Wrappers for interacting with the Concordium node.
Table of Contents:
Please see the documentation for more information
Contains the different packages for the JS-SDKs.
The Nodejs package contains the Nodejs SDK, particularly the client that wraps the GRPC calls to the node, is located here.
The Web package contains the Web SDK, which can used in a web environment.
The common package contains the shared library for the Nodejs and Web SDK's. The GRPC-client, all serialization and most utility functions are located in this package.
The common package contains bindings for Rust code, which is used by the common package. This package is a utility package that should not be used directly, only through the usage of the common package.
To install/update dependencies for the project, run
git submodule update --init --recursive
and
yarn
When installing/updating dependencies on a mac with an arm64 processor, it
might be required to explicitly set the target architecture of dependencies
to x64, as not all dependencies are available for the new mac processors. This
is done by replacing the yarn
command with
npm_config_target_arch=x64 yarn
To build the project run
yarn build
This will build all the subprojects.
Note that you must have wasm-pack installed to build the project.
To build the project quickly during development run
yarn build:dev
This will build all the subprojects. Note that this skips generating the grpc API and optimizing the wasm modules.
The following describes the requirements for creating a new release for each of the packages contained in this repository.
- Bump the version in package.json.
- Update the CHANGELOG describing the changes made.
- Update the dependency to common in the web and nodejs packages.
- Update the CHANGELOG in the web and
nodejs packages.
- Add a change entry: Bumped @concordium/common-sdk to x.y.z.
- Commit and tag the release.
- Tag should be
common/x.y.z
.
- Tag should be
- Run the deploy workflow.
- Under github actions, run the "deploy" workflow and download the
build-release
artifact. Unpack this file and use it for the release.
- Under github actions, run the "deploy" workflow and download the
- Publish the release to NPM.
- From the common package directory (packages/common) run
yarn npm publish
- From the common package directory (packages/common) run
- Bump the version in package.json.
- Update the CHANGELOG describing the changes made.
- Commit and tag the release.
- Tag should be
nodejs/x.y.z
.
- Tag should be
- Build the release.
- Under github actions, run the "deploy" workflow and download the
build-release
artifact. Unpack this file and use it for the release.
- Under github actions, run the "deploy" workflow and download the
- Publish the release to NPM.
- From the nodejs package directory (packages/nodejs) run
yarn npm publish
- From the nodejs package directory (packages/nodejs) run
- Bump the version in package.json.
- Update the CHANGELOG describing the changes made.
- Commit and tag the release.
- Tag should be
web/x.y.z
.
- Tag should be
- Build the release.
- Under github actions, run the "deploy" workflow and download the
build-release
artifact. Unpack this file and use it for the release.
- Under github actions, run the "deploy" workflow and download the
- Publish the release to NPM.
- From the web package directory (packages/web) run
yarn npm publish
- From the web package directory (packages/web) run
- Bump the version in package.json.
- Update the CHANGELOG describing the changes made.
- Update the dependency to rust-bindings in the common and web packages.
- Update the CHANGELOG in the common and
web packages.
- Add a change entry: Bumped @concordium/rust-bindings to x.y.z.
- Commit and tag the release.
- Tag should be
rust-bindings/x.y.z
.
- Tag should be
- Build the release.
- Under github actions, run the "deploy" workflow and download the
build-release
artifact. Unpack this file and use it for the release.
- Under github actions, run the "deploy" workflow and download the
- Publish the release to NPM.
- From the rust-bindings package directory (packages/rust-bindings) run
yarn npm publish
- From the rust-bindings package directory (packages/rust-bindings) run
An automatic test suite is part of this project, and it is run by executing:
yarn test
This will run the tests for each package.
Note that the tests for nodejs require a locally running concordium-node on the testnet. Otherwise the tests will fail.