Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions 11-payment-encoding.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ A writer:
- if a specific minimum `amount` is required for successful payment:
- MUST include that `amount`.
- MUST encode `amount` as a positive decimal integer with no leading 0s.
- If the `p` multiplier is used the `amount` the last decimal MUST be `0`.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: @cdecker I think you missed a last comment that this sentence is weird.
It should be: "If the p multiplier is used the last decimal of the amount MUST be 0."

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh damn, I thought there was a fixup from @Sword-Smith that fixed that. I'll open a new PR with the spelling mistake.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I did leave a fixup. But for some reason it didn't get included. I made a new PR
#733

- SHOULD use the shortest representation possible, by using the largest
multiplier or omitting the multiplier.

Expand All @@ -89,6 +90,9 @@ Donation addresses often don't have an associated amount, so `amount`
is optional in that case. Usually a minimum payment is required for
whatever is being offered in return.

The `p` multiplier would allow to specify sub-millisatoshi amounts, which cannot be transferred on the network, since HTLCs are denominated in millisatoshis.
Requiring a trailing `0` decimal ensures that the `amount` represents an integer number of millisatoshis.

# Data Part

The data part of a Lightning invoice consists of multiple sections:
Expand Down