RPC Methods Reference

Complete reference of all supported Solana RPC methods on Inkognito Network.

Standard Methods

All standard Solana RPC methods are supported. Below are the most commonly used ones with examples.

getBalance

Get the SOL balance of an account.

Parameters:

  • address (string): Base58-encoded public key

Returns: Object with value field (balance in lamports)

Example:

Complete Example
1const balance = await client.request('getBalance', [
2  'DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK'
3]);
4console.log('Balance:', balance.value / 1e9, 'SOL');

getAccountInfo

Get detailed information about an account.

Parameters:

  • address (string): Base58-encoded public key
  • config (object, optional): Configuration object
    • encoding (string): Data encoding (base58, base64, jsonParsed)

Returns: Account information including data, owner, lamports, executable status

Example:

Complete Example
1const accountInfo = await client.request('getAccountInfo', [
2  'DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK',
3  { encoding: 'jsonParsed' }
4]);
5console.log('Owner:', accountInfo.value.owner);
6console.log('Lamports:', accountInfo.value.lamports);

getTransaction

Get details of a confirmed transaction.

Parameters:

  • signature (string): Transaction signature
  • config (object, optional): Configuration object
    • encoding (string): Encoding format
    • maxSupportedTransactionVersion (number): Max transaction version

Returns: Transaction details including block time, slot, metadata

Example:

Complete Example
1const tx = await client.request('getTransaction', [
2  '5wHu1qwD...signature...',
3  { encoding: 'jsonParsed', maxSupportedTransactionVersion: 0 }
4]);
5console.log('Block time:', tx.blockTime);
6console.log('Slot:', tx.slot);

getSignaturesForAddress

Get confirmed transaction signatures for an address.

Parameters:

  • address (string): Base58-encoded public key
  • config (object, optional):
    • limit (number): Maximum number of signatures (default: 1000)
    • before (string): Start searching backwards from this signature
    • until (string): Search until this signature

Returns: Array of signature info objects

Example:

Complete Example
1const signatures = await client.request('getSignaturesForAddress', [
2  'DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK',
3  { limit: 10 }
4]);
5
6signatures.forEach(sig => {
7  console.log('Signature:', sig.signature);
8  console.log('Block time:', new Date(sig.blockTime * 1000));
9});

getBlockHeight

Get the current block height.

Parameters: None

Returns: Current block height (number)

Example:

Complete Example
1const height = await client.request('getBlockHeight');
2console.log('Current block height:', height);

getSlot

Get the current slot.

Parameters: None

Returns: Current slot (number)

Example:

Complete Example
1const slot = await client.request('getSlot');
2console.log('Current slot:', slot);

getLatestBlockhash

Get the latest blockhash.

Parameters:

  • config (object, optional):
    • commitment (string): Commitment level

Returns: Object with blockhash and last valid block height

Example:

Complete Example
1const { blockhash, lastValidBlockHeight } = await client.request('getLatestBlockhash');
2console.log('Blockhash:', blockhash);
3console.log('Valid until block:', lastValidBlockHeight);

getVersion

Get the Solana version.

Parameters: None

Returns: Object with Solana version info

Example:

Complete Example
1const version = await client.request('getVersion');
2console.log('Solana version:', version['solana-core']);
3console.log('Feature set:', version['feature-set']);

getHealth

Check if the node is healthy.

Parameters: None

Returns: "ok" if healthy

Example:

Complete Example
1const health = await client.request('getHealth');
2console.log('Node health:', health); // "ok"

getRecentPerformanceSamples

Get recent performance samples.

Parameters:

  • limit (number, optional): Number of samples (default: 720)

Returns: Array of performance sample objects

Example:

Complete Example
1const samples = await client.request('getRecentPerformanceSamples', [5]);
2samples.forEach(sample => {
3  console.log('Slot:', sample.slot);
4  console.log('TPS:', sample.numTransactions / sample.samplePeriodSecs);
5});

All Supported Methods

Inkognito Network supports all standard Solana RPC methods:

Account Methods

  • getAccountInfo
  • getBalance
  • getMultipleAccounts
  • getProgramAccounts
  • getLargestAccounts
  • getSupply
  • getTokenAccountBalance
  • getTokenAccountsByDelegate
  • getTokenAccountsByOwner
  • getTokenLargestAccounts
  • getTokenSupply

Block Methods

  • getBlock
  • getBlockHeight
  • getBlockProduction
  • getBlockCommitment
  • getBlocks
  • getBlocksWithLimit
  • getBlockTime
  • getFirstAvailableBlock
  • getLatestBlockhash
  • getRecentPerformanceSamples

Transaction Methods

  • getTransaction
  • getSignatureStatuses
  • getSignaturesForAddress
  • sendTransaction (coming soon)
  • simulateTransaction
  • getRecentPrioritizationFees

Network Methods

  • getClusterNodes
  • getEpochInfo
  • getEpochSchedule
  • getGenesisHash
  • getHealth
  • getHighestSnapshotSlot
  • getIdentity
  • getInflationGovernor
  • getInflationRate
  • getInflationReward
  • getLeaderSchedule
  • getMaxRetransmitSlot
  • getMaxShredInsertSlot
  • getMinimumBalanceForRentExemption
  • getRecentPerformanceSamples
  • getSlot
  • getSlotLeader
  • getSlotLeaders
  • getStakeActivation
  • getStakeMinimumDelegation
  • getVersion
  • getVoteAccounts

Program Methods

  • getProgramAccounts
  • getStakeActivation

Request Format

All requests follow the JSON-RPC 2.0 specification:

Complete Example
1{
2  "jsonrpc": "2.0",
3  "id": 1,
4  "method": "METHOD_NAME",
5  "params": [...]
6}

Response Format

Successful responses:

Complete Example
1{
2  "jsonrpc": "2.0",
3  "id": 1,
4  "result": {...}
5}

Error responses:

Complete Example
1{
2  "jsonrpc": "2.0",
3  "id": 1,
4  "error": {
5    "code": -32600,
6    "message": "Error description"
7  }
8}

Rate Limits

  • With Active Session: 100 requests per session (1 credit = 100 requests)
  • Without Session: 0 requests (returns 402 Payment Required)

Headers

Request Headers

  • Content-Type: application/json (required)
  • Authorization: Bearer <session_token> (after session creation)
  • X-PAYMENT: x402 payment proof (for ZK mode)

Response Headers

  • X-Session-Token: Session identifier
  • X-Requests-Remaining: Number of requests left in session
  • X-Session-Expires: Unix timestamp when session expires
  • X-Nullifier: Nullifier hash (ZK mode only)

Error Codes

CodeMessageDescription
402Payment RequiredNo valid session, need to buy credits
401UnauthorizedInvalid session token
429Too Many RequestsRate limit exceeded
400Bad RequestInvalid request format
500Internal Server ErrorServer error
-32600Invalid RequestJSON-RPC error
-32601Method Not FoundUnknown RPC method
-32602Invalid ParamsInvalid method parameters

Examples

TypeScript/JavaScript

Complete Example
1import { InkognitoClient } from '@inkognito/client';
2
3const client = new InkognitoClient({
4  endpoint: 'https://rpc.inkognito.network',
5  mode: 'zk',
6  commitment: yourCommitment,
7});
8
9// Get balance
10const balance = await client.request('getBalance', [address]);
11
12// Get transaction
13const tx = await client.request('getTransaction', [signature]);
14
15// Get account info
16const info = await client.request('getAccountInfo', [address]);

Python (coming soon)

Complete Example
1from inkognito import InkognitoClient
2
3client = InkognitoClient(
4    endpoint='https://rpc.inkognito.network',
5    mode='zk',
6    commitment=your_commitment
7)
8
9# Get balance
10balance = client.request('getBalance', [address])
11print(f'Balance: {balance["value"] / 1e9} SOL')

cURL

Complete Example
1# Get balance (with session token)
2curl -X POST https://rpc.inkognito.network/rpc \
3  -H "Content-Type: application/json" \
4  -H "Authorization: Bearer sess_abc123..." \
5  -d '{
6    "jsonrpc": "2.0",
7    "id": 1,
8    "method": "getBalance",
9    "params": ["DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK"]
10  }'

Next Steps