Skip to main content
Refunds a deposit made to a static deposit address back to a specified Bitcoin address for the SparkWallet.

Method Signature

Parameters

string
required
The transaction ID of the original deposit
number
The index of the output (auto-detected if not provided)
string
required
The Bitcoin address to send the refund to
number
Deprecated. Total fee in sats for the refund transaction. Use satsPerVbyteFee instead.
number
The fee rate in sats per vbyte (must be less than 150)

Returns

string
required
The refund transaction as a hex string that needs to be broadcast

Example