Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Account 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.

All account types in the Ika dWallet system. Each account starts with a 2-byte prefix: discriminator(1) | version(1), followed by the account data.

dWallet Program Accounts

Account Discriminators

DiscriminatorAccount Type
1DWalletCoordinator
3NetworkEncryptionKey
14MessageApproval

DWalletCoordinator (disc 1)

Program-wide state. PDA seeds: ["dwallet_coordinator"].

OffsetFieldSizeDescription
0discriminator11
1version11
2(fields)114Coordinator state

Total: 116 bytes


NetworkEncryptionKey (disc 3)

The network encryption public key used for DKG. PDA seeds: ["network_encryption_key", noa_pubkey].

OffsetFieldSizeDescription
0discriminator13
1version11
2(fields)162NEK data

Total: 164 bytes


DWallet

A distributed signing key. PDA seeds: ["dwallet", curve_byte, public_key].

OffsetFieldSizeDescription
0discriminator1Account type
1version11
2authority32Who can approve messages (user or CPI PDA)
34public_key65dWallet public key (padded)
99public_key_len1Actual key length (32 or 33)
100curve1Curve ID (0=Secp256k1, 1=Secp256r1, 2=Curve25519, 3=Ristretto)
101is_imported1Whether the key was imported

MessageApproval (disc 14)

A signing request. PDA seeds: ["message_approval", dwallet, message_hash].

OffsetFieldSizeDescription
0discriminator114
1version11
2dwallet32dWallet account pubkey
34message_hash32Hash of message to sign
66user_pubkey32User public key
98signature_scheme1Ed25519(0), Secp256k1(1), Secp256r1(2)
99caller_program32Program that approved this
131cpi_authority32CPI authority PDA that signed
139status1Pending(0) or Signed(1)
140signature_len2Signature byte count (LE u16)
142signature128Signature bytes (padded)

Total: 287 bytes (2 + 285)

Status values:

  • 0 = PENDING – awaiting signature from the network
  • 1 = SIGNED – signature is available

Ika System Accounts (SDK Types)

These accounts are part of the Ika System program, readable via ika-solana-sdk-types.

SystemState (disc 1)

PDA seeds: ["ika_system_state"]. Total: 365 bytes.

OffsetFieldSizeDescription
0discriminator11
1version11
2epoch8Current epoch (LE u64)
34authority32System authority

Validator (disc 2)

PDA seeds: ["validator", identity_pubkey]. Total: 973 bytes.

OffsetFieldSizeDescription
0discriminator12
1version11
2identity32Validator identity pubkey
98state1PreActive(0), Active(1), Withdrawing(2)
159ika_balance8IKA token balance (LE u64)

StakeAccount (disc 3)

PDA seeds: ["stake_account", stake_id_le_bytes]. Total: 115 bytes.

OffsetFieldSizeDescription
0discriminator13
1version11
2owner32Stake owner pubkey
74principal8Staked amount (LE u64)
98state1Active(0), Withdrawing(1)

ValidatorList (disc 4)

PDA seeds: ["validator_list"].

OffsetFieldSizeDescription
0discriminator14
1version11
2validator_count4Total validators (LE u32)
6active_count4Active validators (LE u32)

Voting Example Accounts

Proposal (disc 1)

PDA seeds: ["proposal", proposal_id]. Total: 195 bytes.

OffsetFieldSizeDescription
0discriminator11
1version11
2proposal_id32Unique identifier
34dwallet32dWallet pubkey
66message_hash32Message hash to sign
98user_pubkey32User public key
130signature_scheme1Signature scheme
131creator32Creator pubkey
163yes_votes4Yes count (LE u32)
167no_votes4No count (LE u32)
171quorum4Required yes votes (LE u32)
175status1Open(0), Approved(1)
176msg_approval_bump1MessageApproval PDA bump
177bump1Proposal PDA bump
178_reserved16Reserved

VoteRecord (disc 2)

PDA seeds: ["vote", proposal_id, voter]. Total: 69 bytes.

OffsetFieldSizeDescription
0discriminator12
1version11
2voter32Voter pubkey
34proposal_id32Proposal identifier
66vote1Yes(1) or No(0)
67bump1VoteRecord PDA bump

Account Type Summary

AccountDiscTypeSizePDA SeedsProgram
DWalletCoordinator1PDA116["dwallet_coordinator"]dWallet
NetworkEncryptionKey3PDA164["network_encryption_key", noa]dWallet
MessageApproval14PDA287["message_approval", dwallet, hash]dWallet
SystemState1PDA365["ika_system_state"]Ika System
Validator2PDA973["validator", identity]Ika System
StakeAccount3PDA115["stake_account", stake_id]Ika System
ValidatorList4PDA18+["validator_list"]Ika System
Proposal1PDA195["proposal", id]Voting example
VoteRecord2PDA69["vote", id, voter]Voting example