Returns changes for each access key in a given block. Multiple accounts can be queried by passing an array of account_ids.
Supported on NEAR (mainnet) only.
Parameters
changes_type
- string - The type of changesaccount_ids
- array - An array of account idsfinality
- string - The assurance that the transaction cannot be altered, reversed, or canceled after they are completed. For finality=final, it means that it has been validated on at least 66% of the nodes in the network and for finality=optimistic, it uses the latest block recorded on the node that responded to the query passedblock_id
- int/string - The block id which could be either a block number or block hash
Note: You can only use one parameter, either finality or block_id. The block_id param can take either the block number or the block hash as an argument.
Returns
block_hash
- The hash of the block this transaction was associated withchanges
- An array of changes that occurred in the account during the transactioncause
- The reason behind the account changestype
- The change causing factor in an account. It could be transaction_processing or receipt_processingtx_hash/receipt_hash
- There can be two values returned dependent on the change-causing factor. For transaction_processing, the returned value is tx_hash, which represents the hash of the transaction. For receipt_processing, the returned value is receipt_hash, which represents the hash of the receipt.
type
- The type of changes occurred in the accountchange
- The changes occurred in the account during the transactionaccount_id
- The identifier for the accountpublic_key
- The public key of the signeraccess_key
- The access key for authenticating the accountnonce
- The number of transactions made by the sender prior to this one encoded as hexadecimalpermission
- The type of permission
API Endpoint
The format of a Near API endpoint is
https://open-platform.nodereal.io/{{apiKey}}/near/
Here is an example:
https://open-platform.nodereal.io/4c0a1c23661a4e26bcbcwed461e34ea9/near/
Example
Request
curl https://open-platform.nodereal.io/{{apiKey}}/near/ \
--request POST \
--header "Content-Type: application/json" \
--data '{"method": "EXPERIMENTAL_changes","params": {"changes_type": "all_access_key_changes", "account_ids": ["prophet.poolv1.near", "kiln.poolv1.near"], "finality": "final"},"id":1,"jsonrpc":"2.0"}'
Result