Skip to content

Add standard cross-links from JS tutorials to the js-stellar-sdk docs site #2564

Description

@oceans404

Context

The JS SDK now has its own docs site with task guides and a full reference: https://stellar.github.io/js-stellar-sdk/. It is the source of truth for how to use the SDK, versioned with the code and updated in the same PRs. A full audit of stellar-docs found ~35 pages whose JS content overlaps SDK docs pages. Most of these pages should keep their content (they carry protocol context and multi-language tabs) and gain a consistent pointer to the SDK docs page that owns the JS mechanics.

This also future-proofs the docs: SDK v17 will ship a breaking XDR rewrite, and every page that links to the SDK docs instead of restating them is a page that does not need a v17 rewrite.

What to do

  1. Create a small reusable component or standard admonition for these callouts, for example <SdkDocsLink page="guides/02-send-a-payment" /> rendering something like: "For the complete JS SDK reference for this task, see the JS SDK docs." A single component makes future link maintenance a one-file change and the usages grep-able.
  2. Apply it to the pages below, next to the JS tab or the first JS snippet.

Mapping (SDK docs page -> stellar-docs pages to link from)

Guide 01-connect-and-fund: docs/tokens/quickstart.mdx, docs/build/apps/example-application-tutorial/overview.mdx, docs/build/guides/dapps/frontend-guide.mdx, docs/build/guides/transactions/create-account.mdx

Guide 02-send-a-payment: docs/build/apps/example-application-tutorial/payment.mdx, docs/build/guides/transactions/send-and-receive-payments.mdx, docs/tools/openzeppelin-relayer.mdx

Guide 03-issue-an-asset: docs/tokens/quickstart.mdx, docs/tokens/how-to-issue-an-asset.mdx, docs/tokens/control-asset-access.mdx, docs/build/guides/conventions/deploy-sac-with-code.mdx

Guide 04-query-and-stream: docs/build/apps/example-application-tutorial/querying-data.mdx, docs/data/apis/horizon/api-reference/structure/pagination/README.mdx, docs/data/apis/horizon/api-reference/structure/pagination/page-arguments.mdx, docs/build/guides/events/ingest.mdx, docs/learn/fundamentals/stellar-data-structures/events.mdx, docs/learn/fundamentals/liquidity-on-stellar-sdex-liquidity-pools.mdx

Guide 05-handle-errors: docs/data/apis/horizon/api-reference/errors/error-handling.mdx, docs/build/guides/transactions/submit-transaction-wait-js.mdx

Guide 06-invoke-a-contract: docs/build/guides/transactions/invoke-contract-tx-sdk.mdx (the JS tab mirrors this guide almost exactly), docs/learn/fundamentals/contract-development/contract-interactions/stellar-transaction.mdx, docs/build/guides/transactions/install-deploy-contract-with-code.mdx, docs/build/guides/transactions/upload-wasm-bytecode.mdx

Guide 07-contract-auth: docs/build/guides/transactions/signing-soroban-invocations.mdx, docs/learn/fundamentals/contract-development/contract-interactions/transaction-simulation.mdx, docs/build/guides/freighter/sign-auth-entries.mdx, docs/build/apps/guestbook/setup-passkeys.mdx

Reference contracts-bindings / contracts-client: docs/learn/fundamentals/contract-development/types/fully-typed-contracts.mdx (also mention npx @stellar/stellar-sdk generate alongside the Stellar CLI flow), docs/build/apps/guestbook/bindings.mdx, docs/build/apps/dapp-frontend.mdx

Reference core-xdr: docs/learn/fundamentals/data-format/xdr.mdx, docs/build/guides/rpc/retrieve-contract-code-js.mdx

Reference core-soroban-primitives: docs/build/guides/conversions/address-conversions.mdx, docs/build/guides/conversions/bytes-conversions.mdx, docs/build/guides/conversions/scval-conversions.mdx, docs/build/guides/conversions/string-conversions.mdx

Reference network-rpc: docs/data/apis/rpc/api-reference/methods/getTransaction.mdx, docs/data/apis/rpc/api-reference/methods/sendTransaction.mdx, docs/data/apis/rpc/api-reference/methods/getLedgerEntries.mdx, docs/data/apis/rpc/api-reference/structure/json-rpc.mdx (currently links only the GitHub repo), docs/build/guides/archival/restore-data-js.mdx, docs/build/guides/archival/create-restoration-footprint-js.mdx, docs/build/guides/conventions/extending-wasm-ttl.mdx, docs/build/guides/transactions/simulateTransaction-Deep-Dive.mdx

Reference network-horizon: docs/build/guides/transactions/path-payments.mdx, docs/build/guides/basics/verify-trustlines.mdx

Reference seps-toml / seps-webauth: docs/build/apps/example-application-tutorial/anchor-integration/sep1.mdx, docs/build/apps/example-application-tutorial/anchor-integration/sep10.mdx

Reference core-transactions: docs/build/guides/transactions/fee-bump-transactions.mdx, docs/build/guides/transactions/sponsored-reserves.mdx, docs/build/guides/transactions/claimable-balances.mdx, docs/build/guides/transactions/clawbacks.mdx, docs/build/guides/transactions/channel-accounts.mdx, docs/build/guides/transactions/pooled-accounts-muxed-accounts-memos.mdx

Suggested execution

Split into a few PRs by section (build/guides, build/apps, learn+tokens, data). The component lands in the first PR.

Acceptance criteria

  • A single reusable component (or documented admonition pattern) exists for SDK docs callouts.
  • All pages listed above include a callout linking to the mapped SDK docs page, and all links resolve.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Fields

No fields configured for Enhancement.

Projects

Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions