Skip to main content
Transfers tokens to another SparkWallet.

Method Signature

Parameters

tokenIdentifier
Bech32mTokenIdentifier
required
The Bech32m token identifier (format: btkn1... for mainnet, btknrt1... for regtest)
tokenAmount
bigint
required
The amount of tokens to transfer
receiverSparkAddress
string
required
The recipient’s Spark Address
outputSelectionStrategy
"SMALL_FIRST" | "LARGE_FIRST"
Strategy for selecting outputs: "SMALL_FIRST" or "LARGE_FIRST" (defaults to "SMALL_FIRST")
selectedOutputs
OutputWithPreviousTransactionData[]
Specific outputs to use for the transfer (overrides selection strategy)

Returns

txId
string
required
The transaction ID of the token transfer

Example