Skip to main content

Parameters

chainId
string
default:"398"
required
Unique identifier for a blockchain network.
id
number
default:1
required
Request identifier used to match responses.
jsonrpc
string
default:"2.0"
required
JSON-RPC version.
method
string
default:"query"
required
JSON-RPC method name.
params
object
required
Parameters for query:
  • params.request_type: Must be "view_access_key"
  • params.account_id: The NEAR account you are querying
  • params.public_key: The public key to look up
  • params.finality: Query the latest state with the given finality
  • params.block_id: Alternative to finality—specify a block hash, height, or full block-id object

Returns

result
object
The JSON-RPC result.
curl --request POST \
  --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=398 \
  --header 'content-type: application/json' \
  --data '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "query",
    "params": {
      "request_type": "view_access_key",
      "finality": "final",
      "account_id": "account.rpc-examples.testnet",
      "public_key": "ed25519:EddTahJwZpJjYPPmat7DBm1m2vdrFBzVv7e3T4hzkENd"
    }
  }'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "changes_type": "single_access_key_changes",
    "keys": [
      {
        "account_id": "account.rpc-examples.testnet",
        "public_key": "ed25519:EddTahJwZpJjYPPmat7DBm1m2vdrFBzVv7e3T4hzkENd"
      }
    ],
    "block_id": "6RWmTYhXCzjMjoY3Mz1rfFcnBm8E6XeDDbFEPUA4sv1w"
  }
}