Readonly accountReadonly connectionProtected readyHelper function returning the access key (if it exists) to the receiver that grants the designated permission
Promise
The NEAR account seeking the access key for a transaction
The action(s) sought to gain access to
Optional localKey: PublicKeyA local public key provided to check for access
Check if given access key allows the function call or method attempted in transaction
Array of {access_key: AccessKey, public_key: PublicKey} items
The NEAR account attempting to have access
The action(s) needed to be checked for access
https://docs.near.org/docs/concepts/account#access-keys
expand this API to support more options.
A public key to be associated with the contract
Optional contractId: stringNEAR account where the contract is deployed
Optional methodNames: string | string[]The method names on the contract that should be allowed to be called. Pass null for no method names and '' or [] for any method names.
Optional amount: BNPayment in yoctoⓃ that is sent to the contract during this function call
NEAR account name to be created
A public key created from the masterAccount
Create a new account and deploy a contract to it
NEAR account where the contract is deployed
The public key to add to the created contract account
The compiled contract code
of NEAR to transfer to the created contract account. Transfer enough to pay for storage https://docs.near.org/docs/concepts/storage-staking
The NEAR account that will receive the remaining Ⓝ balance from the account being deleted
The public key to be deleted
The compiled contract code
Finds the AccessKeyView associated with the accounts PublicKey stored in the KeyStore.
Find matching access key based on transaction (i.e. receiverId and actions)
{ publicKey PublicKey; accessKey: AccessKeyView }
currently unused (see todo)
currently unused (see todo)
NEAR account where the contract is deployed
The method name on the contract as it is written in the contract code
arguments to pass to method. Can be either plain JS object which gets serialized as JSON automatically
or Uint8Array instance which represents bytes passed as is.
Optional gas: BNmax amount of gas that method call can use
Optional amount: BNamount of NEAR (in yoctoNEAR) to send together with the call
Get all access keys for the account
https://docs.near.org/docs/develop/front-end/rpc#view-access-key-list
Returns calculated account balance
Returns a list of authorized apps
update the response value to return all the different keys, not just app keys.
NEAR account receiving Ⓝ
Amount to send in yoctoⓃ
Sign a transaction using Meteor Wallet. Overrides the Near Account API method of the same name, makes use of signAndSendTransaction_direct
Rest ...args: any[]Protected signCreate a signed transaction which can be broadcast to the network
JsonRpcProvider.sendTransaction
NEAR account receiving the transaction
list of actions to perform as part of the transaction
The public key for the account that's staking
The account to stake in yoctoⓃ
Returns basic NEAR account information via the view_account RPC query method
https://docs.near.org/docs/develop/front-end/rpc#view-account
Invoke a contract view function using the RPC API.
https://docs.near.org/docs/develop/front-end/rpc#call-a-contract-function
NEAR account where the contract is deployed
The view-only method (no state mutations) name on the contract as it is written in the contract code
Optional args: anyAny arguments to the view contract method, wrapped in JSON
Optional __namedParameters: { parse?: ((response: Uint8Array) => any); stringify?: ((input: any) => Buffer) }Optional parse?: ((response: Uint8Array) => any)Optional stringify?: ((input: any) => Buffer)Returns the state (key value pairs) of this account's contract based on the key prefix. Pass an empty string for prefix if you would like to return the entire state.
https://docs.near.org/docs/develop/front-end/rpc#view-contract-state
allows to filter which keys should be returned. Empty prefix means all keys. String prefix is utf-8 encoded.
Optional blockQuery: { blockId: BlockId } | { finality: Finality }specifies which block to query state at. By default returns last "optimistic" block (i.e. not necessarily finalized).
Generated using TypeDoc
Near Account implementation which makes use of MeteorWallet when no local key is available.
Generally won't be created directly- can be obtained by using account
Example