Skip to content

cita-sdk-js library is a collection of packages which are cita-sdk and cita-signer for the CITA ecosystem.

Notifications You must be signed in to change notification settings

citahub/cita-sdk-js

Repository files navigation

Travis

中文文档

Overview

The cita-sdk-js library is a collection of packages which contains specific functionality for the CITA ecosystem.

  • The @citahub/cita-sdk is for interacting with CITA and has been published at @citahub/cita-sdk
  • The @citahub/cita-signer is for signing transaction for CITA and has been published at @citahub/cita-signer

Version

@citahub/cita-sdk strictly abides by Semver, and is compatible with CITA by MAJOR and MINOR version, e.g. @citahub/[email protected] will work perfectly with [email protected]

Notice

Websocket is supported, but the pub/sub is not completed in CITA for now.

Contributing

Repository

https://github.com/citahub/cita-sdk-js

Tech Stack

  • Node: 9.4.0
  • Language: TypeScript
  • Library: Web3.js
  • Dependency Manage: lerna、yarn

Task Management

https://github.com/citahub/cita-sdk-js/issues

Coding Style

lint tool: ESLint The lint tool related configuration file is in /packages/cita-sdk/.eslintrc.js.

Commit Style

Github Flow Guide (https://guides.github.com/introduction/flow/)

Version

@citahub/cita-sdk strictly abides by Semver, and is compatible with CITA by MAJOR and MINOR version, e.g. @citahub/[email protected] will work perfectly with [email protected].

How To Test

Build:

$ git clone https://github.com/citahub/cita-sdk-js.git & cd ./cita-sdk-js
$ git submodule update --init --remote --recursive
$ yarn install
$ yarn bootstrap
$ yarn build 

Configure Environment:

Find the .env.example file in the packages/cita-sdk and packages/cita-signer directories, rename it to .env, and modify the configuration in the file.

Run Tests:

$ yarn test

How To Publish

$ npm login // Log in to the npm account with publishing permissions.
$ lerna version [bump]
$ npm publish

The version upgrade does not require manual modification of package.json. After the release modified code is merged into the master, the publisher uses lerna version [bump] to upgrade the version and publish it to npm.

Push Tag

Naming Rules:

  • cita-sdk
    • @citahub/[email protected]
      • x.y follows the version number of CITA.
      • z is defined by the SDK itself, modified when adding or modifying a feature.
  • cita-signer
    • @citahub/[email protected]
      • x: MAJOR version, when you make incompatible API changes.
      • y: MINOR version, when you add functionality in a backwards compatible manner.
      • z: STAGE version, when you make backwards compatible bug fixes.
  • cita-web-debugger
    • [email protected]
      • x: MAJOR version, when you make incompatible API changes.
      • y: MINOR version, when you add functionality in a backwards compatible manner.
      • z: STAGE version, when you make backwards compatible bug fixes.