Core
dWallet
Register and manage multi-chain dWallet references for co-signing.
Pre-alpha — not production ready
aura-sdk targets Solana devnet only. APIs may change without notice. Do not use for real funds until a stable release and audit are published.
register_dwallet
Register a dWallet reference with the treasury. Required before any cross-chain execution via Ika co-signing.
use aura_sdk::types::RegisterDwalletArgs;
client.register_dwallet(&owner, treasury, RegisterDwalletArgs {
chain: 2, // Ethereum
dwallet_id: "dwallet-abc123".to_string(),
address: "0xdeadbeef...".to_string(),
balance_usd: 5_000,
dwallet_account: Some(dwallet_account_pda),
authorized_user_pubkey: None,
message_metadata_digest: None,
public_key_hex: None,
timestamp: now,
})?;Arguments
pub struct RegisterDwalletArgs {
pub chain: u8,
pub dwallet_id: String,
pub address: String,
pub balance_usd: u64,
pub dwallet_account: Option<Pubkey>,
pub authorized_user_pubkey: Option<Pubkey>,
pub message_metadata_digest: Option<String>,
pub public_key_hex: Option<String>,
pub timestamp: i64,
}Supported Chains
| ID | Chain |
|---|---|
| 0 | Solana |
| 1 | Bitcoin |
| 2 | Ethereum |
| 3 | Polygon |
| 4 | Arbitrum |
| 5 | Optimism |
refresh_dwallet_balance
Update the cached balance evidence for a registered dWallet via an oracle account.
// Build only
let instruction = client.refresh_dwallet_balance_instruction(accounts, chain_code, now);
// Build + send
client.refresh_dwallet_balance(&payer, accounts, chain_code, now)?;client.refresh_dwallet_balance(
&payer,
aura_core::accounts::RefreshDwalletBalance {
treasury,
balance_oracle: balance_oracle_pda,
},
2, // chain_code: Ethereum
now,
)?;