NEAR
NEAR API is available on Web3 API platform.
NEAR is a user-friendly and carbon-neutral blockchain, built from the ground up to be performant, secure, and infinitely scalable.
In technical terms, NEAR is a layer one, sharded, proof-of-stake blockchain built with usability in mind.
In order for your Web3 application to interact with NEAR — either by reading blockchain data or sending transactions to the network — it must connect to a NEAR node. Developers interact with the blockchain using the methods provided by the API.
Responses come in JSON format.
Methods supported
Access Keys — to retrieve information about an account's access keys.
- View access key — retrieves information about a single access key for a given account.
- View access key list — retrieves all access keys for a given account.
- View access key changes (single) — retrieves individual access key changes in a specific block.
- View access key changes (all) — retrieves changes to all access keys of a specific block.
Accounts/Contracts — to view details about accounts and contracts as well as perform contract calls.
- View account — retrieves basic account information.
- View account changes — retrieves account changes from transactions in a given account.
- View contract code — retrieves the contract code (Wasm binary) deployed to the account.
- View contract state — retrieves the state (key value pairs) of a contract based on the key prefix (base64 encoded).
- View contract state changes — retrieves the state change details of a contract based on the key prefix (encoded to base64).
- View contract code changes — retrieves code changes made when deploying a contract.
- Call a contract function — calls a contract method as a view function.
Block/Chunk — to query the network and get details about specific blocks or chunks.
- Block details — retrieves the block for a given height or hash.
- Changes in block — retrieves the changes in a block for a given block height or hash.
- Chunk details — retrieves details of a specific chunk.
Gas — to query the gas price for a specific block or hash.
- Gas price — retrieves the gas price for a specific block height or block hash.
Protocol — to retrieve the current genesis and protocol configuration.
- Genesis config — retrieves the current genesis configuration.
- Protocol config — retrieves the most recent protocol configuration or a specified block.
Network — to query status information for nodes and validators.
- Validation status — queries active validators on the network returning details and the state of validation on the blockchain.
Transactions — to send transactions and query their status.
- Send transaction (async) — sends a transaction and immediately returns transaction hash.
- Send transaction (await) — sends a transaction and waits until transaction is fully completed (has a 10-second timeout).
- Transaction status — queries status of a transaction by hash and returns the final transaction result.
- Transaction status with receipts — queries status of a transaction by hash, returning the final transaction result and details of all receipts.
- Receipt by ID — retrieves a receipt by its ID (as is, without a status or execution outcome).
Methods
Access Keys, Accounts/Contracts, Block/Chunk, Gas, Protocol
View access keyView access key listView access key changes (single)View access key changes (all)View accountView account changesView contract codeView contract stateView contract state changesView contract code changesCall a contract functionBlock detailsChanges in blockChunk detailsGas priceGenesis config