Draft
Fix JS/TS docs snippets with invalid SDK syntax, missing imports, and undefined variables#31
Conversation
14 tasks
Co-authored-by: kaankacar <103106776+kaankacar@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix broken JS SDK code snippets for documentation
Fix JS/TS docs snippets with invalid SDK syntax, missing imports, and undefined variables
Jul 16, 2026
This was referenced Aug 14, 2026
This was referenced Aug 24, 2026
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.
This PR addresses copy-paste failures in JS/TS snippets across Horizon, RPC, contract, and token docs where examples had invalid syntax, missing imports, or undefined identifiers. The updates are scoped to snippet correctness and consistency so examples parse and run as written.
Horizon error-handling examples
new StellarSdk.Horizon.Server(...)).time.sleep(...)with async JS delay.sdkvsStellarSdkusage in touched snippets.Contract interaction/simulation snippets
rpc: StellarRpc).BASE_FEE,nativeToScVal,Address).new Server(...)usage and an undefined variable reference in auth-entry TTL logic.Token issuance and transaction guide fixes
fromSecret(...)with valid string quotes.import * as StellarSdk from "@stellar/stellar-sdk";where global SDK usage was assumed.SERVERusage in path payments.tmpStatus/statusreferences in sharedsubmitTxhelper snippet.networkPassPhrase/returnContractResponsereferences in automate-reset-data snippet.RPC/getLedgerEntries and archival snippets
Server(RPC) andAssetType/related SDK types where used.xdrimport in restore-contract example.