# Solana Integration

#### Overview

Eitherway provides full Solana blockchain support:

* SPL Token creation and management
* Metaplex NFT minting
* Collection management
* Devnet/testnet deployment

***

#### SPL Token Creation

```
POST  /api/solana/tokens/create
{
"userId": "user-123",
"name": "My Token",
"symbol": "MTK", "decimals": 9,
"initialSupply": "1000000", "cluster": "devnet"
}
```

Response:

```
{
"success": true, "tokenId": "uuid",
"mintAddress": "So1ana...",
"signature": "5abc...",
"explorerUrl": "https://explorer.solana.com/..."
}
```

***

#### **NFT Collection Creation**

```
POST  /api/solana/nft/collection
{
"userId":  "user-123", "name": "My NFT Collection", "symbol": "MNFT",
"description": "Unique digital art", "imageUri":  "https://...", "cluster": "devnet"
}
```

***

#### **NFT Minting**

```
POST  /api/solana/nft/mint
{
"userId": "user-123", "collectionId": "collection-uuid", "name": "NFT #1",
"imageUri": "https://...", "attributes": [
{ "trait_type": "Background", "value": "Blue" },
{ "trait_type": "Rarity", "value": "Legendary" }
],
"royaltyBasisPoints":  500
}
```

***

#### Wallet Support

Frontend applications use:

* @solana/wallet-adapter-react – React integration
* @solana/wallet-adapter-wallets – Wallet adapters
* @metaplex-foundation/js – NFT operations

**Supported wallets:** Phantom, Solflare, Torus

***

#### **Airdrop (Devnet Only)**

Get free test SOL:

```
POST /api/solana/airdrop
{
"address": "YourWallet...", "amount": 1,
"cluster":  "devnet"
}
```


---

# 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.eitherway.ai/documentation/web3/solana-integration.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.
