Skip to content

Rewrite transaction docs for address balances and tx.coin/tx.balance#897

Open
hayes-mysten wants to merge 8 commits into
mainfrom
mh--address-balance-docs
Open

Rewrite transaction docs for address balances and tx.coin/tx.balance#897
hayes-mysten wants to merge 8 commits into
mainfrom
mh--address-balance-docs

Conversation

@hayes-mysten
Copy link
Copy Markdown
Contributor

@hayes-mysten hayes-mysten commented Feb 25, 2026

Description

Rewrites the transaction documentation to cover the new address balance system and the tx.coin()/tx.balance() APIs added in #963.

Changes

New documentation section: transactions/ — replaces the old transaction-building/ directory with a reorganized set of pages:

  • basics.mdx — Building transactions from scratch: creating transactions, sending SUI/tokens, Move calls, codegen, chaining commands, batch transfers, thunks, serialization
  • coins-and-balances.mdx — Dedicated page for the coin/balance dual system: tx.coin(), tx.balance(), coinWithBalance, resolution paths (Path 1: all-balance direct withdrawal, Path 2: merge-and-split), manual coin operations, address balance withdrawals/deposits, getBalance/listCoins
  • signing-and-execution.mdx — Simulation, keypair signing, dApp Kit hooks, manual execution, result observation, waitForTransaction, gas configuration (defaults, explicit settings, address balance gas, tx.gas), sponsored transactions (coin-based and address-balance flows)
  • reference.mdx — Complete reference for all commands (splitCoins, mergeCoins, transferObjects, moveCall, makeMoveVec, publish, upgrade) and input types (pure values, vectors/options, BCS, object references, object helpers, withdrawals)
  • offline.mdx — Offline building with shared/party objects and address balances, owned object inputs, expiration configuration, serialization

Other doc updates:

  • Removes old transaction-building/ pages (basics, gas, sponsored-transactions, offline, intents)
  • Updates sui/meta.json to point to new transactions section, removes pages that no longer exist (install, llm-docs, hello-sui, faucet)
  • Minor fixes to other package docs (dapp-kit, bcs, zksend, kiosk, codegen index pages)

Test plan

  • Verified docs build with pnpm --filter @mysten/docs build
  • Reviewed all code examples for accuracy against the current tx.coin()/tx.balance() API and resolver implementation
  • Checked cross-links between pages

AI Assistance Notice

Please disclose the usage of AI. This is primarily to help inform reviewers of how careful they need to review PRs, and to keep track of AI usage across our team. Please fill this out accurately, and do not modify the content or heading for this section!

  • This PR was primarily written by AI.
  • I used AI for docs / tests, but manually wrote the source code.
  • I used AI to understand the problem space / repository.
  • I did not use AI for this PR.

@hayes-mysten hayes-mysten requested a review from a team as a code owner February 25, 2026 22:20
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 25, 2026

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

Project Deployment Actions Updated (UTC)
sui-typescript-docs Ready Ready Preview, Comment May 7, 2026 9:34pm

Request Review

@hayes-mysten hayes-mysten temporarily deployed to sui-typescript-aws-kms-test-env February 25, 2026 22:21 — with GitHub Actions Inactive
Comment thread packages/bcs/README.md
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 25, 2026

⚠️ 🦋 Changesets Warning: This PR has changes to public npm packages, but does not contain a changeset. You can create a changeset easily by running pnpm changeset in the root of the Sui repo, and following the prompts. If your change does not need a changeset (e.g. a documentation-only change), you can ignore this message. This warning will be removed when a changeset is added to this pull request.

Learn more about Changesets.

Comment thread packages/docs/content/sui/clients/core.mdx Outdated
Comment thread packages/docs/content/sui/index.mdx Outdated
@hayes-mysten hayes-mysten force-pushed the mh--address-balance-docs branch from 2f73513 to 9328cc4 Compare March 28, 2026 05:15
@hayes-mysten hayes-mysten temporarily deployed to sui-typescript-aws-kms-test-env March 28, 2026 05:15 — with GitHub Actions Inactive
@hayes-mysten hayes-mysten force-pushed the mh--address-balance-docs branch from 9328cc4 to 5fd1d81 Compare March 28, 2026 05:18
@hayes-mysten hayes-mysten temporarily deployed to sui-typescript-aws-kms-test-env March 28, 2026 05:18 — with GitHub Actions Inactive
@hayes-mysten hayes-mysten force-pushed the mh--address-balance-docs branch from 5fd1d81 to 7b1b356 Compare March 28, 2026 05:18
@hayes-mysten hayes-mysten temporarily deployed to sui-typescript-aws-kms-test-env March 28, 2026 05:19 — with GitHub Actions Inactive
@hayes-mysten
Copy link
Copy Markdown
Contributor Author

@jessiemongeon1 this PR rewrites a big chunk of the docs to be more inline with how we want people to create transactions and updates everything to use address balances (where appropriate)

Copy link
Copy Markdown
Contributor

@jessiemongeon1 jessiemongeon1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed for style guide compliance, page structure/IA will be addressed in the docs audit we do in a few weeks

Comment thread packages/docs/content/sui/transactions/basics.mdx Outdated
Comment thread packages/docs/content/sui/transactions/basics.mdx Outdated
Comment thread packages/docs/content/sui/transactions/basics.mdx Outdated
Comment thread packages/docs/content/sui/transactions/basics.mdx Outdated
Comment thread packages/docs/content/sui/transactions/basics.mdx Outdated

## Sign without executing

Sometimes you need the signature without immediately executing — for multi-sig, sponsored
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Sometimes you need the signature without immediately executing for multi-sig, sponsored
Sometimes you need the signature without immediately executing, such as for multi-sig, sponsored

| Field | Description |
| ---------------- | --------------------------------------------------- |
| `transaction` | The full transaction data (sender, commands, gas) |
| `effects` | Execution effects (created/mutated/deleted objects) |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `effects` | Execution effects (created/mutated/deleted objects) |
| `effects` | Execution effects (created, mutated, or deleted objects) |

Comment thread packages/docs/content/sui/transactions/signing-and-execution.mdx Outdated
Comment thread packages/docs/content/sui/transactions/signing-and-execution.mdx Outdated
Comment thread packages/docs/content/sui/transactions/signing-and-execution.mdx Outdated
Copy link
Copy Markdown
Contributor

@jessiemongeon1 jessiemongeon1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed for style guide compliance, page structure/IA will be addressed in the docs audit we do in a few weeks

@hayes-mysten hayes-mysten force-pushed the mh--address-balance-docs branch from 4b43ed4 to 857cd21 Compare April 10, 2026 18:15
@hayes-mysten hayes-mysten temporarily deployed to sui-typescript-aws-kms-test-env April 10, 2026 18:15 — with GitHub Actions Inactive
@jessiemongeon1
Copy link
Copy Markdown
Contributor

jessiemongeon1 commented May 7, 2026

Style Guide Audit

Audited 33 file(s) against the Sui Documentation Style Guide.

1 violation(s) found. All must be fixed before merge.

packages/docs/content/dapp-kit/dapp-kit-instance.mdx (1 violation(s))

1 violation(s) (1 regex, 0 claude)

  • Line 31 — Use present tense, not future
    • Current: will
    • Fix: Use present tense verb

Automated audit using the Sui Documentation Style Guide.

hayes-mysten and others added 8 commits May 7, 2026 14:03
Move docs to new directory structure. Content rewrite follows in next commit.

- basics.mdx → transactions/basics.mdx
- offline.mdx → transactions/offline.mdx
- intents.mdx → transactions/coins-and-balances.mdx
- gas.mdx → transactions/signing-and-execution.mdx
- _meta.json → transactions/meta.json
- Delete sponsored-transactions.mdx (merged into signing-and-execution.mdx)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rewrite all transaction documentation to cover address balances,
tx.coin(), tx.balance(), and the new intent resolution system.

- basics.mdx: Use tx.coin() as primary API, add codegen, thunks, serialization
- coins-and-balances.mdx: Full rewrite covering dual coin/balance system,
  resolution paths, tx.withdrawal(), manual operations, getBalance/listCoins
- signing-and-execution.mdx: Full rewrite covering simulation, keypair signing,
  dApp Kit, sponsored transactions (coin-based and address-balance flows),
  gas configuration, waitForTransaction
- reference.mdx: New comprehensive command and input reference
- offline.mdx: Rewrite for address balance workflows, party objects, expiration
- Update other doc pages for consistency (dapp-kit, bcs, kiosk, etc.)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…t test

- Add gasless transactions section to coins-and-balances docs aligned
  with Sui docs PR language and linking to upstream guides
- Update sui-tools Docker image to 53de0108 (latest with arm64 support)
- Fix grpc-transport e2e test to dynamically import optional native gRPC
  dependencies so the file loads and skips gracefully when not installed

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add internal link and anchor validation to docs validation script
- Add `test` script to docs package so validation runs in CI
- Fix broken links:
  - kiosk managing.mdx: anchor → page link for kiosk-transaction
  - kiosk purchasing.mdx: fix anchor slug for introduction heading
  - migrations/0.38.mdx: fix anchor slug (#module-packages → #module-structure)
  - migrations/sui-1.0.mdx: fix link to removed intents page

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Jessie Mongeon <133128541+jessiemongeon1@users.noreply.github.com>
After accepting all PR review suggestions, re-run the style audit (regex
+ sonnet review) and fix what remains:

- regex: em dashes, list-item dashes, missing keywords frontmatter,
  via -> through, may -> might, will -> present, dApp -> app,
  e.g. -> for example, since -> because, capitalize Devnet/Testnet/Mainnet
- typos introduced by suggestion accepts ("amd" -> "and",
  "It is recommended to send SUI is with" -> "Use ... to send SUI")
- passive voice in offline.mdx and signing-and-execution.mdx
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