This library exists to support smart contract developers working on our contracts and tests. It is not intended for dapp usage or third-party integration, and we do not provide support or encourage external adoption.
Not fully supported but some things might work. Call setEnvProvider(() => ({ nodeUrl: "...", allowRpcUrlEnv: true, ... })) before using the toolkit to override loading the secrets using dotenv.
For Vite (and similar bundlers), alias Node built-ins to the toolkit’s browser shims so the bundle resolves fs, path, crypto, child_process:
import { getNodeShimAliases } from "starknet-dev-toolkit/browser-shims/alias";
export default defineConfig({
resolve: { alias: getNodeShimAliases() },
// ...
});Install from a git tag (no registry):
pnpm add argentlabs/starknet-dev-toolkit.git#vX.Y.Z
- Update
versioninpackage.json. - Build and tag:
pnpm build
git tag vX.Y.Z
git push origin vX.Y.Z
- In the consumer repo, link to use the local checked out
starknet-dev-toolkit:
pnpm add --link ../starknet-dev-toolkit
- In this repo, run the watch build:
pnpm build:watch
Changes compile into dist/ within seconds. Source maps are emitted; enable
sourcemaps in your runtime/bundler to debug into the original TypeScript.