JSON-RPC API Overview
Kora implements a JSON-RPC 2.0 interface for gasless transaction processing on Solana.
Protocol
- Standard: JSON-RPC 2.0
- Transport: HTTP POST
- Content-Type: application/json
- Endpoint:
http://your-kora-instance/
Available Methods
| Method | Description |
|---|---|
| estimateTransactionFee | Estimates the transaction fee in both lamports and the specified token. |
| getBlockhash | Gets the latest blockhash from the Solana RPC that the Kora server is connected to. |
| getConfig | Retrieves the current Kora server configuration. |
| getPayerSigner | Retrieves the payer signer and payment destination from the Kora server. |
| getPaymentInstruction | Creates a payment instruction to append to a transaction for fee payment to the Kora paymaster. |
| getSupportedTokens | Retrieves the list of tokens supported for fee payment. |
| signAndSendTransaction | Signs a transaction and immediately broadcasts it to the Solana network. |
| signTransaction | Signs a transaction with the Kora fee payer if the transaction includes necessary payment to the fee payer without broadcasting it. |
| transferTransaction | Creates a token transfer transaction with Kora as the fee payer. |
Request Format
All requests follow the JSON-RPC 2.0 standard:
{
"jsonrpc": "2.0",
"id": 1,
"method": "methodName",
"params": {}
}Response Format
Successful responses:
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}Error responses:
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32600,
"message": "Invalid request"
}
}