> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spark.money/llms.txt
> Use this file to discover all available pages before exploring further.

# advancedDeposit

> Deposit funds to Spark using a raw Bitcoin transaction.

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.

<Note>
  `advancedDeposit()` does not broadcast the transaction. You must sign and broadcast the transaction yourself.
</Note>

## Method Signature

```typescript theme={null}
async advancedDeposit(txHex: string): Promise<TreeNode[]>
```

## Parameters

<ResponseField name="txHex" type="string" required>
  The hex string of the transaction to deposit
</ResponseField>

## Returns

<ResponseField name="nodes" type="TreeNode[]" required>
  The nodes resulting from the deposit
</ResponseField>

## Example

```typescript theme={null}
const nodes = await wallet.advancedDeposit("transaction-hex-string");
console.log("Deposit nodes:", nodes);
```
