Skip to main content
Claims a Bitcoin deposit made to a single-use deposit address for the SparkWallet.

Method Signature

async claimDeposit(txId: string): Promise<WalletLeaf[]>

Parameters

txId
string
required
The transaction ID of the Bitcoin deposit

Returns

leaves
WalletLeaf[]
required
The wallet leaves resulting from the claim operation

Example

const leaves = await wallet.claimDeposit("transaction-hash-here");
console.log("Deposit claimed, leaves:", leaves);