fabric-sdk-node-mongodb-kvs

0.3.0 • Public • Published

fabric-sdk-node-mongodb-kvs

MongoDB KeyValueStore implementation for Fabric Node.js SDK

Install

npm i fabric-sdk-node-mongodb-kvs

Configuration & Usage in SDK

const Client = require('fabric-client')

Client.setConfigSetting('key-value-store', 'fabric-sdk-node-mongodb-kvs')

// Create KeyValuieStore using the MongoDB options
Client.newDefaultKeyValueStore({
  url: 'mongodb://localhost:27017',
  dbName: 'app',
  collectionName: 'credential'
})

// Create CryptoKeyStore using the MongoDB options
Client.newCryptoKeyStore({
  url: 'mongodb://localhost:27017',
  dbName: 'app',
  collectionName: 'crypto'
});

// Have fun with Fabric

Test

npm run test

Package Sidebar

Install

npm i fabric-sdk-node-mongodb-kvs

Weekly Downloads

7

Version

0.3.0

License

MIT

Unpacked Size

5.99 kB

Total Files

7

Last publish

Collaborators

  • chengusky