Skip to main content
Non-trusty flow for depositing funds to the SparkWallet. Construct a Bitcoin transaction that pays to one of the wallet’s unused deposit addresses, then call advancedDeposit() with the raw transaction hex.
advancedDeposit() does not broadcast the transaction. You must sign and broadcast the transaction yourself.

Method Signature

async advancedDeposit(txHex: string): Promise<TreeNode[]>

Parameters

txHex
string
required
The hex string of the transaction to deposit

Returns

nodes
TreeNode[]
required
The nodes resulting from the deposit

Example

const nodes = await wallet.advancedDeposit("transaction-hex-string");
console.log("Deposit nodes:", nodes);