Skip to content

v0.16.2

Choose a tag to compare

@WiktorStarczewski WiktorStarczewski released this 18 Sep 00:23
7cf13ae

Enhancements

  • [FEATURE] New package @miden-sdk/create. npm create @miden-sdk@latest, run once in a project, is what makes the shipped agent guidance reachable: it writes a marker-delimited block into the project's own AGENTS.md naming the guides of the @miden-sdk/* packages actually installed, creates CLAUDE.md as an @AGENTS.md import because Claude Code reads that name instead, syncs those packages' skills into .claude/skills/, and adds a prepare script so a teammate who clones the repo and installs gets them too. No coding agent reads instruction files out of node_modules, so without this the documentation those packages ship is version-matched and invisible. It is idempotent and preserves surrounding content. The prepare script lives in the consumer's own manifest rather than as a postinstall on the SDK, because pnpm 10 blocks dependency lifecycle scripts by default and pnpm 11 defaults strictDepBuilds to true. (#311)
  • [FEATURE] Every published package now ships agent-facing documentation inside its tarball: an AGENTS.md index, plus a skills/ directory where task-scoped guidance earns one, readable at node_modules/@miden-sdk/<pkg>/. All 19 published packages carry one, including the wallet-adapter, Para, Turnkey and telemetry families adopted onto the 0.16 line; the three node-sdk-* native shells carry a short pointer saying they hold one .node binary and where the real SDK is. Because these files ship with the code they are version-matched to the installed release, so an AI agent working in a consumer's repo gets guidance for the version in that repo's lockfile rather than whatever its training data remembers. @miden-sdk/miden-sdk also ships its README.md for the first time: it previously published neither a readme nor any documentation. Paste the marker block from any package readme into your project's root AGENTS.md to point your agent at them. (#310)

Changes

  • [CHANGE] The skills describing this SDK's own API (web-client-usage, react-sdk-patterns, vite-wasm-setup, frontend-pitfalls, signer-integration, testing-patterns, frontend-source-guide) are now canonical in this repo, joined by chain-anchored-execution for the ChainAnchor API and by new guides for the adopted packages. They previously lived in 0xMiden/agent-tools and were copied into 0xMiden/frontend-template; both copies had drifted from each other and from the code, since nothing tied a skill to the API it documented. Keeping them beside the source makes an API change and its documentation the same PR. Every shipped skill has been brought up to 0.16: the corrections include examples that threw on current code (notes.sendPrivate without its now-required scanAfterBlockNum, a foreignAccounts sample that fails with InvalidForeignAccountId), guidance that contradicted the source (a React chain-anchor example that used anchoredRequest where it is still null, an assertion that custom notes cannot carry attachments, an instruction to edit a constant the source marks frozen), and the 0.16 fee model, which none of them covered. agent-tools remains canonical for everything not specific to this SDK. (#310)
  • [FIX] @miden-sdk/para, @miden-sdk/para-react and @miden-sdk/create-para-react now actually publish the AGENTS.md each has carried since it was adopted. npm packs README and LICENSE whatever files says but grants AGENTS.md no such privilege, and none of the three listed it, so the file existed in the repo and reached no consumer. A new make check-agent-docs gate asserts every published package's AGENTS.md and skills/ against the real npm pack --dry-run file list, so this cannot regress silently. (#310)
  • [FIX] @miden-sdk/telemetry-otel, @miden-sdk/telemetry-sentry and @miden-sdk/create are now in scripts/publish-manifest.json, so they can actually reach npm. All three were versioned, linted and gated by check:publish while appearing in no publish workflow and no manifest, which meant no route to the registry at all - the two telemetry packages had never been published. (#389)

Fixes

  • [FIX][web] SwapOptions.paybackType and PswapCreateOptions.paybackType documented a default of public. Both swap and pswapCreate resolve paybackType ?? type, so omitting it on a private swap produces a private payback note. The JSDoc now says so. (#390)
  • [FIX][turnkey] createAccount guarded its on-chain hydration path with storageMode !== AccountStorageMode.private(). That factory returns a new wasm-backed object on every call, so the comparison was always true and the accounts.import attempt ran for private accounts as well, which the guard exists to prevent. It now compares by value. (#391)
  • [FIX][turnkey] useTurnkeyMiden never terminated the client it created. The effect's cleanup called terminate() on the client React state captured when the effect ran, which is null on the first pass, and client is deliberately not in the dependency array, so every unmount or dependency change leaked a client. The cleanup now terminates the instance that run actually created, including one that finishes after unmount. (#391)
  • [FIX][turnkey] create-miden-turnkey-react scaffolded an app that could not install: it wrote @miden-sdk/turnkey and @miden-sdk/turnkey-react at ^1.15.1, which no published version satisfies, and @miden-sdk/miden-sdk at ^0.15.1, below the peer range those packages declare. All three now pin ^0.16.2. (#391)