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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xverse.app/sats-connect/spark-methods/spark_transfer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
