WalletApi class
Wallet CRUD, backup, restore, reshare, and multi-create operations.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
backup(
String walletId) → Future< List< WalletBackupEntry> > -
Get a wallet backup. Returns one entry per wallet; each entry contains
a suggested filename and base64url-encoded encrypted payload. Pass the
entries (as a list of
{filename, data}maps) back to restore to restore a wallet. -
create(
{required String name, required List< KeyDescription> keys, String? curve}) → Stream<ProgressOr< Wallet> > - Create a new wallet. Yields progress updates, then the created wallet.
-
createAgentWallet(
{required AtOnline api, required String name, required String agentSpotId, required Map< String, dynamic> policy}) → Future<CreateAgentWalletResult> - Provision an agent-controlled wallet end-to-end: opens the server-side WalletSign session + skill policy, then drives the 3-party EdDSA keygen ceremony with the agent and wdrone, and returns the new wallet id + Solana address.
-
delete(
String id) → Future< void> - Delete a wallet and all associated data.
-
exportToDevice(
String walletId) → Future< DeviceTransferSession> -
Open a device-to-device transfer session for
walletId. The old device (where the wallet lives) calls this, paints the returned DeviceTransferSession.pairingCode as a QR code, and the user scans it on the new device which then calls importFromDevice. -
exportToDeviceCancel(
String sid) → Future< void> -
Cancel a pending device-transfer session opened by
exportToDevice. Safe to call at any point — the new device
will receive a
declinederror on its waiting importFromDevice call. Idempotent. -
exportToDeviceConfirm(
{required String sid, }) → Future< void> -
Approve a pending device transfer started by exportToDevice.
Pass the
sidfrom the DeviceTransferSession you opened and the device shares you just read from your platform keystore (one DeviceShareEntry per StoreKey-typed share on the wallet). -
get(
String id) → Future< Wallet> - Get a wallet by ID.
-
importFromDevice(
String pairingCode) → Future< DeviceTransferImportResult> -
Drive the new device's side of a device-to-device transfer.
pairingCodeis the opaque string scanned from the QR painted by the old device's exportToDevice call. This method blocks for up to ~2 minutes: it sends the pair request to the old device over Spot, the old device prompts its user to confirm, and on approval ships back the encrypted payload. -
importMnemonic(
{required String mnemonic, String passphrase = '', required String curve, required String name, required List< KeyDescription> keys}) → Future<Wallet> - Import a BIP39 mnemonic phrase as a 1-of-1 wallet.
-
importPrivateKey(
{required String privateKey, required String curve, required String name, required List< KeyDescription> keys}) → Future<Wallet> - Import an existing private key (hex or WIF) as a 1-of-1 wallet.
-
initiateKeygen(
{required String remoteKey, required List< Map< peers, required String wdroneSpotId, required String name, String curve = 'ed25519', String? meMoniker}) → Future<String, dynamic> >Map< String, dynamic> > - Run the mobile-led ClawdWallet keygen ceremony (Stage 1).
-
joinSign(
{required String walletId, required String remoteKey, required List< Map< peers, required String digest, String curve = 'ed25519', String? meMoniker}) → Future<String, dynamic> >Map< String, dynamic> > - Join a ClawdWallet sign ceremony (Stage 1).
-
list(
) → Future< List< Wallet> > - List all wallets.
-
multiCreate(
{required String name, required List< KeyDescription> keys}) → Stream<ProgressOr< Map< >String, Wallet> > - Create both secp256k1 and ed25519 wallets in one call.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
probeActivity(
String walletId, {required List< KeyDescription> keys, List<String> ? networks, int timeoutSeconds = 10}) → Future<List< ProbeActivityRow> > -
Probe on-chain activity for every BIP44 standard derivation path
under a mnemonic-backed wallet. Returns one row per
(chain, BIP variant) candidate with the derived address and a
hasActivityflag; the host UI uses the result to decide which chains to migrate to MPC (see promoteMnemonic) or to surface to the user for manual selection when nothing has activity yet. -
promote(
String walletId, {required List< KeyDescription> oldKeys, required List<KeyDescription> newKeys, required int threshold}) → Future<Wallet> -
Promote an imported 1-of-1 wallet (RawKey / Mnemonic) to a normal
N-of-T TSS wallet via tss-lib's resharing protocol. The master
pubkey and chaincode are preserved (the wallet's address does NOT
change), only the storage of the signing key changes — the
imported share is replaced by
newKeyssplit into TSS shares with athreshold-of-N reconstruction policy. -
promoteMnemonic(
String walletId, {required List< KeyDescription> oldKeys, required List<ChainMigration> chains, required List<KeyDescription> newKeys, required int threshold}) → Future<List< Wallet> > -
Migrate a mnemonic-backed wallet into N fresh MPC wallets, one
per chain in
chains. Each migration derives the mnemonic at the chain's BIP32 / SLIP-0010 path and reshares the resulting privkey into a new TSS committee; the source mnemonic wallet is NOT modified, so the caller keeps it until every migrated wallet is validated. -
repairRemoteKey(
String walletId, {required String remoteKey}) → Future< Wallet> - Repair the wallet's server-side RemoteKey (2FA) share from the local backup copy.
- Reshare wallet keys. Yields progress updates, then the regenerated wallet with its new key shares.
-
restore(
List< Map< files) → Future<String, String> >Map< String, dynamic> > - Restore wallets from backup files.
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
String id, {required String name}) → Future< Wallet> - Update a wallet's name.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited