transferCoinTransaction

abstract suspend fun transferCoinTransaction(from: AccountAddressInput, to: AccountAddressInput, amount: ULong, coinType: String = APTOS_COIN, options: InputGenerateTransactionOptions = InputGenerateTransactionOptions()): SimpleTransaction

Generates a Transaction that can be simulated and/or signed and submitted to the chain.

Return

SimpleTransaction object that can be simulated and/or signed and submitted to the chain.

Parameters

from

Sender's account address.

to

Recipient's account address.

amount

Amount of coins to transfer.

coinType

Optional Coin type to transfer. Defaults to 0x1::aptos_coin::AptosCoin

options

Optional parameters to generate the transaction. These include the max gas amount, gas unit price, and expiration time. Reasonable defaults are provided.