Near Rpc

ToolByBrandonVersion0.1.0

NEAR Protocol JSON-RPC integration. 27 actions covering account state, access keys, contract storage and code, view function calls, blocks, chunks, validators, transaction lifecycle, gas and protocol config, state changes, network status, and light-client proofs. No credentials required for read actions.

Web3Data FeedBlockchain

Use Cases

  • Monitor NEAR account state
  • Query smart contract data
  • Track blockchain state changes
Install
$ironclaw hub install near-rpc

Description

near-rpc

NEAR Protocol JSON-RPC integration for IronClaw. 27 actions covering account state, access keys, contract storage and code, view function calls, blocks and chunks, validators, transaction lifecycle, gas and protocol config, state changes, network status, and light-client proofs.

Actions

Account and state

ActionParametersPurpose
view_accountaccount_id, optional block_height/block_hashFull account state at a block
view_account_balanceaccount_idBalance in yoctoNEAR and NEAR (final)
view_access_keyaccount_id, public_key, optional block refSingle access key permissions and nonce
view_access_key_listaccount_id, optional block refAll access keys on an account
view_stateaccount_id, optional prefix_base64, optional include_proof, optional block refContract storage by key prefix
view_codeaccount_id, optional block refContract WASM as base64
view_functionaccount_id, method_name, args_base64 (default e30=), optional block refRead-only contract call with logs and block stamp

Blocks, chunks, transactions

ActionParametersPurpose
get_blockoptional block_height or block_hashBlock by height, hash, or latest
get_chunkchunk_id or (block_height/block_hash + shard_id)Chunk data
get_recent_blockscount (default 5, max 10)Last N block summaries
get_transactiontx_hash, sender_account_id, optional wait_untilTransaction outcome (light)
tx_statustx_hash, sender_account_id, optional wait_untilFull transaction status with receipts
send_txsigned_tx_base64, optional wait_untilModern signed-tx submission with finality control
broadcast_tx_asyncsigned_tx_base64Submit and return immediately
broadcast_tx_commitsigned_tx_base64Submit and wait for full execution

wait_until accepts: NONE, INCLUDED, EXECUTED_OPTIMISTIC, INCLUDED_FINAL, EXECUTED, FINAL.

Validators, gas, config

ActionParametersPurpose
validatorsoptional block_height/block_hashCurrent and next validator set, fishermen, proposals, kickouts, plus a summary block with counts
gas_priceoptional block_height/block_hashGas price at a block (or current)
protocol_configoptional block_height/block_hash or epoch_idEpoch length, max validators, gas limits
genesis_confignoneGenesis configuration

State changes

ActionParametersPurpose
changeschanges_type, account_ids, optional key_prefix_base64 or public_key, optional block refState changes for accounts/keys/data/code
changes_in_blockoptional block refAll state changes within a block

changes_type accepts: account_changes, single_access_key_changes, all_access_key_changes, data_changes, contract_code_changes. data_changes requires key_prefix_base64. single_access_key_changes requires public_key (paired with each account_ids entry).

Network status

ActionParametersPurpose
statusnoneChain id, latest block, version, sync info
healthnoneNode liveness check
network_infononePeer count and connection details
client_confignoneNode client configuration

Light client

ActionParametersPurpose
light_client_proofproof_type (transaction or receipt), light_client_head, plus type-specific fieldsCryptographic proof for SPV-style verification
next_light_client_blocklast_block_hashNext light-client block after a known head

proof_type=transaction requires transaction_hash + sender_id. proof_type=receipt requires receipt_id + receiver_id.

Common parameters

All actions accept optional network (default "mainnet", also "testnet") and rpc_url (overrides the network default with a custom endpoint).

Block-referenced actions accept block_height (preferred), block_hash, or neither (defaults to finality: "final"). When both are supplied, height wins.

Auth model

Read actions need only an RPC endpoint URL. No credentials required.

Write actions (send_tx, broadcast_tx_async, broadcast_tx_commit) accept a base64-encoded borsh-serialized SignedTransaction. Signing happens outside this tool. Function-call keys are preferred over full-access keys for narrow-scope operations.

Supported RPC endpoints

Mainnet: rpc.mainnet.near.org, beta.rpc.mainnet.near.org, archival-rpc.mainnet.near.org, free.rpc.fastnear.com, near.lava.build

Testnet: rpc.testnet.near.org, beta.rpc.testnet.near.org, archival-rpc.testnet.near.org, test.rpc.fastnear.com

Custom endpoints via the rpc_url parameter.

Limits

Public RPC endpoints rate-limit aggressively. FastNEAR or a dedicated provider is recommended for production use. The tool's host-level rate limit is 120 requests per minute and 3,600 per hour; the runtime enforces this regardless of the upstream provider's quota.

get_recent_blocks is capped at 10 blocks per call to avoid burning the rate-limit budget on a single query.

Light-client and state-change endpoints can return large payloads on busy blocks; callers should expect multi-megabyte responses on changes_in_block for high-throughput windows.

Specifications

WIT Interface0.3.0
Action Capacity27 actions
Auth ModelNo auth
Source Pathtools/near-rpc

Security & Network

Network Allowlist
rpc.mainnet.near.orgrpc.testnet.near.orgfree.rpc.fastnear.comtest.rpc.fastnear.comnear.lava.buildbeta.rpc.mainnet.near.orgbeta.rpc.testnet.near.orgarchival-rpc.mainnet.near.orgarchival-rpc.testnet.near.org

Constraints & Tags

Known Limits
  • Public RPC endpoints rate-limit aggressively; production deployments should use FastNEAR, Pagoda, or another dedicated provider
  • Signed-write actions (`send_tx`, `broadcast_tx_async`, `broadcast_tx_commit`) accept a pre-signed base64-encoded `SignedTransaction`; the tool does not perform local signing
  • Validator-set, state-change, and contract-code responses can be megabytes in size on busy blocks.
Technical Tags
WASM toolNEARHTTP allowlistNo required secrets

Standalone tool trunk without current skill branches.