Connection info
Private
Static
Readonly
providersGets access key changes for a given array of accountIds See docs for more info
Gets account changes for a given array of accountIds pass block_id OR finality as blockQuery, not both See docs for more info
Query for block info from the RPC pass block_id OR finality as blockQuery, not both
BlockReference (passing a BlockId is deprecated)
Query changes in block from the RPC pass block_id OR finality as blockQuery, not both
Queries for details about a specific chunk appending details of receipts and transactions to the same chunk data provided by a block
Hash of a chunk ID or shard ID
Gets contract code changes for a given array of accountIds pass block_id OR finality as blockQuery, not both Note: Change is returned in a base64 encoded WASM file See docs for more info
Gets contract state changes for a given array of accountIds pass block_id OR finality as blockQuery, not both Note: If you pass a keyPrefix it must be base64 encoded See docs for more info
Optional
keyPrefix: stringGets the protocol config at a block from RPC
specifies the block to get the protocol config for
Fast forward to a point in the future. The delta block height is supplied to tell the network to advanced a certain amount of blocks. This comes with the advantage only having to wait a fraction of the time it takes to produce the same number of blocks.
Estimate as to how long it takes: if our delta_height crosses X
epochs, then it would
roughly take X * 5
milliseconds for the fast forward request to be processed.
Note: This is not to be confused with speeding up the current in-flight transactions; the state being forwarded in this case refers to time-related state (the block height, timestamp and epoch).
Promise
Gets a light client execution proof for verifying execution outcomes
Returns the next light client block as far in the future as possible from the last known hash to still be able to validate from that hash. This will either return the last block of the next epoch, or the last final known block.
Query the RPC by passing an "@near-js/types".provider/request.RpcQueryRequest | RpcQueryRequest
the shape of the returned query response
Rest
...args: any[]Sends a signed transaction to the RPC and waits until transaction is fully complete
The signed transaction being sent
Sends a signed transaction to the RPC and immediately returns transaction hash See docs for more info
The signed transaction being sent
Gets single access key changes for a given array of access keys pass block_id OR finality as blockQuery, not both See docs for more info
Gets the RPC's status
Gets a transaction's status from the RPC
A transaction hash as either a Uint8Array or a base58 encoded string
The NEAR account that signed the transaction
Gets a transaction's status from the RPC with receipts See docs for more info
The hash of the transaction
The NEAR account that signed the transaction
Query validators of the epoch defined by the given block id.
Block hash or height, or null for latest.
Get full response from RPC about result of view method
Static
fromCreate a JsonRpcProvider from config or rpcAddr
rpc endpoint URL or a configuration that includes one.
JsonRpcProvider
Static
fromGenerated using TypeDoc
Extends the main provider class in near-api-js, adding more methods for interacting with an endpoint.