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 SDK contains the actual SDK, which can used in both a web and NodeJS environment.
The rust-bindings contains bindings for Rust code, which is used by the SDK through WASM. This package is a utility package that should not be used directly, only through the usage of the SDK.
The ccd-js-gen contains a library and CLI for generating smart contract clients for TypeScript and JavaScript.
To install/update dependencies for the project, run
git submodule update --init --recursive
and
yarn
It may be necessary to install Xcode when installing dependencies on a mac.
On a mac with an arm64 processor, it might also 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.
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.
- Commit and tag the release.
- Tag should be
sdk/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 sdk package directory (packages/sdk) run
yarn npm publish
- From the sdk package directory (packages/sdk) run
- Bump the version in package.json.
- Update the CHANGELOG describing the changes made.
- Update the dependency to rust-bindings in the sdk
- Update the CHANGELOG in the sdk
- 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
- Bump the version in package.json.
- Update the CHANGELOG describing the changes made.
- Commit and tag the release.
- Tag should be
ccd-js-gen/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 ccd-js-gen package directory (packages/ccd-js-gen) run
yarn npm publish
- From the ccd-js-gen package directory (packages/ccd-js-gen) 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.