/api.js

CENNZnet JS API for browsers, React Native and Node.js

Primary LanguageTypeScriptApache License 2.0Apache-2.0

CENNZnet API ci status badge

The CENNZnet JavaScript API library for browsers and Node.js.

Quick Start

See the Getting started guide on the wiki for an introduction to the API.

Then head to the docs and try the example snippets to get started.

Components

Name Description
@cennznet/api The core API package
@cennznet/types CENNZnet specific type definitions

Development

Testing

Running integration tests

# Start test nodes
docker-compose up
yarn test:e2e

Update Metadata

Fetch latest metadata from local node and regenerate dynamic type definitions + docs

yarn meta:update

Making a Release (requires maintainer permission)

  1. Create a branch prerelease/<semver> e.g. prerelease/1.5.0 for an ordinary release or prerelease/1.5.0-alpha.0 for a release candidate.
    Bump package versions, ensure static metadata updated and docs regenerated
  2. Open a PR, passing CI and review
  3. label it 'automerge' and the release will be published to npm

Viewing Docs

Generate typedocs

yarn docs:src