# spark\_transfer

You can use the `spark_transfer` method to send **Spark BTC** from the user’s wallet to any valid Spark address.

## Parameters

<table><thead><tr><th width="221">Request parameters</th><th>Description</th></tr></thead><tbody><tr><td><code>reciverSparkAddress</code></td><td>a string representing the destination Spark address<br>Example: "sprt1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu"</td></tr><tr><td><code>amountSats</code></td><td>a string representing the amount of BTC to transfer, in satoshis. </td></tr></tbody></table>

## Example

```typescript
import { request } from "sats-connect";

try {
  const response = await request("spark_transfer", {
    receiverSparkAddress: "sprt1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu",
    amountSats: 100, // Amount to send, in satoshis
  });

  if ("result" in response) {
    console.log("Spark transfer successful:", response.result.txid);
  } else {
    console.error("Spark transfer failed:", response.error.message);
  }
} catch (error) {
  console.error("Unexpected error:", error);
}

```

## What `spark_transfer` does

Calling this method prompts the user to:

1. Review the **recipient address** and **amount** of Spark BTC to send.
2. **Approve the transaction** in their Xverse wallet.
3. Upon approval, the transaction is **signed and broadcasted** to the Spark network.

The `spark_transfer` method returns a Promise that resolves to a `SparkTransferResult` :

<table><thead><tr><th width="162">Property</th><th>Description</th></tr></thead><tbody><tr><td><code>txid</code></td><td>a hex-encoded string representing the ID of the broadcasted BTC transfer transaction on Spark</td></tr></tbody></table>
