Closed callebtc closed 8 months ago
LGTM
Just one suggestion. I would like to rename method to payment_method, since this is more precise. If I read the term method in a Rest-Api my first thought is http-method.
Update: In the nut the struct is described as settings but in the json it's called method. Having method or payment_method twice feels redundant.
How about this:
"4": {
"settings": [
{
"payment_method": "bolt11",
"unit": "sat",
"min_amount": 0,
"max_amount": 10000
}
],
"disabled": false
},
Since cashu-ts is migrating to v1 api and this is only a small change, I think we should get this PR ready to merge before the wallets adopt the new api. Any thoughts on this? @gandlafbtc @callebtc
looks good to me
In the nut the struct is described as settings but in the json it's called method. Having method or payment_method twice feels redundant.
It feels appropriate to me that there is an array "methods" with entries that have a "method". Since we speak of "method-unit" pairs in the spec, I think the labels are ok or at least clear enough as is.
I have added all remaining suggestions and I think we are ready to merge this.
This PR changes the "settings" for NUT-4/NUT-5 (minting and melting) that are shown in the
/v1/info
response.The unit pairs are changed from an array
["method", "unit"]
to an object that now also carries settings for the endpoints.Example: