Skip to content

@armada/sdk / index / ArmadaSdk

Interface: ArmadaSdk ​

Defined in: src/index.ts:146

Per-instance SDK handle — no singletons, no module-level mutable state (kills the snarkjsInitialized bug class). sync, tx, ops, and preflight are surfaced as their modules land in Phase 2+.

Properties ​

wallet ​

readonly wallet: WalletFactory

Defined in: src/index.ts:147


sync ​

readonly sync: object

Defined in: src/index.ts:149

The instance's sync state (SPEC §4.4), shared by its wallets.

status() ​

status(): Promise<{ syncedThrough: number; syncing: boolean; }>

The block the instance's verified trees are synced through, and whether a sync is running. Cheap: no RPC. Each wallet's own position is wallet.syncStatus().

Returns ​

Promise<{ syncedThrough: number; syncing: boolean; }>

Methods ​

close() ​

close(): Promise<void>

Defined in: src/index.ts:161

Shut the instance down (SPEC §4.1): stop every watcher, cancel in-flight work (a running sync or proof rejects with InstanceClosedError; the sync saves nothing), dispose every wallet, and release the provider, prover and storage. Every call on the instance or its wallets afterwards throws InstanceClosedError; calling it again does nothing.

Returns ​

Promise<void>