Creates new CoinClient instance
AptosClient instance
Get the balance of the account. By default it checks the balance of 0x1::aptos_coin::AptosCoin, but you can specify a different coin type.
to use a different type, set the coinType
to be the fungible asset type.
The TS SDK supports fungible assets operations. If you want to use CoinClient
with this feature, set the coinType
to be the fungible asset metadata address.
This option uses the FungibleAssetClient class and queries the
fungible asset primary store.
Promise that resolves to the balance as a bigint.
Account that you want to get the balance of.
Optional
extraArgs: { Extra args for checking the balance.
Optional
coinGenerate, sign, and submit a transaction to the Aptos blockchain API to
transfer coins from one account to another. By default it transfers
0x1::aptos_coin::AptosCoin, but you can specify a different coin type
with the coinType
argument.
You may set createReceiverIfMissing
to true if you want to create the
receiver account if it does not exist on chain yet. If you do not set
this to true, the transaction will fail if the receiver account does not
exist on-chain.
The TS SDK supports fungible assets operations. If you want to use CoinClient
with this feature, set the coinType
to be the fungible asset metadata address.
This option uses the FungibleAssetClient
class and queries the
fungible asset primary store.
The hash of the transaction submitted to the API
Account sending the coins
Account to receive the coins
Number of coins to transfer
Optional
extraArgs: OptionalTransactionArgs & { Extra args for building the transaction or configuring how the client should submit and wait for the transaction
Generated using TypeDoc
Class for working with the coin module, such as transferring coins and checking balances.