A user centric cloud storage system
The Data Vault is a user-centric cloud service. Allows any user with a digital wallet to connect to their own storage cloud, encrypting their information on the client side.
Connect to RIF Data Vault from your browser app!
import DataVaultWebClient, { AuthManager, AsymmetricEncryptionManager } from '@rsksmart/ipfs-cpinner-client'
const serviceUrl = 'https://data-vault.identity.rifos.org'
// using Metamask
const address = await window.ethereum.request({ method: 'eth_accounts' }).then(accounts => accounts[0])
const did = `did:ethr:rsk:${address}`
const dataVault = new DataVaultWebClient({
  serviceUrl,
  authManager: new AuthManager({ did, serviceUrl, personalSign: (data: string) => window.ethereum.request({ method: 'personal_sign', params: [data, address] }) }),
  encryptionManager: AsymmetricEncryptionManager.fromWeb3Provider(window.ethereum)
})
const key = 'MyKey'
const content = 'this is my content'
const id = await dataVault.create({ key, content })
await dataVault.get({ did, key })Read the docs and find out more!
@rsksmart/ipfs-cpinner-client- the web SDK. Enables users to log to their clouds with standard web3 wallets@rsksmart/ipfs-cpinner-provider- implements the storage layer: storing and pinning files on IPFS@rsksmart/ipfs-cpinner-service- API for the Data Vault. This abstraction allows to create different implementations for the storage layer@rsksmart/ipfs-cpinner-client-types- types for the SDK
- 
Install dependencies
npm i npm run setup - 
Install IPFS CLI. Find your option: https://docs.ipfs.io/how-to/command-line-quick-start/.
 
- Init IPFS (once)
 
ipfs init
- Start IPFS Daemon
 
ipfs daemon
- Run tests
 
npm test
or watch mode with
test:watch
npm run lint
masterhas latest release. Do merge commits.develophas latest approved PR. PRs need to passciandLGTM. Do squash & merge.- Use branches pointing to 
developto add new PRs. - Do external PRs against latest commit in 
develop. 
To run a productive instance of the Data Vault refer to Data Vault service configuration