diff --git a/apps/web/lib/stellar-wallet.ts b/apps/web/lib/stellar-wallet.ts index 07defd1..b073f0f 100644 --- a/apps/web/lib/stellar-wallet.ts +++ b/apps/web/lib/stellar-wallet.ts @@ -1,10 +1,16 @@ -import { FreighterModule, StellarWalletsKit, WalletNetwork } from "@creit.tech/stellar-wallets-kit"; +import { + FreighterModule, + LobstrModule, + StellarWalletsKit, + WalletNetwork, +} from "@creit.tech/stellar-wallets-kit"; import { env } from "./env"; /** - * Freighter only for now (Stellar Wallets Kit supports more, but auth-entry/transaction-signing - * parity across wallets isn't independently verified here — see docs/architecture.md §2's - * "verify at build time" note before adding more modules). + * Freighter and the LOBSTR browser extension. Stellar Wallets Kit supports more, but + * transaction-signing parity across wallets isn't independently verified here — see + * docs/architecture.md §2's "verify at build time" note before adding more modules. LOBSTR's + * extension has no `signAuthEntry`, which is fine: open-intent.ts signs the whole transaction. * * # The network is derived, never defaulted * @@ -32,6 +38,6 @@ export function createStellarWalletKit(): StellarWalletsKit { return new StellarWalletsKit({ network, selectedWalletId: "freighter", - modules: [new FreighterModule()], + modules: [new FreighterModule(), new LobstrModule()], }); } diff --git a/apps/web/lib/wallets/stellar.ts b/apps/web/lib/wallets/stellar.ts index 887d866..9854260 100644 --- a/apps/web/lib/wallets/stellar.ts +++ b/apps/web/lib/wallets/stellar.ts @@ -5,8 +5,9 @@ import type { Connection, WalletEntry } from "./types"; * The Stellar wallets this app will sign with. * * Deliberately a short list. Every transfer and every admin call carries a Soroban authorization - * tree that the wallet must sign entry by entry, and signing parity across wallets has only been - * checked for Freighter (see stellar-wallet.ts). Listing a wallet here is a promise that money + * tree that the wallet must sign entry by entry, and signing parity across wallets has been + * checked for Freighter (see stellar-wallet.ts); LOBSTR is listed on the strength of its extension's + * `signTransaction`, which is the only call open-intent.ts needs, and still wants a real transfer. Listing a wallet here is a promise that money * moves correctly through it, so it is added after a real transfer has gone through it, not * because the kit happens to support it. */ @@ -14,7 +15,11 @@ export const VERIFIED_STELLAR_WALLETS: ReadonlyArray<{ id: string; name: string; installUrl: string; -}> = [{ id: "freighter", name: "Freighter", installUrl: "https://www.freighter.app" }]; +}> = [ + { id: "freighter", name: "Freighter", installUrl: "https://www.freighter.app" }, + // Browser extension only. LOBSTR's phone app is not reachable through this module. + { id: "lobstr", name: "LOBSTR", installUrl: "https://lobstr.co/signer-extension" }, +]; export async function stellarEntries(kit: StellarWalletsKit): Promise { const supported = await kit.getSupportedWallets();