This package installs the system-specific native
The JS module also provides programmatic access to the binary file path and the installation functions.
An installation script runs automatically when this package is installed via
npm install (or an equivalent package install tool/command). Pre-built dist files are downloaded if the platform & arch is supported, otherwise, it attempts to compile the binary from source.
Controlling Installation Options
Force install via source compilation by specifying either the
environment variables. The variable must be available during the npm install script. If found then the script will not attempt to download
a pre-compiled distributable. The value must be set to a git tag or branch on the
For example, the following commands test a blockstack-core repo feature branch using the
git clone firstname.lastname@example.org:blockstack/clarity-js-sdk.git cd clarity-js-sdk BLOCKSTACK_CORE_SOURCE_BRANCH="feature/new-thing" npm install cd packages/clarity-tutorials npm test
Or, for an already setup local SDK dev environment, trigger an
npm install of this package. Examples:
cd clarity-js-sdk BLOCKSTACK_CORE_SOURCE_BRANCH="feature/new-thing" npm run rebuild
cd clarity-js-sdk/packages/clarity-native-bin BLOCKSTACK_CORE_SOURCE_BRANCH="feature/new-thing" npm install
Source Compilation Requirements
If compiling from source then the Rust toolchain and a C compiler must be available.