feat(stellar): add passkey smart-account wallet mode - #166
Merged
truthixify merged 5 commits intoAug 26, 2026
Merged
Conversation
|
@collinsezedike is attempting to deploy a commit to the truthixify's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@collinsezedike Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
Merged. Dedicated tests around the PRF assertion parser and a real unsupported-authenticator card rather than a silent failure. Careful piece of work @collinsezedike. |
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.
Summary
Closes #150.
src/lib/stellar/passkey.ts): credential creation, re-authentication, PRF extension result parsing, and a documented session ceiling (30 min or 20 signatures, whichever comes first) on how long the derived key stays resident in memory.PasskeyAdapterimplementing the sharedStellarWalletinterface, registered alongside Freighter/Albedo/xBull/LOBSTR/WalletConnect insrc/wallets/stellar/index.ts. First-run creates a passkey, deterministically derives a Stellar Ed25519 keypair from its PRF secret, and funds it via friendbot on testnet — no extension prompt at any point.PasskeyUnsupportedCardnext-step card, rendered byStellarWalletPickerin place of the generic error string when a device can't complete the PRF ceremony, pointing at passkeys.dev's device-support page.Important scope correction (read this before reviewing)
The issue describes a Soroban smart account with on-chain fee sponsorship and a contract-delegated session key, authorized via an SDK export called
WebAuthnPasskeyStealthSigner. I checked every version of@wraith-protocol/sdkpublished to npm (1.0.0 through the current latest, 1.4.5) — that export does not exist anywhere. A real smart-contract account would also need a deployed Soroban wallet contract (Rust/WASM) that doesn't exist anywhere in this repo.Since neither the SDK export nor a deployed contract exist, this PR ships an honestly-scoped-down but fully working alternative: a classic Ed25519 Stellar account whose signing key is deterministically derived from the passkey's PRF secret via
Keypair.fromRawEd25519Seed(@stellar/stellar-sdk, already a dependency — no new packages added). It satisfies "no extension prompt, funds itself on testnet, PRF-gated, session ceiling" end to end with real, working code. What it does not do is on-chain fee sponsorship or contract-delegated session keys — those need the missing smart-wallet contract and are natural follow-up work once one exists. See the scope note at the top ofPasskeyAdapter.tsfor the full reasoning.Pre-existing gap found during this work
StellarWalletPickerandStellarWalletButton(the multi-wallet adapter system this issue extends) are not currently mounted anywhere in the app —Header.tsxrendersWalletConnect.tsx, which uses a separate, Freighter-onlyStellarWalletContextthat predates the adapter registry. This means Albedo, xBull, LOBSTR, and WalletConnect were already unreachable in the running app before this PR, and Passkey inherits that same gap. I scoped this PR to exactly the files the issue lists rather than also rewiringHeader.tsxoff the legacy context, since that touches shared wallet state consumed by Send/Receive/Vault/batch-withdraw/notifications. Flagging for a maintainer decision on whether that's a separate issue.Acceptance criteria status
@ts-nocheck; PRF assertion parser has unit testsTest plan
pnpm test:unitforsrc/lib/stellar/passkey.test.tsStellarWalletButton/StellarWalletPicker(or a temporary harness) to click through first-run passkey creation, friendbot funding, and a stealth send/withdraw on testnet