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
Parameter | Type | Description |
---|---|---|
to | string | the account to send funds to |
amount | Amount | the amount in tokens |
currencyAddress | string | (Optional) Optional - ERC20 contract address of the token to transfer |
Returns:
Promise<TransactionResult>