# sendSOL

## Description

The `sendSOL` function enables the transfer of SOL tokens between two wallets on the Solana blockchain.&#x20;

## Parameter

| Name                  | Type   | Description                                    |
| --------------------- | ------ | ---------------------------------------------- |
| `fromWalletSecretKey` | string | The secret key of the wallet sending SOL       |
| `toWalletAddress`     | string | The public address of the wallet receiving SOL |
| `amount`              | number | The amount of SOL to be transferred            |

## Response

| Name        | Type   | Description                                          |
| ----------- | ------ | ---------------------------------------------------- |
| `signature` | string | The transaction signature returned by the blockchain |

## Example Request and Response

### Prerequisites

Before making requests with Volary SDK, you must have it installed.

You can install Volary SDK using either `npm` or `yarn`. Use the following commands to install Volary SDK:

```sh
npm install @nest25/solana-lib
OR
yarn add @nest25/solana-lib
```

### Request

Here is an example of how to make a `sendSOL` request using the Volary SDK:

```javascript
// import Nest SDK
import { Solana } from '@nest25/solana-lib';

// create a new instance of the SDK
const Sol = new Solana();

async function main() {
 // send SOL to an address
  let receipt = await Sol.sendSOL(
    '3Q6Wn4hggUWuiD3iEjGaMYurKBywTXiWWjxp1yGCQvFvWPmZ4dff8SXuUEknfLRzqXfobSB46k9rbmDzjrDE3ZqK',
    'HyAEtjw6d4qEf7ew7LUN8UV7Hes3wXk9yBL6kG9yCpfP',
    '1',
  )
  console.log({receipt});
}

main();
```

### Response

```sh
{
   SUYgr3ZrqUKaTD5vJok2AzzfKg2mkP8ZXzUDH1PH55uKKHxwUrA8w23SKxm7AgV8yyTrTHQ8BNhcbhqx15z7NMH
}
```

## Use Cases

* **Sending payments:** The function can be used to send SOL payments from one wallet to another, enabling users to pay for goods and services on Solana-based platforms.
* **Exchanges:** The function can be used by cryptocurrency exchanges to facilitate the buying and selling of SOL.
* **Wallets:** The function can be integrated into Solana-based wallets to allow users to send and receive SOL tokens.


---

# 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.volary.io/sdks-guide/blockchain-sdks/solana-sdk/sendsol.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.
