Optionalsigner: KeyPairString | SignerAdd a full access key to the account
The public key to be added
Optionalallowance?: string | number | bigintOptionalmethodNames?: string[]Call a function on a smart contract and return parsed transaction result
Call function parameters
Optionalargs?: Uint8Array<ArrayBufferLike> | Record<string, any>Optionaldeposit?: string | number | bigintOptionalgas?: string | number | bigintOptionalwaitUntil?: TxExecutionStatusCall a function on a smart contract and return raw transaction outcome
Call function parameters
Optionalargs?: Uint8Array<ArrayBufferLike> | Record<string, any>Optionaldeposit?: string | number | bigintOptionalgas?: string | number | bigintOptionalwaitUntil?: TxExecutionStatusCreates a new NEAR account with a given ID and public key.
This method can create two types of accounts:
Top-level accounts of the form name.tla (e.g., bob.near):
Sub-accounts of the current account (e.g., sub.ana.near):
ana.near, you can create sub.ana.nearAccount creation options
OptionalnearToTransfer?: string | number | bigintCreate a meta transaction ready to be signed by a Signer
Meta transaction options
Create a signed MetaTransaction that can be broadcasted to a relayer
Signed meta transaction options
Create a signed transaction ready to be broadcast by a Provider
Creates a sub account of this account. For example, if the account is ana.near, you can create sub.ana.near.
Sub-account creation options
OptionalnearToTransfer?: string | number | bigintCreate a transaction that can be later signed with a Signer
Transaction options
Deletes the account, transferring all remaining NEAR to a beneficiary account
Important: Deleting an account does not transfer FTs or NFTs
Will receive the account's remaining balance
The public key to be deleted
Deploy a smart contract in the account
The compiled contract code bytes
Deploy a global contract that can be reused by multiple accounts
The compiled contract code bytes
Deploy mode - "codeHash" for immutable contracts, "accountId" for updateable contracts
Calls Provider.viewAccessKey to retrieve information for a specific key in the account
Calls Provider.viewAccessKeyList to retrieve the account's keys
The token to check the balance of. Defaults to Native NEAR.
The available balance of the account in units (e.g. yoctoNEAR).
Calls Provider.viewContractCode to retrieve the account's contract code and its hash
Calls Provider.viewContractState to retrieve the keys and values stored on the account's contract
Optionalprefix: stringReturns an overview of the account's state, including the account's balance, storage usage, and code hash
Allows to set the signer used to control the account
holds the private key and can sign Transactions
Creates a transaction, signs it and broadcast it to the network
Sign and send transaction options
Optionalretries?: numberOptionalsigner?: SignerOptionalthrowOnFailure?: booleanOptionalwaitUntil?: TxExecutionStatusThis function simply calls the signNep413Message method of the Signer
Nep413 message signing arguments
OptionalcallbackUrl?: stringTransfers a token to the specified receiver.
Supports sending either the native NEAR token or any supported Fungible Token (FT).
Transfer options
Optionaltoken?: NativeToken | FungibleTokenUse a previously deployed global contract on this account
The global contract identifier - either { accountId: string } or { codeHash: string | Uint8Array }
This class allows to access common account information. If a Signer is provider, then the account can be used to perform all common actions such as transferring tokens and calling functions