Solana Paymaster endpoints
All Solana Paymaster endpoints follow the JSON-RPC 2.0 specification and are available at:
https://api.openfort.io/rpc/solana/{cluster}Include your Openfort publishable key in the Authorization header:
Authorization: Bearer YOUR_OPENFORT_PUBLISHABLE_KEYsignAndSendTransaction
Signs a transaction with the Openfort fee payer and immediately broadcasts it to the Solana network.
Request
{
"jsonrpc": "2.0",
"method": "signAndSendTransaction",
"params": {
"transaction": "base64EncodedTransaction",
"signer_key": "signerPublicKey",
"sig_verify": true
},
"id": 1
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
transaction | string | Yes | Base64-encoded transaction to sign and send |
signer_key | string | No | Specific signer public key to use |
sig_verify | boolean | No | Whether to verify signatures before sending |
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"signature": "base58Signature",
"signed_transaction": "base64EncodedSignedTransaction",
"signer_pubkey": "3Z1Ef7YaxK8oUMoi6exf7wYZjZKWJJsrzJXSt1c3qrDE"
}
}Response fields
| Field | Description |
|---|---|
signature | Transaction signature in base58 encoding |
signed_transaction | The complete signed transaction in base64 format |
signer_pubkey | Public key of the fee payer signer |
Example
const response = await fetch('https://api.openfort.io/rpc/solana/devnet', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_OPENFORT_PUBLISHABLE_KEY',
},
body: JSON.stringify({
jsonrpc: '2.0',
method: 'signAndSendTransaction',
params: {
transaction: base64EncodedTransaction,
sig_verify: true
},
id: 1
}),
})
const { result } = await response.json()
console.log('Transaction signature:', result.signature)signTransaction
Signs a transaction with the Openfort fee payer without broadcasting it. The transaction must include necessary payment instructions to the fee payer.
Request
{
"jsonrpc": "2.0",
"method": "signTransaction",
"params": {
"transaction": "base64EncodedTransaction",
"signer_key": "signerPublicKey",
"sig_verify": true
},
"id": 1
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
transaction | string | Yes | Base64-encoded transaction with fee payment instructions |
signer_key | string | No | Specific signer public key to use |
sig_verify | boolean | No | Whether to verify signatures |
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"signed_transaction": "base64EncodedSignedTransaction",
"signer_pubkey": "3Z1Ef7YaxK8oUMoi6exf7wYZjZKWJJsrzJXSt1c3qrDE"
}
}Response fields
| Field | Description |
|---|---|
signed_transaction | The complete signed transaction in base64 format |
signer_pubkey | Public key of the fee payer signer |
transferTransaction
Creates a token transfer transaction with Openfort as the fee payer, enabling gasless token transfers.
Request
{
"jsonrpc": "2.0",
"method": "transferTransaction",
"params": {
"amount": 1000000,
"token": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"source": "sourceWalletPublicKey",
"destination": "destinationWalletPublicKey",
"signer_key": "signerPublicKey"
},
"id": 1
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
amount | integer | Yes | Transfer amount in smallest token units (must be a non-negative integer) |
token | string | Yes | Token mint address (e.g., USDC) |
source | string | Yes | Source wallet public key |
destination | string | Yes | Destination wallet public key |
signer_key | string | No | Specific signer public key to use |
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transaction": "base64EncodedTransaction",
"message": "base64EncodedMessage",
"blockhash": "base58Blockhash",
"signer_pubkey": "3Z1Ef7YaxK8oUMoi6exf7wYZjZKWJJsrzJXSt1c3qrDE"
}
}Response fields
| Field | Description |
|---|---|
transaction | Base64-encoded transaction ready for signing |
message | Base64-encoded transaction message |
blockhash | Blockhash used in the transaction |
signer_pubkey | Public key of the signer used |
estimateTransactionFee
Estimates the transaction fee in both lamports and optionally in the specified token.
Request
{
"jsonrpc": "2.0",
"method": "estimateTransactionFee",
"params": {
"transaction": "base64EncodedTransaction",
"fee_token": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"signer_key": "signerPublicKey",
"sig_verify": true
},
"id": 1
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
transaction | string | Yes | Base64-encoded transaction |
fee_token | string | No | Token mint address for fee calculation in token units |
signer_key | string | No | Specific signer public key to use for estimation |
sig_verify | boolean | No | Whether to verify signatures |
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"fee_in_lamports": 5000,
"fee_in_token": 1000000,
"signer_pubkey": "3Z1Ef7YaxK8oUMoi6exf7wYZjZKWJJsrzJXSt1c3qrDE",
"payment_address": "3Z1Ef7YaxK8oUMoi6exf7wYZjZKWJJsrzJXSt1c3qrDE"
}
}Response fields
| Field | Description |
|---|---|
fee_in_lamports | Transaction fee in lamports (SOL's smallest unit) |
fee_in_token | Equivalent fee amount in the specified token (only present if fee_token was provided) |
signer_pubkey | Public key of the signer used for fee estimation |
payment_address | Destination address for fee payment |
getSupportedTokens
Retrieves the list of tokens accepted for fee payment.
Request
{
"jsonrpc": "2.0",
"method": "getSupportedTokens",
"params": [],
"id": 1
}Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"tokens": [
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
]
}
}Response fields
| Field | Description |
|---|---|
tokens | Array of token mint addresses accepted for fee payment |
getConfig
Retrieves the current server configuration including enabled methods and fee payers.
Request
{
"jsonrpc": "2.0",
"method": "getConfig",
"params": [],
"id": 1
}Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"enabled_methods": {},
"fee_payers": [
"3Z1Ef7YaxK8oUMoi6exf7wYZjZKWJJsrzJXSt1c3qrDE"
],
"validation_config": {}
}
}Response fields
| Field | Description |
|---|---|
enabled_methods | Dictionary of available RPC methods and their enabled status |
fee_payers | List of authorized fee payer public keys |
validation_config | Server-side validation configuration |
getPayerSigner
Retrieves the payer signer and payment destination addresses.
Request
{
"jsonrpc": "2.0",
"method": "getPayerSigner",
"params": [],
"id": 1
}Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"payment_address": "3Z1Ef7YaxK8oUMoi6exf7wYZjZKWJJsrzJXSt1c3qrDE",
"signer_address": "3Z1Ef7YaxK8oUMoi6exf7wYZjZKWJJsrzJXSt1c3qrDE"
}
}Response fields
| Field | Description |
|---|---|
payment_address | Address receiving fee payments |
signer_address | Address signing transactions as fee payer |
getBlockhash
Gets the latest blockhash from the Solana network.
Request
{
"jsonrpc": "2.0",
"method": "getBlockhash",
"params": [],
"id": 1
}Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockhash": "base58Blockhash"
}
}Response fields
| Field | Description |
|---|---|
blockhash | Base58-encoded blockhash for transaction composition |