@lelantos-org/sdk / index / WalletState
Interface: WalletState
Defined in: @lelantos-org/sdk/dist/wallet/types/sync.d.ts:104
A snapshot of what the wallet knows, for rendering without polling.
Immutable. state() returns the same object until something changes, so it can back React's useSyncExternalStore(wallet.subscribe, wallet.state) directly.
Properties
balances
readonly balances: ReadonlyMap<AssetId, CircuitAmount>;Defined in: @lelantos-org/sdk/dist/wallet/types/sync.d.ts:123
Unspent total per asset held: Balance.total, without the async split.
disposed
readonly disposed: boolean;Defined in: @lelantos-org/sdk/dist/wallet/types/sync.d.ts:126
notes
readonly notes: object;Defined in: @lelantos-org/sdk/dist/wallet/types/sync.d.ts:115
count
readonly count: number;Notes in the store, spent included.
pendingSpend
readonly pendingSpend: number;Reserved after a submit with an unknown outcome.
unspent
readonly unspent: number;ops
readonly ops: readonly OpActivity[];Defined in: @lelantos-org/sdk/dist/wallet/types/sync.d.ts:125
Operations in flight, oldest first.
sync
readonly sync: object;Defined in: @lelantos-org/sdk/dist/wallet/types/sync.d.ts:107
lastError
readonly lastError:
| WalletError<
| "INTERNAL"
| "WALLET_CONFIG"
| "NETWORK_NOT_DEPLOYED"
| "ENVIRONMENT"
| "INVALID_ARGUMENT"
| "NO_EVM_ACCOUNT"
| "UNSUPPORTED_OPERATION"
| "INSUFFICIENT_BALANCE"
| "NOTES_HELD"
| "INSUFFICIENT_COVER"
| "FEE_ASSET_NOT_QUOTED"
| "FEE_ABOVE_LIMIT"
| "DEADLINE_PASSED"
| "QUOTE_STALE"
| "USER_REJECTED"
| "RELAYER_REJECTED"
| "SPEND_OUTCOME_UNKNOWN"
| "RELAYER_TIMEOUT"
| "RELAYER_FAILED"
| "FMD_TIMEOUT"
| "FMD_FAILED"
| "QUOTER_TIMEOUT"
| "QUOTER_FAILED"
| "WIRE_FORMAT"
| "RPC_FAILED"
| "TX_REVERTED"
| "TX_MINING"
| "TREE_OUT_OF_SYNC"
| "PROVER_FAILED"
| "PROVER_UNAVAILABLE"
| "PROVER_ARTIFACTS_MISSING"
| "PROVER_ARTIFACTS_FAILED"
| "WORKER_TIMEOUT"
| "WORKER_CRASHED"
| "WORKER_FAILED"
| "X402_PAYMENT">
| undefined;The last sync's failure, cleared by the next success.
lastReport
readonly lastReport: SyncReport | undefined;status
readonly status: "idle" | "syncing";syncedAt
readonly syncedAt: Date | undefined;Last successful sync.
version
readonly version: number;Defined in: @lelantos-org/sdk/dist/wallet/types/sync.d.ts:106
Increments on every emitted change.