Skip to content

iExec SDK ​

The iExec SDK is a CLI and a JS library that allows easy interactions with iExec decentralized marketplace in order to run off-chain computations.

Overview ​

Prerequisites ​

Before getting started, ensure that you have the following installed on your system:

- Node.js version 18 or higher

- NPM (Node.js package manager)

Installation ​

sh
npm install @iexec/dataprotector
sh
yarn add @iexec/dataprotector
sh
pnpm add @iexec/dataprotector
sh
bun add @iexec/dataprotector

Instantiate SDK ​

ts
import { 
IExec
} from 'iexec';
// Connect to injected provider const
iexec
= new
IExec
({
ethProvider
:
window
.
ethereum
});
ts
import { 
IExec
,
utils
} from 'iexec';
const
ethProvider
=
utils
.
getSignerFromPrivateKey
(
'http://localhost:8545', // blockchain node URL 'YOUR_PRIVATE_KEY' ); const
iexec
= new
IExec
({
ethProvider
,
});

For comprehensive documentation and advanced usage examples, see the iExec SDK GitHub repository.

Command Line Interface ​

The CLI documentation is available here

JavaScript/TypeScript Library ​

The library documentation is available here

Browser integration ​

⚑  Code Sandbox

NodeJS integration ​

⚑  Code Sandbox