Node API - NEAR
API AuthenticationClick to view API Authentication details
Authorization
request header or URL
property. Calls are made to one of the Near Node API endpoints found in your app's dashboard. For example:
https://near-mainnet--rpc--archive.datahub.figment.io
- Fetch with Header
- Fetch with Parameter
- CURL with Header
- CURL with Parameter
fetch("https://near-mainnet--rpc--archive.datahub.figment.io", {
method: 'POST', // can also be 'GET', 'PUT' or any appropriate method
headers: {
"Authorization" : "<api_key>",
"Content-Type": "application/json" // if method is 'POST'
},
body: JSON.stringify({
// JSON Payload
})
})
fetch("https://near-mainnet--rpc--archive.datahub.figment.io/apikey/{{apikey}}", {
method: 'POST', // can also be 'GET', 'PUT' or any appropriate method
headers: {
"Content-Type": "application/json" // if method is 'POST'
},
body: JSON.stringify({
// JSON Payload
})
})
curl -X POST 'https://near-mainnet--rpc--archive.datahub.figment.io' \
--header 'Content-Type: application/json' \
--header 'Authorization: <api_key>' \
--data '{
// JSON Payload
}'
curl -X POST 'https://near-mainnet--rpc--archive.datahub.figment.io/apikey/{{apikey}}' \
--header 'Content-Type: application/json' \
--data '{
// JSON Payload
}'
Available Methods
view_access_key
Returns information about a single access key for given account.
{
"jsonrpc": "2.0",
"result": {
"nonce": 85,
"permission": {
"FunctionCall": {
"allowance": "18501534631167209000000000",
"receiver_id": "client.chainlink.testnet",
"method_names": [
"get_token_price"
]
}
},
"block_height": 19884918,
"block_hash": "GGJQ8yjmo7aEoj8ZpAhGehnq9BSWFx4xswHYzDwwAP2n"
},
"id": "dontcare"
}
SpecificationView Specification
If permission
of the key is FunctionCall
, it will return more details such as the allowance
, receiver_id
, and method_names
.
Parameters
request_type
:view_access_key
finality
ORblock_id
account_id
:"example.testnet"
public_key
:"example.testnet's public key"
Response
nonce
permission
FunctionCall
allowance
receiver_id
method_names
block_height
block_hash
view_access_key_list
Query all access keys for a given account.
{
"jsonrpc": "2.0",
"result": {
"keys": [
{
"public_key": "ed25519:2j6qujbkPFuTstQLLTxKZUw63D5Wu3SG79Gop5JQrNJY",
"access_key": {
"nonce": 17,
"permission": {
"FunctionCall": {
"allowance": "9999203942481156415000",
"receiver_id": "place.meta",
"method_names": []
}
}
}
}
],
"block_height": 17798231,
"block_hash": "Gm7YSdx22wPuciW1jTTeRGP9mFqmon69ErFQvgcFyEEB"
},
"id": "dontcare"
}
SpecificationView Specification
Parameters
request_type
:view_access_key
finality
ORblock_id
account_id
:"example.testnet"
Response
keys
public_key
access_key
nonce
permission
FunctionCall
allowance
receiver_id
method_names
single_access_key_changes
Returns individual access key changes in a specific block. You can query multiple keys by passing an array of objects containing the account_id
and public_key
.
{
"jsonrpc": "2.0",
"result": {
"block_hash": "4kvqE1PsA6ic1LG7S5SqymSEhvjqGqumKjAxnVdNN3ZH",
"changes": [
{
"cause": {
"type": "transaction_processing",
"tx_hash": "HshPyqddLxsganFxHHeH9LtkGekXDCuAt6axVgJLboXV"
},
"type": "access_key_update",
"change": {
"account_id": "example-acct.testnet",
"public_key": "ed25519:25KEc7t7MQohAJ4EDThd2vkksKkwangnuJFzcoiXj9oM",
"access_key": {
"nonce": 1,
"permission": "FullAccess"
}
}
}
]
},
"id": "dontcare"
}
SpecificationView Specification
Parameters
changes_type
:single_access_key_changes
keys
:[{ account_id, public_key }]
finality
ORblock_id
Response
block_hash
changes
cause
type
change
account_id
public_key
access_key
nonce
permission
all_access_key_changes
Returns changes to all access keys of a specific block. Multiple accounts can be queried by passing an array of account_ids
.
{
"jsonrpc": "2.0",
"result": {
"block_hash": "4kvqE1PsA6ic1LG7S5SqymSEhvjqGqumKjAxnVdNN3ZH",
"changes": [
{
"cause": {
"type": "transaction_processing",
"tx_hash": "HshPyqddLxsganFxHHeH9LtkGekXDCuAt6axVgJLboXV"
},
"type": "access_key_update",
"change": {
"account_id": "example-acct.testnet",
"public_key": "ed25519:25KEc7t7MQohAJ4EDThd2vkksKkwangnuJFzcoiXj9oM",
"access_key": {
"nonce": 1,
"permission": "FullAccess"
}
}
},
{
"cause": {
"type": "receipt_processing",
"receipt_hash": "CetXstu7bdqyUyweRqpY9op5U1Kqzd8pq8T1kqfcgBv2"
},
"type": "access_key_update",
"change": {
"account_id": "example-acct.testnet",
"public_key": "ed25519:96pj2aVJH9njmAxakjvUMnNvdB3YUeSAMjbz9aRNU6XY",
"access_key": {
"nonce": 0,
"permission": "FullAccess"
}
}
}
]
},
"id": "dontcare"
}
SpecificationView Specification
Parameters
changes_type
:all_access_key_changes
account_ids
:[ "example.testnet", "example2.testnet"]
finality
ORblock_id
Response
block_hash
changes
cause
type
tx_hash
type
change
account_id
public_key
access_key
nonce
permission
view_account
Returns basic account information.
{
"jsonrpc": "2.0",
"result": {
"amount": "189286386321531738053058949",
"block_hash": "D2sPjidEGrpBXBUkVkhMAL2Rj1GGChF36RcjA1QSbMry",
"block_height": 73170897,
"code_hash": "DEoG4tzttRHJTCgrk6vKKof17gkthbvnqb3bdCuHmegf",
"locked": "0",
"storage_paid_at": 0,
"storage_usage": 541089
},
"id": "dontcare"
}
SpecificationView Specification
Parameters
request_type
:view_account
finality
ORblock_id
account_id
:"example.testnet"
Response
amount
locked
code_hash
storage_usage
storage_paid_at
block_height
block_hash
account_changes
Returns account changes from transactions in a given account.
{
"jsonrpc": "2.0",
"result": {
"block_hash": "F4B2FD2FWtx7qxD9YuMcTqTiySyrWqqqNj1SWtBZMmEB",
"changes": [
{
"cause": {
"tx_hash": "653FzhtCKrhsxR5nmzHcuP3AnL5eLQYFyhU6tU4qMydg",
"type": "transaction_processing"
},
"change": {
"account_id": "sputnikdao.near",
"amount": "59989664739855239700000000",
"code_hash": "8GX2jhqeKnopkiRSAGHMjs7dirER1eqVG4uEXT4HZUuk",
"locked": "0",
"storage_paid_at": 0,
"storage_usage": 467911
},
"type": "account_update"
},
{
"cause": {
"receipt_hash": "DYKJPrCyXupNBkj17zTiL7UvNZxyzVVzRtGYWaQM5AbR",
"type": "receipt_processing"
},
"change": {
"account_id": "sputnikdao.near",
"amount": "59989664739855239700000000",
"code_hash": "DEoG4tzttRHJTCgrk6vKKof17gkthbvnqb3bdCuHmegf",
"locked": "0",
"storage_paid_at": 0,
"storage_usage": 494487
},
"type": "account_update"
}
]
},
"id": "dontcare"
}
SpecificationView Specification
Parameters
changes_type
:account_changes
account_ids
:["example.testnet"]
finality
ORblock_id
Response
block_hash
changes
cause
type
tx_hash
type
change
account_id
public_key
access_key
nonce
permission
view_code
Returns the contract code (Wasm binary) deployed to the account. Please note that the returned code will be encoded in base64.
{
"jsonrpc": "2.0",
"result": {
"block_hash": "8s9jegTZwiDadVBoo8pNEZLjpmC3PnBtz7LjoU3pnNi8",
"block_height": 73171596,
"code_base64": "AGFzbQEAAAABtAM5YAF/AGACf38Bf2AAAX9gAn9+AGAEf35+",
"hash": "DEoG4tzttRHJTCgrk6vKKof17gkthbvnqb3bdCuHmegf"
},
"id": "dontcare"
}
SpecificationView Specification
Parameters
request_type
:view_code
finality
ORblock_id
account_id
:"guest-book.testnet"
Response
block_hash
block_height
code_base64
hash
view_state
Returns the state (key value pairs) of a contract based on the key prefix (base64 encoded). Pass an empty string for prefix_base64
if you would like to return the entire state. Please note that the returned state will be base64 encoded as well.
{
"jsonrpc": "2.0",
"result": {
"block_hash": "J6bg2zk6HhvN3h4yfxVpWsYZ1dsQqa9Yej3dsnMvjYCF",
"block_height": 73171820,
"proof": [],
"values": [
{
"key": "U1RBVEU=",
"proof": [],
"value": "AgAAAGRpJgEAAAAAAAACAAAAZGU="
}
]
},
"id": "dontcare"
}
SpecificationView Specification
Parameters
request_type
:view_state
finality
ORblock_id
account_id
:"guest-book.testnet"
prefix_base64
:""
Response
block_hash
block_height
proof
values
key
proof
value
data_changes
Returns the state change details of a contract based on the key prefix (encoded to base64). Pass an empty string for this param if you would like to return all state changes.
{
"jsonrpc": "2.0",
"result": {
"block_hash": "9wVGBcKVKnitVQWmx9zoDaFKprgrSqfwLqb8YHATqtZc",
"changes": []
},
"id": "dontcare"
}
SpecificationView Specification
Parameters
changes_type
:data_changes
account_ids
:["example.testnet"]
key_prefix_base64
:"base64 encoded key value"
finality
ORblock_id
Response
block_hash
changes
cause
type
receipt_hash
type
change
account_id
key_base64
value_base64
contract_code_changes
Returns code changes made when deploying a contract. Change is returned is a base64 encoded WASM file.
{
"jsonrpc": "2.0",
"result": {
"block_hash": "F4B2FD2FWtx7qxD9YuMcTqTiySyrWqqqNj1SWtBZMmEB",
"changes": []
},
"id": "dontcare"
}
SpecificationView Specification
Parameters
changes_type
:contract_code_changes
account_ids
:["example.testnet"]
finality
ORblock_id
Response
block_hash
changes
cause
type
receipt_hash
type
change
account_id
code_base64
call_function
Allows you to call a contract method as a view function.
{
"jsonrpc": "2.0",
"result": {
"result": [
48
],
"logs": [],
"block_height": 17817336,
"block_hash": "4qkA4sUUG8opjH5Q9bL5mWJTnfR4ech879Db1BZXbx6P"
},
"id": "dontcare"
}
SpecificationView Specification
Parameters
request_type
:call_function
finality
ORblock_id
account_id
:"example.testnet"
method_name
:name_of_a_example.testnet_method
args_base64
:method_arguments_base_64_encoded
Response
logs
block_height
block_hash
block
Queries network and returns block for given height or hash. You can also use finality param to return latest block details.
{
"jsonrpc": "2.0",
"result": {
"author": "bisontrails.poolv1.near",
"chunks": [
{
"balance_burnt": "977555664792700000000",
"chunk_hash": "B9Mr261qR8aRfVPaZGtM3KZcJ6nXqjbqj52T3BrPirFS",
"encoded_length": 326,
"encoded_merkle_root": "5GpzXFwo44QSV1osvqm5vL7uThzj7eyftDMvURVVCe5B",
"gas_limit": 1000000000000000,
"gas_used": 11490527390063,
"height_created": 73173942,
"height_included": 73173942,
"outcome_root": "D8omX78q1f1cS62ecnUxcwDMfBMUfawcT2ETZHnSsJMm",
"outgoing_receipts_root": "4uTbAbtxvvKuZ9ExyqyjmV7JsSJWYLdwcqaZY9YQDoRR",
"prev_block_hash": "34yRZxC9yGFMXsBsAUQcBxoyxyc7LDMERpfAktHASZu7",
"prev_state_root": "3PFuKF9ipWoMkYZpinsqJhqUVnLQqo2DiUocZV13P5EG",
"rent_paid": "0",
"shard_id": 0,
"signature": "ed25519:4RTRUL73ZTtysco3Nk2wx5d2287DiaB39393BEH54P9D1gvDbfnjEv2yTMbfJJhfQoVhvPd8fW8mUd5VJYSrhcgG",
"tx_root": "11111111111111111111111111111111",
"validator_proposals": [],
"validator_reward": "0"
}
],
"header": {
"approvals": [
null,
"ed25519:5UPPWQ3RQNtx9dUe24aAPk1xTgde2JHeQMWsfjSHM6J8JgGU6WUgxzgs3SGhNuyBbon1zNioFurgi6zvziZzT6EA"
],
"block_merkle_root": "HetTw1NKi5wQdxGmpFjQCMZ8utzwMreY46PphDA6ny6R",
"block_ordinal": 63167249,
"challenges_result": [],
"challenges_root": "11111111111111111111111111111111",
"chunk_headers_root": "2uHodRcbBc66fHDA2WrUhG1r8B1GPnHWqcBp2A3u4B25",
"chunk_mask": [
true,
true,
true,
true
],
"chunk_receipts_root": "8bihi66KrSB9RdHfka9NazuMfgvcYBArYX2qb9VYjFME",
"chunk_tx_root": "7TNacR2KyKioUYN14PPooBKbkJeTbGKPuRMSqGV3Du3q",
"chunks_included": 4,
"epoch_id": "Gefwb7u5fj3RiZ28ueV8AhkAPX1jK4QfVAXFBaVWq5KC",
"epoch_sync_data_hash": null,
"gas_price": "100000000",
"hash": "Dpi3DmbsGL6ojwjfuNdWEDg8WAZ2r9xpKjHfEQqwQhZ",
"height": 73173942,
"last_ds_final_block": "34yRZxC9yGFMXsBsAUQcBxoyxyc7LDMERpfAktHASZu7",
"last_final_block": "J5cpihee5EUr5hVkJ3tptRQjTTB3ujWbhmnrDeVrQz4q",
"latest_protocol_version": 55,
"next_bp_hash": "H58wwsQQZJHdrEQnXFgFpkgRX8ZBEzbFZFkJSYi4KSVb",
"next_epoch_id": "53Yk9F2LmNHEi61iaPTxZRv2atnNSDZgcDvVNQXcaixb",
"outcome_root": "23G1c7VAXpizmKMkKToGBMZ1XcX6mTRMyKNcir2Juj5r",
"prev_hash": "34yRZxC9yGFMXsBsAUQcBxoyxyc7LDMERpfAktHASZu7",
"prev_height": 73173941,
"prev_state_root": "BxGqw3BWUMuCDP3LhxXtCM62ZV969J4sJkCByj7JbbiG",
"random_value": "3ogpCShnEHjKXpgq4ZHbzAHUgGKV8Yn4gBhE9JSk1R9C",
"rent_paid": "0",
"signature": "ed25519:5AnSdCTQwUmkPFu4ysXaYx6voJcVPPYmLz9Nr8RgrHozf3DLhiKnv4JB9PUhAmuSZsWVN8LTYKKPRLitCkTZdNXi",
"timestamp": 1661939099626601200,
"timestamp_nanosec": "1661939099626601251",
"total_supply": "1095837471737522425899251825468102",
"validator_proposals": [],
"validator_reward": "0"
}
},
"id": "dontcare"
}
SpecificationView Specification
Parameters
finality
ORblock_id
Response
Returns the complete block details based on the given params
.
EXPERIMENTAL_changes_in_block
Returns changes in block for given block height or hash. You can also use finality param to return latest block details.
{
"jsonrpc": "2.0",
"result": {
"block_hash": "2bh35kJs2tSPsXK2r7WzthcH6WnnNhz6to1ghkhLbFn8",
"changes": [
{
"account_id": "210488eb227b583208c557a391c730ec4a9ed44f52c3bafa941f712a4b2a96ef",
"type": "account_touched"
}
]
},
"id": "dontcare"
}
SpecificationView Specification
Parameters
finality
ORblock_id
Response
block_hash
changes
type
account_id
chunk
Returns details of a specific chunk. You can run a block details query to get a valid chunk hash.
{
"jsonrpc": "2.0",
"result": {
"author": "valisaurus-dex.poolv1.near",
"header": {
"balance_burnt": "976046224998000000000",
"chunk_hash": "14DZnoBr553YvtEcGa1bFyTW9NjqH3eWRT6GAHC4uL3i",
"encoded_length": 728,
"encoded_merkle_root": "J8HcBWtkRAfbRtwUiWuJ6J5dXWACJe9swojEHquXJVXm",
"gas_limit": 1000000000000000,
"gas_used": 10821705468139,
"height_created": 73175261,
"height_included": 73175261,
"outcome_root": "2g1x1PijdknbyzhHSQjHvMpeFutUoVn1DupLkxsut6Ty",
"outgoing_receipts_root": "AcNxCkC3soeEaHMKrW4dzTmJnU4ziuNF5not3HmfsSsQ",
"prev_block_hash": "4urrRJLYPMpmyqB4DriqEB3NEb9RHQQbDqXNGx8bLGFL",
"prev_state_root": "GyQvVL7EVjLAQiC4vHNo3YPAVaAw9SJcGnKKbRLvBkkS",
"rent_paid": "0",
"shard_id": 0,
"signature": "ed25519:3cABs4JrzdA2zUcdK9owvkQc5MjEBkVF3WEqDZKK44wgKhNU9uKcZCHNdec9bum3qXb5LssDiAmzeAuQYgd9aWVu",
"tx_root": "274HY8uVNqEVAD4sNXt96d6oBtKv2M3SuY2FrhDTiqi2",
"validator_proposals": [],
"validator_reward": "0"
},
"receipts": [
{
"predecessor_id": "system",
"receipt": {
"Action": {
"actions": [
{
"Transfer": {
"deposit": "67641599476955457469402"
}
}
],
"gas_price": "0",
"input_data_ids": [],
"output_data_receivers": [],
"signer_id": "app.nearcrowd.near",
"signer_public_key": "ed25519:6j4aNwVBP1TTQxcnM36buQoZs3r7bZ48VpU7K1zRbTZ5"
}
},
"receipt_id": "6Te2Xa56juJh2rpv47Zk4M2AXW6PSRzBoDQTpRSYBoRN",
"receiver_id": "app.nearcrowd.near"
},
{
"predecessor_id": "system",
"receipt": {
"Action": {
"actions": [
{
"Transfer": {
"deposit": "3521070226284817854228"
}
}
],
"gas_price": "0",
"input_data_ids": [],
"output_data_receivers": [],
"signer_id": "konstal.near",
"signer_public_key": "ed25519:2Xg6SNuoFka8uGpkowVkRdR5ZLNrNcEj8qVNAWHg8ZaF"
}
},
"receipt_id": "7mYGqGaBJzL1TP9PMQApcBux3oRjdr4W2kJnckQaMZvC",
"receiver_id": "konstal.near"
}
],
"transactions": [
{
"actions": [
{
"FunctionCall": {
"args": "eyJhY2NvdW50X2lkIjoidzIwMjIubmVhciIsInNvbHV0aW9uX2hhc2giOlsxNzksMjE5LDE0MiwxNTYsMjMyLDEyMywxODMsMjQ2LDU2LDEyNywxMzUsODAsMTIxLDk4LDExMCwxNTYsMjQwLDEzNSwyMTksMjE5LDEzOCwyNDQsMjEyLDEzOCwxMjQsMTYxLDM2LDE1LDIyOSwxMjksMTIyLDcxXX0=",
"deposit": "0",
"gas": 200000000000000,
"method_name": "approve_solution"
}
}
],
"hash": "8VvJxkWMNwvfZcS32Ggj8T3qZ54sfmuKYBBBW8qj6eFX",
"nonce": 43616690618388,
"public_key": "ed25519:2nHbwSRK1QXoVcJmNDx7325AhVJ1b5oGvP4CEphFiANN",
"receiver_id": "app.nearcrowd.near",
"signature": "ed25519:5xkDX5jv4D3H1iSo6E8vhZd4txQbtovP1RVe97p48PjnQw6nhe4UwVGej8rkAH3cYJkM8SLLFKgdG3ahVce6fge9",
"signer_id": "app.nearcrowd.near"
}
]
},
"id": "dontcare"
}
SpecificationView Specification
Parameters
chunk_id
ORblock_id
,shard_id
Response
- In response, it returns the complete details of the specific chunk.
gas_price
Returns gas price for a specific block_height
or block_hash
.
{
"jsonrpc": "2.0",
"result": {
"gas_price": "100000000"
},
"id": "dontcare"
}
SpecificationView Specification
Using [null]
will return the most recent block's gas price.
Parameters
[block_height]
,["block_hash"]
, or[null]
Response
gas_price
return the most recent block or specific block as per the givenparams
.
EXPERIMENTAL_genesis_config
Returns current genesis configuration.
{
"jsonrpc": "2.0",
"result": {
"avg_hidden_validator_seats_per_shard": [
0
],
"block_producer_kickout_threshold": 90,
"chain_id": "mainnet",
"chunk_producer_kickout_threshold": 90,
"dynamic_resharding": false,
"epoch_length": 43200,
"fishermen_threshold": "340282366920938463463374607431768211455",
"gas_limit": 1000000000000000,
"gas_price_adjustment_rate": [
1,
100
],
"genesis_height": 9820210,
"genesis_time": "2020-07-21T16:55:51.591948Z",
"max_gas_price": "10000000000000000000000",
"max_inflation_rate": [
0,
1
],
"min_gas_price": "1000000000",
"minimum_stake_divisor": 10,
"minimum_stake_ratio": [
1,
6250
],
"num_block_producer_seats": 100,
"num_block_producer_seats_per_shard": [
100
],
"num_blocks_per_year": 31536000,
"online_max_threshold": [
99,
100
],
"online_min_threshold": [
90,
100
],
"protocol_reward_rate": [
0,
1
],
"protocol_treasury_account": "treasury.near",
"protocol_upgrade_num_epochs": 2,
"protocol_upgrade_stake_threshold": [
4,
5
],
"protocol_version": 29,
"shard_layout": {
"V0": {
"num_shards": 1,
"version": 0
}
},
"simple_nightshade_shard_layout": {
"V1": {
"boundary_accounts": [
"aurora",
"aurora-0",
"kkuuue2akv_1630967379.near"
],
"fixed_shards": [],
"shards_split_map": [
[
0,
1,
2,
3
]
],
"to_parent_shard_map": [
0,
0,
0,
0
],
"version": 1
}
},
"total_supply": "999999999792372916156395166000000",
"transaction_validity_period": 86400,
"validators": [
{
"account_id": "nfvalidator1.near",
"amount": "50000000000000000000000000000",
"public_key": "ed25519:14pWWRutZtGFKX4B8q89KVFaUWY1Cqu1JcqYXhCDeFh1"
},
{
"account_id": "nfvalidator2.near",
"amount": "50000000000000000000000000000",
"public_key": "ed25519:BwZk4bkYJxo79P2vSRw2uk1nfiqEfVkHvr5p8eVsqASC"
},
{
"account_id": "nfvalidator3.near",
"amount": "50000000000000000000000000000",
"public_key": "ed25519:DMz11tmPvhdqpi7CzP2JULeeSE8SxYRD8pys5nKke4FS"
},
{
"account_id": "nfvalidator4.near",
"amount": "50000000000000000000000000000",
"public_key": "ed25519:Fi3CQDHJoviKazVR27YmfFzWcFnvmoPBKEDd9ouq5Tjx"
}
]
},
"id": "dontcare"
}
SpecificationView Specification
Parameters
- None
Response
- In response, returns the complete details of the current genesis configuration including
avg_hidden_validator_seats_per_shard
,block_producer_kickout_threshold
,chunk_producer_kickout_threshold
,gas_limit
etc.
EXPERIMENTAL_protocol_config
Returns most recent protocol configuration or a specific queried block. Useful for finding current storage and transaction costs.
{
"jsonrpc": "2.0",
"result": {
"avg_hidden_validator_seats_per_shard": [
0,
0,
0,
0
],
"block_producer_kickout_threshold": 90,
"chain_id": "mainnet",
"chunk_producer_kickout_threshold": 90,
"dynamic_resharding": false,
"epoch_length": 43200,
"fishermen_threshold": "340282366920938463463374607431768211455",
"gas_limit": 1000000000000000,
"gas_price_adjustment_rate": [
1,
100
],
"genesis_height": 9820210,
"genesis_time": "2020-07-21T16:55:51.591948Z",
"max_gas_price": "10000000000000000000000",
"max_inflation_rate": [
0,
1
],
"min_gas_price": "1000000000",
"minimum_stake_divisor": 10,
"num_block_producer_seats": 100,
"num_block_producer_seats_per_shard": [
100,
100,
100,
100
],
"num_blocks_per_year": 31536000,
"online_max_threshold": [
99,
100
],
"online_min_threshold": [
90,
100
],
"protocol_reward_rate": [
0,
1
],
"protocol_treasury_account": "treasury.near",
"protocol_upgrade_stake_threshold": [
4,
5
],
"protocol_version": 55,
"runtime_config": {
"account_creation_config": {
"min_allowed_top_level_account_length": 32,
"registrar_account_id": "registrar"
},
"storage_amount_per_byte": "10000000000000000000",
"transaction_costs": {
"action_creation_config": {
"add_key_cost": {
"full_access_cost": {
"execution": 101765125000,
"send_not_sir": 101765125000,
"send_sir": 101765125000
},
"function_call_cost": {
"execution": 102217625000,
"send_not_sir": 102217625000,
"send_sir": 102217625000
},
"function_call_cost_per_byte": {
"execution": 1925331,
"send_not_sir": 1925331,
"send_sir": 1925331
}
},
"create_account_cost": {
"execution": 99607375000,
"send_not_sir": 99607375000,
"send_sir": 99607375000
},
"delete_account_cost": {
"execution": 147489000000,
"send_not_sir": 147489000000,
"send_sir": 147489000000
},
"delete_key_cost": {
"execution": 94946625000,
"send_not_sir": 94946625000,
"send_sir": 94946625000
},
"deploy_contract_cost": {
"execution": 184765750000,
"send_not_sir": 184765750000,
"send_sir": 184765750000
},
"deploy_contract_cost_per_byte": {
"execution": 64572944,
"send_not_sir": 6812999,
"send_sir": 6812999
},
"function_call_cost": {
"execution": 2319861500000,
"send_not_sir": 2319861500000,
"send_sir": 2319861500000
},
"function_call_cost_per_byte": {
"execution": 2235934,
"send_not_sir": 2235934,
"send_sir": 2235934
},
"stake_cost": {
"execution": 102217625000,
"send_not_sir": 141715687500,
"send_sir": 141715687500
},
"transfer_cost": {
"execution": 115123062500,
"send_not_sir": 115123062500,
"send_sir": 115123062500
}
},
"action_receipt_creation_config": {
"execution": 108059500000,
"send_not_sir": 108059500000,
"send_sir": 108059500000
},
"burnt_gas_reward": [
3,
10
],
"data_receipt_creation_config": {
"base_cost": {
"execution": 36486732312,
"send_not_sir": 36486732312,
"send_sir": 36486732312
},
"cost_per_byte": {
"execution": 17212011,
"send_not_sir": 17212011,
"send_sir": 17212011
}
},
"pessimistic_gas_price_inflation_ratio": [
103,
100
],
"storage_usage_config": {
"num_bytes_account": 100,
"num_extra_bytes_record": 40
}
},
"wasm_config": {
"ext_costs": {
"alt_bn128_g1_multiexp_base": 713000000000,
"alt_bn128_g1_multiexp_element": 320000000000,
"alt_bn128_g1_sum_base": 3000000000,
"alt_bn128_g1_sum_element": 5000000000,
"alt_bn128_pairing_check_base": 9686000000000,
"alt_bn128_pairing_check_element": 5102000000000,
"base": 264768111,
"contract_compile_base": 0,
"contract_compile_bytes": 0,
"contract_loading_base": 35445963,
"contract_loading_bytes": 216750,
"ecrecover_base": 278821988457,
"keccak256_base": 5879491275,
"keccak256_byte": 21471105,
"keccak512_base": 5811388236,
"keccak512_byte": 36649701,
"log_base": 3543313050,
"log_byte": 13198791,
"promise_and_base": 1465013400,
"promise_and_per_promise": 5452176,
"promise_return": 560152386,
"read_cached_trie_node": 2280000000,
"read_memory_base": 2609863200,
"read_memory_byte": 3801333,
"read_register_base": 2517165186,
"read_register_byte": 98562,
"ripemd160_base": 853675086,
"ripemd160_block": 680107584,
"sha256_base": 4540970250,
"sha256_byte": 24117351,
"storage_has_key_base": 54039896625,
"storage_has_key_byte": 30790845,
"storage_iter_create_from_byte": 0,
"storage_iter_create_prefix_base": 0,
"storage_iter_create_prefix_byte": 0,
"storage_iter_create_range_base": 0,
"storage_iter_create_to_byte": 0,
"storage_iter_next_base": 0,
"storage_iter_next_key_byte": 0,
"storage_iter_next_value_byte": 0,
"storage_read_base": 56356845750,
"storage_read_key_byte": 30952533,
"storage_read_value_byte": 5611005,
"storage_remove_base": 53473030500,
"storage_remove_key_byte": 38220384,
"storage_remove_ret_value_byte": 11531556,
"storage_write_base": 64196736000,
"storage_write_evicted_byte": 32117307,
"storage_write_key_byte": 70482867,
"storage_write_value_byte": 31018539,
"touching_trie_node": 16101955926,
"utf16_decoding_base": 3543313050,
"utf16_decoding_byte": 163577493,
"utf8_decoding_base": 3111779061,
"utf8_decoding_byte": 291580479,
"validator_stake_base": 911834726400,
"validator_total_stake_base": 911834726400,
"write_memory_base": 2803794861,
"write_memory_byte": 2723772,
"write_register_base": 2865522486,
"write_register_byte": 3801564
},
"grow_mem_cost": 1,
"limit_config": {
"initial_memory_pages": 1024,
"max_actions_per_receipt": 100,
"max_arguments_length": 4194304,
"max_contract_size": 4194304,
"max_functions_number_per_contract": 10000,
"max_gas_burnt": 300000000000000,
"max_length_method_name": 256,
"max_length_returned_data": 4194304,
"max_length_storage_key": 2048,
"max_length_storage_value": 4194304,
"max_locals_per_contract": 1000000,
"max_memory_pages": 2048,
"max_number_bytes_method_names": 2000,
"max_number_input_data_dependencies": 128,
"max_number_logs": 100,
"max_number_registers": 100,
"max_promises_per_function_call_action": 1024,
"max_register_size": 104857600,
"max_stack_height": 16384,
"max_total_log_length": 16384,
"max_total_prepaid_gas": 300000000000000,
"max_transaction_size": 4194304,
"registers_memory_limit": 1073741824,
"stack_limiter_version": 1,
"wasmer2_stack_limit": 204800
},
"regular_op_cost": 822756
}
},
"transaction_validity_period": 86400
},
"id": "dontcare"
}
SpecificationView Specification
Parameters
finality
ORblock_id
Response
- In response, returns the complete details of the current protocol configuration including
avg_hidden_validator_seats_per_shard
,block_producer_kickout_threshold
,chunk_producer_kickout_threshold
,protocol_version
etc.
status
Returns general status of a given node (sync status, nearcore node version, protocol version, etc), and the current set of validators.Text
{
"jsonrpc": "2.0",
"result": {
"chain_id": "mainnet",
"latest_protocol_version": 55,
"protocol_version": 55,
"rpc_addr": "0.0.0.0:3030",
"sync_info": {
"earliest_block_hash": "EPnLgE7iEq9s7yTkos96M3cWymH5avBAPm3qx3NXqR8H",
"earliest_block_height": 9820210,
"earliest_block_time": "2020-07-21T16:55:51.591948Z",
"epoch_id": "Gefwb7u5fj3RiZ28ueV8AhkAPX1jK4QfVAXFBaVWq5KC",
"epoch_start_height": 73151490,
"latest_block_hash": "2wkkNhPGKZvjXg3XT9Jmf9LUEWsAnTngmfNYsvyatHn9",
"latest_block_height": 73176809,
"latest_block_time": "2022-08-31T10:44:17.356187134Z",
"latest_state_root": "C7edysngCaz9jmfJMBE53NCD3tsGhqFpZe4fhjdqzzYQ",
"syncing": false
},
"validator_account_id": null,
"validators": [
{
"account_id": "bzam6yjpnfnxsdmjf6pw.poolv1.near",
"is_slashed": false
}
],
"version": {
"build": "crates-0.14.0-149-gef8862918",
"rustc_version": "1.61.0",
"version": "1.28.0"
}
},
"id": "dontcare"
}
SpecificationView Specification
Parameters
- None
Response
chain_id
latest_protocol_version
protocol_versio
rpc_addr
sync_info: {}
validator_account_id
validators: []
version: {}
network_info
Returns the current state of node network connections (active peers, transmitted data, etc.)
{
"jsonrpc": "2.0",
"result": {
"active_peers": [
{
"account_id": null,
"addr": "207.244.67.44:24567",
"id": "ed25519:9yADGZcz8rSejReu1fL7t5e7yGvGXVRqwbxrTM3rVLtw"
}
],
"num_active_peers": 35,
"peer_max_count": 40,
"received_bytes_per_sec": 514421,
"sent_bytes_per_sec": 397123
},
"id": "dontcare"
}
SpecificationView Specification
Parameters
- None
Response
- In response, returns the
active_peers: []
,num_active_peers
,peer_max_count
,received_bytes_per_sec
andsent_bytes_per_sec
.
validators
Queries active validators on the network returning details and the state of validation on the blockchain.
{
"jsonrpc": "2.0",
"result": {
"current_fishermen": [],
"current_proposals": [
{
"account_id": "01node.poolv1.near",
"public_key": "ed25519:5xz7EbcnPqabwoFezdJBxieK8S7XLsdHHuLwM4vLLhFt",
"stake": "1827919059723716919597893312488",
"validator_stake_struct_version": "V1"
},
{
"account_id": "figment.poolv1.near",
"public_key": "ed25519:7RjyY1bRKDqkshbKZtgpQdwsdxou8j9my8g1hPKZ9ngM",
"stake": "7088479599020075087314556988965",
"validator_stake_struct_version": "V1"
}
],
"current_validators": [
{
"account_id": "bzam6yjpnfnxsdmjf6pw.poolv1.near",
"is_slashed": false,
"num_expected_blocks": 1467,
"num_expected_chunks": 5856,
"num_produced_blocks": 1466,
"num_produced_chunks": 5856,
"public_key": "ed25519:2ZJqaaCAisK4u8E2i611zFfvNmrvevovnU3M7SpGHkLY",
"shards": [
0,
1,
2,
3
],
"stake": "24650164586763137288581875265633"
}
],
"prev_epoch_kickout": [
{
"account_id": "fresh.poolv1.near",
"reason": {
"NotEnoughBlocks": {
"expected": 181,
"produced": 156
}
}
}
]
},
"id": "dontcare"
}
SpecificationView Specification
Parameters
["block hash"]
,[block number]
, or[null]
for the latest block Note: For["block hash"]
&[block number]
you will need to query from the last block in an epoch.
Response
- In response, returns the complete details of
current_fishermen
,current_proposals
,current_validators
andprev_epoch_kickout
.
broadcast_tx_async
Sends a transaction and immediately returns transaction hash.
{
"jsonrpc": "2.0",
"result": "6zgh2u9DqHHiXzdy9ouTP7oGky2T4nugqzqt9wJZwNFm",
"id": "dontcare"
}
SpecificationView Specification
Parameters
- [SignedTransaction encoded in base64]
Response
- Returns the transaction hash of the broadcasted transaction.
broadcast_tx_commit
Sends a transaction and waits until transaction is fully complete. (Has a 10 second timeout)
{
"jsonrpc": "2.0",
"result": {
"status": {
"SuccessValue": ""
},
"transaction": {
"signer_id": "sender.testnet",
"public_key": "ed25519:Gowpa4kXNyTMRKgt5W7147pmcc2PxiFic8UHW9rsNvJ6",
"nonce": 13,
"receiver_id": "receiver.testnet",
"actions": [
{
"Transfer": {
"deposit": "1000000000000000000000000"
}
}
],
"signature": "ed25519:7oCBMfSHrZkT7tzPDBxxCd3tWFhTES38eks3MCZMpYPJRfPWKxJsvmwQiVBBxRLoxPTnXVaMU2jPV3MdFKZTobH",
"hash": "ASS7oYwGiem9HaNwJe6vS2kznx2CxueKDvU9BAYJRjNR"
},
"transaction_outcome": {
"proof": [],
"block_hash": "9MzuZrRPW1BGpFnZJUJg6SzCrixPpJDfjsNeUobRXsLe",
"id": "ASS7oYwGiem9HaNwJe6vS2kznx2CxueKDvU9BAYJRjNR",
"outcome": {
"logs": [],
"receipt_ids": [
"BLV2q6p8DX7pVgXRtGtBkyUNrnqkNyU7iSksXG7BjVZh"
],
"gas_burnt": 223182562500,
"tokens_burnt": "22318256250000000000",
"executor_id": "sender.testnet",
"status": {
"SuccessReceiptId": "BLV2q6p8DX7pVgXRtGtBkyUNrnqkNyU7iSksXG7BjVZh"
}
}
},
"receipts_outcome": [
{
"proof": [],
"block_hash": "5Hpj1PeCi32ZkNXgiD1DrW4wvW4Xtic74DJKfyJ9XL3a",
"id": "BLV2q6p8DX7pVgXRtGtBkyUNrnqkNyU7iSksXG7BjVZh",
"outcome": {
"logs": [],
"receipt_ids": [
"3sawynPNP8UkeCviGqJGwiwEacfPyxDKRxsEWPpaUqtR"
],
"gas_burnt": 223182562500,
"tokens_burnt": "22318256250000000000",
"executor_id": "receiver.testnet",
"status": {
"SuccessValue": ""
}
}
},
{
"proof": [],
"block_hash": "CbwEqMpPcu6KwqVpBM3Ry83k6M4H1FrJjES9kBXThcRd",
"id": "3sawynPNP8UkeCviGqJGwiwEacfPyxDKRxsEWPpaUqtR",
"outcome": {
"logs": [],
"receipt_ids": [],
"gas_burnt": 0,
"tokens_burnt": "0",
"executor_id": "sender.testnet",
"status": {
"SuccessValue": ""
}
}
}
]
},
"id": "dontcare"
}
SpecificationView Specification
Parameters
- [SignedTransaction encoded in base64]
Response
Returns the multiple objects with transaction details -
status
transaction
signature
transaction_outcome
receipts_outcome
tx
Queries the status of a transaction by hash and returns the final transaction result.
{
"jsonrpc": "2.0",
"result": {
"receipts_outcome": [
{
"block_hash": "AqgR1quHWLPor6ZdpHHuRM3aZyyeSL2xzWn8fYPK7cnV",
"id": "GEuQs8ejZv14mhL8BvfhGXyPaEgSyPYXGdw16LsiFHoJ",
"outcome": {
"executor_id": "yash.near",
"gas_burnt": 223182562500,
"logs": [],
"metadata": {
"gas_profile": null,
"version": 1
},
"receipt_ids": [
"418hvqtnwYnRpNoc1BnmGPYFZfSssxaPDYQ1Wb5d15Zo"
],
"status": {
"SuccessValue": ""
},
"tokens_burnt": "22318256250000000000"
},
"proof": [
{
"direction": "Right",
"hash": "D34qgy5VzAsT9cq79Wt9rBosdd1gMbJ4zcGciKjDSAvE"
},
{
"direction": "Right",
"hash": "2V67Tref8f1Ta8xj5LkoVoTUnPdxKkg3JRRFnj39S9Fj"
},
{
"direction": "Right",
"hash": "FoLAzv64b6j9hE4nFTwpxyNjdm6w7g8c5rd9ajLCb88r"
}
]
},
{
"block_hash": "Co8Vn9FoLxuKhaN7cQM4Kzm4Jnyu3YVfMF1iiddPDmkb",
"id": "418hvqtnwYnRpNoc1BnmGPYFZfSssxaPDYQ1Wb5d15Zo",
"outcome": {
"executor_id": "roganx.near",
"gas_burnt": 0,
"logs": [],
"metadata": {
"gas_profile": null,
"version": 1
},
"receipt_ids": [],
"status": {
"SuccessValue": ""
},
"tokens_burnt": "0"
},
"proof": [
{
"direction": "Right",
"hash": "915QxNxgSJA53vwgYzkCkTszqAM9DdL3c2aXPn6gKYZY"
},
{
"direction": "Right",
"hash": "2JunKyjrzGDcukJc8zH87hkpi1GwSmN7tAsoPtMPKw1d"
},
{
"direction": "Left",
"hash": "6ecaDknE3uxLZQHuCeAb12mgNMbXEJTTn69HoQquGk6"
},
{
"direction": "Right",
"hash": "AZZ9Nw3qSVLAuwqpQbjf47smx7ki5MFbmHNfxRdKtUzY"
}
]
}
],
"status": {
"SuccessValue": ""
},
"transaction": {
"actions": [
{
"Transfer": {
"deposit": "16000000000000000000000000"
}
}
],
"hash": "3aL4tK4VS8B7vABWXsRWZXgwtXKNvQzZfy4qpWK6kLBr",
"nonce": 13,
"public_key": "ed25519:R5EhG8no8C6UhVp64dWjH2RvWrwbmNfUUfMqQBY5jHk",
"receiver_id": "yash.near",
"signature": "ed25519:2fJnCHSi5tUetB8KaA82TzTrRHrwdtjfYywrrZfCHJ51JK3byszmo9eyhSwJBc4szRXVJSUKwh5dGBXH7GFHm9st",
"signer_id": "roganx.near"
},
"transaction_outcome": {
"block_hash": "F4R9dEEk1SPBqP463CfBBgUYxVCB5QEFjLZaRStGHeS3",
"id": "3aL4tK4VS8B7vABWXsRWZXgwtXKNvQzZfy4qpWK6kLBr",
"outcome": {
"executor_id": "roganx.near",
"gas_burnt": 223182562500,
"logs": [],
"metadata": {
"gas_profile": null,
"version": 1
},
"receipt_ids": [
"GEuQs8ejZv14mhL8BvfhGXyPaEgSyPYXGdw16LsiFHoJ"
],
"status": {
"SuccessReceiptId": "GEuQs8ejZv14mhL8BvfhGXyPaEgSyPYXGdw16LsiFHoJ"
},
"tokens_burnt": "22318256250000000000"
},
"proof": [
{
"direction": "Right",
"hash": "XNqdhz7CApou7e5R3VBrCCjA6ucS8kSSLzYhqy4ZW2M"
},
{
"direction": "Right",
"hash": "HbAP8gRyNFTuoVT8iLeWsiUHEtCotCrZiSm6a6ji7fyG"
},
{
"direction": "Right",
"hash": "6eKrdbR5EgrK4bsHCBPS728ZXyUi5CoWdVwZnPgtNrTg"
}
]
}
},
"id": "dontcare"
}
SpecificationView Specification
Parameters
transaction hash
(see NEAR Explorer for a valid transaction hash)sender account id
Response
Returns the multiple objects with transaction details -
status
transaction
signature
transaction_outcome
receipts_outcome
EXPERIMENTAL_tx_status
Queries status of a transaction by hash, returning the final transaction result and details of all receipts.
{
"jsonrpc": "2.0",
"result": {
"receipts": [
{
"predecessor_id": "roganx.near",
"receipt": {
"Action": {
"actions": [
{
"Transfer": {
"deposit": "16000000000000000000000000"
}
}
],
"gas_price": "103000000",
"input_data_ids": [],
"output_data_receivers": [],
"signer_id": "roganx.near",
"signer_public_key": "ed25519:R5EhG8no8C6UhVp64dWjH2RvWrwbmNfUUfMqQBY5jHk"
}
},
"receipt_id": "GEuQs8ejZv14mhL8BvfhGXyPaEgSyPYXGdw16LsiFHoJ",
"receiver_id": "yash.near"
}
],
"receipts_outcome": [
{
"block_hash": "AqgR1quHWLPor6ZdpHHuRM3aZyyeSL2xzWn8fYPK7cnV",
"id": "GEuQs8ejZv14mhL8BvfhGXyPaEgSyPYXGdw16LsiFHoJ",
"outcome": {
"executor_id": "yash.near",
"gas_burnt": 223182562500,
"logs": [],
"metadata": {
"gas_profile": null,
"version": 1
},
"receipt_ids": [
"418hvqtnwYnRpNoc1BnmGPYFZfSssxaPDYQ1Wb5d15Zo"
],
"status": {
"SuccessValue": ""
},
"tokens_burnt": "22318256250000000000"
},
"proof": [
{
"direction": "Right",
"hash": "D34qgy5VzAsT9cq79Wt9rBosdd1gMbJ4zcGciKjDSAvE"
}
]
},
{
"block_hash": "Co8Vn9FoLxuKhaN7cQM4Kzm4Jnyu3YVfMF1iiddPDmkb",
"id": "418hvqtnwYnRpNoc1BnmGPYFZfSssxaPDYQ1Wb5d15Zo",
"outcome": {
"executor_id": "roganx.near",
"gas_burnt": 0,
"logs": [],
"metadata": {
"gas_profile": null,
"version": 1
},
"receipt_ids": [],
"status": {
"SuccessValue": ""
},
"tokens_burnt": "0"
},
"proof": [
{
"direction": "Right",
"hash": "915QxNxgSJA53vwgYzkCkTszqAM9DdL3c2aXPn6gKYZY"
}
]
}
],
"status": {
"SuccessValue": ""
},
"transaction": {
"actions": [
{
"Transfer": {
"deposit": "16000000000000000000000000"
}
}
],
"hash": "3aL4tK4VS8B7vABWXsRWZXgwtXKNvQzZfy4qpWK6kLBr",
"nonce": 13,
"public_key": "ed25519:R5EhG8no8C6UhVp64dWjH2RvWrwbmNfUUfMqQBY5jHk",
"receiver_id": "yash.near",
"signature": "ed25519:2fJnCHSi5tUetB8KaA82TzTrRHrwdtjfYywrrZfCHJ51JK3byszmo9eyhSwJBc4szRXVJSUKwh5dGBXH7GFHm9st",
"signer_id": "roganx.near"
},
"transaction_outcome": {
"block_hash": "F4R9dEEk1SPBqP463CfBBgUYxVCB5QEFjLZaRStGHeS3",
"id": "3aL4tK4VS8B7vABWXsRWZXgwtXKNvQzZfy4qpWK6kLBr",
"outcome": {
"executor_id": "roganx.near",
"gas_burnt": 223182562500,
"logs": [],
"metadata": {
"gas_profile": null,
"version": 1
},
"receipt_ids": [
"GEuQs8ejZv14mhL8BvfhGXyPaEgSyPYXGdw16LsiFHoJ"
],
"status": {
"SuccessReceiptId": "GEuQs8ejZv14mhL8BvfhGXyPaEgSyPYXGdw16LsiFHoJ"
},
"tokens_burnt": "22318256250000000000"
},
"proof": [
{
"direction": "Right",
"hash": "XNqdhz7CApou7e5R3VBrCCjA6ucS8kSSLzYhqy4ZW2M"
}
]
}
},
"id": "dontcare"
}
SpecificationView Specification
Parameters
transaction hash
(see NEAR Explorer for a valid transaction hash)sender account id
(used to determine which shard to query for the transaction)
Response
Returns the multiple objects with final transaction details -
receipts
receipts_outcome
status
transaction
transaction_outcome