Transfers tokens to another Spark Address via the IssuerSparkWallet.
Method Signature
async function transferTokens({
tokenIdentifier: string,
tokenAmount: bigint,
receiverSparkAddress: string,
selectedOutputs?: OutputWithPreviousTransactionData[]
}): Promise<string>;
Parameters
Bech32m token identifier (eg: btkn1…) of the token to transfer
Amount of tokens to transfer
Recipient’s Spark Address
selectedOutputs
OutputWithPreviousTransactionData[]
Specific outputs to use for transfer
Returns
Example
const txId = await issuerWallet.transferTokens({
tokenIdentifier: "btkn1...",
tokenAmount: 1000n,
receiverSparkAddress: "spark:recipient-address"
});
console.log("Tokens transferred:", txId);