Class AccountsService

Hierarchy

  • AccountsService

Constructors

Properties

httpRequest: BaseHttpRequest

Methods

  • Get account Return the authentication key and the sequence number for an account address. Optionally, a ledger version can be specified. If the ledger version is not specified in the request, the latest ledger version is used.

    Returns

    AccountData

    Throws

    ApiError

    Parameters

    • address: string

      Address of account with or without a 0x prefix

    • Optional ledgerVersion: string

      Ledger version to get state of account

      If not provided, it will be the latest version

    Returns CancelablePromise<AccountData>

  • Get account module Retrieves an individual module from a given account and at a specific ledger version. If the ledger version is not specified in the request, the latest ledger version is used.

    The Aptos nodes prune account state history, via a configurable time window. If the requested ledger version has been pruned, the server responds with a 410.

    Returns

    MoveModuleBytecode

    Throws

    ApiError

    Parameters

    • address: string

      Address of account with or without a 0x prefix

    • moduleName: string

      Name of module to retrieve e.g. coin

    • Optional ledgerVersion: string

      Ledger version to get state of account

      If not provided, it will be the latest version

    Returns CancelablePromise<MoveModuleBytecode>

  • Get account modules Retrieves all account modules' bytecode for a given account at a specific ledger version. If the ledger version is not specified in the request, the latest ledger version is used.

    The Aptos nodes prune account state history, via a configurable time window. If the requested ledger version has been pruned, the server responds with a 410.

    Returns

    MoveModuleBytecode

    Throws

    ApiError

    Parameters

    • address: string

      Address of account with or without a 0x prefix

    • Optional ledgerVersion: string

      Ledger version to get state of account

      If not provided, it will be the latest version

    • Optional start: string

      Cursor specifying where to start for pagination

      This cursor cannot be derived manually client-side. Instead, you must call this endpoint once without this query parameter specified, and then use the cursor returned in the X-Aptos-Cursor header in the response.

    • Optional limit: number

      Max number of account modules to retrieve

      If not provided, defaults to default page size.

    Returns CancelablePromise<MoveModuleBytecode[]>

  • Get account resource Retrieves an individual resource from a given account and at a specific ledger version. If the ledger version is not specified in the request, the latest ledger version is used.

    The Aptos nodes prune account state history, via a configurable time window. If the requested ledger version has been pruned, the server responds with a 410.

    Returns

    MoveResource

    Throws

    ApiError

    Parameters

    • address: string

      Address of account with or without a 0x prefix

    • resourceType: string

      Name of struct to retrieve e.g. 0x1::account::Account

    • Optional ledgerVersion: string

      Ledger version to get state of account

      If not provided, it will be the latest version

    Returns CancelablePromise<MoveResource>

  • Get account resources Retrieves all account resources for a given account and a specific ledger version. If the ledger version is not specified in the request, the latest ledger version is used.

    The Aptos nodes prune account state history, via a configurable time window. If the requested ledger version has been pruned, the server responds with a 410.

    Returns

    MoveResource

    Throws

    ApiError

    Parameters

    • address: string

      Address of account with or without a 0x prefix

    • Optional ledgerVersion: string

      Ledger version to get state of account

      If not provided, it will be the latest version

    • Optional start: string

      Cursor specifying where to start for pagination

      This cursor cannot be derived manually client-side. Instead, you must call this endpoint once without this query parameter specified, and then use the cursor returned in the X-Aptos-Cursor header in the response.

    • Optional limit: number

      Max number of account resources to retrieve

      If not provided, defaults to default page size.

    Returns CancelablePromise<MoveResource[]>

Generated using TypeDoc