iexec / IExecHubModule
module exposing hub methods
new IExecHubModule(
configOrArgs,options?):IExecHubModule
Create an IExecModule instance
IExecHubModule
config:
IExecConfig
current IExecConfig
countCategory():
Promise<BN>
count the created categories.
example:
const count = await countCategory();
console.log('category count:', count);Promise<BN>
createCategory(
category):Promise<{catid:BN;txHash:string; }>
SIGNER REQUIRED, ONLY IEXEC OWNER
create a computation category on the iExec contract
example:
const { catid } = await createCategory({
name: 'Small',
description: '5 min',
workClockTimeRef: 300,
});
console.log('deployed with catid', catid);string
string
Promise<{ catid: BN; txHash: string; }>
getTimeoutRatio():
Promise<BN>
get the current TimeoutRatio
TimeoutRatio is used with the category workClockTimeRef to determine the tasks duration (task max duration = TimeoutRatio * workClockTimeRef)
example:
const timeoutRatio = await getTimeoutRatio();
console.log('timeoutRatio:', timeoutRatio);Promise<BN>
showCategory(
catid):Promise<Category>
show category with specified catid.
example:
const category = await showCategory(0);
console.log('category:', category);Promise<Category>
staticfromConfig(config):IExecHubModule
Create an IExecHubModule instance using an IExecConfig instance
IExecHubModule