AccountResourceClient

Class in @typemove/aptos

Defined in @typemove/aptos

Constructors

Constructor

new AccountResourceClient(client: Aptos): AccountResourceClient;

Parameters

ParameterType
clientAptos

Returns

AccountResourceClient

Properties

PropertyType
clientAptos

Methods

getAll()

getAll(accountAddress: AccountAddressInput, options?: PaginationArgs & LedgerVersionArg): Promise<MoveResource[]>;

Get all resources of an account, same as getAccountResources in aptos client

Parameters

ParameterTypeDescription
accountAddressAccountAddressInput-
options?PaginationArgs & LedgerVersionArg-

Returns

Promise<MoveResource[]>


matchAll()

matchAll<T>(
   accountAddress: AccountAddressInput, 
   resourceType: TypeDescriptor<T>, 
   options?: PaginationArgs & LedgerVersionArg
): Promise<TypedMoveResource<T>[]>;

Match all resources with type pattern, it could be a partial type like amm.Pool<aptos_coin.AptosCoin.type(), ANY_TYPE>

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
accountAddressAccountAddressInput-
resourceTypeTypeDescriptor<T>-
options?PaginationArgs & LedgerVersionArg-

Returns

Promise<TypedMoveResource<T>[]>


matchExact()

matchExact<T>(
   accountAddress: AccountAddressInput, 
   resourceType: TypeDescriptor<T>, 
   options?: LedgerVersionArg
): Promise<
  | TypedMoveResource<T>
| undefined>;

Match a single resource with exact type, resource type should not contain any type

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
accountAddressAccountAddressInput-
resourceTypeTypeDescriptor<T>-
options?LedgerVersionArg-

Returns

Promise< | TypedMoveResource<T> | undefined>

On this page