Skip to content

Add JavaScript examples to the consume-events and ledger-key guides - #3114

Merged
ElliotFriend merged 2 commits into
mainfrom
docs-agent/1770-javascript
Nov 12, 2026
Merged

ElliotFriend merged 2 commits into
mainfrom
docs-agent/1770-javascript

Conversation

@stellar-doxie

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

Copy link
Copy Markdown
Contributor

🤖 Automated message from the Stellar Triage Bot.

Refs #1770

Working this because @ElliotFriend approved the plan in #1770. This is PR 2 of the stack. It is based on #3113, so merge #3113 first. It adds JavaScript to the two pages that had only Python.

rpc/generate-ledger-keys:

  • New JavaScript tab next to the Python code. The Python code is unchanged.
  • Fixed the intro. It said the increment example keeps COUNTER in its own ledger entry. That contract uses instance storage, so no such entry exists. The page now describes a persistent COUNTER entry, and a note points to the instance entry instead.

events/consume:

  • Each code section now has JavaScript and Python tabs. The Python content is unchanged.
  • The JavaScript tabs use the Prisma StellarEvent model from the ingest guide's JavaScript tab: create, findMany, and a $extends query hook for the "listener" step. Prisma has no database listeners, and the page says so.

Verified:

  • I ran both JavaScript snippets with @stellar/stellar-sdk 17.4.0, the newest release. Every XDR value and the decoded listener output match the Python tab. The ledger key snippet uses v17 APIs (ContractDataDurability.persistent, toXdr).

Not verified:

  • The Prisma calls did not run. They follow Prisma 6, like the ingest guide's import { PrismaClient } from "@prisma/client".
  • The Python code did not run. pip needs approval in this lane.

pnpm check passes. pnpm check:links reports only the known broken links in .mintlify/skills/.

@stellar-doxie

stellar-doxie Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Automated message from the Stellar Triage Bot.

Reviewing my own PR for #1770, opened by the issue lane.

  • Verified: the XDR calls match @stellar/stellar-sdk 17.4.0, the newest. The page pins no version. The Prisma fields match the ingest guide's model.
  • I pushed one fix: the ingest guide link is now root-relative.
  • No live preview and no checks run yet. CI runs only on PRs into main, so it starts when Drop the language from guide page names #3113 merges and this PR moves to main.
  • Not run: the Prisma calls.

Merge #3113 first. Ready to merge.

@ElliotFriend
ElliotFriend added this pull request to stack #3118 November 12, 2026 16:50
@ElliotFriend
ElliotFriend force-pushed the docs-agent/1770-javascript branch from 3c064f4 to bb5bf4e Compare November 12, 2026 18:21
Base automatically changed from docs-agent/1770-renames to main November 12, 2026 18:35
@ElliotFriend
ElliotFriend force-pushed the docs-agent/1770-javascript branch from bb5bf4e to 0dda787 Compare November 12, 2026 18:35
@mintlify

mintlify Bot commented Nov 12, 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 12, 2026, 6:36 PM

@stellar-doxie

stellar-doxie Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Automated message from the Stellar Triage Bot.

Back on this because @ElliotFriend rebased it onto main after merging #3113.

  • The diff is identical to the one I verified (same patch-id). All checks pass at this head.
  • The preview renders both pages. Every link target is in docs.json on main.
  • Checked against @stellar/stellar-sdk 17.4.0, the newest. The pages pin none. Not run: the Prisma calls.

Ready to merge.

@ElliotFriend
ElliotFriend merged commit ea6f061 into main Nov 12, 2026
8 checks passed
@ElliotFriend
ElliotFriend deleted the docs-agent/1770-javascript branch November 12, 2026 18:58

This branch was successfully deployed

1 active deployment
staging — 0dda787a Deployed Nov 12, 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