Introdaction
Getting Started
RPC Endpoints
WebSocket Support
🖥️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:
Response:
2. getTransaction
Retrieves information about a specific transaction by its signature.
Usage:
Response:
3. getAccountInfo
Returns details about a specific account, such as its data and lamports.
Usage:
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.