An extension of Observable that also has a 'next' method which can be used to publish new events into the Observable stream.
PubsubMessage as raw IPFS pubsub message.
PubsubMessage to transform into raw form.
Peer ID that ostensibly sent the message.
Stop emitting if +betweenMs+ passed since the last emitted value.
max interval between the sequential values.
Create an IPFS instance
IFPS config for override
Pass only messages from other IPFS nodes.
Own peer id.
Instantiate a number of IPFS instances
number of ipfs instances
IPFS config for override
Deserialize incoming message in an internal observable that does not emit if error happens. Log a successfully deserialized message.
own IPFS node peer id
logger that dumps a successfully deserialized message
IPFS pubsub topic we listen
Given two different StreamStates representing two different conflicting histories of the same stream, pick which commit to accept, in accordance with our conflict resolution strategy
first log's state
second log's state
the StreamState containing the log that is selected
Build Stream from the current state and update feed.
Ceramic context
available stream handlers
current state of the stream
On-demand feed of updates for the stream. If not provided then the returned Stream object is marked read-only and cannot be used to update the stream.
Verifies anchor commit structure
To get raw blob from IPFS
AnchorValidator to verify chain inclusion
Anchor commit data
Maps some of Ethereum chain IDs to network configuration
Ceramic Core
Getting started
Installation
$ npm install @ceramicnetwork/core
Usage
import Ceramic from '@ceramicnetwork/core' import TileDocument from '@ceramicnetwork/stream-tile' import IPFS from 'ipfs-core' import dagJose from 'dag-jose' import { convert } from 'blockcodec-to-ipld-format' const format = convert(dagJose) const ipfs = Ipfs.create({ ipld: { formats: [format] }, }) const config: CeramicConfig = {} const ceramic = await Ceramic.create(ipfs, config) // create document example const tileDocument = await TileDocument.create(ceramic, { test: 123 })
Ceramic API
Complete Ceramic core API is available on Ceramic API.
Development
Run tests:
$ npm test
Run linter:
npm run lint
Contributing
We are happy to accept small and large contributions. Make sure to check out the Ceramic specifications for details of how the protocol works.
License