Skip to main content

UserWallet.transfer() method

Transfer native or ERC20 tokens from this wallet to another wallet

Example

// transfer 0.8 ETH
await sdk.wallet.transfer("0x...", 0.8);
// transfer 0.8 tokens of `tokenContractAddress`
await sdk.wallet.transfer("0x...", 0.8, tokenContractAddress);

Signature:

transfer(to: string, amount: Amount, currencyAddress?: string): Promise<TransactionResult>;

Parameters

ParameterTypeDescription
tostringthe account to send funds to
amountAmountthe amount in tokens
currencyAddressstring(Optional) Optional - ERC20 contract address of the token to transfer

Returns:

Promise<TransactionResult>