feat: add nodeControl contract + checkout.mintInvoice#17
Conversation
…plane Add the oRPC contracts and Zod schemas for the WebSocket-based node control protocol between mdk.com and merchant lightning-js nodes. Includes payout, invoice minting (BOLT11 + BOLT12), and server-pushed event stream contracts. Also adds mintInvoice to the checkout contract, replacing the legacy two-step local-mint + registerInvoice flow.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f2a7ea097a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| create: createCheckoutContract, | ||
| confirm: confirmCheckoutContract, | ||
| registerInvoice: registerInvoiceContract, | ||
| mintInvoice: mintInvoiceContract, |
There was a problem hiding this comment.
Wire mintInvoice into sdkContract checkout map
This adds checkout.mintInvoice to the core contract, but sdkContract.checkout still exports only registerInvoice in src/index.ts (lines 205-210), so any SDK router/client that is typed from sdkContract cannot adopt the new single-step mint flow and will stay pinned to the legacy path. That mismatch makes this feature unavailable in the SDK-facing contract surface even though it is now publicly defined.
Useful? React with 👍 / 👎.
Summary
mintInvoiceto the checkout contract, replacing the legacy two-step local-mint + registerInvoice flowTest plan
npx tsc --noEmitpasses