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

# Solana

> Transfer assets, call programs, and sign Solana messages with the MPCVault API. Includes Sonic SVM transactions.

MPCVault supports native coin and SPL token transfers and custom program transactions on Solana and Sonic SVM, plus Solana message signing.

## Networks

| Network | Wallet `networkType` | Transaction payloads |
| - | - | - |
| Solana Mainnet | `NETWORK_TYPE_SOLANA` | `solanaSend*` |
| Sonic SVM Mainnet | `NETWORK_TYPE_SOLANA` | `sonicSvmSend*` |

The payload field selects the network. `chainId` is ignored for these transaction payloads.

Examples use [API client signing](https://docs.mpcvault.com/api-reference/overview.md#preparation).

## Signing request types

| Payload | Use |
| - | - |
| [`solanaSendNative`](https://docs.mpcvault.com/api-reference/rest/create-signing-request) | Transfer SOL. |
| [`solanaSendSplToken`](https://docs.mpcvault.com/api-reference/rest/create-signing-request) | Transfer SPL tokens. |
| [`solanaSendCustom`](https://docs.mpcvault.com/api-reference/rest/create-signing-request) | Submit prepared transactions containing program instructions. |
| [`solanaMessage`](https://docs.mpcvault.com/api-reference/rest/create-signing-request) | Sign a Solana message. |
| [`sonicSvmSendNative`](https://docs.mpcvault.com/api-reference/rest/create-signing-request) | Transfer the native coin on Sonic SVM. |
| [`sonicSvmSendSplToken`](https://docs.mpcvault.com/api-reference/rest/create-signing-request) | Transfer SPL tokens on Sonic SVM. |
| [`sonicSvmSendCustom`](https://docs.mpcvault.com/api-reference/rest/create-signing-request) | Submit prepared program transactions on Sonic SVM. |

To sign transactions you build yourself or messages you format yourself, use [raw signing](https://docs.mpcvault.com/api-reference/overview.md#raw-signing).

## Wallet

[Create a wallet](https://docs.mpcvault.com/api-reference/rest/create-wallet.md) with `networkType: "NETWORK_TYPE_SOLANA"`. Fund it with SOL for transfers, transaction fees and any token-account creation, plus the token balance for token transfers.

For Sonic SVM, fund the wallet on Sonic SVM and use its native fee balance and token mints.

## Send SOL

This Solana Mainnet example sends `0.01 SOL`.

[CreateSigningRequest](https://docs.mpcvault.com/api-reference/rest/create-signing-request.md)

```bash theme={null}
curl -X POST https://api.mpcvault.com/v1/createSigningRequest \
  -H "Content-Type: application/json" \
  -H "x-mtoken: <API_TOKEN>" \
  -d '{
    "vaultUuid": "<VAULT_UUID>",
    "callbackClientSignerPublicKey": "<CLIENT_SIGNER_OPENSSH_PUBLIC_KEY>",
    "broadcastTx": true,
    "solanaSendNative": {
      "from": "<YOUR_SOLANA_ADDRESS>",
      "to": "<RECIPIENT_SOLANA_ADDRESS>",
      "value": "10000000"
    }
  }'
```

`value` is an integer string in lamports: `1 SOL = 1,000,000,000 lamports`. `to` is a wallet address, rather than an SPL token account.

## Send USDC

Replace `solanaSendNative` with this payload in the same request. This example sends `1 USDC` on Solana Mainnet.

```json theme={null}
{
  "solanaSendSplToken": {
    "from": "<YOUR_SOLANA_ADDRESS>",
    "to": "<RECIPIENT_SOLANA_ADDRESS>",
    "mintAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "amount": "1000000"
  }
}
```

`amount: "1000000"` sends `1 USDC` (six decimals). The example uses [Circle's Solana Mainnet USDC mint](https://developers.circle.com/stablecoins/usdc-contract-addresses#mainnet). `to` can be the recipient wallet or an existing USDC token account. SOL pays transaction fees and any token-account creation.

## Call a program

Build a transaction containing your program instructions, then replace `solanaSendNative` with `solanaSendCustom`:

```json theme={null}
{
  "solanaSendCustom": {
    "from": "<YOUR_SOLANA_ADDRESS>",
    "txBase64": ["<BASE64_SERIALIZED_SOLANA_TRANSACTION>"]
  }
}
```

`txBase64` accepts one to five serialized transactions in legacy or v0 format, each encoded as standard base64. The `from` wallet signs every transaction; any other required signatures are already present. When a transaction has no existing signatures, MPCVault refreshes its recent blockhash before signing. A transaction carrying another signer's signature keeps its blockhash and can expire while awaiting execution. For individual `txHash` tracking, submit one transaction per request; a custom request containing multiple transactions returns only the first transaction's hash.

## Use Sonic SVM

Use `sonicSvmSendNative`, `sonicSvmSendSplToken` or `sonicSvmSendCustom` in place of the corresponding Solana payload. Their fields and encoding are the same. For example, a program call on Sonic SVM uses:

```json theme={null}
{
  "sonicSvmSendCustom": {
    "from": "<YOUR_SONIC_SVM_ADDRESS>",
    "txBase64": ["<BASE64_SERIALIZED_SONIC_SVM_TRANSACTION>"]
  }
}
```

## Sign and track

[Sign the request](https://docs.mpcvault.com/api-reference/overview.md#sign-the-request), then query the returned `txHash` as follows.

The UUID identifies the signing request; the returned `txHash` is the transaction's first signature in base58. Query [`getSignatureStatuses`](https://solana.com/docs/rpc/http/getsignaturestatuses) on the network selected by the payload:

```bash theme={null}
curl -X POST '<SOLANA_OR_SONIC_SVM_RPC_URL>' \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getSignatureStatuses",
    "params": [["<TRANSACTION_SIGNATURE>"], {"searchTransactionHistory": true}]
  }'
```

Use `txHash` as `<TRANSACTION_SIGNATURE>`. In `result.value[0]`, `err: null` with `confirmationStatus: "finalized"` indicates successful, finalized execution; a non-null `err` reports transaction failure. A null entry means the provider has no status; poll with an interval and timeout.

After a timeout, [check the existing request](https://docs.mpcvault.com/api-reference/overview.md#track-the-result) and on-chain result before creating another request.

## Sign a Solana message

Use this payload with the shared [message-signing flow](https://docs.mpcvault.com/api-reference/overview.md#sign-a-message):

```json theme={null}
{
  "solanaMessage": {
    "from": "<YOUR_SOLANA_ADDRESS>",
    "type": "TYPE_DEFAULT",
    "content": "TVBDVmF1bHQgZXhhbXBsZQ=="
  }
}
```

`content` is standard base64 of the message bytes. This example signs the UTF-8 text `MPCVault example`; printable ASCII and valid UTF-8 are supported.

`solanaMessage` has no Sonic SVM network selector.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.