Abstract
Abstract
Readonly
accountAccount address associated with the account
Abstract
Readonly
publicPublic key associated with the account
Abstract
signingSigning scheme used to sign transactions
Abstract
signAbstract
signSign the given transaction using the available signing capabilities.
the transaction to be signed
Signature
Abstract
signSign a transaction using the available signing capabilities.
the raw transaction
the AccountAuthenticator containing the signature of the transaction, together with the account's public key
Abstract
signSign a message using the available signing capabilities.
the signing message, as binary input
the AccountAuthenticator containing the signature, together with the account's public key
Verify the given message and signature with the public key. This function helps ensure the integrity and authenticity of a message by validating its signature.
The arguments for verifying the signature.
Represents the arguments required to verify a digital signature.
A boolean indicating whether the signature is valid.
Verify the given message and signature with the public key. It fetches any on chain state if needed for verification.
The arguments for verifying the signature.
The configuration object for connecting to the Aptos network
Raw message data in HexInput format.
Signed message signature.
A boolean indicating whether the signature is valid.
Static
authRetrieve the authentication key for the associated account using the provided public key. This key enables account owners to rotate their private key(s) associated with the account without changing the address that hosts their account. See here for more info: https://aptos.dev/concepts/accounts#single-signer-authentication
The arguments for retrieving the authentication key.
The public key of the account.
The authentication key for the associated account.
Static
fromGenerates an account from a specified derivation path and mnemonic. This function allows you to create an account using different signing schemes based on the provided arguments.
The arguments for generating the account.
Arguments for generating an Ed25519 account, specifying the signing scheme and legacy option.
Optional
legacy?: trueOptional
scheme?: Ed25519Arguments for deriving a private key using a mnemonic phrase and a specified BIP44 path.
Generates an account from a specified derivation path and mnemonic. This function allows you to create an account using different signing schemes based on the provided arguments.
The arguments for generating the account.
Arguments for generating a SingleKeyAccount
with an underlying Ed25519PrivateKey
.
The legacy
argument must be set to false to ensure an Ed25519SingleKeyAccount
is returned.
Optional
scheme?: Ed25519Arguments for deriving a private key using a mnemonic phrase and a specified BIP44 path.
Generates an account from a specified derivation path and mnemonic. This function allows you to create an account using different signing schemes based on the provided arguments.
The arguments for generating the account.
Arguments for generating a SingleKeyAccount
using a supported private key other than Ed25519PrivateKey
.
The legacy
argument is optional and defaults to false, and cannot be set to true.
Optional
legacy?: falseArguments for deriving a private key using a mnemonic phrase and a specified BIP44 path.
Generates an account from a specified derivation path and mnemonic. This function allows you to create an account using different signing schemes based on the provided arguments.
The arguments for generating the account.
Arguments for generating an opaque Account
when the input signature scheme is unknown at compile time.
Optional
legacy?: booleanOptional
scheme?: SigningSchemeInputArguments for deriving a private key using a mnemonic phrase and a specified BIP44 path.
Static
fromCreates an account from a given private key and address. This function allows you to instantiate an account based on the provided private key, and it can differentiate between legacy and non-legacy accounts.
The arguments for creating the account.
Arguments for creating an Ed25519Account
from an Ed25519PrivateKey
.
To use the SingleKey authentication scheme, set legacy
to false.
Optional
address?: AccountAddressInputOptional
legacy?: trueAn instance of either Ed25519Account or SingleKeyAccount based on the provided private key.
Creates an account from a given private key and address. This function allows you to instantiate an account based on the provided private key, and it can differentiate between legacy and non-legacy accounts.
The arguments for creating the account.
Arguments for creating a SingleKeyAccount
from a supported private key, excluding Ed25519PrivateKey
.
The legacy
argument is always false and cannot be set to true.
Optional
address?: AccountAddressInputOptional
legacy?: falseAn instance of either Ed25519Account or SingleKeyAccount based on the provided private key.
Creates an account from a given private key and address. This function allows you to instantiate an account based on the provided private key, and it can differentiate between legacy and non-legacy accounts.
The arguments for creating the account.
Arguments for creating an Account
from a private key when the key type is unknown at compile time.
Optional
address?: AccountAddressInputOptional
legacy?: booleanAn instance of either Ed25519Account or SingleKeyAccount based on the provided private key.
Static
fromThe arguments required to create an account from a private key.
Arguments for creating an Account
from a private key when the key type is unknown at compile time.
Optional
address?: AccountAddressInputOptional
legacy?: booleanAccount
Static
generateGenerates a new account based on the specified signing scheme and legacy option. This function allows you to create an account with either the Ed25519 signing scheme or a different scheme as specified.
Optional
args: GenerateEd25519AccountArgsThe arguments for generating the account.
Arguments for generating an Ed25519 account, specifying the signing scheme and legacy option.
Optional
legacy?: trueOptional
scheme?: Ed25519Generates a new account based on the specified signing scheme and legacy option. This function allows you to create an account with either the Ed25519 signing scheme or a different scheme as specified.
The arguments for generating the account.
Arguments for generating a SingleKeyAccount
with an underlying Ed25519PrivateKey
.
The legacy
argument must be set to false to ensure an Ed25519SingleKeyAccount
is returned.
Optional
scheme?: Ed25519Generates a new account based on the specified signing scheme and legacy option. This function allows you to create an account with either the Ed25519 signing scheme or a different scheme as specified.
The arguments for generating the account.
Arguments for generating a SingleKeyAccount
using a supported private key other than Ed25519PrivateKey
.
The legacy
argument is optional and defaults to false, and cannot be set to true.
Optional
legacy?: falseGenerates a new account based on the specified signing scheme and legacy option. This function allows you to create an account with either the Ed25519 signing scheme or a different scheme as specified.
The arguments for generating the account.
Arguments for generating an opaque Account
when the input signature scheme is unknown at compile time.
Optional
legacy?: booleanOptional
scheme?: SigningSchemeInput
Abstract class representing a generic Aptos account.
This class serves as a single entry point for account generation, allowing accounts to be created either through
Account.generate()
orAccount.fromDerivationPath
. Although it is defined as an abstract class, it should be treated as an interface and enforced using theimplements
keyword.Note: Generating an account instance does not create the account on-chain.