Socket
Socket
Sign inDemoInstall

@espresso-org/aragon-datastore

Package Overview
Dependencies
10
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @espresso-org/aragon-datastore

Datastore based on AragonOS


Version published
Weekly downloads
3
increased by200%
Maintainers
2
Created
Weekly downloads
 

Readme

Source

AragonOS Datastore

Build Status Coverage Status

The Datastore lets DApps easily store files and manage their permissions decentrally. It consists of two modules:

  1. A javascript library to store files in a distributed file system, IPFS as of right now. It will also handle the encryption/decryption process.
  2. A solidity smart contract that keeps the information of those files and manages permissions.

Javascript library

To be as extensible as possible, the Datastore is built around a system of multiple providers. To use the Javascript library, first import the necessary objects:

import { Datastore, providers } from 'aragon-datastore'

And you can then create an instance like this:

const datastore = new Datastore({
    storageProvider: new providers.storage.Ipfs(),
    encryptionProvider: new providers.encryption.Aes(),
    rpcProvider: new providers.rpc.Aragon(aragonApp)
})

The code above would create a Datastore instance using IPFS as storage and aragon.js to execute the smart contract methods and receive events. To use Filecoin instead of IPFS, simply select the corresponding storage provider. In case the DApp is not using Aragon, a Web3 provider is also availabe:

    rpcProvider: new providers.rpc.Web3(...)

Solidity smart contract

To use or extend the smart contract features, import the Datastore.sol file:

import "aragon-datastore/contracts/Datastore.sol";

IPFS

Right now, the Datastore only supports IPFS. The provider will try to connect to localhost by default on port 5001. Make sure an IPFS daemon is running:

ipfs daemon

FAQs

Last updated on 17 Oct 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc