port: migrate to Smart Account Kit + OpenZeppelin Relayer (replaces retired passkey-kit + Launchtube) - #1
Closed
AshFrancis wants to merge 3 commits into
Closed
port: migrate to Smart Account Kit + OpenZeppelin Relayer (replaces retired passkey-kit + Launchtube)#1AshFrancis wants to merge 3 commits into
AshFrancis wants to merge 3 commits into
Conversation
… Relayer
Replace the retired passkey-kit/Launchtube stack with the current
OpenZeppelin Smart Account + Channels relayer toolchain, and switch
hosting from Vercel to Cloudflare Pages so the relayer proxy can live
alongside the static app.
Client (src/lib/passkeyClient.ts):
- Drop the SACClient proxy; expose `account` (lazy SmartAccountKit),
`send()`, `fundContract()`, plus `SAK_DEPLOYER_PUBLIC_KEY` for the
shared simulation source.
- Dynamic-import smart-account-kit so server routes don't pull it.
Server (src/lib/server/relayer.ts):
- Route Soroban {func, auth} payloads to OZ Channels with Bearer auth.
- Route signed XDR envelopes to RPC directly (OZ rejects SAK's wallet-
deploy fee as a mismatch, and the SAK deployer is pre-funded).
Routes:
- /api/send → /api/relay, proxy forwards to the new relayer module.
- /api/fund builds the SAC transfer + assembled tx by hand to dodge
`contract.Client.from` / `TransactionBuilder.cloneFrom` issues under
the Workers bundler; submits via RPC.
UI (components/ConnectButtons, GuestbookMessage, routes/sign):
- Signup uses `autoSubmit: true`; login uses `connectWallet({ prompt })`;
donations build `AssembledTransaction.build(...)` with the smart
account as `from` and the SAK deployer as stellar-sdk `publicKey`.
- Settings reads the SAC Balance entry directly from ledger storage.
- Wire up the Copy-address button; surface real error messages in toasts.
Misc:
- Drop unused deps (@openzeppelin/relayer-plugin-channels, @floating-ui,
base64url, buffer) and the PUBLIC_FUNDER_PUBLIC_KEY env var.
- Remove the Jacquard-font preload that mismatched the CSS load timing.
- Switch to @sveltejs/adapter-cloudflare and document the Pages deploy
flow + required env vars in the README.
|
@AshFrancis is attempting to deploy a commit to the elliotfriend's projects Team on Vercel. A member of the Team first needs to authorize it. |
Addresses Copilot review feedback on stellar-docs PR #2367: `@sveltejs/kit`'s `error(...)` returns `never` (it throws), so `return error(...)` reads confusingly. Swap to `throw error(...)` for clarity. Re-throw HttpErrors in /api/relay's catch block so client-side validation errors aren't re-wrapped as 502s.
ElliotFriend
added a commit
that referenced
this pull request
Sep 4, 2026
his PR on the guestbook repo served as a lot of prior art for this upgrade and was indispensible when updating educational comments throughout the codebase. this project is much better for the contributions from him. This commit specifically adapts his relayer proxy approach, the env-file structure, and several explanatory comments. Refs #1 Co-authored-by: Ash Francis <ash@ashfrancis.com>
Owner
|
merged a lot of this in with 6b78e46 (finally!) thanks so much for the help!!! |
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.
Hey @ElliotFriend — no expectations with this one; feel free to close if the direction isn't right for the repo. Sharing in case it's useful.
Why
stellar/launchtubeis archived and the hosted service atlaunchtube.xyzis offline, so the current guestbook can't complete signup or transaction submission end-to-end. The Stellar docs tutorial that points at this repo has the same problem.What
Ports the app to the current Stellar smart-wallet stack:
passkey-kit→ Smart Account Kit — the successor SDK, targeting audited OpenZeppelin Smart Account contracts./api/relayproxy so the API key stays server-side./api/fund/[address]endpoint alongside the static app.Notable simplifications:
sign+senddance;kit.signAndSubmit(assembledTx)handles the whole passkey-signed submission.stellar-sdkprimitives rather than via a SAC wrapper, which turned out more stable under production bundling.Testing
Live Testnet deploy exercising all flows (signup, login, fund, donate, write/edit messages, reconnect): https://ye-olde-guestbook.pages.dev
Related
Companion PR updating the Stellar developer docs: stellar/stellar-docs#2367