0.0.1 • Published 4 years ago
@rsksmart/rif-cpinner-client v0.0.1
This project is a work in progress
The Data Vault is a user centric cloud storage system. This repo currently exposes a Javascript implementation for interacting with this centralized IPFS pinner service.
Getting started
Use the Data Vault client to store and retrieve files
View the data-vault service README for a quick-start
import { SecretBox } from 'daf-libsodium'
// holderAgent is a uPort agent
const secretKey = await SecretBox.createSecretKey()
const secretBox = new SecretBox(secretKey)
const dataVault = CentralizedIPFSPinnerClient.fromAgent((await holderAgent.getIdentities())[0], holderAgent, secretBox, 'http://localhost:5102', { ipfsDefault: true })
const cid1 = await dataVault.put('some key', 'some value')
const cid2 = await dataVault.put('some key', 'some other value')
const result = await dataVault.get('some key')
await dataVault.delete('some key', cid1)
await dataVault.delete('some key', cid2)
Setup
Install dependencies
npm i
npm run setup
Run tests
Currently no tests
0.0.1
4 years ago