Skip to main content

transfer

Transfer native or ERC20 tokens from this wallet to another wallet.

Usage

// Transfer 0.8 of the native token (e.g. Ether on Ethereum)
const txResult = await sdk.wallet.transfer("{{wallet_address}}", 0.8);

Configuration

to

The address of the account to send funds to.

Must be a string.

amount

The amount in tokens to be transferred.

Must be a string or number.

currencyAddress (optional)

The address of the token smart contract that you want to transfer.

If no address is provided, the native currency will be used.

// Transfer 0.8 tokens of a custom erc20 token
const txResult = await sdk.wallet.transfer(
"{{wallet_address}}",
0.8,
"{{token_contract_address}}", // Include the smart contract address of the token you want to transfer
);

Return Value

Returns a TransactionResult object containing the following properties: