Skip to content

@armada/sdk / index / PoolConfig

Interface: PoolConfig

Defined in: src/index.ts:8

Properties

chainId

readonly chainId: number

Defined in: src/index.ts:9


poolAddress

readonly poolAddress: `0x${string}`

Defined in: src/index.ts:10


deployBlock

readonly deployBlock: number

Defined in: src/index.ts:11


usdcAddress

readonly usdcAddress: `0x${string}`

Defined in: src/index.ts:12


additionalTokens?

readonly optional additionalTokens?: readonly `0x${string}`[]

Defined in: src/index.ts:18

Deprecated

No longer required. ERC20 token hashes are self-describing (the hash is the padded address), so the SDK scans, reports, and reconstructs history for ANY pool ERC20 without pre-registration (issue #90). Retained for backward compatibility; currently ignored.


wrappers?

readonly optional wrappers?: object

Defined in: src/index.ts:19

gaslessShield?

optional gaslessShield?: `0x${string}`

yieldAdapter?

optional yieldAdapter?: `0x${string}`


cctp?

readonly optional cctp?: object

Defined in: src/index.ts:20

domain

domain: number

messenger

messenger: `0x${string}`


finalityThreshold?

readonly optional finalityThreshold?: number

Defined in: src/index.ts:27

Confirmations a commitment needs before it counts as spendable rather than pending in balances() (default 0 = count immediately). Set it to the pool's finality depth to give recent shields/transfers a reorg buffer in the balance view. (Spend-path gating and a checkpoint reorg margin are tracked separately — they need reorg-aware tree truncation.)


confirmationDepth?

readonly optional confirmationDepth?: number

Defined in: src/index.ts:35

Blocks to stay behind chain head when scanning (SPEC §4.4 reorg safety, default 0 = scan to head). The SDK only persists commitments up to head − confirmationDepth, so a reorg of that depth or shallower can't remove an already-scanned leaf (the append-only tree can't un-append it). Set it to a small value on a fast-finality hub (a few blocks) or the finality depth for zero reorg exposure; the cost is that notes in the last confirmationDepth blocks aren't visible/spendable until they're deeper.


supportedShapes?

readonly optional supportedShapes?: readonly string[]

Defined in: src/index.ts:41

Circuit shapes (<nullifiers>x<commitments>, e.g. "2x3") the deployment has artifacts for. When set, planTransfer rejects an unprovable shape up front with UnsupportedCircuitShapeError instead of failing late at artifact resolution / on-chain. Omit to skip the check.


pendingSpendTtlMs?

readonly optional pendingSpendTtlMs?: number

Defined in: src/index.ts:50

How long (ms) an optimistic in-flight spend hold survives before it's auto-released (issue #55). When a spend's transaction is submitted, wallet.markSpendPending holds its input notes out of selection so a rapid follow-up spend can't reselect them before the on-chain Nullified event is scanned. A confirmed spend clears its hold automatically; this TTL is the safety net so a dropped/never-mined (or app-crash-before-clearSpendPending) submission can't lock its inputs forever, including across a reload. Set it comfortably above the submit→confirm→scan latency (default 300000 = 5 min).


autoSyncIntervalMs?

readonly optional autoSyncIntervalMs?: number

Defined in: src/index.ts:56

Default interval (ms) for wallet.watch() auto-sync (issue #59). watch() runs sync() on this cadence so a wallet stays current without the consumer writing a poll loop; a per-call intervalMs overrides it. Default 10000 (10s), matching the stock railgun engine's polling cadence.