Merge development into main - #1201
Open
popenta wants to merge 33 commits into
Open
Conversation
…lar recipes Add a TypeScript verification harness for the sdk-js cookbook, mirroring the repo's Rust tutorial CI (testing/rust-tutorial-ci.sh + extract-tutorial-code): - testing/cookbook-ts/: a fence extractor (parser.ts + extract.ts) that pulls titled ts/tsx fences from cookbook recipe MDX into a strict TS project, plus CONVENTION.md documenting the authoring convention. - testing/cookbook-ts-ci.sh + .github/workflows/cookbook-ts-ci.yml: extract then tsc --noEmit --strict, the "what is shown is what is compiled" gate. - Three exemplar recipes ported to docs/sdk-and-tools/sdk-js/cookbook/, carrying the meta-strip frontmatter the Track A swizzle reads: a read-side network-providers recipe, a write-side transactions recipe, and a dApp/React sdk-dapp recipe. - sidebars.js: a "Cookbook (recipes)" category. Verified: extractor assembles 10 files across 3 recipes; tsc --noEmit --strict passes; a deliberate type error is rejected (TS2322); Docusaurus build is green with the meta strip server-rendered; markdownlint + codespell pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Port 14 recipes onto the proven TS-verification harness + design layer: - start-here (5): vite-react-minimal, nextjs-minimal, local-https-setup, sign-and-send, v4-to-v5-migration - migration (3): dapp-provider-to-initapp, get-account-info-v4-vs-v5, send-transactions-to-transaction-manager - wallets (6): wallet-login-button, defi-extension-login, walletconnect-login, ledger-login, native-auth, typescript-strict-mode-checklist Each page inlines its source verbatim as titled ts/tsx fences (v4 "before" and next/vite config files shown as untitled illustrative fences since they can't compile against the harness deps). Internal-only doc references scrubbed from comments. Sidebar wired under "Cookbook (recipes)". Verified: cookbook-ts extract + tsc --noEmit --strict green (57 files / 16 recipes incl. exemplars); docusaurus build green, all pages generate, no new broken links; markdownlint + codespell clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Port the entire prototype `accounts` section (14 recipes) onto the proven TS-verification template, under docs/.../cookbook/accounts/: - Key management: generate-mnemonic-derive-keys, account-from-keys, keystore-save-load, pem-save-load - Addresses & state: address-utilities, fetch-account-state, manage-nonces - Signing: sign-verify-message, sign-verify-transaction, hash-signing-transaction - Guardians & relayed: set-guardian, guard-unguard-account, apply-guardian-to-transaction, relayed-v3-transaction Each page carries the meta-strip frontmatter (difficulty + sdk_versions), last_validated normalized to 2026-07-16, Docusaurus admonitions in place of Starlight <Aside>, and every compile-required source file inlined verbatim as a titled ts fence. Internal-only references (CLAUDE.md, authoring-process notes) scrubbed from prose and comments; cross-links to unported pages reworded to avoid new broken links. Added an "Accounts and signing" category to sidebars.js under Cookbook (recipes). Verified: `npm run extract` + `tsc --noEmit --strict` green across all 30 recipes (74 files); markdownlint (0 errors) and codespell clean on the 14 new pages; `docusaurus build` succeeds with all pages generated and no new broken links. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Port 13 recipes onto the verified Docusaurus cookbook template: - tokens (8): issue fungible/NFT/SFT, set special roles, local mint/burn, lifecycle (freeze/pause/wipe), fetch metadata, fetch balances - transactions (3): send-esdt, multi-token-transfer, track-transaction-status - governance (2): create-proposal, vote-close-proposal Frontmatter meta strip (difficulty + sdk_versions), admonitions, and titled code fences match waves 1-2. Public-valuable SDK-bug pitfalls kept (unset-role wrong-flag, pause/freeze/wipe wrong-receiver, LocaMinting typo); internal-only references scrubbed. Adds Tokens and Governance sidebar categories and appends the new transactions. tsc --noEmit --strict green across all cookbook recipes; Docusaurus build green with no new broken links; markdownlint and codespell clean on the new pages. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ave 4) Port 14 recipes onto the verified TS cookbook template: - network-providers (6): fetch-network-config-status, fetch-a-block, await-account-on-condition, await-transaction-on-condition, simulate-estimate-transaction, custom-api-request - delegation (5): create-delegation-contract, delegate-stake, claim-and-redelegate-rewards, undelegate-and-withdraw, query-delegation-contract - multisig (3): propose-action, sign-perform-action, read-multisig-state Add Delegation and Multisig sidebar categories and append the six network-providers pages to the existing category. Extract + strict tsc, markdownlint, codespell, and the Docusaurus build all pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…s (wave 5) Final port wave. Adds 11 recipes across three new "Cookbook (recipes)" categories: Smart contracts (call & query): load-abi, query-contract-view, call-contract-endpoint, call-payable-endpoint, decode-return-data, decode-contract-events. Smart contracts (deploy & upgrade): compute-contract-address, deploy-contract, upgrade-contract. Smart contracts (Rust authoring): new-contract-from-template, storage-mapper-decision-table. The ABI-loading TS recipes take an Abi-typed parameter (subject files) or read the ABI JSON at runtime via fs (load-abi's index.ts), so every titled ts fence type-checks under the harness with no bare JSON import. The Rust authoring recipes ship illustrative rust fences (not extracted/compiled). Verified: extract + tsc --noEmit --strict green across all 66 recipes; docusaurus build green with no new broken links; markdownlint and codespell clean on the 11 new pages. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ss A) Build the cookbook's browsable entry points on top of the 69 ported recipes and retire the Track-A demo pages. - Landing page (docs/.../cookbook/index.mdx, slug = cookbook root) renders all 69 recipes grouped by the 13 sections via the Track-A RecipeGrid/RecipeCard components. Cards are driven by a build-time manifest (scripts/generate-cookbook-manifest.js -> src/data/cookbook-manifest.json) that reads each recipe's real frontmatter and mirrors the curated sidebar order, so no list is hand-maintained. New CookbookIndex component adds a manifest-driven jump-nav with per-section counts. - Agent on-ramp (docs/.../cookbook/agents.mdx) routes human devs to the recipes and coding agents to the machine-readable surface (llms.txt / llms-full.txt) and the existing learn/ai-agents page (mx-ai-skills). Placed first in the cookbook sidebar. - Retire cookbook-preview.mdx + cookbook-preview-recipe.mdx and their sidebar entries; make the index the "Cookbook (recipes)" category link. - Regenerate static/llms.txt + llms-full.txt: all 69 recipes now appear as tagged lines / full content. Wire the manifest generator into prebuild. Build green; TS harness (extract + tsc --strict) green; codespell clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ass B) All 69 recipes now exist, so the inter-recipe cross-links the porting waves dropped (to avoid links to then-unported pages) can be real again. Restore them from the prototype's see_also curation, and lightly restore em-dashes where a wave's comma/colon substitution left a run-on. Cross-links (18 see_also edges across 12 recipes): - Convert 9 plain-texted "covered in the X recipes" See also bullets back into real recipe links (address-utilities, create-delegation-contract, create-proposal, fetch-account-state, issue-nft-collection, propose-action, query-delegation-contract, vote-close-proposal, manage-nonces). - Restore the prototype's curated See also set on 3 recipes the waves had filled with placeholder links (configure-network-provider, read-connected-account, send-egld). - All targets are real ported pages under /sdk-and-tools/sdk-js/cookbook/<section>/<slug>. No fabricated links. wallet-login-button left as-is: its rendered base-setup link (vite-react-minimal) is correct; the stale frontmatter see_also (nextjs-minimal) was never rendered. Em-dashes (6 surgical restorations, 5 recipes): manage-nonces (x2), await-account-on-condition, await-transaction-on-condition, native-auth, simulate-estimate-transaction, only where a comma splice or emphatic appositive read as a run-on. No code fences touched. Additive, prose-only. Verified green: extract + tsc --noEmit --strict via testing/cookbook-ts-ci.sh; Docusaurus build (zero cookbook broken links); markdownlint-cli2 (only the known index.mdx MD033/CookbookIndex); codespell clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Surgical copy pass across the sdk-js cookbook recipe pages. Removes the self-narrating "this recipe shows/demonstrates/walks" frame, throat-clearing ("worth noting", "it is tempting to", "the point is"), and cutesy filler ("out of the box", "under the hood") in favour of plain, direct wording matching the already-rewritten index/agents front door.
Prose only: no code fences, links, admonitions, or technical claims changed. 17 recipe pages edited; the rest left as-is. Front-door index/agents rewrites (already done) are included in this commit.
Verified: docusaurus build green (no new broken links); cookbook-ts extract + tsc --noEmit --strict green; markdownlint + codespell clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…precision) + drop redundant await
… + repoint inbound links)
The generated manifest and llms files are no longer committed, and the prebuild lifecycle hook only fires on 'npm run build'. Without this, 'npm start' would come up with a missing cookbook manifest.
- Bump next 15.5.18 -> 15.5.21 in both starters and the harness (clears the new Server Actions DoS + SSRF HIGH advisories). Regenerated lockfiles; both Next production builds pass on Node 20.19.0. - Add a dependency-free high/critical npm-audit gate (testing/cookbook-ts/audit-project.mjs) wired as its own CI step. It fails on any new high and allow-lists only the unreachable sharp/libvips advisory (no recipe uses next/image). Closes the advisory-treadmill gap so a future Next CVE fails CI, not a reviewer. - Declare gray-matter@4.0.3 directly (was resolving via a Docusaurus transitive hoist). - Soften the two Rust reference pages to 'manually verified at authoring time, not continuously built'. - gitignore /src/data/ so builds no longer leave the generated manifest untracked. Per maintainer decision: the tracked static/llms*.txt keep their current (old) versions; regeneration comes as a separate PR. Targets development. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…erated artifacts F1: postcss and brace-expansion resolved via overrides to 8.5.25 and 5.0.8. next pins postcss 8.4.31 exactly (so does next@latest), and sdk-dapp / sdk-dapp-ui are already at their latest published versions, so no upstream bump exists for either chain. Overrides applied to the ten recipe manifests that pull the affected packages, not only the test harness, so a reader copying a starter gets the patched tree. Allowlist unchanged at one entry. F5: audit-project.mjs takes --directory; each of the five freshly installed dependency environments is audited before its projects build. F2: sign-and-send no longer reports completion before confirmation. 'done' is set only from sdk-dapp's session-specific onSuccess callback; the state moves to 'tracking' when send resolves and submission stays disabled through it. A synchronous guard rejects a same-tick second submission before React renders disabled=true, and an early-terminal path covers the callback landing before the send promise resolves. The dead 'sending' state is removed. Three runtime lifecycle tests added. F3: helper re-described as React-independent browser-side sdk-dapp code; server and CLI use pointed at sdk-core. useGetPendingTransactions arity fixed. F4: static/llms*.txt untracked and ignored, matching the manifest policy. F6: stray fence removed. F7: expected-output count corrected to four. F8: clientName added across all entrypoint constructions. F9: non-cookbook changes disclosed in the PR description. Verified on Node 20.19.0: advisory gate green, 11/11 extractor tests, 3/3 lifecycle tests, strict TypeScript, 5/5 environments audited, 61/61 projects built, 8/8 Vite and 2/2 Next production builds, clean Docusaurus build, 6 offline and 10 live read-only runtime examples. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
C1: the busy guard added in round 3 had no release path. Logging out while a submission was tracking dropped the sdk-dapp session, so the terminal callbacks could never fire and the page stayed locked forever. A regression from the round-3 fix, not a pre-existing issue. SendEgldLifecycle gains abandon(reason), which releases the guard and clears the stored output and early terminal so a callback from the dropped session cannot resurrect the abandoned submission after reconnecting. Its doc comment states that the broadcast transaction may still be pending and the caller must refresh the account nonce before sending again; clearing busy alone would reintroduce the stale-nonce bug the guard exists to prevent. Adds an isBusy getter so the guard state is inspectable. Disconnect is guarded twice: the button is disabled while signing or tracking with an explanatory tooltip, and handleLogout() returns early on the same condition so a programmatic caller cannot bypass the UI. Test added: tracking -> logout -> stale callback ignored -> login -> send accepted -> done. C2: the SendEgldOutput comment now says sessionId keys the ...TransactionsSessions() maps and identifies the per-session callbacks, and names the flat hooks as taking no session id. Verified on Node 20.19.0: advisory gate green (harness plus all five fresh environments), 11/11 extractor tests, 4/4 lifecycle tests, strict TypeScript, 61/61 projects built, 8/8 Vite and 2/2 Next production builds, clean Docusaurus build with no new broken links. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Add a designed, CI-verified sdk-js cookbook (69 recipes) + agent on-ramp
Attempt to fix pipelines
radumojic
previously approved these changes
Aug 12, 2026
danidrasovean
previously approved these changes
Aug 12, 2026
More fixes related to latest changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the pull request (what is new / what has changed)
Did you test the changes locally ?
Did you regenerate static/llms.txt and static/llms-full.txt ? (happens at build time)
Which category (categories) does this pull request belong to?