Skip to content

Advanced configuration

The IExecDataProtector constructor accepts additional configuration parameters. As these parameters are very specific, they are not needed for a standard usage of @iexec/dataprotector.

Similarly, not all functionalities need to be instantiated at once in the SDK, as described in the getting started section.

Parameters

ts
import { type 
DataProtectorConfigOptions
} from '@iexec/dataprotector';

dataprotectorContractAddress

AddressOrENS

The Ethereum contract address or ENS (Ethereum Name Service) for dataProtector smart contract. If not provided, the default dataProtector contract address will be used.

ts
const 
dataProtector
= new
IExecDataProtector
(
web3Provider
, {
dataprotectorContractAddress
: '0x123abc...',
});

sharingContractAddress

AddressOrENS

The Ethereum contract address or ENS (Ethereum Name Service) for dataProtector sharing smart contract. If not provided, the default dataProtector sharing contract address will be used.

ts
const 
dataProtector
= new
IExecDataProtector
(
web3Provider
, {
sharingContractAddress
: '0x123abc...',
});

subgraphUrl

string

The subgraph URL for querying data.

If not provided, the default data protector subgraph provided by iExec will be used.

ts
const 
dataProtector
= new
IExecDataProtector
(
web3Provider
, {
subgraphUrl
:
'https://thegraph-product.iex.ec/subgraphs/name/bellecour/dataprotector', });

ipfsNode

string

The IPFS node URL for content uploads. Use this option if you want to use your own IPFS node to upload content.

If not provided, the default IPFS node provided by iExec will be used.

ts
const 
dataProtector
= new
IExecDataProtector
(
web3Provider
, {
ipfsNode
: 'https://ipfs-upload.v8-bellecour.iex.ec',
});

ipfsGateway

string

The IPFS gateway URL used for content downloads. Mainly used for checking content uploaded on the IPFS network. Use this option if you want to use your own IPFS node for content downloads.

If not provided, the default IPFS gateway provided by iExec will be used.

ts
const 
dataProtector
= new
IExecDataProtector
(
web3Provider
, {
ipfsGateway
: 'https://ipfs-gateway.v8-bellecour.iex.ec',
});

iexecOptions

Low level configuration options for iexec SDK, see iexec SDK documentation IExecConfigOptions for more details.

ts
const 
dataProtector
= new
IExecDataProtector
(
web3Provider
, {
iexecOptions
: {
smsURL
: 'https://sms.scone-prod.v8-bellecour.iex.ec' },
});