Class: IExecAccountModule
April 29, 2026 · View on GitHub
iexec / IExecAccountModule
Class: IExecAccountModule
module exposing account methods
Extends
Constructors
Constructor
new IExecAccountModule(
configOrArgs,options?):IExecAccountModule
Create an IExecModule instance
Parameters
configOrArgs
options?
Returns
IExecAccountModule
Inherited from
Properties
config
config:
IExecConfig
current IExecConfig
Inherited from
Methods
approve()
approve(
amount,spenderAddress):Promise<string>
SIGNER REQUIRED
approves the spender to use the account up to a specified amount, denoted in nRLC (1 nRLC = 1* RLC).
example:
const txHash = await approve(amount, spenderAddress);
console.log('tx:', txHash);
Parameters
amount
spenderAddress
string
Returns
Promise<string>
checkAllowance()
checkAllowance(
ownerAddress,spenderAddress):Promise<NRLCAmount>
checks the amount of allowance approved for the specified spender to use the account of the owner.
example:
const allowanceAmount = await checkAllowance(ownerAddress, spenderAddress);
console.log('allowance amount:', allowanceAmount);
Parameters
ownerAddress
string
spenderAddress
string
Returns
Promise<NRLCAmount>
checkBalance()
check the account balance of specified address (stake is available nRLC, locked is escrowed nRLC)
example:
const balance = await checkBalance(ethAddress);
console.log('Nano RLC staked:', balance.stake.toString());
console.log('Nano RLC locked:', balance.locked.toString());
Parameters
address
string
Returns
Promise<{ locked: BN; stake: BN; }>
deposit()
deposit(
amount):Promise<{amount:BN;txHash:string; }>
SIGNER REQUIRED
deposit some nRLC (1 nRLC = 1* RLC) from user wallet to user account
example:
const { amount, txHash } = await deposit('1000000000');
console.log('Deposited:', amount);
console.log('tx:', txHash);
Parameters
amount
Returns
Promise<{ amount: BN; txHash: string; }>
revokeApproval()
revokeApproval(
spenderAddress):Promise<string>
SIGNER REQUIRED
revokes the approval for the spender to use the account.
example:
const txHash = await revokeApproval(spenderAddress);
console.log('tx:', txHash);
Parameters
spenderAddress
string
Returns
Promise<string>
withdraw()
withdraw(
amount):Promise<{amount:BN;txHash:string; }>
SIGNER REQUIRED
withdraw some nRLC (1 nRLC = 1* RLC) from user account to user wallet
example:
const { amount, txHash } = await iexec.account.withdraw('1000000000');
console.log('Withdrawn:', amount);
console.log('tx:', txHash);
Parameters
amount
Returns
Promise<{ amount: BN; txHash: string; }>
fromConfig()
staticfromConfig(config):IExecAccountModule
Create an IExecAccountModule instance using an IExecConfig instance
Parameters
config
Returns
IExecAccountModule