Account

interface Account

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

Inheritors

Properties

Link copied to clipboard
abstract val config: AptosConfig

AptosConfig object for configuration

Functions

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

Queries the account's APT amount

Link copied to clipboard
abstract suspend fun getAccountCoinAmount(accountAddress: AccountAddressInput, coinType: MoveValue.MoveStructId = MoveValue.MoveStructId(APTOS_COIN), page: PaginationArgs? = null): Result<GetAccountCoinsDataQuery.Data?, AptosIndexerError>

Queries the account's coin amount by the coin type

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

Queries an account's coin balance directly from on-chain smart contracts using a view call.

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

Queries the current count of an account's coins aggregated

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

Queries an account's coins data

Link copied to clipboard
abstract suspend fun getAccountCollectionsWithOwnedTokens(accountAddress: AccountAddressInput, tokenStandard: TokenStandard? = null, sortOrder: List<CollectionOwnershipV2ViewSortOrder>? = null, page: PaginationArgs? = null, minimumLedgerVersion: Long? = null): Result<GetAccountCollectionsWithOwnedTokensQuery.Data?, AptosIndexerError>

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

Link copied to clipboard
abstract suspend fun getAccountInfo(accountAddress: AccountAddressInput, params: LedgerVersionQueryParam.() -> Unit = {}): Result<AccountData, AptosSdkError>

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

Link copied to clipboard
abstract suspend 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
abstract suspend fun getAccountOwnedObjects(accountAddress: AccountAddressInput, sortOrder: List<ObjectSortOrder>? = null, page: PaginationArgs? = null, minimumLedgerVersion: Long? = null): 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
inline suspend fun <T> Account.getAccountResource(accountAddress: AccountAddressInput, resourceName: String, param: LedgerVersionQueryParam.() -> Unit = {}): Result<T, AptosSdkError>

Queries a specific account resource given an account address and resource name

Link copied to clipboard

Retrieves all Move resources for a specific account.

Link copied to clipboard
abstract suspend fun getAccountTokensCount(accountAddress: AccountAddressInput, page: PaginationArgs? = null, minimumLedgerVersion: Long? = null): 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
abstract suspend fun getAccountTransactionsCount(accountAddress: AccountAddressInput, minimumLedgerVersion: Long? = null): Result<Long, AptosIndexerError>

Queries the current count of transactions submitted by an account

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

Retrieves the original account address for a given authentication key.