@aptos-labs/ts-sdk
Version:
Aptos TypeScript SDK
108 lines • 6.05 kB
TypeScript
/**
* This file contains the underlying implementations for exposed API surface in
* the {@link api/fungible_asset}. By moving the methods out into a separate file,
* other namespaces and processes can access these methods without depending on the entire
* fungible_asset namespace and without having a dependency cycle error.
* @group Implementation
*/
import { AptosConfig } from "../api/aptosConfig.js";
import { AnyNumber, GetCurrentFungibleAssetBalancesResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, PaginationArgs, WhereArg } from "../types/index.js";
import { CurrentFungibleAssetBalancesBoolExp, FungibleAssetActivitiesBoolExp, FungibleAssetMetadataBoolExp } from "../types/generated/types.js";
import { AccountAddressInput } from "../core/index.js";
import { Account } from "../account/index.js";
import { InputGenerateTransactionOptions } from "../transactions/index.js";
import { SimpleTransaction } from "../transactions/instances/simpleTransaction.js";
/**
* Retrieves metadata for fungible assets based on specified criteria.
* This function allows you to filter and paginate through fungible asset metadata.
*
* @param args - The arguments for the function.
* @param args.aptosConfig - The configuration for Aptos.
* @param [args.options] - Optional parameters for pagination and filtering.
* @param [args.options.limit] - The maximum number of results to return.
* @param [args.options.offset] - The number of results to skip before starting to collect the result set.
* @param [args.options.where] - Conditions to filter the results.
* @group Implementation
*/
export declare function getFungibleAssetMetadata(args: {
aptosConfig: AptosConfig;
options?: PaginationArgs & WhereArg<FungibleAssetMetadataBoolExp>;
}): Promise<GetFungibleAssetMetadataResponse>;
/**
* Retrieves the activities associated with fungible assets.
* This function allows you to filter and paginate through the activities based on specified conditions.
*
* @param args - The arguments for retrieving fungible asset activities.
* @param args.aptosConfig - The configuration settings for Aptos.
* @param [args.options] - Optional parameters for pagination and filtering.
* @param [args.options.limit] - The maximum number of activities to retrieve.
* @param [args.options.offset] - The number of activities to skip before starting to collect the result set.
* @param [args.options.where] - Conditions to filter the activities.
* @returns A promise that resolves to an array of fungible asset activities.
* @group Implementation
*/
export declare function getFungibleAssetActivities(args: {
aptosConfig: AptosConfig;
options?: PaginationArgs & WhereArg<FungibleAssetActivitiesBoolExp>;
}): Promise<GetFungibleAssetActivitiesResponse>;
/**
* Retrieves the current balances of fungible assets for a specified configuration.
*
* @param args - The arguments for retrieving fungible asset balances.
* @param args.aptosConfig - The configuration settings for Aptos.
* @param args.options - Optional parameters for pagination and filtering.
* @param args.options.limit - The maximum number of results to return.
* @param args.options.offset - The number of results to skip before starting to collect the results.
* @param args.options.where - Conditions to filter the results based on specific criteria.
* @returns The current balances of fungible assets.
* @group Implementation
*/
export declare function getCurrentFungibleAssetBalances(args: {
aptosConfig: AptosConfig;
options?: PaginationArgs & WhereArg<CurrentFungibleAssetBalancesBoolExp>;
}): Promise<GetCurrentFungibleAssetBalancesResponse>;
/**
* Transfers a specified amount of a fungible asset from the sender to the recipient.
* This function helps facilitate the transfer of digital assets between accounts on the Aptos blockchain.
*
* @param args - The parameters for the transfer operation.
* @param args.aptosConfig - The configuration settings for the Aptos network.
* @param args.sender - The account initiating the transfer.
* @param args.fungibleAssetMetadataAddress - The address of the fungible asset's metadata.
* @param args.recipient - The address of the account receiving the asset.
* @param args.amount - The amount of the fungible asset to transfer.
* @param args.options - Optional settings for generating the transaction.
* @group Implementation
*/
export declare function transferFungibleAsset(args: {
aptosConfig: AptosConfig;
sender: Account;
fungibleAssetMetadataAddress: AccountAddressInput;
recipient: AccountAddressInput;
amount: AnyNumber;
options?: InputGenerateTransactionOptions;
}): Promise<SimpleTransaction>;
/**
* Transfers a specified amount of a fungible asset from any (primary or secondary) fungible store to any (primary or secondary) fungible store.
* This function helps facilitate the transfer of digital assets between fungible stores on the Aptos blockchain.
*
* @param args - The parameters for the transfer operation.
* @param args.aptosConfig - The configuration settings for the Aptos network.
* @param args.sender - The account initiating the transfer.
* @param args.fromStore - The address of the fungible store initiating the transfer.
* @param args.toStore - The address of the fungible store receiving the asset.
* @param args.amount - The amount of the fungible asset to transfer. Must be a positive number.
* @param args.options - Optional settings for generating the transaction.
* @returns A SimpleTransaction that can be submitted to the blockchain.
* @throws Error if the transaction generation fails or if the input parameters are invalid.
* @group Implementation
*/
export declare function transferFungibleAssetBetweenStores(args: {
aptosConfig: AptosConfig;
sender: Account;
fromStore: AccountAddressInput;
toStore: AccountAddressInput;
amount: AnyNumber;
options?: InputGenerateTransactionOptions;
}): Promise<SimpleTransaction>;
//# sourceMappingURL=fungibleAsset.d.ts.map