KeyStore class final

A custodial store that seals signing secrets at rest. Create one with AviaryNodes.createKeyStore or AviaryNodes.loadKeyStore.

Implemented types
Available extensions

Properties

hashCode → int
The hash code for this object.
no setterinherited
isReleased → bool
Whether the native handle has already been released.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
unlocked → bool
Whether secrets can currently be revealed.
no setter

Methods

addAccount(Uint8List publicKey, Uint8List secret) → Uint8List
Seals an account's secret and returns its 32 byte address.
addresses() → List<Uint8List>

Available on KeyStore, provided by the KeyStoreSigning extension

Every stored address.
dispose() → void
Releases the native store.
has(Uint8List address) → bool

Available on KeyStore, provided by the KeyStoreSigning extension

Whether the store holds address.
lock() → void

Available on KeyStore, provided by the KeyStoreSigning extension

Forgets the master key until the next KeyStore.unlock.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
publicKey(Uint8List address) → Uint8List

Available on KeyStore, provided by the KeyStoreSigning extension

The stored public key for address. Throws when unknown.
reveal(Uint8List address) → Uint8List
Decrypts the sealed secret for address. Requires unlocked.
serialise() → Uint8List
The persistable encrypted blob.
signRecord({required int chainId, required Uint8List from, required int nonce, required Uint8List key, required RecordOp op, required Uint8List value}) → Uint8List

Available on KeyStore, provided by the KeyStoreSigning extension

A signed, encoded record write by the stored account at from (record state model). The scheme follows the stored key, so a hybrid key signs with Ed25519 + ML-DSA-65. Throws when locked or from is unknown.
signTransfer({required int chainId, required Uint8List from, required Uint8List to, required int amount, required int nonce, int fee = 0}) → Uint8List

Available on KeyStore, provided by the KeyStoreSigning extension

A signed, encoded transfer of amount from the stored account at from to to. The scheme follows the stored key (Ed25519 or hybrid); a zero fee gives the plain version 1 envelope. Throws when the store is locked or from is unknown.
toString() → String
A string representation of this object.
inherited
unlock(String passphrase) → void
Recovers the master key from passphrase. Throws when it is wrong.

Operators

operator ==(Object other) → bool
The equality operator.
inherited