TriportRPC

eth_getProof

POSThttps://triport.io/rpc/bsc

Return an account and storage Merkle proof.

BNB Smart Chainbsc:rpcbsc_read_rpc - 15 / 20 / 100 / 250 RPS (free / basic / pro / business) (default, unmeasured); enterprise unlimited

eth_getProof returns an account proof and proofs for the requested storage keys at a selected BNB Smart Chain block.

Use it when a consumer must verify account state against a state root rather than trusting a balance or storage value directly. The response includes proof node byte arrays plus the account balance, nonce, code hash, and storage hash from the schema.

Unlike eth_getStorageAt, this method includes Merkle proof material. Historical proof generation requires historical state and therefore depends on the two confirmed archive-state pool nodes.

Parameters

JSON-RPC params is a positional array: [address, storageKeys, block].

addressstring (20-byte hex address)required
The 20-byte EVM account or contract address to query.
storageKeysarray<string (hex quantity)>required
Storage positions to prove, each encoded as an EVM hex quantity.
blockstring (block tag or hex quantity)required
Block selector: latest, earliest, pending, or an EVM hex block number.

Response

The response below is the checked fixture for this method; it is reproduced without changing its fields or values.

resultobject
Account and storage proof response.
result.addressstring
Proved account address.
result.accountProofarray<string>
Hex-encoded account proof nodes.
result.balancestring
Account balance as a hex quantity.
result.codeHashstring
Hash of account code.
result.noncestring
Account nonce as a hex quantity.
result.storageHashstring
Account storage-root hash.
result.storageProofarray<object>
Proof entries for the requested storage keys.

Errors

Errors use the standard JSON-RPC error envelope. See BSC errors for network-specific classification and the linked shared reference.

CodeMeaningWhen it happens
-32602Invalid paramsA required positional parameter is missing or a value does not match the OpenRPC schema.
-32000Upstream request failureInterpret the message with the code: header not found means a missing block; pruned/unsupported state text means unavailable historical state.
401UnauthorizedThe x-token API key is missing or invalid.
429Rate limitedThe request exceeds the configured category RPS for the caller's tier.

Examples

JavaScript (fetch)

const response = await fetch("https://triport.io/rpc/bsc", {
  method: "POST",
  headers: {
    "x-token": process.env.TRIPORT_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_getProof",
    "params": [
      "0x0000000000000000000000000000000000000000",
      [],
      "latest"
    ]
  }),
});


const payload = await response.json();
console.log(payload.result);

Notes

  • Historical state is confirmed on two pool nodes. A historical request can fail when no eligible archive-state node is available.
  • Treat upstream -32000 by both code and message: header not found and pruned historical state are different conditions.
  • The BSC categories use configured defaults of 15 / 20 / 100 / 250 RPS; they are marked unmeasured in the tier matrix.
  • Related methods: eth_getStorageAt, eth_getBalance, eth_getBlockByNumber.