Skip to content

docs: build with TxBuilder - #18

Merged
twwu123 merged 1 commit into
mainfrom
docs/tx-builder-pages
Nov 30, 2026
Merged

twwu123 merged 1 commit into
mainfrom
docs/tx-builder-pages

Conversation

@lisicky

@lisicky lisicky commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

What

Every page that still built transactions with MeshTxBuilder now builds them with TxBuilder parts: the smart contract pages, the providers, the guides, the course and resources, the API pages, and the home page, AI, Aiken, Hydra, NFT, Svelte and Yaci pages. MeshTxBuilder stays only in the legacy builder pages, the migration guide and the links to it.

The change also fixes problems the pages had before it: dead links, browser wallet addresses passed in hex where bech32 is needed, an expired slot in the course, the TxParser pages' serializer and the Offline Evaluator page's evaluator from @meshsdk/core-csl, and a transaction CBOR read from a field that does not exist.

Merge together with MeshJS/mesh#880, MeshJS/mesh#881 and MeshJS/mesh#883:

  • the contract pages give a contract a builder (#881);
  • the UTxOs page says that a UTxO given in a collateral part may also be spent when the payer's UTxOs hold it (#880);
  • the Offline Evaluator page imports OfflineEvaluator from @meshsdk/core (#883).

Contents

  • Smart contracts (10 pages): new TxBuilder({ network, provider }) and new MeshContractName({ builder, wallet }). The index explains the builder input and that mesh is deprecated. The vesting page's manual deposit and withdrawal are written with parts, and plutus-nft reads lovelacePrice, the field the contract returns.
  • Providers (11 pages): the builder takes the provider as provider, evaluation examples evaluate built.tx, and redeemer budgets are exUnits. Hydra builds take params and submitter.
  • Guides (11 pages), course, tutorials and use cases (10), resources (10): transactions are built with parts, signed with built.sign() and submitted with built.submit(). Pages that connect a browser wallet submit through it.
  • API pages: data, utilities, browser wallet and x402 examples, and the collateral sentence on the UTxOs page.
  • Fixes of what was already wrong:
    • Dead links: internal links that led to no page or heading now point to the page they meant. /docs/... links point to /..., /wallets to /apis/wallets, /solutions and /challenges to /resources/... (also in the menu and footer data), and /transaction/basics, /apis/transaction and /apis/react/wallet-hooks to the pages that replaced them. The rest point to the closest page, and the Catalyst links to the proposals dashboard, as the About menu does.
    • Wallet addresses: a browser wallet's getUsedAddresses() and getChangeAddress() give hex, and resolvePaymentKeyHash, deserializeAddress and checkSignature read bech32 only. The Aiken pages, the vesting, NFT marketplace and wallet ownership guides, the content-ownership contract and the wallet hooks page read those addresses with getUsedAddressesBech32() and getChangeAddressBech32(). The wallet ownership guide also calls signData(address, payload), in the wallet's order.
    • Course lesson 2: the time-locked policy and the validity end at a slot one hour ahead (builder.slotAt). Slot 99999999 has passed, so the ledger refused the mint.
    • TxParser and TxTester pages make the parser with CardanoSDKSerializer from @meshsdk/core-cst, as the repository's tests do, instead of CSLSerializer from @meshsdk/core-csl.
    • TxParser page: the example that parses a transaction from the chain read txInfo.tx.cborHex, and TransactionInfo has no tx. It reads the CBOR from Blockfrost's /txs/{hash}/cbor through provider.get.
    • Offline Evaluator page: OfflineEvaluator came from @meshsdk/core-csl, which is gone. It comes from @meshsdk/core now (#883), as the same class as OfflineEvaluatorScalus. The page says how a failing script is reported now, lists the vote and proposal tags, and says that Jest needs --experimental-vm-modules.
  • Kept as they are:
    • the TxParser rebuild examples keep MeshTxBuilder, since TxParser.parse() returns a MeshTxBuilderBody, which only MeshTxBuilder.complete() takes;
    • the AI skills page's description of the transaction skill, which still teaches MeshTxBuilder.

Validation

  • next build: 515 pages.
  • No internal link leads to a missing page or heading. The only exceptions are seven entries in data/ that no list renders.
  • Every changed TypeScript block type-checks against the packages built with #880, #881 and #883, apart from these errors, whose causes all predate this change:
    • the contracts' full examples pass MeshCardanoBrowserWallet as the contract's wallet, which is not an IWallet, and sign with signTx(tx) (32);
    • OfflineFetcher in @meshsdk/provider 1.9.0-beta.108 declares a private network, so it is not an IFetcher (12). MeshJS/providers main makes it public (4a3dd7b), and no release has that yet;
    • MeshCardanoHeadlessWallet.fromCliKeys does not exist (3);
    • YaciProvider.getDevnetInfo() is typed Promise<void> (1);
    • one on purpose, on the TypeScript page, which shows a mistake the compiler catches.
  • Examples on the API pages, the course and the tutorials were also built and submitted on TxEmulator.

@vercel

vercel Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
meshjs.dev Ready Ready Preview Nov 29, 2026 8:58pm UTC

Request Review

@lisicky
lisicky force-pushed the docs/tx-builder-pages branch from b83fd26 to ac039d0 Compare November 29, 2026 20:57
@twwu123
twwu123 merged commit a1564c8 into main Nov 30, 2026
2 checks passed

This branch was successfully deployed

1 active deployment
Preview — ac039d0b Deployed Nov 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants