# Solana Send SOL Tool

#### Solana Send SOL Tool (`solana_send_sol_tool`)

Performs an **on-chain transaction** to send a specified amount of SOL from the agent's (user's) wallet to a recipient's Solana address. Exercise caution as this involves real fund transfers.

{% hint style="info" %}
**Inputs:** Requires sender's wallet details, recipient, and amount.
{% endhint %}

```python
class SolanaSendSolInput(BaseModel):
    agent_public: str      # Sender's public key
    agent_private: str     # Sender's ENCRYPTED private key
    recipient_address: str # Recipient's Solana address
    amount_sol: float      # Amount of SOL to send (e.g., 0.1)
```

***

**Key Functionality:**

* Securely decrypts the provided agent's private key.
* Validates the amount and checks the sender's SOL balance.
* Constructs and sends a versioned transaction to the Solana network to transfer SOL.
* Returns a confirmation with the transaction signature and an explorer link upon success.

***

**Sample Usage Queries (How an AI might use it):** *(These imply the agent has access to or will securely prompt for necessary wallet details)*

* "Send 0.5 SOL to `RecipientPublicKeyHere` from my wallet."
* "Transfer 1.2 SOL from my primary account to `FriendAddress`."
* "I need to send `AmountX` SOL to `DestinationAddress`."
* "Initiate a SOL payment of `Y` to address `Z`."
* "Execute a transaction: send `0.05` SOL to `AnotherWalletAddress`."
* "Help me send SOL from my wallet." (Agent would then gather parameters)

***

**Quick Code Glance:**

```python
class SolanaSendSolTool(BaseTool):
    name: ClassVar[str] = "solana_send_sol_tool"
    description: ClassVar[str] = "Send SOL from agent wallet to a specified Solana address."
    args_schema: ClassVar[Type[BaseModel]] = SolanaSendSolInput
```

***

**⚠️ CRITICAL INFORMATION & SECURITY:**

* **Real Transactions:** This tool executes actual SOL transfers on the Solana blockchain. **Transactions are irreversible.**
* **Encrypted Private Key:** Requires the agent's **encrypted** private key. The security of the encryption/decryption mechanism (`WalletDecryptor`) is paramount. Never expose raw private keys.
* **Network Dependent:** Relies on a connection to a Solana RPC node (`CONFIG.SOLANA_RPC_URL`).
* **Asynchronous:** Primarily designed for asynchronous execution (`_arun`).


---

# 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://www.lumolabs.ai/tools/solana-send-sol-tool.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.
