Class AccountAbstract

Interface for a generic Aptos account.

The interface is defined as abstract class to provide a single entrypoint for account generation, either through Account.generate() or Account.fromDerivationPath. Despite this being an abstract class, it should be treated as an interface and enforced using the implements keyword.

Note: Generating an account instance does not create the account on-chain.

Implemented by

Constructors

Properties

accountAddress: AccountAddress

Account address associated with the account

publicKey: AccountPublicKey

Public key associated with the account

signingScheme: SigningScheme

Signing scheme used to sign transactions

Methods

  • Sign the given message using the available signing capabilities.

    Parameters

    Returns Signature

    Signature

  • Sign the given transaction using the available signing capabilities.

    Parameters

    Returns Signature

    Signature

  • Sign a transaction using the available signing capabilities.

    Parameters

    Returns AccountAuthenticator

    the AccountAuthenticator containing the signature of the transaction, together with the account's public key

  • Sign a message using the available signing capabilities.

    Parameters

    • message: HexInput

      the signing message, as binary input

    Returns AccountAuthenticator

    the AccountAuthenticator containing the signature, together with the account's public key

  • Verify the given message and signature with the public key.

    Parameters

    Returns boolean

  • Returns Account

    Account

    use fromPrivateKey instead. Instantiates an account given a private key and a specified account address. This is primarily used to instantiate an Account that has had its authentication key rotated.