Transfer coins
transferCoin(recipient: string, amount: bigint | number, coinType?: MoveStructId): Promise<string>Transfer APT coin to a wallet
const RECIPIENT_ADDRESS = "..."; // Wallet address of the recipient
const AMOUNT = 1; // 1 APT
const transactionHash = await wallet.transferCoin(RECIPIENT_ADDRESS, AMOUNT);
console.log(`Transaction sent with hash: ${transactionHash}`); Transfer any coin to a wallet
const USDT_COIN_TYPE = "0x43417434fd869edee76cca2a4d2301e528a1551b1d719b75c350c3c97d15b8b9::coins::USDT";
const RECIPIENT_ADDRESS = "..."; // Wallet address of the recipient
const AMOUNT = 1; // 1 USDT
const transactionHash = await wallet.transferCoin(
RECIPIENT_ADDRESS,
AMOUNT,
USDT_COIN_TYPE
);
console.log(`Transaction sent with hash: ${transactionHash}`); Last updated