feat(setup): Zeus lightning journey — fund-wallet step, IBD timer + finish-setup toast, channel suggestions

Every Lightning setup (Open a Shop, Accept Payments, Run a Lightning Node)
gains a guided path to a working channel:

- New "Fund Your Bitcoin Wallet" step, gated on the blockchain finishing
  its initial sync: while syncing it shows a live progress bar with a
  counting-down time-remaining estimate; once synced it shows the on-chain
  balance and a "Fund Wallet" button that opens the receive modal with a
  fresh address, QR, and the Zeus channel limits (min 150,000 / max
  1,500,000 sats) noted.
- When the sync finishes while a Lightning setup is mid-flight, a toast
  pops with a "Finish setup" link straight back to the wizard (toasts now
  support action links). If several setups are in flight, one is chosen —
  the shared steps complete the lightning part of any of them.
- Channel steps are Zeus-branded (logo + copy) and land on the Lightning
  Channels screen, which now carries an "Open a channel with Zeus" card
  that prefills the open-channel modal with the Olympus peer URI, 150k
  sats, and private-channel checked. "Get Zeus" links to zeusln.com.
- Setup completion now actually requires walking the manual steps (fund,
  open channel, configure) — previously any step whose app was installed
  was silently auto-ticked and running apps marked the whole goal done.
- Completion CTAs now go to the app you just set up ("Go to my shop
  (BTCPay)" etc.) instead of the generic services list; iframe apps open
  in the on-top app overlay.
- On-chain send modal gains a "Send all funds" sweep toggle, backed by
  LND's send_all on the backend (amount no longer required when sweeping).
- Demo/mock: bitcoin.getinfo now returns the block_height/sync_progress
  contract the UI reads and simulates a ~90s IBD ramp per visitor so the
  timer, toast, and fund flow can all be demoed live; channel list data
  fixed (status/channel_point/liquidity totals — the panel previously
  crashed on the missing status field); sendcoins supports send_all.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
archipelago
2026-07-16 21:51:12 -04:00
co-authored by Claude Fable 5
parent 90bedc2a25
commit 3aebbcbbb8
16 changed files with 658 additions and 63 deletions
+44 -6
View File
@@ -1,4 +1,25 @@
import type { GoalDefinition } from '@/types/goals'
import type { GoalDefinition, GoalStep } from '@/types/goals'
/** Zeus (Olympus LSP) channel size limits, in sats */
export const ZEUS_CHANNEL_MIN_SATS = 150_000
export const ZEUS_CHANNEL_MAX_SATS = 1_500_000
export const ZEUS_ICON = '/assets/img/app-icons/zeus.webp'
/**
* Shared "fund the bitcoin wallet" step used by every Lightning goal. Gated on
* the blockchain being fully synced (IBD) — the wizard shows a live sync timer
* until then, and a "Fund Wallet" receive flow after.
*/
const FUND_WALLET_STEP: GoalStep = {
id: 'fund-wallet',
title: 'Fund Your Bitcoin Wallet',
description:
"Send bitcoin to your node's on-chain wallet so it can open a Lightning channel. Zeus channels need between 150,000 and 1,500,000 sats. Funding unlocks once your node finishes syncing the blockchain.",
action: 'fund',
isAutomatic: false,
icon: '/assets/img/app-icons/bitcoin-knots.webp',
}
export const GOALS: GoalDefinition[] = [
{
@@ -25,6 +46,17 @@ export const GOALS: GoalDefinition[] = [
action: 'install',
isAutomatic: true,
},
{ ...FUND_WALLET_STEP },
{
id: 'open-zeus-channel',
title: 'Open a Channel with Zeus',
description:
'Open a Lightning channel to Zeus, the mobile wallet that pairs perfectly with your node. Fund it with 150,0001,500,000 sats and your shop can accept instant Lightning payments.',
action: 'configure',
isAutomatic: false,
icon: ZEUS_ICON,
ctaLabel: 'Open a channel',
},
{
id: 'install-btcpay',
title: 'Install BTCPay Server',
@@ -69,13 +101,16 @@ export const GOALS: GoalDefinition[] = [
action: 'install',
isAutomatic: true,
},
{ ...FUND_WALLET_STEP },
{
id: 'open-channel',
title: 'Open a Lightning Channel',
description: 'Open your first payment channel to start sending and receiving Lightning payments. LND will guide you through it.',
appId: 'lnd',
title: 'Open a Channel with Zeus',
description:
'Open your first payment channel to Zeus, the mobile wallet built for nodes like yours (150,0001,500,000 sats). You can then send and receive Lightning payments from your phone.',
action: 'configure',
isAutomatic: false,
icon: ZEUS_ICON,
ctaLabel: 'Open a channel',
},
],
estimatedTime: '~30 min + sync time',
@@ -168,13 +203,16 @@ export const GOALS: GoalDefinition[] = [
action: 'install',
isAutomatic: true,
},
{ ...FUND_WALLET_STEP },
{
id: 'open-channels',
title: 'Open Payment Channels',
description: 'Open channels with well-connected nodes to start routing payments. More channels means more routing opportunities.',
appId: 'lnd',
description:
'Open channels with well-connected nodes to start routing payments. A great first channel is Zeus (150,0001,500,000 sats) — it also puts your node in your pocket. More channels means more routing opportunities.',
action: 'configure',
isAutomatic: false,
icon: ZEUS_ICON,
ctaLabel: 'Open a channel',
},
{
id: 'verify-routing',