Skip to content

Teach the JS SDK bindings generator instead of the deprecated CLI command - #2985

Merged
ElliotFriend merged 2 commits into
mainfrom
docs-agent/2968-sdk-bindings-generator
Nov 3, 2026
Merged

ElliotFriend merged 2 commits into
mainfrom
docs-agent/2968-sdk-bindings-generator

Conversation

@stellar-doxie

@stellar-doxie stellar-doxie Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

🤖 Automated message from the Stellar Triage Bot.

Refs #2968

Working this because @oceans404 added bot:take. This PR fixes 5 of the 7 pages. It says "Refs", not "Closes", because two pages need a maintainer decision (see the issue).

Changes:

  • Replace stellar contract bindings typescript with npx @stellar/stellar-sdk generate on hello-world-frontend.mdx, fully-typed-contracts.mdx, verify-trustlines.mdx, frontend-guide.mdx and dapp-frontend.mdx.
  • Say that the generated package uses the same SDK version as the generator (v17 today), and that the CLI command is deprecated.

Differences between the two generators that the pages now handle:

  • The SDK generator does not read CLI aliases. hello-world-frontend.mdx now resolves the alias with stellar contract alias show.
  • Its output has no networks export. The Hello World client now passes contractId and networkPassphrase.
  • It names the package after --contract-name (default contract for a contract ID) and turns _ into -. verify-trustlines.mdx passes --contract-name=sac. dapp-frontend.mdx imports hello-world.
  • --network is required for network sources and takes only testnet, mainnet, futurenet or localnet.

Sources: js-stellar-sdk v17.4.0 src/cli/index.ts, src/cli/util.ts, src/bindings/generator.ts, src/bindings/config.ts; the bin map of @stellar/[email protected]; stellar-cli soroban-spec-typescript/src/project_template/package.json (^16.0.1).

Checks: pnpm needs approval in this lane, so pnpm format:mdx, pnpm check and pnpm check:links did not run locally. The checks job runs them on this PR.

Not changed (already on main): hello-world-frontend.mdx imports ./packages/hello_world from src/pages/, which points inside src/pages/.

@mintlify

mintlify Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
stellar-docs 🟢 Ready View Preview Nov 3, 2026, 6:30 AM

@stellar-doxie

stellar-doxie Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Automated message from the Stellar Triage Bot.

Reviewing because the issue lane opened this PR for #2968.

Verified: the flags, the _ to - package names and the mainnet --rpc-url rule match js-stellar-sdk v17.4.0. All 5 pages render on the preview. Ready to merge.

The 2 broken links that checks reports on these pages also exist on main. This PR does not add them.

External-origin change, so a maintainer merges this.

@ElliotFriend ElliotFriend left a comment

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.

Flags and package naming verified against v17.4.0, and the generator commands from fully-typed-contracts and verify-trustlines produce working packages on testnet. One change before merge:

  • hello-world-frontend.mdx:100: the import is ./packages/hello_world, but the file is src/pages/index.astro, so the path should be ../../packages/hello_world. Since this PR rewrites that block, please fix it here.

Heads up, no action needed: soroban-contract-init-template.mdx continues from dapp-frontend.mdx, so the two parts will teach different binding commands until the #2968 decision on that page lands. That will be handled separately.

@ElliotFriend

Copy link
Copy Markdown
Contributor

/triage

@stellar-doxie

stellar-doxie Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Automated message from the Stellar Triage Bot.

Back on this because @ElliotFriend asked with /triage.

Fixed: the import in src/pages/index.astro is now ../../packages/hello_world (5e8b6f8). checks and the preview pass. Your change request still blocks the merge, so please clear it when you agree. Ready to merge.

External-origin change, so a maintainer merges this.

@ElliotFriend
ElliotFriend merged commit d03b84f into main Nov 3, 2026
8 checks passed
@ElliotFriend
ElliotFriend deleted the docs-agent/2968-sdk-bindings-generator branch November 3, 2026 16:16

This branch was successfully deployed

1 active deployment
staging — 5e8b6f86 Deployed Nov 3, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:ready-to-merge Bot verified and approved; waiting for a maintainer to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant