> ## Documentation Index
> Fetch the complete documentation index at: https://docs.monei.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Solana Services

> Interact with the Solana blockchain — manage wallets, transfer tokens, and track transactions using the Monei Python SDK.

# Overview

`monei.solana` provides methods to interact with the Solana blockchain on mainnet or devnet.

> **Note**: All methods return response objects with attributes accessible via dot notation (e.g., `address`, `balance`, `signature`).

***

### Get Wallet Address

```python theme={null}
wallet_response = monei.solana.get_address()
print(wallet_response.address)  # Base58 public key
```

### Get SOL Balance

```python theme={null}
balance_data = monei.solana.get_native_balance(network="mainnet")
print(f"{balance_data.balance} SOL")
```

### Get SPL Token Balance

```python theme={null}
balance_data = monei.solana.get_token_balance(
    token_mint_address="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",  # USDC mint
    network="mainnet"
)

print(balance_data.balance)
```

### Get Portfolio

```python theme={null}
portfolio = monei.solana.get_portfolio(network="mainnet")
print(portfolio.tokens)
```

### Send SOL

```python theme={null}
result = monei.solana.send_native_token(
    to="RecipientPublicKey",
    amount="0.5",
    network="mainnet"
)

print(result.signature)
```

### Send SPL Token

```python theme={null}
result = monei.solana.send_token(
    to="RecipientPublicKey",
    token_mint_address="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    amount="50",
    network="mainnet"
)

print(result.signature)
```

***

## Working with Response Objects

All methods return objects with attribute access:

```python theme={null}
# Wallet address response
wallet_response = monei.solana.get_address()
print(wallet_response.address)      # Base58 public key
print(wallet_response.network)      # Network (mainnet/devnet)

# SOL balance response
balance_data = monei.solana.get_native_balance(network="mainnet")
print(balance_data.balance)         # SOL balance
print(balance_data.symbol)          # "SOL"
print(balance_data.decimals)        # Token decimals

# SPL token balance response
balance_data = monei.solana.get_token_balance(...)
print(balance_data.balance)         # Token balance
print(balance_data.symbol)          # Token symbol (e.g., "USDC")
print(balance_data.decimals)        # Token decimals
print(balance_data.mint_address)    # Token mint address

# Portfolio response
portfolio = monei.solana.get_portfolio(network="mainnet")
print(portfolio.tokens)             # List of token balances
print(portfolio.total_value)        # Total portfolio value in USD

# Transaction response (send SOL/SPL)
result = monei.solana.send_native_token(...)
print(result.signature)             # Transaction signature
print(result.blockhash)             # Block hash
print(result.status)                # Transaction status
print(result.explorer_url)          # Solana explorer URL
```

***

## Network Options

```python theme={null}
# Mainnet (production)
mainnet_result = monei.solana.get_native_balance(network="mainnet")

# Devnet (testing)
devnet_result = monei.solana.get_native_balance(network="devnet")
```

***

## Notes

* All methods require a properly configured `MoneiClient` instance with authentication
* Network parameter accepts: `"mainnet"` or `"devnet"`
* All responses are strongly typed objects with attribute access
* SPL token addresses are mint addresses (Base58 format)
* Transaction signatures can be viewed on [Solana Explorer](https://explorer.solana.com)

***
