feat: expose Chatelet over the LNbits nostr transport (#1) #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/nostr-transport-rpcs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Makes Chatelet drivable entirely over the core LNbits nostr transport (kind-21000 RPC), no HTTP needed — the functional half of the "Nostr-native" goal. Closes the code portion of #1.
Commits
services.py— behavior-neutral. Availability quoting + check-then-hold + invoice orchestration move out ofviews_api.pyinto a transport-agnosticservices.pywith typed errors (NotFound/Unavailable/ValueError/BookingError).views_apibecomes a thin HTTP door mapping those to status codes. This is what lets both doors share one flow.lnurlp/transport_rpcs.py.kind:22000/22001as a retained client-agnostic proposal (not redundant) — see finding below.RPC surface
chatelet_room_create/_update/_publish,chatelet_block_createchatelet_room_list_minechatelet_room_list/_getchatelet_availabilitychatelet_booking_request/_getsender_pubkeyregister_link_owner_resolver(tag="chatelet", key="booking_id")lets the operator stream settlements viasubscribe_payments. Graceful no-op on pre-#4 LNbits builds.Scope + transport finding
The core transport pool is kind-21000 RPC only (
_publish_eventemits nothing else; subscriptions filter only 21000) — the correct tool for #1, but it can't publish public discovery events. So this PR is the RPC booking flow (#1) only; the public NIP-99/52/78 events are #2.Follow-up research (posted on #2) resolved #2's path and revised my initial take:
nostrclientextension in-process (spirekeeper template:nostr_client.relay_manager.publish_message(...), sign viaresolve_signer). nostrmarket/spirekeeper already do this; the core pool was never the right layer for it.kind:22000/22001is retained as a client-agnostic proposal, not dropped — per workspace doctrine the availability RPC is the training wheel and the public kind is the destination. Commit 3 reflects this inevent-flow.md; issue #6 (register the allocation) stays open.So nothing here is blocked — #1 stands on its own; #2 is a tracked follow-up with a decided path.
Test (FakeWallet + core transport build)
Send an encrypted kind-21000
chatelet_availability, thenchatelet_booking_request→ expect aBookingQuotewith bolt11; pay it →chatelet_booking_getshowsconfirmed.Why PR
Money-handling extension → PR category. Handing off merge to you via the Forgejo UI.
🤖 Generated with Claude Code