Skip to content

Multi-wallet support for Stellar (Albedo, xBull, LOBSTR beyond Freighter) #18

@truthixify

Description

@truthixify

Labels: Stellar Wave, stellar, feature, drips, help-wanted
Tier: L (1–2 weeks)
Type: feature

Context

Today the demo's Stellar flow only supports Freighter. Stellar has a real wallet ecosystem — Albedo (web-based, no extension required), xBull (popular alternative), LOBSTR (web + mobile), Hana, and others. A visitor without Freighter installed gets a dead end. Many won't bother installing a new extension just to try a demo.

We should support at least three Stellar wallets out of the box.

Scope

  1. Abstract the wallet layer:
    • Create src/wallets/stellar/ with a StellarWallet interface:
      interface StellarWallet {
        readonly id: string
        readonly name: string
        readonly icon: string
        isAvailable(): Promise<boolean>
        connect(): Promise<{ publicKey: string; network: string }>
        signTransaction(xdr: string, opts: SignOpts): Promise<{ signedXdr: string }>
        disconnect(): Promise<void>
      }
  2. Implement adapters:
    • FreighterAdapter (existing, just refactor onto the interface).
    • AlbedoAdapter using @albedo-link/intent.
    • xBullAdapter using @creit.tech/xbull-wallet-connect.
    • LobstrAdapter using @lobstrco/signer-extension-api.
  3. Connect-wallet UI:
    • On the chain switch to Stellar, show a wallet picker modal listing all detected wallets.
    • Each entry: icon, name, status badge ("Installed" / "Not detected" with install link).
    • Persist the chosen wallet in localStorage so reconnect skips the picker.
  4. Stellar Wallets Kit — consider using @creit.tech/stellar-wallets-kit as a one-stop integration instead of writing adapters manually. Argue the trade-off in the PR (vendor lock-in vs. ergonomics).

Constraints

  • Each adapter's signing must produce identical XDR — verify with a unit test.
  • The auto-sign / stealth-key derivation flow (demo/04) must work with any wallet.
  • Bundle size impact ≤ +15 KB per wallet adapter, lazy-loaded.

Acceptance criteria

  • Wallet abstraction interface + ≥ 3 adapters.
  • Wallet picker UI.
  • Persistence of last-used wallet.
  • Playwright tests for at least the Freighter and Albedo paths.
  • Documented in docs/guides/stellar-quickstart.mdx (or follow-up issue).

Why this matters

Forcing a specific wallet is a 5-second bounce trigger. Supporting the top three wallets gives roughly 95% of Stellar users a connect-and-go experience.

Resources

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programdripsFunded via Drips NetworkfeatureNew feature workhelp wantedExtra attention is neededstellarTouches Stellar / Soroban code

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions