Skip to content

Latest commit

 

History

History
157 lines (85 loc) · 2.52 KB

File metadata and controls

157 lines (85 loc) · 2.52 KB

iexec


iexec / IExecConfig

Class: 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);

Constructors

Constructor

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('arbitrum-sepolia-testnet', privateKey) });

Parameters

args

IExecConfigArgs

options?

IExecConfigOptions

Returns

IExecConfig

Methods

resolveChainId()

resolveChainId(): Promise<number>

resolve the current chainId

Returns

Promise<number>


resolveCompassURL()

resolveCompassURL(): Promise<string | undefined>

Experimental

resolve the current Compass URL

Returns

Promise<string | undefined>


resolveContractsClient()

resolveContractsClient(): Promise<IExecContractsClient>

resolve the current IExecContractsClient

Returns

Promise<IExecContractsClient>


resolveIexecGatewayURL()

resolveIexecGatewayURL(): Promise<string>

resolve the current IExec market URL

Returns

Promise<string>


resolveIpfsGatewayURL()

resolveIpfsGatewayURL(): Promise<string>

resolve the current IPFS gateway URL

Returns

Promise<string>


resolveIpfsNodeURL()

resolveIpfsNodeURL(): Promise<string>

resolve the current IPFS node URL

Returns

Promise<string>


resolvePocoSubgraphURL()

resolvePocoSubgraphURL(): Promise<string>

resolve the current PoCo subgraph URL

Returns

Promise<string>


resolveSmsURL()

resolveSmsURL(): Promise<string>

resolve the current SMS URL

Returns

Promise<string>