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 withCITA
and has been published at @citahub/cita-sdk - The
@citahub/cita-signer
is for signing transaction forCITA
and has been published at @citahub/cita-signer
@citahub/cita-sdk
strictly abides by Semver, and is compatible with CITA by MAJOR
and MINOR
version, e.g. @citahub/cita-sdk@0.20.x
will work perfectly with CITA@0.20
Websocket is supported, but the pub/sub is not completed in CITA for now.
https://github.com/citahub/cita-sdk-js
- Node: 9.4.0
- Language: TypeScript
- Library: Web3.js
- Dependency Manage: lerna、yarn
https://github.com/citahub/cita-sdk-js/issues
lint tool: ESLint
The lint tool related configuration file is in /packages/cita-sdk/.eslintrc.js
.
Github Flow Guide (https://guides.github.com/introduction/flow/)
@citahub/cita-sdk
strictly abides by Semver, and is compatible with CITA by MAJOR
and MINOR
version, e.g. @citahub/cita-sdk@0.20.x
will work perfectly with CITA@0.20
.
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
$ 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.
Naming Rules:
- cita-sdk
@citahub/cita-sdk@x.y.z
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/cita-signer@x.y.z
- 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
cita-web-debugger@x.y.z
- 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.