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

# sendTransaction on Solana

> sendTransaction submits a signed transaction to the cluster on Solana, via GoldRush JSON-RPC.

> [card] 0.01 credits per call

`sendTransaction` on **Solana**: Submits a signed transaction to the cluster.

## Endpoint

```
https://rpc.goldrushdata.com/v1/solana-mainnet
```

Authenticate with `Authorization: Bearer <GOLDRUSH_API_KEY>`. See [authentication](https://goldrush.dev/docs/goldrush-json-rpc/authentication.md).

## Parameters

| Name | Type | Required | Description | Example |
| - | - | - | - | - |
| `transaction` | `string` | yes | Fully-signed transaction, encoded as a `base64` (recommended) or `base58` string. | `"AR4KbO6uYPS5PKSh8u1ah2Jq1pHeXwaojuxdDGbSSumHcCM1bukbYaDt5/wiqiIwP156mLvzJxk3ILQocD3W8wcBAAIEwS6EMxyDU3PzY4L5Q52OIthyvkPczZiNOrY0kYo1V1oNwwgfIhv6odn2qTUu/gOisDtaeCW1qlwW/gx3ccr/4wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwZGb+UhFzL/7K26csOb57yM5bvF9xJrLEObOkAAAACmNAYg3PP4Wwb6+EaGmhEew4gOOjQBZwBCR73i+EDMaAMDAAkDgNHwCAAAAAADAAUC9AEAAAICAAEMAgAAAKCGAQAAAAAA"` |
| `config` | `object` | no | `{encoding?, skipPreflight?, preflightCommitment?, maxRetries?, minContextSlot?}`. Set `encoding: "base64"` to match the transaction encoding. | `{"encoding":"base64","skipPreflight":false,"preflightCommitment":"confirmed","maxRetries":5}` |

## Returns

`string`: Base-58 encoded transaction signature (the first signature in the transaction).

```json theme={null}
"5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW"
```

## Examples

```bash curl theme={null}
curl https://rpc.goldrushdata.com/v1/solana-mainnet \
  -H "Authorization: Bearer $GOLDRUSH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "sendTransaction",
    "params": ["AR4KbO6uYPS5PKSh8u1ah2Jq1pHeXwaojuxdDGbSSumHcCM1bukbYaDt5/wiqiIwP156mLvzJxk3ILQocD3W8wcBAAIEwS6EMxyDU3PzY4L5Q52OIthyvkPczZiNOrY0kYo1V1oNwwgfIhv6odn2qTUu/gOisDtaeCW1qlwW/gx3ccr/4wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwZGb+UhFzL/7K26csOb57yM5bvF9xJrLEObOkAAAACmNAYg3PP4Wwb6+EaGmhEew4gOOjQBZwBCR73i+EDMaAMDAAkDgNHwCAAAAAADAAUC9AEAAAICAAEMAgAAAKCGAQAAAAAA", {"encoding":"base64","skipPreflight":false,"preflightCommitment":"confirmed","maxRetries":5}]
  }'
```

```typescript @solana/kit theme={null}
import {
  createDefaultRpcTransport,
  createSolanaRpcFromTransport,
} from "@solana/kit";

const transport = createDefaultRpcTransport({
  url: "https://rpc.goldrushdata.com/v1/solana-mainnet",
  headers: { Authorization: `Bearer ${process.env.GOLDRUSH_API_KEY}` },
});
const rpc = createSolanaRpcFromTransport(transport);

const result = await rpc.sendTransaction("AR4KbO6uYPS5PKSh8u1ah2Jq1pHeXwaojuxdDGbSSumHcCM1bukbYaDt5/wiqiIwP156mLvzJxk3ILQocD3W8wcBAAIEwS6EMxyDU3PzY4L5Q52OIthyvkPczZiNOrY0kYo1V1oNwwgfIhv6odn2qTUu/gOisDtaeCW1qlwW/gx3ccr/4wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwZGb+UhFzL/7K26csOb57yM5bvF9xJrLEObOkAAAACmNAYg3PP4Wwb6+EaGmhEew4gOOjQBZwBCR73i+EDMaAMDAAkDgNHwCAAAAAADAAUC9AEAAAICAAEMAgAAAKCGAQAAAAAA", {"encoding":"base64","skipPreflight":false,"preflightCommitment":"confirmed","maxRetries":5}).send();
console.log(result);
```

```python python theme={null}
import os
import requests

resp = requests.post(
    "https://rpc.goldrushdata.com/v1/solana-mainnet",
    headers={
        "Authorization": f"Bearer {os.environ['GOLDRUSH_API_KEY']}",
        "Content-Type": "application/json",
    },
    json={"jsonrpc": "2.0", "id": 1, "method": "sendTransaction", "params": ["AR4KbO6uYPS5PKSh8u1ah2Jq1pHeXwaojuxdDGbSSumHcCM1bukbYaDt5/wiqiIwP156mLvzJxk3ILQocD3W8wcBAAIEwS6EMxyDU3PzY4L5Q52OIthyvkPczZiNOrY0kYo1V1oNwwgfIhv6odn2qTUu/gOisDtaeCW1qlwW/gx3ccr/4wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwZGb+UhFzL/7K26csOb57yM5bvF9xJrLEObOkAAAACmNAYg3PP4Wwb6+EaGmhEew4gOOjQBZwBCR73i+EDMaAMDAAkDgNHwCAAAAAADAAUC9AEAAAICAAEMAgAAAKCGAQAAAAAA", {"encoding":"base64","skipPreflight":false,"preflightCommitment":"confirmed","maxRetries":5}]},
)
print(resp.json()["result"])
```

## Errors

| Code | Message |
| - | - |
| `-32002` | Transaction simulation failed during preflight (see `data.logs`). |
| `-32003` | Transaction signature verification failure. |

Plus standard JSON-RPC errors: `-32600` invalid request, `-32601` method not found, `-32602` invalid params.

## Related Transactions info methods on Solana

* [`getTransaction` on Solana](https://goldrush.dev/docs/api-reference/json-rpc/solana/gettransaction)
* [`simulateTransaction` on Solana](https://goldrush.dev/docs/api-reference/json-rpc/solana/simulatetransaction)
* [`getSignaturesForAddress` on Solana](https://goldrush.dev/docs/api-reference/json-rpc/solana/getsignaturesforaddress)
* [`getSignatureStatuses` on Solana](https://goldrush.dev/docs/api-reference/json-rpc/solana/getsignaturestatuses)
* [`getTransactionCount` on Solana](https://goldrush.dev/docs/api-reference/json-rpc/solana/gettransactioncount)


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