Account

class Account(val config: AptosConfig) : Account

Account API namespace. This class provides functionality to reading and writing account related information.

Constructors

Link copied to clipboard
constructor(config: AptosConfig)

Properties

Link copied to clipboard
open override val config: AptosConfig

AptosConfig object for configuration

Functions

Link copied to clipboard
open suspend override fun getAccountAPTAmount(accountAddress: AccountAddressInput, minimumLedgerVersion: Long?): Result<Long, AptosIndexerError>

Queries the account's APT amount

Link copied to clipboard

Queries the account's coin amount by the coin type

Link copied to clipboard
open suspend override fun getAccountCoinAmountFromSmartContract(accountAddress: AccountAddressInput, coinType: MoveValue.MoveStructId?, faMetadataAddress: AccountAddressInput?): Result<Long, AptosSdkError>

Queries the account's coin amount directly from smart contracts (view function), matching the TS SDK behavior.

Link copied to clipboard
open suspend override fun getAccountCoinsCount(accountAddress: AccountAddressInput, minimumLedgerVersion: Long?): Result<Long, AptosIndexerError>

Queries the current count of an account's coins aggregated

Link copied to clipboard
open suspend override fun getAccountCoinsData(accountAddress: AccountAddressInput, minimumLedgerVersion: Long?, sortOrder: List<FungibleAssetSortOrder>?, page: PaginationArgs?): Result<GetAccountCoinsDataQuery.Data?, AptosIndexerError>

Queries an account's fungible asset (coin) data from the indexer.

Link copied to clipboard

Queries for all collections that an account currently has tokens for.

Link copied to clipboard
open suspend override fun getAccountInfo(accountAddress: AccountAddressInput, params: LedgerVersionQueryParam.() -> Unit): Result<AccountData, AptosSdkError>

Retrieves the Aptos blockchain for an account's on-chain state.

Link copied to clipboard
open suspend override fun getAccountModule(accountAddress: AccountAddressInput, moduleName: String, param: LedgerVersionQueryParam.() -> Unit): Result<MoveModuleBytecode, AptosSdkError>

Retrieves a specific Move module from an account by its name.

Link copied to clipboard

Retrieves all Move modules deployed to a specific Aptos account.

Link copied to clipboard
open suspend override fun getAccountOwnedObjects(accountAddress: AccountAddressInput, sortOrder: List<ObjectSortOrder>?, page: PaginationArgs?, minimumLedgerVersion: Long?): Result<GetObjectDataQuery.Data?, AptosIndexerError>

Queries for objects owned by a specific account.

Queries for all tokens an account owns within a specific collection.

Link copied to clipboard

Retrieves all Move resources for a specific account.

Link copied to clipboard
open suspend override fun getAccountTokensCount(accountAddress: AccountAddressInput, page: PaginationArgs?, minimumLedgerVersion: Long?): Result<Long, AptosIndexerError>

Queries the total count of tokens owned by a specific account.

Link copied to clipboard

Queries for transactions submitted by a specific account.

Link copied to clipboard
open suspend override fun getAccountTransactionsCount(accountAddress: AccountAddressInput, minimumLedgerVersion: Long?): Result<Long, AptosIndexerError>

Queries the current count of transactions submitted by an account

Link copied to clipboard
open suspend override fun lookupOriginalAccountAddress(authenticationKey: AccountAddressInput, ledgerVersion: Int?): Result<AccountAddressInput, AptosSdkError>

Retrieves the original account address for a given authentication key.