> For the complete documentation index, see [llms.txt](https://docs.non-obvious.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.non-obvious.ai/sdks-guide/blockchain-sdks/wallet-sdk/transfer/sol.md).

# sol

## Description

The `transfer` function allows the transfer of SOL tokens from one wallet to another on the Solana blockchain. The function takes in the sender's private key, receiver's wallet address, transfer amount, and the environment to execute the transaction.

## Parameters

| Name         | Type   | Description                                      |
| ------------ | ------ | ------------------------------------------------ |
| `privateKey` | string | The private key of the wallet sending the tokens |
| `value`      | string | The amount of tokens to be transferred           |
| `receiver`   | string | The wallet address of the recipient              |
| `env`        | string | The environment to execute the transaction       |

## Response

| Name               | Type   | Description                                                                          |
| ------------------ | ------ | ------------------------------------------------------------------------------------ |
| `code`             | number | Status code (1 for success, 0 for failure)                                           |
| `result/signature` | string | If successful, returns the transaction signature, otherwise returns an error message |

## Example Request and Response

### Prerequisites

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

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

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

### Request

Here is an example of how to make a `transfer` request using the NO.AI SDK:

{% code overflow="wrap" %}

```javascript
// import Nest SDK
import { Wallet } from 'nest25/wallet-lib';

// Create a new instance of the Wallet class
const wallet = new Wallet();
// test mnemonic for BTC mainnet (use the createWallet function to get one)
const testMnemonic = 'divorce poverty spend fire symbol market good skull rebel surge giggle album';
// receiver address
const receiver = '0xd040591F093eacFAB8734350aac24703a0081f29';

const main = async () => {
  // transfer 0.1 AVA from the test mnemonic to the receiver address
  const response = await wallet.transfer('sol',testMnemonic,receiver,'0.1');
  // print the response
  console.log(response);
};

main();
```

{% endcode %}

### Response

{% code overflow="wrap" %}

```sh
 {
        code: 1,
        result: '5oWsXKXkTYxWUeBtyhaC6xxx7ZNRXW5qq1PJpbas1y4zQqgD9mxPGBF2zCeUkVHornFDo63hriUdVGuPp49u5Tvy'
      }
```

{% endcode %}

## Use Cases

* **Applications:** It can be used by Solana wallet applications to send SOL tokens to other wallet addresses.
* **Payment Systems:** It can be integrated into payment systems of Solana-based online marketplaces to facilitate transactions between buyers and sellers.

###
