hirosystems / clarinet

Write, test and deploy high-quality smart contracts to the Stacks blockchain and Bitcoin.
https://hiro.so/clarinet
GNU General Public License v3.0
290 stars 129 forks source link

Publish a clarinet-sdk package for the browser #1432

Open hugocaillard opened 2 months ago

hugocaillard commented 2 months ago

Description

The @hirosystems/clarinet-sdk-wasm and @hirosystems/clarinet-sdk packages are built to work with Node.js only. they are primarily used to run unit test with Vitest.

@hirosystems/clarinet-sdk-wasmis build with wasm-pack build --target=node and @hirosystems/clarinet-sdk relies on Node FS.

There are also needs to run the SDK in the browser, for example to check contracts validity on the client side on the platform or run arbitrary code snippets in documentation website. We could publish 2 new packages @hirosystems/clarinet-sdk-wasm-web and @hirosystems/clarinet-sdk-web that would allow to achieve that