mega.transfer()
Signature
Parameters
Field
Type
Required
Notes
Example
import { parseEther } from 'viem';
const result = await mega.transfer({
type: 'native',
to: '0xRecipientAddress',
amount: parseEther('0.1').toString(),
});
if (result.status === 'approved') {
console.log(result.receipt?.hash);
} else if (result.status === 'cancelled') {
console.log('User cancelled transfer');
} else {
console.error(result.error);
}Response
Status
Meaning
Action
Notes
Last updated