Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @ceramicnetwork/http-client

Ceramic http client

An http client for the Ceramic protocol

Getting started

Installation

$ npm install @ceramicnetwork/http-client

Usage

import CeramicClient from '@ceramicnetwork/http-client'
import TileDocument from '@ceramicnetwork/stream-tile'
import IdentityWallet from 'identity-wallet'

const API_URL = "http://localhost:7007"

const client = new CeramicClient(API_URL)

// 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

Index

Variables

Const API_PATH

API_PATH: "/api/v0" = "/api/v0"

Const CERAMIC_HOST

CERAMIC_HOST: "http://localhost:7007" = "http://localhost:7007"

Functions

combineURLs

  • combineURLs(baseURL: any, relativeURL: any): any

delay

  • delay(mills: number): Promise<void>

typeStreamID

  • typeStreamID(streamId: StreamID | string): StreamID

Object literals

Const DEFAULT_APPLY_COMMIT_OPTS

DEFAULT_APPLY_COMMIT_OPTS: object

anchor

anchor: boolean = true

publish

publish: boolean = true

sync

sync: SyncOptions = SyncOptions.PREFER_CACHE

Const DEFAULT_CLIENT_CONFIG

DEFAULT_CLIENT_CONFIG: object

Default Ceramic client configuration

syncInterval

syncInterval: number = 5000

Const DEFAULT_CREATE_FROM_GENESIS_OPTS

DEFAULT_CREATE_FROM_GENESIS_OPTS: object

anchor

anchor: boolean = true

publish

publish: boolean = true

sync

sync: SyncOptions = SyncOptions.PREFER_CACHE

Const DEFAULT_LOAD_OPTS

DEFAULT_LOAD_OPTS: object

sync

sync: SyncOptions = SyncOptions.PREFER_CACHE