iexec / IExecWalletModule
module exposing wallet methods
new IExecWalletModule(
configOrArgs,options?):IExecWalletModule
Create an IExecModule instance
IExecWalletModule
config:
IExecConfig
current IExecConfig
check the wallet balances (native and iExec token) of specified address
example:
const { wei, nRLC } = await checkBalances(address);
console.log('iExec nano RLC:', nRLC.toString());
console.log('ethereum wei:', wei.toString());string
Promise<{ nRLC: BN; wei: BN; }>
getAddress():
Promise<string>
SIGNER REQUIRED
get the connected wallet address
example:
const userAddress = await getAddress();
console.log('user address:', userAddress);Promise<string>
sendETH(
WeiAmount,to):Promise<string>
SIGNER REQUIRED
send some wei to the specified address
example:
const txHash = await sendETH(amount, receiverAddress);
console.log('transaction hash:', txHash);string
Promise<string>
sendRLC(
nRLCAmount,to):Promise<string>
SIGNER REQUIRED
send some nRLC to the specified address
example:
const txHash = await sendRLC(amount, receiverAddress);
console.log('transaction hash:', txHash);string
Promise<string>
sweep(
to):Promise<{sendERC20TxHash:string;sendNativeTxHash:string; }>
SIGNER REQUIRED
send all the iExec token and the native token owned by the wallet to the specified address
example:
const { sendERC20TxHash, sendNativeTxHash } = await sweep(receiverAddress);
console.log('sweep RLC transaction hash:', sendERC20TxHash);
console.log('sweep ether transaction hash:', sendNativeTxHash);string
Promise<{ sendERC20TxHash: string; sendNativeTxHash: string; }>
staticfromConfig(config):IExecWalletModule
Create an IExecWalletModule instance using an IExecConfig instance
IExecWalletModule