Skip to content

Guestbook updates - #1945

Closed
ElliotFriend wants to merge 12 commits into
mainfrom
chore/guestbook-updates
Closed

ElliotFriend wants to merge 12 commits into
mainfrom
chore/guestbook-updates

Conversation

@ElliotFriend

Copy link
Copy Markdown
Contributor

various updates to keep the tutorial in line with the actual project.

@ElliotFriend
ElliotFriend marked this pull request as ready for review October 23, 2025 19:42
Copilot AI balanced review requested due to automatic review settings September 7, 2026 18:36
@github-actions github-actions Bot added the preview Preview builds for PRs by SDF employees. label Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot removed the preview Preview builds for PRs by SDF employees. label Sep 7, 2026

Copilot AI 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.

Pull request overview

Updates the Guestbook tutorial to reflect renamed templates, revised passkey setup, and newer Svelte components.

Changes:

  • Removes Mercury setup and updates passkey workflows.
  • Refreshes frontend examples and project links.
  • Revises contract and bindings documentation.

Recommendation: NEEDS-CHANGES — Several examples are invalid or no longer match the linked project.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
smart-contract.mdx Clarifies contract types and behavior.
setup-passkeys.mdx Revises passkey clients, server, and API routes.
passkeys-prerequisites.mdx Removes Mercury prerequisites.
overview.mdx Renames and relinks the starter template.
frontend.mdx Updates Svelte components and passkey flows.
bindings.mdx Restructures binding instructions and links.
Suppressed comments (3)

docs/build/apps/guestbook/setup-passkeys.mdx:66

  • The updated expression uses Asset, but this snippet still imports only SACClient and the now-unused PUBLIC_NATIVE_CONTRACT_ADDRESS. As written, copying it produces Asset is not defined.
  export const native = sac.getSACClient(
    Asset.native().contractId(PUBLIC_STELLAR_NETWORK_PASSPHRASE),
  );

docs/build/apps/guestbook/frontend.mdx:154

  • The linked application's current main branch migrated from passkey-kit/Launchtube to smart-account-kit and OpenZeppelin Channels on 2026-09-03, so this updated walkthrough still does not match the “actual project” named in the PR description. Either update the tutorial to the current architecture or pin every source link and setup instruction to the historical revision this content documents.
    docs/build/apps/guestbook/frontend.mdx:596
  • user.keyId is string | null, but it is passed directly to account.sign. This copied snippet omits the project's guard, so it does not type-check and can attempt signing without an authenticated user.
      message_id: messageId,

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/build/apps/guestbook/frontend.mdx Outdated
Comment on lines +477 to +481
const result = await rpc.getLedgerEntries(...ledgerKeysArray);
const messages = result.entries.map((message) => {
return {
...scValToNative(message.val.contractData().val()),
};

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.

🤖 Automated message from Kaan's Automated Triage Bot.

Correct, fixed. getAllMessages now returns MessageWithIndex and reads the ID out of the ledger key, like the project code does.

Comment on lines +74 to +76
// Send the transaction, and then fund the smart wallet
await send(signedTx);
await fundContract(user.contractAddress);

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.

🤖 Automated message from Kaan's Automated Triage Bot.

Correct, fixed. The signup snippet now guards user.contractAddress before it funds the wallet, like Signup.svelte does.

Comment on lines +305 to +307
try {
isLoading = true;
const at = await ye_olde_guestbook.write_message({

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.

🤖 Automated message from Kaan's Automated Triage Bot.

Correct, fixed. signGuestbook now throws when keyId or contractAddress is missing, and submitEdit guards keyId. Both match the project code.

Comment thread docs/build/apps/guestbook/frontend.mdx Outdated
Comment on lines +572 to +575
let isEditing: boolean = $state(false);
let isLoading: boolean = $state(false);
let messageTitle = $state(message.title);
let messageText = $state(message.text);

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.

🤖 Automated message from Kaan's Automated Triage Bot.

Correct, fixed. There is one $state pair now, and cancelEdit sets isEditing.

Comment thread docs/build/apps/guestbook/frontend.mdx Outdated
Comment on lines 95 to 97
// The connectWallet function requires us to pass a function that can
// be used to reverse-lookup the smart wallet address, provided we know
// the passkey's ID (the user supplies that during the function's execution)

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.

🤖 Automated message from Kaan's Automated Triage Bot.

Correct. Both spots are fixed. The login comment now describes address derivation, and the logout text no longer mentions the indexer.

That's all there is to it! This `account` will be fully ready to authenticate users and sign transactions! (It's even easier than all the prerequisites isn't it!)

Now, we've also added some useful "helpers" into the `$lib/passkeyClient.ts` file in our template. The [source code file](https://github.com/ElliotFriend/soroban-template-sveltekit-passkeys/blob/main/src/lib/passkeyClient.ts) is commented to reflect what these helpers are, and how they work. These are strictly for convenience, though. You could stop right here and come away with perfectly valid signed passkey transactions. These helpers are:
Now, we've also added some useful "helpers" into the `$lib/passkeyClient.ts` file in our template. The [source code file](https://github.com/ElliotFriend/stellar-template-sveltekit-passkeys/blob/main/src/lib/passkeyClient.ts) is commented to reflect what these helpers are, and how they work. These are strictly for convenience, though. You could stop right here and come away with perfectly valid signed passkey transactions. These helpers are:

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.

🤖 Automated message from Kaan's Automated Triage Bot.

Correct, and only the author can fix it. ElliotFriend/stellar-template-sveltekit-passkeys still ships PUBLIC_NATIVE_CONTRACT_ADDRESS, the getContractId helper and send(xdr: string). Raised in a PR comment.

#### `DataKey`

This is a struct that's used elsewhere in the contract to define the keys for the various storage entries the contract will hold. Nothing groundbreaking or remarkable here, to be honest, but it's still worth showing. The `Message(ID_NUMBER)` will be used as the key to store a `Message` struct on-chain as the corresponding value.
This is a struct that's used elsewhere in the contract to define the keys for the various storage entries the contract will hold. Nothing groundbreaking or remarkable here, to be honest, but it's still worth showing. The `Message(u32)` variant will be used as the key to store a `Message` struct on-chain as the corresponding value.

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.

🤖 Automated message from Kaan's Automated Triage Bot.

Correct, fixed. The text now calls DataKey an enum.

Copilot AI review requested due to automatic review settings September 7, 2026 18:42

Copilot AI 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.

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Suppressed comments (7)

Previously missed (2) — in code that hasn't changed since the last review.

docs/build/apps/guestbook/frontend.mdx:571

  • Renaming the state variable to isEditing leaves cancelEdit() below assigning to the nonexistent editing identifier, so cancelling an edit throws instead of closing the form.

This issue also appears on line 573 of the same file.

The HTML of the page is outside of what we need to cover here, but suffice it to say when the user is editing an entry, the form fields behave pretty similar to the form on the "sign the guestbook" page. The functions are a bit more interesting, and more relevant to this tutorial.

docs/build/apps/guestbook/frontend.mdx:60

  • This updated walkthrough still does not match the linked project's current implementation: main now uses smart-account-kit, src/lib/smartAccountClient.ts, and a different createWallet/submission flow rather than this passkey-kit API. Because all source links target main, readers cannot reconcile these snippets with the advertised reference application. Either update the tutorial to the current app or pin every reference link and dependency to the compatible revision.

docs/build/apps/guestbook/setup-passkeys.mdx:65

  • Asset is not imported anywhere in this snippet, while the now-unused PUBLIC_NATIVE_CONTRACT_ADDRESS import remains. As written, readers who copy this helper get Cannot find name 'Asset'; import Asset from the SDK and remove the obsolete environment-variable import.
  export const native = sac.getSACClient(
    Asset.native().contractId(PUBLIC_STELLAR_NETWORK_PASSPHRASE),

docs/build/apps/guestbook/setup-passkeys.mdx:213

  • createWallet() returns signedTx as base64 XDR, so the new send(signedTx) call passes a string here and tx.toXDR() throws. Let this wrapper accept the deployment XDR as well as built transactions.
export async function send(tx: Tx) {
  return fetch('/api/send', {
    method: 'POST',
    body: JSON.stringify({
      xdr: tx.toXDR(),
    }),

docs/build/apps/guestbook/frontend.mdx:540

  • getAllMessages() above still returns Message[] and only spreads each stored Message; the contract's Message type has no id field. Consequently every key and messageId here is undefined (and the new sort compares undefined values). Extract the numeric ID from each ledger-entry key and include it in the returned objects before rendering by message.id.
  <div class="space-y-4">
    <h1 class="h1">Read the Book</h1>

docs/build/apps/guestbook/frontend.mdx:574

  • These new state declarations duplicate messageTitle and messageText a few lines below, so the shown component fails to compile with duplicate identifiers. Remove the old declarations and their now-inaccurate comment.
:::tip

docs/build/apps/guestbook/setup-passkeys.mdx:33

  • The newly linked template file does not reflect the helpers shown in this page: its current main still imports PUBLIC_NATIVE_CONTRACT_ADDRESS, exposes send(xdr: string), and includes the Mercury lookup helper removed here. A reader who clones the recommended template therefore starts with a materially different implementation. Update that template in lockstep, or link to a revision whose code matches this tutorial.
Now, we've also added some useful "helpers" into the `$lib/passkeyClient.ts` file in our template. The [source code file](https://github.com/ElliotFriend/stellar-template-sveltekit-passkeys/blob/main/src/lib/passkeyClient.ts) is commented to reflect what these helpers are, and how they work. These are strictly for convenience, though. You could stop right here and come away with perfectly valid signed passkey transactions. These helpers are:

The stripped-down basics of the component is simple enough:

```html title="src/lib/components/connectButtons.svelte"
```html title="src/lib/components/ConnectButtons/ConnectButtons.svelte"

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.

🤖 Automated message from Kaan's Automated Triage Bot.

Correct, fixed. The link now points at src/lib/components/ConnectButtons/ConnectButtons.svelte, which returns 200. I checked every other source link on these pages, and they all resolve.

Copilot AI review requested due to automatic review settings September 7, 2026 18:48

Copilot AI 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.

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Suppressed comments (5)

Previously missed (3) — in code that hasn't changed since the last review.

docs/build/apps/guestbook/frontend.mdx:28

  • The updated prose says signup, login, and logout live in child components, but this parent-component snippet still calls three handlers that are not defined here. A reader following the new component layout gets unresolved identifiers; render the child components instead.
    docs/build/apps/guestbook/frontend.mdx:547
  • Switch is a compound Skeleton component; the root alone does not render an interactive control. Without Switch.Control, Switch.Thumb, and Switch.HiddenInput, users cannot toggle it and onCheckedChange will not fire.
    docs/build/apps/guestbook/setup-passkeys.mdx:65
  • This snippet now calls Asset.native(), but it still imports the removed environment variable and never imports Asset, so readers copying it get Cannot find name 'Asset'. Import Asset from the Stellar SDK instead.

docs/build/apps/guestbook/frontend.mdx:24

  • After moving this component into the ConnectButtons directory, the source link below still targets the removed src/lib/components/ConnectButtons.svelte path and now returns 404. Point it at the nested file shown by this fence title.
```html title="src/lib/components/ConnectButtons/ConnectButtons.svelte"

docs/build/apps/guestbook/bindings.mdx:115

  • The linked template's initialize.js deploys every Wasm without constructor arguments, so after readers add this guestbook contract its required admin, title, and text arguments make pnpm run setup fail. Document the required customization or use the guestbook project's constructor-aware initialization script before presenting this as an automated path.
You can always customize this script to suit your needs. Check out the [source code here](https://github.com/ElliotFriend/stellar-template-sveltekit-passkeys/blob/main/initialize.js) (which has been documented with comments). Or, you can see the [officially maintained script](https://github.com/stellar/soroban-template-astro/blob/main/initialize.js) in the [`soroban-template-astro` repository](https://github.com/stellar/soroban-template-astro), as well.

Comment thread docs/build/apps/guestbook/bindings.mdx Outdated
Comment on lines 42 to 45
stellar contract deploy \
--source-account <identity or secret key> \
--network testnet \
--wasm-hash <wasm_hash_from_install_step>

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.

🤖 Automated message from Kaan's Automated Triage Bot.

Correct, fixed. __constructor takes admin, title and text, so the deploy command now passes them after the -- separator. The automated path uses the template's initialize.js, which is out of this repo.

Copilot AI review requested due to automatic review settings September 7, 2026 18:54
@github-actions github-actions Bot added the preview Preview builds for PRs by SDF employees. label Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot removed the preview Preview builds for PRs by SDF employees. label Sep 7, 2026

Copilot AI 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.

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Suppressed comments (4)

Previously missed (3) — in code that hasn't changed since the last review.

docs/build/apps/guestbook/frontend.mdx:60

  • This updated signup flow still does not match the linked current project: the project now uses SmartAccountKit, and createWallet returns fundResult/submitResult while handling submission and funding through options. These PasskeyKit return fields and the subsequent manual send/fundContract flow are absent there. Since this PR is intended to align the tutorial with the actual project, update the walkthrough consistently or pin all project links to the matching historical revision.
    docs/build/apps/guestbook/frontend.mdx:492
  • This accumulates every message key into one RPC request even though getLedgerEntries enforces the documented 200-key maximum. Once the guestbook reaches message ID 202, the call sends 201 keys and fails with InvalidParams; batching also avoids issuing an empty request when only the welcome message exists.
    docs/build/apps/guestbook/frontend.mdx:548
  • Skeleton's Switch is a compound component, but this snippet omits Switch.Control, Switch.Thumb, and Switch.HiddenInput. Consequently it lacks the actual visual/keyboard-operable control and hidden form input; placing text directly under the root is not a complete switch. Use the required subcomponents, as the linked project does.

docs/build/apps/guestbook/setup-passkeys.mdx:65

  • This replacement calls Asset.native() without importing Asset, while the preceding snippet still imports the now-unused PUBLIC_NATIVE_CONTRACT_ADDRESS. As written, readers assembling passkeyClient.ts get Cannot find name 'Asset'.
  export const native = sac.getSACClient(
    Asset.native().contractId(PUBLIC_STELLAR_NETWORK_PASSPHRASE),

Comment on lines 85 to +89
export const server = new PasskeyServer({
rpcUrl: PUBLIC_STELLAR_RPC_URL,
launchtubeUrl: PUBLIC_LAUNCHTUBE_URL,
launchtubeJwt: PRIVATE_LAUNCHTUBE_JWT,
mercuryUrl: PUBLIC_MERCURY_URL,
mercuryJwt: PRIVATE_MERCURY_JWT,
// mercuryKey: PRIVATE_MERCURY_KEY, // optionally
launchtubeHeaders: {
Copilot AI review requested due to automatic review settings September 7, 2026 19:01
@github-actions github-actions Bot added the preview Preview builds for PRs by SDF employees. label Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

@kaankacar

Copy link
Copy Markdown
Contributor

🤖 Automated message from Kaan's Automated Triage Bot.

I merged main, fixed the snippet defects and answered every Copilot thread. Three things need you:

  1. The template repo still ships the old passkeyClient.ts (PUBLIC_NATIVE_CONTRACT_ADDRESS, getContractId, send(xdr: string)). A reader who clones it does not get the code these pages now describe.
  2. ye-olde-guestbook moved to smart-account-kit on 3 Sep 2026 and dropped passkeyServer. Should this land as an interim sync, or wait for a rework?
  3. The new Launchtube tip says your headers keep transactions out of the KALE limit. In stellar/launchtube the KALE fee floor keys on the contract address, and X-Client-Name is only logged. Please confirm that wording.

Build and mdx-format are green. The preview job passed, but its host returns 404 on every path, so I used the build as the render evidence.

@kaankacar kaankacar added the bot:needs-author Bot asked the author for a change or clarification label Sep 7, 2026

Copilot AI 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.

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated no new comments.

Suppressed comments (2)

Previously missed (2) — in code that hasn't changed since the last review.

docs/build/apps/guestbook/frontend.mdx:60

  • This no longer matches the “actual project” named by the PR: the linked ye-olde-guestbook main branch now uses $lib/smartAccountClient/SmartAccountKit, and its signup flow calls createWallet(..., { autoSubmit: true, autoFund: true }); $lib/passkeyClient is absent. The current passkey-kit release also has breaking signing/configuration APIs, so these floating main links now mix incompatible implementations. Update the tutorial and template dependency together, or pin every clone/source link to a compatible revision.
    docs/build/apps/guestbook/setup-passkeys.mdx:66
  • This replacement calls Asset.native() without importing Asset, while the snippet still imports the now-unused PUBLIC_NATIVE_CONTRACT_ADDRESS. A reader assembling passkeyClient.ts will get Cannot find name 'Asset'. Import Asset from the Stellar SDK and remove the obsolete environment import.

@ElliotFriend

Copy link
Copy Markdown
Contributor Author

superseded by #2837

@github-actions github-actions Bot removed the preview Preview builds for PRs by SDF employees. label Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

PR Preview: torn down

ElliotFriend added a commit that referenced this pull request Oct 12, 2026
* Modernize smart-wallets references + rewrite guestbook tutorial

Stellar's smart-wallets docs still point at the retired passkey-kit +
Launchtube stack. Launchtube's repo is archived and the hosted service
is offline, so the existing guestbook tutorial can't be completed as
written.

Update the canonical references to the current stack:

- passkey-kit → Smart Account Kit (https://github.com/kalepail/smart-account-kit)
- OpenZeppelin Smart Account contracts (audited signer/policy framework)
- Launchtube → OpenZeppelin Relayer (Stellar Channels plugin)

Changes:

- build/guides/contract-accounts/smart-wallets.mdx: rewrite the Tooling
  section. Lead with the current stack; flag passkey-kit + Launchtube
  as legacy with a pointer at the retirement.
- build/guides/contract-accounts/advanced-patterns.mdx: add Smart Account
  Kit alongside the OZ + Crossmint reference implementations.
- build/apps/guestbook/*: rewrite the 6-page tutorial against the new
  stack. The companion app is now a Cloudflare Pages deployment that
  uses Smart Account Kit + the OZ Channels relayer via a same-origin
  /api/relay proxy, so the API key stays server-side.

The reference app lives at https://github.com/AshFrancis/ye-olde-guestbook
(live: https://ye-olde-guestbook.pages.dev).

* docs: address Copilot review feedback on guestbook tutorial

- throw `error(...)` instead of returning it in /api/relay, /api/fund,
  and /read/[id] snippets (SvelteKit's `error()` throws; `return` is
  misleading).
- Add goto/resolve imports to signGuestbook snippet so readers copying
  it don't hit missing imports.
- Overview: "fill in three things" → "two" (matches the .env snippet
  underneath, which has two vars).
- Reword the relayer-key warning: we use Bearer auth, not URL-path
  auth, so the original phrasing was misleading.

* docs: show PRIVATE_RELAYER_BASE_URL in overview .env snippet

Per Copilot feedback: the earlier snippet omitted PRIVATE_RELAYER_BASE_URL
and only mentioned two variables to fill in, even though relayer.ts reads
a third. Include it with its Testnet default so a reader who stays on the
overview page has a complete picture of the relayer-related env vars.

* docs: follow the moved SDK repos and fix the funder secret command

kalepail/smart-account-kit and kalepail/passkey-kit are both archived and
now live under the stellar org. Point every link at the new homes.

The CLI has no `stellar keys show` subcommand; the one that prints a
secret key is `stellar keys secret`.

* docs: carry over guestbook contract and bindings fixes from #1945

Accuracy fixes that are independent of the smart-account stack, so they
survive the rewrite: the contract uses `__constructor` (not `initialize`),
`DataKey` is an enum, and the deploy command needs its constructor
arguments after the `--` separator.

Refs #1945

Co-Authored-By: Kaan Kacar <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* docs: re-aim the guestbook tutorial at the current app

Ash Francis's rewrite in #2367 targeted smart-account-kit 0.2.10 on
Cloudflare Pages. ye-olde-guestbook now runs ^0.6.2 on Vercel, so point
the pages at what the app actually does: /api/send rather than an
/api/relay Pages Function, smartAccountClient.ts rather than
passkeyClient.ts, the kit's autoFund and fundWallet rather than a funder
G-account, and kit events rather than localStorage.

Correct the indexer story while we're here. The kit defaults to Mercury's
hosted smart-account-indexer, so the reverse lookup did not disappear
with Launchtube, it just stopped being something you deploy yourself.
Draw that boundary explicitly, since conflating the two breaks
returning-user login on an unseen device.

Refs #2367, #1945
Closes #2700

Co-Authored-By: Ash Francis <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* docs: use the workspace protocol for the guestbook bindings package

ye-olde-guestbook keeps its bindings in a pnpm workspace now, so
`pnpm add file:./packages/ye_olde_guestbook` no longer reflects what the
repo does. Use `pnpm add -D ye_olde_guestbook --workspace`, which records
`workspace:*` the way the app's package.json does.

Replace the nested `cd packages/... && pnpm install && pnpm run build`
with the workspace housekeeping initialize.js actually performs: drop the
standalone lockfile the CLI emits, and set a `prepare` script so pnpm
compiles the bindings on install.

Refs #2837

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* docs: match the automated bindings list to what initialize.js does

The manual method now covers the pnpm workspace housekeeping, but the
automated section's bullet list stopped at "generate bindings", so the two
no longer described the same work. Name the prepare script, the dist/
gitignore, and the standalone lockfile removal, and correct the deploy
bullet to mention the compile step.

Refs #2837

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* docs: trim the guestbook frontend walkthrough to the parts that teach

The code blocks reproduced whole Svelte components, so only about 14% of
their lines touched Smart Account Kit or the network. Two blocks (the
sign-page form markup and the read/[id] component) had no Stellar content
at all, and the form markup opened the tutorial's main event.

Drop those two, trim the toast and loading-state ceremony from the rest,
and mark every omission with a `// ...omitted:` comment naming what is
gone. Lessons that the prose was narrating now live in code comments, so
the signup section loses a paragraph that restated its own snippet.

311 code lines become 232 across 11 blocks rather than 13.

Refs #2837

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* docs: keep the guestbook section description short enough to be usable

The stack links were appended to the intro paragraph, which the llms
plugin takes as the page description. That pushed it from 273 to 578
characters and tripped a build warning. Split the stack into its own
paragraph.

Refs #2837

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* docs: tighten the guestbook relayer proxy origin check

Match the origin exactly rather than by substring, and explain why the
forwarded payload is wrapped in `params` when the relayer guide's SDK
examples aren't.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* docs: drop migration framing from guestbook passkey prerequisites

The page spent most of its length contrasting the current setup with the
retired Launchtube and self-hosted Zephyr approach, which means nothing to
a first-time reader. Describe the relayer, the funding helper, and the
hosted indexer in the present tense instead, keeping the point that Mercury
is still doing the credential-to-address lookup even though nobody
configures it.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* fix old-style admonition title

* docs: describe the guestbook tooling without the before-and-after

A first-time reader has no memory of Launchtube or of an earlier draft
of this tutorial, so framing the current setup as a departure from those
only adds noise. One pointer to passkey-kit stays in the overview for
readers arriving from an older demo, and the smart wallets guide still
carries the full predecessor mapping.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* docs: correct what the guestbook relayer proxy passes through

The kit treats a submission as successful only when the response status
is ok and the body carries a top-level `success: true`, so the route
cannot accept a bare transaction result the way the page claimed.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* docs: cover the kit's connection-verification failures

connectWallet() verifies provenance, contract code, and signer state
before it connects, and a failed check throws rather than connecting.
"Try again later" is misleading advice for most of them.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* docs: compile the guestbook bindings explicitly, not via prepare

pnpm skips lifecycle scripts when an install has no work to do, which
leaves dist/ missing on a warm build cache.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* docs: scope the guestbook testing caveat to the frontend

The smart contract has a test suite; the frontend is the part with no
automated testing.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* docs: bound guestbook RPC reads and clarify tutorial claims

* docs: sync guestbook snippets with the SvelteKit 3 app

- move imports to `#lib` and `$app/env/*`, and pass string messages to `error()`
- check the `cause` of wrapped passkey dismissals
- drop the batching caveat now that the app reads in batches of 200

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs: describe passkey-kit as a sibling of smart-account-kit

Refs #2700

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Ash Francis <[email protected]>
Co-authored-by: kaankacar <[email protected]>
Co-authored-by: Kaan Kacar <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Co-authored-by: kalepail <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:needs-author Bot asked the author for a change or clarification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants