The cita-sdk-js library is a collection of packages which contains specific functionality for the CITA ecosystem.
- The
@citahub/cita-sdkis for interacting withCITAand has been published at @citahub/cita-sdk - The
@citahub/cita-signeris for signing transaction forCITAand 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/[email protected] will work perfectly with [email protected]
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/[email protected] will work perfectly with [email protected].
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 publishThe 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/[email protected]x.yfollows the version number of CITA.zis 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.