Skip to content

stable-channels-lsp: SC REST handlers, push notifications, and the stability brain#101

Merged
toneloc merged 3 commits into
toneloc:mainfrom
Billa05:feature/sc-handlers
Jun 2, 2026
Merged

stable-channels-lsp: SC REST handlers, push notifications, and the stability brain#101
toneloc merged 3 commits into
toneloc:mainfrom
Billa05:feature/sc-handlers

Conversation

@Billa05

@Billa05 Billa05 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Adds the Stable Channels REST surface and the autonomous stability logic to the stable-channels-lsp daemon. Runs against vanilla upstream main, no LDK Server changes needed.

SC handlers + push

  • EditStableChannel (set/update a channel's USD target, patch semantics)
  • RegisterPush (wallets register APNs/FCM device tokens)
  • PushService over APNs + FCM, config-driven, disables gracefully when creds are absent
  • LdkLog (tails LDK Server's log file)

Stability brain

  • SubscribeEvents consumer with backoff, plus a 60s tick that keysends a top-up on USD drift (only lsp_to_user) or wakes offline peers via push
  • Startup hydration from sqlite joined with the live channel snapshot, so it survives restarts
  • Lifecycle handlers for channel ready/closed and forwarded-payment stable-spend reconcile
  • LdkServerCalls trait for mockable gRPC, plus 51 unit tests

@Billa05 Billa05 force-pushed the feature/sc-handlers branch 3 times, most recently from 44ac04e to 911870d Compare June 1, 2026 12:22
@Billa05 Billa05 force-pushed the feature/sc-handlers branch from 911870d to 79974af Compare June 1, 2026 12:37
@toneloc

toneloc commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Added capability to have closed channels. Can discuss.

@toneloc toneloc merged commit d3e23d4 into toneloc:main Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants