@iexec/dataprotector
v2.0.0-beta.23
Published
This product enables users to confidentially store data–such as mail address, documents, personal information ...
Readme
DataProtector offers developers methods to create apps that give users unparalleled ownership and privacy over their data.
Through DataProtector, users may allow apps to use their data–without ever revealing the data itself. This revolutionary approach to data management relies on:
- end-to-end encryption backed by a confidential computing technology that prevents apps from accessing users’ unencrypted data
- smart contracts that manage apps’ rights to use users’ encrypted data
Installation
DataProtector is available as an npm package.
npm:
npm install @iexec/dataprotector@betayarn:
yarn add @iexec/dataprotector@betaGet started
Depending on your project's requirements, you can instantiate the SDK using the umbrella module for full functionality or opt for one of the submodules to access specific sets of features.
Instantiate using the umbrella module
For projects requiring the full functionality of the SDK, including both core and sharing functions.
Browser
import { IExecDataProtector } from '@iexec/dataprotector';
const web3Provider = window.ethereum;
// Instantiate using the umbrella module for full functionality
const dataProtector = new IExecDataProtector(web3Provider);
const dataProtectorCore = dataProtector.core;
const dataProtectorSharing = dataProtector.sharing;NodeJS
import { IExecDataProtector, getWeb3Provider } from '@iexec/dataprotector';
const { PRIVATE_KEY } = process.env;
// Get Web3 provider from a private key
const web3Provider = getWeb3Provider(PRIVATE_KEY);
// Instantiate using the umbrella module for full functionality
const dataProtector = new IExecDataProtector(web3Provider);
const dataProtectorCore = dataProtector.core; // access to core methods
const dataProtectorSharing = dataProtector.sharing; // access to sharing methodsDocumentation
License
This project is licensed under the terms of the Apache 2.0.
