iexec / IExecConfig
configuration for IExecModule
example:
// create the configuration
const config = new IExecConfig({ ethProvider: window.ethereum });
// instantiate iExec SDK
const iexec = IExec.fromConfig(config);
// or instantiate IExecModules sharing the same configuration
const account = IExecAccountModule.fromConfig(config);
const wallet = IExecWalletModule.fromConfig(config);new IExecConfig(
args,options?):IExecConfig
Create an IExecConfig instance consumable by IExecModules
example:
- using injected provider client side
const config = new IExecConfig({ ethProvider: window.ethereum });- using a private key server side
import { getSignerFromPrivateKey } from 'iexec/utils';
const config = new IExecConfig({ ethProvider: getSignerFromPrivateKey('mainnet', privateKey) });IExecConfig
resolveBridgeAddress():
Promise<string>
resolve the current bridge contract address
Promise<string>
resolveBridgeBackAddress():
Promise<string>
resolve the bridge contract address on bridged chain
Promise<string>
resolveBridgedContractsClient():
Promise<IExecContractsClient>
resolve the current bridged IExecContractsClient
Promise<IExecContractsClient>
resolveChainId():
Promise<number>
resolve the current chainId
Promise<number>
resolveCompassURL():
Promise<string|undefined>
Experimental
resolve the current Compass URL
Promise<string | undefined>
resolveContractsClient():
Promise<IExecContractsClient>
resolve the current IExecContractsClient
Promise<IExecContractsClient>
resolveEnsPublicResolverAddress():
Promise<string>
resolve the current ENS public resolver contract address
Promise<string>
resolveIexecGatewayURL():
Promise<string>
resolve the current IExec market URL
Promise<string>
resolveIpfsGatewayURL():
Promise<string>
resolve the current IPFS gateway URL
Promise<string>
resolveIpfsNodeURL():
Promise<string>
resolve the current IPFS node URL
Promise<string>
resolvePocoSubgraphURL():
Promise<string>
resolve the current PoCo subgraph URL
Promise<string>
resolveResultProxyURL():
Promise<string>
resolve the current result proxy URL
Promise<string>
resolveSmsURL(
options?):Promise<string>
resolve the current SMS URL
Promise<string>
resolveVoucherHubAddress():
Promise<string|null>
resolve the current VoucherHub contract address
returns null if not available
Promise<string | null>
resolveVoucherSubgraphURL():
Promise<string|null>
resolve the current voucher subgraph URL
returns null if not available
Promise<string | null>