Instruction Reference
Pre-Alpha Disclaimer: This is an early pre-alpha release for exploring the SDK and starting development only. There is no real MPC signing — all signatures are generated by a single mock signer, not a distributed network. Do not submit any real transactions for signing or rely on any security guarantees. The dWallet keys, trust model, and signing protocol are not final; do not rely on any key material until mainnet. All interfaces, APIs, and data formats are subject to change without notice. The Solana program and all on-chain data will be wiped periodically and everything will be deleted when we transition to Ika Alpha 1. This software is provided “as is” without warranty of any kind; use is entirely at your own risk and dWallet Labs assumes no liability for any damages arising from its use.
Instructions in the Ika dWallet Solana program. The first byte of instruction data is the discriminator.
Instruction Groups
| Group | Disc Range | Instructions |
|---|---|---|
| Message | 8 | approve_message |
| Ownership | 24 | transfer_ownership |
| DKG | 31 | commit_dwallet |
| Signing | 42–43 | transfer_future_sign, commit_signature |
Message
approve_message (disc 8)
Create a MessageApproval PDA requesting a signature from the Ika network. Supports both direct signer and CPI callers.
Accounts (CPI path):
| # | Account | W | S | Description |
|---|---|---|---|---|
| 0 | message_approval | yes | no | MessageApproval PDA (must be empty) |
| 1 | dwallet | no | no | dWallet account |
| 2 | caller_program | no | no | Calling program (executable) |
| 3 | cpi_authority | no | yes | CPI authority PDA (signed via invoke_signed) |
| 4 | payer | yes | yes | Rent payer |
| 5 | system_program | no | no | System program |
Data (67 bytes):
| Offset | Field | Size |
|---|---|---|
| 0 | discriminator | 1 |
| 1 | bump | 1 |
| 2 | message_hash | 32 |
| 34 | user_pubkey | 32 |
| 66 | signature_scheme | 1 |
The dWallet program verifies:
caller_programis executablecpi_authoritymatchesPDA(["__ika_cpi_authority"], caller_program)dwallet.authority == cpi_authority
Ownership
transfer_ownership (disc 24)
Transfer dWallet authority to a new pubkey.
Accounts (signer path):
| # | Account | W | S | Description |
|---|---|---|---|---|
| 0 | current_authority | no | yes | Current dWallet authority (signer) |
| 1 | dwallet | yes | no | dWallet account |
Accounts (CPI path):
| # | Account | W | S | Description |
|---|---|---|---|---|
| 0 | caller_program | no | no | Calling program (executable) |
| 1 | cpi_authority | no | yes | CPI authority PDA (signer) |
| 2 | dwallet | yes | no | dWallet account |
Data (33 bytes):
| Offset | Field | Size |
|---|---|---|
| 0 | discriminator | 1 |
| 1 | new_authority | 32 |
DKG
commit_dwallet (disc 31)
NOA-only: create a dWallet account after DKG completes.
Accounts:
| # | Account | W | S | Description |
|---|---|---|---|---|
| 0 | coordinator | no | no | DWalletCoordinator PDA |
| 1 | nek | no | no | NetworkEncryptionKey PDA |
| 2 | noa | no | yes | NOA signer |
| 3 | dwallet | yes | no | DWallet PDA (must be empty) |
| 4 | authority | no | no | Initial dWallet authority |
| 5 | payer | yes | yes | Rent payer |
| 6 | system_program | no | no | System program |
Data:
| Offset | Field | Size |
|---|---|---|
| 0 | discriminator | 1 |
| 1 | curve | 1 |
| 2 | is_imported | 1 |
| 3 | public_key_len | 1 |
| 4 | public_key | 65 |
| 69 | bump | 1 |
| 70 | public_output_len | 2 |
| 72 | public_output | 256 |
| 328 | noa_signature | 64 |
Signing
transfer_future_sign (disc 42)
Transfer the completion authority of a PartialUserSignature.
Accounts (CPI path):
| # | Account | W | S | Description |
|---|---|---|---|---|
| 0 | partial_user_sig | yes | no | PartialUserSignature account |
| 1 | caller_program | no | no | Calling program (executable) |
| 2 | cpi_authority | no | yes | CPI authority PDA (signer) |
Data (33 bytes):
| Offset | Field | Size |
|---|---|---|
| 0 | discriminator | 1 |
| 1 | new_completion_authority | 32 |
commit_signature (disc 43)
NOA-only: write the signature into a MessageApproval account.
Accounts:
| # | Account | W | S | Description |
|---|---|---|---|---|
| 0 | message_approval | yes | no | MessageApproval PDA |
| 1 | nek | no | no | NetworkEncryptionKey PDA |
| 2 | noa | no | yes | NOA signer |
Data:
| Offset | Field | Size |
|---|---|---|
| 0 | discriminator | 1 |
| 1 | signature_len | 2 |
| 3 | signature | 128 |
Voting Example Instructions
These are defined by the example voting program, not the dWallet program:
create_proposal (disc 0)
Create a voting proposal.
Accounts:
| # | Account | W | S | Description |
|---|---|---|---|---|
| 0 | proposal | yes | no | Proposal PDA (["proposal", proposal_id]) |
| 1 | dwallet | no | no | dWallet account |
| 2 | creator | no | yes | Proposal creator |
| 3 | payer | yes | yes | Rent payer |
| 4 | system_program | no | no | System program |
Data (103 bytes): proposal_id(32) | message_hash(32) | user_pubkey(32) | signature_scheme(1) | quorum(4) | message_approval_bump(1) | bump(1)
cast_vote (disc 1)
Cast a vote. Triggers approve_message CPI when quorum is reached.
Accounts (base, 5):
| # | Account | W | S | Description |
|---|---|---|---|---|
| 0 | proposal | yes | no | Proposal PDA |
| 1 | vote_record | yes | no | VoteRecord PDA (["vote", proposal_id, voter]) |
| 2 | voter | no | yes | Voter |
| 3 | payer | yes | yes | Rent payer |
| 4 | system_program | no | no | System program |
Additional accounts when quorum reached (5):
| # | Account | W | S | Description |
|---|---|---|---|---|
| 5 | message_approval | yes | no | MessageApproval PDA |
| 6 | dwallet | no | no | dWallet account |
| 7 | caller_program | no | no | Voting program |
| 8 | cpi_authority | no | no | CPI authority PDA |
| 9 | dwallet_program | no | no | dWallet program |
Data (35 bytes): proposal_id(32) | vote(1) | vote_record_bump(1) | cpi_authority_bump(1)