TypeScript helpers for working with the Done JS contract runtime from Node/Bun tooling.
npm install @donezone/coreTypeScript helpers for working with the Done JS contract runtime from Node/Bun tooling.
- WasmdClient – thin wrapper around the wasmd binary with typed upload/instantiate helpers
- deployJsContract – convenience function that uploads cw_js.wasm and instantiates it with a JS
script (as used by the Done runtime)
- Command utilities for running child processes with predictable error handling
``ts
import { deployJsContract } from "@donezone/core";
const result = await deployJsContract({
scriptPath: "./packages/demo/contract/tokenSale.js",
from: "validator",
wasmd: {
chainId: "testing",
node: "http://127.0.0.1:26657",
keyringBackend: "test",
},
});
console.log("Contract address:", result.instantiate.contractAddress);
`
You can supply instantiateMsg or instantiateMsgPath to pass custom state, as well as override thecw_js.wasm path or admin/funds for the instantiate transaction.
The module is used by @donezone/cli` and can be embedded in custom scripts to automate Done contract
operations.