Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR:
./lspCLI wrapper for calling the Blocktank API from the repo rootbitkit://dev/create-invoicedeep link handler (debug builds only) for programmatic invoice creationpay-invoices.shautomation script for bulk invoice creation, payment, and block miningDescription
Introduces a Claude Code plugin at
.claude/plugins/blocktank-api/that gives Claude knowledge of the Blocktank LSP REST API (18 endpoints) and provides shell scripts for calling it. The plugin includes a skill with endpoint tables, common workflows (channel purchase, CJIT, force close), and state machine documentation.A dev-only deep link (
bitkit://dev/create-invoice?amount=N) allows creating bolt11 invoices on the app's LDK node and writing them to a file readable via ADB. This enables thepay-invoices.shscript to automate creating invoices, paying them via the LSP, and mining blocks — useful for populating the app with payment activity during testing.The deep link handler checks
canReceive()before creating invoices, matching the UI behavior of not generating bolt11s when no LN channel is available.Preview
N/A — AI tooling, no UI changes.
QA Notes
1. Verify
./lspwrapperShould return JSON with LSP node info and channel limits.
2. Verify deep link invoice creation (requires dev debug build with wallet + open channel)
Should output a bolt11 invoice string.
Verify it can be paid afterwards using the
./lsphelper in repo root:./lsp POST /regtest/channel/pay \ '{"invoice":"__paste_invoice_here__"}'3. Verify deep link guard without channel
With no open LN channel, the deep link should log an error and not write an invoice file.
4. Verify full automation (requires open channel with inbound capacity)
Should create 3 invoices (1, 2, 3 sats), pay each, mine 10 blocks. Payments should appear in the app's activity list.