> ## 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.

# transferTokens

> Send tokens to another Spark address.

Transfers tokens to another `SparkWallet`.

## Method Signature

```typescript theme={null}
async transferTokens({
  tokenIdentifier,
  tokenAmount,
  receiverSparkAddress,
  outputSelectionStrategy,
  selectedOutputs,
}: {
  tokenIdentifier: Bech32mTokenIdentifier;
  tokenAmount: bigint;
  receiverSparkAddress: string;
  outputSelectionStrategy?: "SMALL_FIRST" | "LARGE_FIRST";
  selectedOutputs?: OutputWithPreviousTransactionData[];
}): Promise<string>
```

## Parameters

<ResponseField name="tokenIdentifier" type="Bech32mTokenIdentifier" required>
  The Bech32m token identifier (format: `btkn1...` for mainnet, `btknrt1...` for regtest)
</ResponseField>

<ResponseField name="tokenAmount" type="bigint" required>
  The amount of tokens to transfer
</ResponseField>

<ResponseField name="receiverSparkAddress" type="string" required>
  The recipient's Spark Address
</ResponseField>

<ResponseField name="outputSelectionStrategy" type="&#x22;SMALL_FIRST&#x22; | &#x22;LARGE_FIRST&#x22;">
  Strategy for selecting outputs: `"SMALL_FIRST"` or `"LARGE_FIRST"` (defaults to `"SMALL_FIRST"`)
</ResponseField>

<ResponseField name="selectedOutputs" type="OutputWithPreviousTransactionData[]">
  Specific outputs to use for the transfer (overrides selection strategy)
</ResponseField>

## Returns

<ResponseField name="txId" type="string" required>
  The transaction ID of the token transfer
</ResponseField>

## Example

```typescript theme={null}
const txId = await wallet.transferTokens({
  tokenIdentifier: "btkn1...",
  tokenAmount: 1000n,
  receiverSparkAddress: "spark1..."
});
console.log("Token transfer completed:", txId);
```
