🖥️Standard Solana JSON-RPC Methods

Solana’s JSON-RPC API allows developers to interact with the Solana blockchain by making requests to nodes. Below are some of the most commonly used JSON-RPC methods.

1. getBalance

Fetches the balance of a specific account in lamports (1 Sol = 1 billion lamports).

  • Usage:

{"jsonrpc": "2.0", "id": 1, "method": "getBalance", "params": ["<publicKey>"]
  • Response:

2. getTransaction

Retrieves information about a specific transaction by its signature.

  • Usage:

{"jsonrpc": "2.0", "id": 1, "method": "getTransaction", "params": ["<transactionSignature>"]
  • Response:

3. getAccountInfo

Returns details about a specific account, such as its data and lamports.

  • Usage:

{"jsonrpc": "2.0", "id": 1, "method": "getAccountInfo", "params": ["<publicKey>"]
  • Response:

4. getSlot

Gets the current slot on the Solana blockchain. A slot is a unit of time on the network.

  • Usage:

  • Response:

5. getBlockHeight

Fetches the current block height on the Solana blockchain.

🔹Usage:

🔹Response:

📚 These methods are the foundation for interacting with the Solana network and building decentralized applications (dApps). For more detailed use cases, refer to the official Solana documentation.

© 2024 Best Architects L.L.C-FZ

© 2024 Best Architects L.L.C-FZ