Repository navigation
Conversation
|
👋 Thanks for assigning @tankyleo as a reviewer! |
tankyleo
left a comment
There was a problem hiding this comment.
A couple points from codex i found worthwhile:
-
[P2] The amount is per item, not per payment. The new amount help text (ldk-server-cli/src/main.rs:352) is misleading when quantity is used. bolt12-receive 1000sat -q 3 allows a payer buying three items to pay 3000 sat. LDK multiplies the offer amount by the requested quantity. Describe this as
Amount to request per item. -
Quantity without an amount is silently ignored. The CLI (ldk-server-cli/src/main.rs:363) accepts bolt12-receive --quantity 3, but the server_s variable-amount branch (ldk-server/src/api/bolt12_receive.rs:28) drops quantity. This predates the commit, but is worth fixing while improving
ergonomics: add requires = "amount" and reject the invalid combination server-side. -
MCP still advertises description as required. The schema (ldk-server-mcp/src/tools/schema.rs:444) retains "required": ["description"], although request deserialization defaults an omitted description to an empty string. Making it optional would align MCP with the new CLI behavior; this is a
consistency improvement, not a new regression.
It was unclear how to create a reusable offer, and `bolt12-receive 1000sat` silently used the amount as the description. Take the amount positionally with an optional -d description, like bolt11-receive, and document that offers can be paid repeatedly until they expire.
The variable-amount path silently dropped quantity, so callers got an offer that didn't match what they asked for. Return an invalid request error instead.
f162517 to
556adfb
Compare
It was unclear how to create a reusable offer, and
bolt12-receive 1000satsilently used the amount as the description. Take the amount positionally with an optional -d description, likebolt11-receive, and document that offers can be paid repeatedly until they expire.