Skip to content

Commit

Permalink
doc: Fix schema for offer.amount, it can be a non-BTC unit too
Browse files Browse the repository at this point in the history
The `amount` field is intended to be either a native unit (`msat`,
`sat` or `btc`) or it can also be a non-native unit that needs to be
converted into native when creating the invoice. As such limiting the
`amount` to only be native is very restrictive.
  • Loading branch information
cdecker committed Feb 7, 2024
1 parent 317cf4d commit 09d32ec
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 76 deletions.
2 changes: 1 addition & 1 deletion cln-grpc/proto/node.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cln-grpc/src/convert.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cln-rpc/src/model.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

140 changes: 70 additions & 70 deletions contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions doc/schemas/offer.request.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
],
"properties": {
"amount": {
"type": "msat_or_any",
"description": "either the string \"any\" (e.g. for donations) or a positive value in millisatoshi precision"
"type": "string",
"description": "The amount parameter can be the string \"any\", which creates an offer that can be paid with any amount (e.g. a donation). Otherwise it can be a positive value in millisatoshi precision; it can be a whole number, or a whole number ending in msat or sat, or a number with three decimal places ending in sat, or a number with 1 to 11 decimal places ending in btc. `amount` can also have an ISO 4217 postfix (i.e. USD), in which case currency conversion will need to be done for the invoice itself. A plugin is needed which provides the \"currencyconvert\" API for this currency, otherwise the offer creation will fail."
},
"description": {
"type": "string",
Expand Down

0 comments on commit 09d32ec

Please sign in to comment.