ReadonlyactivityActivity resolvers consumed by getActivityHistory.
ReadonlycontractOptional ReadonlydelegateReadonlydustOptionalexitOpt-in exit-data capture settings; see StorageConfig.exitDataCapture.
ReadonlyidentityReadonly identity associated with the wallet.
ReadonlyindexerOptionalintentOpt-in intent-lifecycle repository. Assigned by the create()
factories from config.storage.intentRepository; undefined ⇒ all
intent-persistence code paths are no-ops (default behaviour unchanged).
ReadonlynetworkReadonlyonchainOptionalvirtualExperimental / inert. Opt-in virtual-tx / exit-branch repository,
exposed so callers can pass it to Unroll.Session.create as a
best-effort raw-tx cache. Assigned by create() from
config.storage.virtualTxRepository. Normal sync never writes it
(ContractManager isn't given it); undefined ⇒ no-op.
ReadonlywalletReadonlywalletThe wallet's current active server signer (x-only, 32 bytes). Read-only from the outside; mutated only via Wallet.setArkServerPublicKeyForRotation during mid-session server-signer rotation (plan §4). Single-valued for wallets that never span a rotation.
Readonly asset manager bound to this wallet instance.
The wallet's current boarding tapscript (the on-chain onboarding
target). Read-only from the outside; mutated only via
Wallet.setBoardingTapscriptForRotation when a fresh boarding
address is explicitly allocated. Single-valued for static / auto
wallets.
Get the pkScript hex for the wallet's primary offchain address. For the full wallet-owned script set registered in ContractManager, use getWalletScripts().
Currently-active receive tapscript. Read-only from the outside; mutated only via Wallet.setOffchainTapscriptForRotation by WalletReceiveRotator.rotate.
Async-dispose hook that forwards to dispose().
Wipe all locally persisted wallet data (VTXOs, UTXOs, history, sync cursor, contracts). Create a fresh wallet instance afterward.
Clear the global VTXO sync cursor, forcing a full re-bootstrap on next sync. Useful for recovery after indexer reprocessing or debugging.
Dispose wallet-owned managers and release background resources.
Fetch Arkade transaction ids that are still pending final settlement.
Wallet history grouped by registered activity resolvers. With no resolver match, rows bucket by transaction key so send/change pairs stay together.
Returns the wallet's Arkade address.
Server info for the Arkade server this wallet is connected to, resolved exactly as construction resolves it: live wins, a retryable failure falls back to the snapshot persisted at boot, a terminal one propagates.
Live rather than the pinned boot snapshot because the fields callers
come here for — signerPubkey, checkpointTapscript, fees — are the
ones a mid-session rotation moves, and a covenant built against a
superseded signer is unspendable.
One rotation caveat: reading does NOT re-pin the wallet —
arkServerPublicKey, dustAmount and the tapscripts move
only through handleServerInfoChanged/rotateServerSigner — so inside
a rotation window this can report epoch N+1 while the wallet still
spends on N. The window closes on its own: a read that observes a moved
digest makes the provider emit onServerInfoChanged, which is what
drives that rotation. A caller about to bind the answer into a covenant
passes { requireLive: true } and fails closed instead of receiving
the boot snapshot.
Optionalopts: GetArkadeInfoOptionsThe Arkade server's info
Chain reads against this wallet's server for scripts it does not own.
Binds the wallet's own indexerProvider — which may be an Expo or
injected one that a caller's hand-built RestIndexerProvider would
silently bypass. getVtxos goes through
getNormalizedVtxos, which is what makes every VTXO leaving the
seam carry its canonical facts.
A bound object rather than the provider itself, so an IReadonlyWallet
holder gets getVtxos/getVirtualTxs and nothing else at runtime.
(indexerProvider is still public on the concrete classes, unlike
arkProvider, so this narrows the interface rather than the field.)
Return the wallet's combined onchain and offchain balances.
Returns the onchain boarding address used to move funds into Arkade.
The on-chain (P2TR) addresses of every boarding tapscript this wallet uses — the current address plus any historical rotated boarding addresses. The aggregating boarding readers (history, notifications) fan out over this set so deposits at previous boarding addresses are still surfaced (plan §6-IV); getBoardingAddress stays single-valued.
Build a transaction history view across the wallet's boarding addresses (current + historical rotated; plan §6-IV.1).
Fetch and cache onchain inputs (UTXOs) received at the wallet's boarding addresses — the current address plus any historical rotated boarding addresses that still hold unspent UTXOs (plan §6-III.1). Each UTXO is annotated with the tapscript of the address it actually sits on, so the spending path forfeits / exits it with the correct per-index leaves.
Current-signer only: a flatten of getBoardingUtxosForSigners over
the wallet's current signer, so the two paths cannot drift. Old-signer
boarding recovery goes through the deprecated-signer migration API
instead (it would otherwise pull EXPIRED-signer inputs into a plain
settle() that the server must reject).
Fetch and cache onchain inputs (UTXOs) received at the boarding addresses
of the given signer set, grouped per boarding address so the caller keeps
the address↔signer association that ExtendedCoin cannot carry
(it retains only the encoded leaves/tapTree the spend needs, not the
DefaultVtxo.Script and its serverPubKey/CSV delay).
Per group it does exactly what getBoardingUtxos does per tapscript:
getCoins → extendCoinWithTapscript → saveUtxos. Offline-first:
it does not call getInfo(); the caller supplies the allowed signer set,
so the only network calls are the per-address getCoins.
x-only-hex server keys whose boarding addresses to fetch (passed through to getBoardingTapscripts).
Get the ContractManager for managing contracts including the wallet's default address.
The ContractManager handles:
const manager = await wallet.getContractManager();
// Create a contract for a Boltz swap
const contract = await manager.createContract({
label: "Boltz Swap",
type: "vhtlc",
params: { ... },
script: swapScript,
address: swapAddress,
});
// Start watching for events (includes wallet's default address)
const stop = await manager.onContractEvent((event) => {
console.log(`${event.type} on ${event.contractScript}`);
});
The contract-manager's current provider-sync health without forcing it
to initialize — reads the already-constructed manager, or reports
online when none exists yet. Unlike getContractManager, this
never triggers a remote sync, so it is safe on a pure diagnostics path
(e.g. the service-worker sync-state message).
Composed provider-connection freshness: the LATEST server-info
resolution (boot, or any later getArkadeInfo read) combined with
the contract-manager's indexer-sync health, if the manager has been
initialized. Reads no live provider state — it never forces a
ContractManager to construct — so it is safe for readonly callers
that only use address/balance APIs.
arkade (cache).indexer (repository).This only describes sync freshness; wallet balances/VTXOs are always read from the repository regardless of this state.
Build a map of scriptHex → VtxoScript for all wallet contracts, so virtual outputs can be extended with the correct tapscript per contract.
The subset of getVtxos that generic spending may select: the same
filter, minus contracts the generic-spending gate closes, minus funds
awaiting recovery under a past-cutoff signer, minus outpoints locked by an
in-flight intent. Every implicit coin selection in the SDK reads this;
getVtxos stays the raw reporting/recovery read.
Both exclusion sets are derived from one contract snapshot, so they cannot disagree about which VTXOs exist.
Optionalfilter: GetVtxosFilterSame flags, same defaults, as getVtxos
Return wallet transaction history derived from Arkade state and boarding transactions.
Return virtual outputs tracked by the wallet.
The raw reporting/recovery read: escrowed, locked and awaiting-recovery
funds are all present. Coin selection must use
getSpendableVtxos instead — feeding this straight into
settle({ inputs }) or send({ selectedVtxos }) bypasses the
generic-spending gate.
Optionalfilter: GetVtxosFilterOptional flags controlling whether recoverable or unrolled VTXOs are included
Get all pkScript hex strings for the wallet's own addresses (both delegate and non-delegate, current and historical).
Debug-log any explicit input generic selection would have excluded, for
each of the three reasons it excludes on. Explicit-input APIs stay ungated
on purpose (naming an outpoint is the intent the gate protects, and it
is how an escrowed deposit is recovered once generic selection stops
covering it), so this only makes the crossing visible — notably
settle({ inputs: await wallet.getVtxos() }), which launders the raw read
into a spend. Never throws into a spend path.
Public so the worker handler and plugins can report their own explicit-input crossings through the same three checks.
Subscribe to onchain and offchain notifications for newly received funds.
The onchain watcher tracks the full boarding-address set (current +
historical rotated). When boarding rotates after subscribing — e.g.
rotate-on-board allocates a fresh address via
getNewBoardingAddress — the watcher automatically re-subscribes
to widen its set, so a deposit to the new address fires a notification
within the same session (no watcher re-init required). The re-subscribe
is driven by onBoardingRotation; static / auto / readonly
wallets never rotate boarding, so it never fires for them.
Callback invoked when matching funds are detected
A function that stops the subscriptions
Outpoints of VTXOs whose deprecated signer is past its cutoff (EXPIRED) and
which have not yet been swept — unspendable until they recover. Offline:
classifies the repo's contracts against the cached signer set (active +
_deprecatedSigners, cutoffs included). Empty fast-path when no
signer is deprecated. Consumed by getBalance (the pendingRecovery
bucket) and by getSpendableVtxos so neither counts nor spends them.
Takes a fresh contractSnapshot, which syncs against the indexer. Callers that already hold a snapshot — or that must not sync at all, like the worker's balance read — pass it to pendingRecoveryOutpointsIn instead.
pendingRecoveryOutpoints over a snapshot the caller already has: pure classification against the cached signer set, no repository or network read of its own.
Refresh the cached deprecated-signer set from a fresh server-info
snapshot. Called by the create() factories at construction, by the
server-info-change handler mid-session, and by the deprecated-signer
migration pass (VtxoManager.migrateDeprecatedSignerVtxos). This set feeds
pendingRecoveryOutpoints, which drops EXPIRED (past-cutoff)
deprecated-signer VTXOs from the wallet's own coin selection. Lenient: a
malformed deprecated entry is skipped, never fatal to wallet creation.
StaticcreateCreate a readonly wallet for querying balances, addresses, and history.
Readonly wallet configuration
A readonly wallet instance
Readonly wallet interface for Bitcoin transactions with Arkade protocol support.
This interface defines the contract that all wallet implementations must follow. It provides methods for address management, balance checking, virtual output operations, and transaction management including sending, settling, and unrolling.
See
IWallet