Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 5 additions & 133 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"format": "prettier --ignore-path .gitignore --write ."
},
"dependencies": {
"@iexec/dataprotector": "^2.0.0-beta.23",
"@iexec/dataprotector": "^2.0.0-beta.27",
"@iexec/dataprotector-deserializer": "^0.1.1",
"@iexec/web3mail": "^1.7.1",
"@iexec/web3telegram": "^0.1.0-alpha.9",
Expand Down
4 changes: 2 additions & 2 deletions src/get-started/helloWorld/2-protectData.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ with two arguments.
```ts twoslash
import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector';

const web3Provider = getWeb3Provider('PRIVATE_KEY');
const web3Provider = getWeb3Provider('PRIVATE_KEY', 'RPC_URL');
const dataProtectorCore = new IExecDataProtectorCore(web3Provider);
// ---cut---
const { address: protectedDataAddress } = await dataProtectorCore.protectData({
Expand Down Expand Up @@ -169,7 +169,7 @@ Create a new instance and call the methods you need.
```ts twoslash
import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector';

const web3Provider = getWeb3Provider('PRIVATE_KEY');
const web3Provider = getWeb3Provider('PRIVATE_KEY', 'RPC_URL');
const dataProtectorCore = new IExecDataProtectorCore(web3Provider);
// ---cut---
const { address: protectedDataAddress } = await dataProtectorCore.protectData({
Expand Down
2 changes: 1 addition & 1 deletion src/get-started/helloWorld/4-manageDataAccess.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ it now to grant access to your protected data.
```ts twoslash
import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector';

const web3Provider = getWeb3Provider('PRIVATE_KEY');
const web3Provider = getWeb3Provider('PRIVATE_KEY', 'RPC_URL');
const dataProtectorCore = new IExecDataProtectorCore(web3Provider);
// ---cut---
const grantedAccess = await dataProtectorCore.grantAccess({
Expand Down
2 changes: 1 addition & 1 deletion src/guides/build-iapp/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Track your tasks at [iExec Explorer](https://explorer.iex.ec):
```ts twoslash
import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector';

const web3Provider = getWeb3Provider('PRIVATE_KEY');
const web3Provider = getWeb3Provider('PRIVATE_KEY', 'RPC_URL');
const dataProtectorCore = new IExecDataProtectorCore(web3Provider);
// ---cut---
const response = await dataProtectorCore.processProtectedData({
Expand Down
14 changes: 7 additions & 7 deletions src/guides/build-iapp/inputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Users specify the protected data address when executing your iApp:
```ts twoslash
import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector';

const web3Provider = getWeb3Provider('PRIVATE_KEY');
const web3Provider = getWeb3Provider('PRIVATE_KEY', 'RPC_URL');
const dataProtectorCore = new IExecDataProtectorCore(web3Provider);
// ---cut---
// User provides the protected data they want to use for processing
Expand Down Expand Up @@ -186,7 +186,7 @@ Users pass args through the DataProtector `processProtectedData()` call:
```ts twoslash
import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector';

const web3Provider = getWeb3Provider('PRIVATE_KEY');
const web3Provider = getWeb3Provider('PRIVATE_KEY', 'RPC_URL');
const dataProtectorCore = new IExecDataProtectorCore(web3Provider);
// ---cut---
// User provides args when executing your iApp
Expand Down Expand Up @@ -258,7 +258,7 @@ Users specify input files when executing your iApp:
```ts twoslash
import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector';

const web3Provider = getWeb3Provider('PRIVATE_KEY');
const web3Provider = getWeb3Provider('PRIVATE_KEY', 'RPC_URL');
const dataProtectorCore = new IExecDataProtectorCore(web3Provider);
// ---cut---
// User provides input files via DataProtector
Expand Down Expand Up @@ -341,7 +341,7 @@ Users provide all Requester Secrets when executing your iApp via DataProtector:
```ts twoslash
import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector';

const web3Provider = getWeb3Provider('PRIVATE_KEY');
const web3Provider = getWeb3Provider('PRIVATE_KEY', 'RPC_URL');
const dataProtectorCore = new IExecDataProtectorCore(web3Provider);
// ---cut---
// Example: User executes your iApp with all input types
Expand Down Expand Up @@ -473,7 +473,7 @@ iapp test --protectedData "mock_name"
```ts twoslash
import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector';

const web3Provider = getWeb3Provider('PRIVATE_KEY');
const web3Provider = getWeb3Provider('PRIVATE_KEY', 'RPC_URL');
const dataProtectorCore = new IExecDataProtectorCore(web3Provider);
// ---cut---
// User runs your data analysis iApp
Expand Down Expand Up @@ -505,7 +505,7 @@ save_results(results)
```ts twoslash
import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector';

const web3Provider = getWeb3Provider('PRIVATE_KEY');
const web3Provider = getWeb3Provider('PRIVATE_KEY', 'RPC_URL');
const dataProtectorCore = new IExecDataProtectorCore(web3Provider);
// ---cut---
// User runs your AI model with their data
Expand Down Expand Up @@ -540,7 +540,7 @@ save_encrypted_results(predictions)
```ts twoslash
import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector';

const web3Provider = getWeb3Provider('PRIVATE_KEY');
const web3Provider = getWeb3Provider('PRIVATE_KEY', 'RPC_URL');
const dataProtectorCore = new IExecDataProtectorCore(web3Provider);
// ---cut---
// User generates a report from their business data
Expand Down
10 changes: 5 additions & 5 deletions src/guides/manage-data/handle-schemas-dataset-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ it's all handled for you.
```ts twoslash
import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector';

const web3Provider = getWeb3Provider('PRIVATE_KEY');
const web3Provider = getWeb3Provider('PRIVATE_KEY', 'RPC_URL');
const dataProtectorCore = new IExecDataProtectorCore(web3Provider);
// ---cut---
const protectedData = await dataProtectorCore.protectData({
Expand Down Expand Up @@ -124,7 +124,7 @@ Users can find relevant protected data without seeing the actual content:
```ts twoslash
import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector';

const web3Provider = getWeb3Provider('PRIVATE_KEY');
const web3Provider = getWeb3Provider('PRIVATE_KEY', 'RPC_URL');
const dataProtectorCore = new IExecDataProtectorCore(web3Provider);
// ---cut---
const listProtectedData = await dataProtectorCore.getProtectedData({
Expand All @@ -145,7 +145,7 @@ are used in production environments.
```ts twoslash
import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector';

const web3Provider = getWeb3Provider('PRIVATE_KEY');
const web3Provider = getWeb3Provider('PRIVATE_KEY', 'RPC_URL');
const dataProtectorCore = new IExecDataProtectorCore(web3Provider);
// ---cut---
const userData = await dataProtectorCore.protectData({
Expand All @@ -172,7 +172,7 @@ const userData = await dataProtectorCore.protectData({
```ts twoslash
import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector';

const web3Provider = getWeb3Provider('PRIVATE_KEY');
const web3Provider = getWeb3Provider('PRIVATE_KEY', 'RPC_URL');
const dataProtectorCore = new IExecDataProtectorCore(web3Provider);
// ---cut---
const contactData = await dataProtectorCore.protectData({
Expand Down Expand Up @@ -225,7 +225,7 @@ function createArrayBufferFromFile(file: File): Promise<ArrayBuffer> {
// Get file from input element
const file = new File([''], 'example.jpg', { type: 'image/jpeg' });

const web3Provider = getWeb3Provider('PRIVATE_KEY');
const web3Provider = getWeb3Provider('PRIVATE_KEY', 'RPC_URL');
const dataProtectorCore = new IExecDataProtectorCore(web3Provider);
// ---cut---
const fileBuffer = await createArrayBufferFromFile(file);
Expand Down
4 changes: 2 additions & 2 deletions src/guides/manage-data/manage-access.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ NFT. Only you control who can decrypt and use it.
```ts twoslash
import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector';

const web3Provider = getWeb3Provider('PRIVATE_KEY');
const web3Provider = getWeb3Provider('PRIVATE_KEY', 'RPC_URL');
const dataProtectorCore = new IExecDataProtectorCore(web3Provider);
// ---cut---
const protectedData = await dataProtectorCore.protectData({
Expand Down Expand Up @@ -96,7 +96,7 @@ your data. Here's how to set it up:
```ts twoslash
import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector';

const web3Provider = getWeb3Provider('PRIVATE_KEY');
const web3Provider = getWeb3Provider('PRIVATE_KEY', 'RPC_URL');
const dataProtectorCore = new IExecDataProtectorCore(web3Provider);
// ---cut---

Expand Down
2 changes: 1 addition & 1 deletion src/guides/manage-data/monetize-protected-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ conditions for accessing your protected data. Each order defines:
```ts twoslash
import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector';

const web3Provider = getWeb3Provider('PRIVATE_KEY');
const web3Provider = getWeb3Provider('PRIVATE_KEY', 'RPC_URL');
const dataProtectorCore = new IExecDataProtectorCore(web3Provider);
// ---cut---
// Create a signed order with specific conditions
Expand Down
2 changes: 1 addition & 1 deletion src/guides/use-iapp/how-to-pay-executions.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ You can control costs by setting maximum prices for each component:
```ts twoslash
import { IExecDataProtectorCore, getWeb3Provider } from '@iexec/dataprotector';

const web3Provider = getWeb3Provider('PRIVATE_KEY');
const web3Provider = getWeb3Provider('PRIVATE_KEY', 'RPC_URL');
const dataProtectorCore = new IExecDataProtectorCore(web3Provider);
// ---cut---
const result = await dataProtectorCore.processProtectedData({
Expand Down
Loading
Loading