Socket
Socket
Sign inDemoInstall

orbit-db-pouch

Package Overview
Dependencies
3
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    orbit-db-pouch

OrbitDB store backed by PouchDB.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
72.6 MB
Created
Weekly downloads
 

Readme

Source

orbit-db-pouch

Gitter Matrix Discord

Key-Value database for orbit-db backed by PouchDB.

A key-value datastore for OrbitDB backed by the PouchDB. Orbit handles IPFS + authentication + creating a cryptographic trail of changes. PouchDB is really good at being a searchable database with strong revisioning.

Used in orbit-db.

Install

Usage

First, create an instance of OrbitDB:

const PouchStore = require('orbit-db-pouch')
const IPFS = require('ipfs')
const OrbitDB = require('orbit-db')

const ipfs = new IPFS()
const orbitdb = await OrbitDB.createInstance(ipfs)

Add custom datastore type

OrbitDB.addDatabaseType("pouch", PouchStore)

Create a datastore with a schema. In this example we're saving baseball players. We'll add 4 different indexed fields. Indexes and can unique.

store = await orbitdb.open("baseballplayers", {
    create: true, 
    type: "pouch"
})

Once opened the PouchDB can be accessed with ".db":

await store.db.allDocs() //see PouchDB documentation for more.

License

MIT

Keywords

FAQs

Last updated on 01 Mar 2022

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