Package Exports
- @ceramicnetwork/core
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ceramicnetwork/core) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Ceramic Core
This package contains the implementation of the core Ceramic protocol. It's exposed using a simple JavaScript API.
Getting started
Installation
$ npm install @ceramicnetwork/core
Usage
import Ceramic from '@ceramicnetwork/core'
import IPFS from 'ipfs'
import dagJose from 'dag-jose'
import basicsImport from 'multiformats/cjs/src/basics-import.js'
import legacy from 'multiformats/cjs/src/legacy.js'
basicsImport.multicodec.add(dagJose)
const format = legacy(basicsImport, dagJose.name)
const ipfs = Ipfs.create({
ipld: { formats: [format] },
})
const config: CeramicConfig = {}
const ceramic = await Ceramic.create(ipfs, config)
// create document example
const doctype1 = await ceramic.createDocument('tile', { content: { 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.