@armada/sdk / wallet / WalletFactory
Interface: WalletFactory
Defined in: src/wallet/index.ts:109
Enrollment factory (SPEC §4.2). rootSecret is the canonical identity; no mnemonic intermediary.
Methods
fromRootSecret()
fromRootSecret(
rootSecret,opts):Promise<Wallet>
Defined in: src/wallet/index.ts:116
Load a wallet from its rootSecret. Spend-capable by DEFAULT (SPEC §4.2.1: LocalSigner is the default) — the SDK derives a LocalSigner internally, since the rootSecret already grants spend power. Pass signer to attach a different signer (e.g. ExternalSigner), or viewOnly: true for a view-only wallet from a rootSecret (no spend key held; spend-path calls throw NoSpendCapabilityError).
Parameters
rootSecret
Uint8Array
opts
creationBlock
number
signer?
viewOnly?
boolean
Returns
Promise<Wallet>
ephemeralFromSeed()
ephemeralFromSeed(
seed):Promise<Wallet>
Defined in: src/wallet/index.ts:121
Ephemeral, in-memory only, never persisted — for claimable payments (SPEC §6).
Parameters
seed
Uint8Array
Returns
Promise<Wallet>
fromMnemonic()
fromMnemonic(
mnemonic,opts):Promise<Wallet>
Defined in: src/wallet/index.ts:127
BIP-39 compat for the relayer's mnemonic-provisioned wallet. Validates the mnemonic checksum; spend-capable by default (auto-derives a LocalSigner), with signer/viewOnly overrides and an optional derivationIndex (default 0).
Parameters
mnemonic
string
opts
creationBlock
number
signer?
viewOnly?
boolean
derivationIndex?
number
Returns
Promise<Wallet>
viewOnlyFromViewingKey()
viewOnlyFromViewingKey(
shareableViewingKey,opts):Promise<Wallet>
Defined in: src/wallet/index.ts:132
View-only: full scan/balance/disclosure, no spend (spend-path calls throw NoSpendCapabilityError).
Parameters
shareableViewingKey
string
opts
creationBlock
number
Returns
Promise<Wallet>