Skip to contents

Retrieves all access keys (full access + function call keys) associated with a NEAR account. Uses the query RPC method with request_type = "view_access_key_list".

Usage

near_get_access_keys(
  account_id,
  finality = c("final", "optimistic"),
  block_id = NULL
)

Arguments

account_id

Character scalar. The account ID to query (e.g., "alice.near", "bob.testnet").

finality

Character. Block finality: "final" (default, safest) or "optimistic" (faster).

block_id

Integer or character. Optional specific block height or hash. Cannot be used together with finality.

Value

A tibble with one row per access key:

public_key

Ed25519 public key in base58 format (e.g., "ed25519:8z...")

access_key

List-column containing permission details:

  • nonce – current nonce

  • permission – either "FullAccess" or a FunctionCall object with allowance, receiver_id, method_names

block_height, block_hash

context of the query

raw_response

full RPC response for debugging

Examples

if (FALSE) { # \dontrun{
# Set endpoint first
near_set_endpoint("mainnet")
near_get_access_keys("vitalik.near")
} # }