UNPKG

datoms-protocol

Version:

An integrated implementation of hypercore protocol with both stream and state machine

20 lines (16 loc) 488 B
// Main entry point that exports the combined API const Protocol = require('./lib/protocol') const Stream = require('./lib/stream') module.exports = { // The stream implementation Stream, // The state machine Protocol, // Utility functions keyPair: Stream.keyPair, isProtocolStream: Stream.isProtocolStream, // Create a combined protocol+stream instance createProtocolStream: function(initiator, options = {}) { return new Stream(initiator, options) } }