From 8c312b46fa1f0779d785571ad4b11d94fd587363 Mon Sep 17 00:00:00 2001 From: Lucas Sunsi Abreu Date: Wed, 27 Dec 2023 07:33:37 -0300 Subject: [PATCH] add convertible max/min sendable fields --- 21.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/21.md b/21.md index 476ec1c..49f8a47 100644 --- a/21.md +++ b/21.md @@ -41,7 +41,10 @@ type Currency = { symbol: string, // Symbol of the currency. E.g.: R$ decimals: number, // Integer; Number of decimal places. E.g.: 2 multiplier: number, // Double; Number of millisatoshis per smallest unit of currency. E.g.: 5405.405 - convertible?: bool // Whether the payment can be converted into the currency + convertible?: { // Whether the payment can be converted into the currency + maxSendable: number, // Integer; Max converted amount of currency + minSendable: number // Integer; Min converted amount of currency + } } type ExtendedResponse = BaseResponse & { @@ -63,7 +66,10 @@ type ExtendedResponse = BaseResponse & { + "symbol": "R$", + "decimals": 2, + "multiplier": 5404.405, -+ "convertible": true ++ "convertible": { ++ "maxSendable": 100000, ++ "minSendable": 1000 ++ } + } + ] } @@ -71,11 +77,12 @@ type ExtendedResponse = BaseResponse & { - The inclusion of the `currencies` field implies the support of this extension - The inclusion of a `currency` implies it can be used for denomination of an amount -- The inclusion of a `convertible currency` implies the `SERVICE` can quote and guarantee a price for a given currency +- The inclusion of a `convertible` field implies the `SERVICE` can quote and guarantee a price for a given `currency` - The `multiplier` is not guaranteed by the `SERVICE` and is subject to change - The `code` of a `currency` will be used as an identifier for the next request and must be unique - The `code` must be according to [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) if possible - The order of the `currencies` may be interpreted by the `WALLET` as the receiving user preference for a currency +- The `maxSendable` and `minSendable` fields must be respected by `WALLET` on `convertable` requests ### Wallet-side second request @@ -140,7 +147,10 @@ These examples show all the possible uses of this extension by a supporting `WAL "symbol": "R$", "decimals": 2, "multiplier": 5405.405, - "convertible": true + "convertible": { + "maxSendable": 100000, + "minSendable": 100 + } }, { "code": "USDT",