Payment request consolidation (and extra fees for non-preferred mints)#381
Payment request consolidation (and extra fees for non-preferred mints)#381robwoodgate wants to merge 17 commits into
Conversation
Co-authored-by: Rob Woodgate <robwoodgate@users.noreply.github.com>
Spec moved from cashubtc/nuts#380 to cashubtc/nuts#381, adding fee_reserve (fr) and supported_methods (sm) alongside the existing mint-strict flag. Adds an isMintListStrict resolver for the spec default-to-true semantic.
|
@callebtc , @thesimplekid - we have three implementations, can we consider final review / merge please. cc @ye0man |
|
4 implementations: |
Spec moved from cashubtc/nuts#380 to cashubtc/nuts#381, adding fee_reserve (fr) and supported_methods (sm) alongside the existing mint-strict flag. Adds an isMintListStrict resolver for the spec default-to-true semantic.
|
The only thing I still don't love about this is the It opens up all kinds of edge case issues as I'd rather default to What are the thoughts on this? |
Co-authored-by: tsk <tsk@thesimplekid.com>
I agree, I think default true is an anti pattern and we should avoid it. |
Agreed. Would you prefer to keep |
I would flip the semantics. |
yeah, that's my leaning too. @d4rp4t @a1denvalu3, do you agree? |
i agree with this ... |
|
This gives the same semantic, but flipped so an omitted value means |
|
Cashu-TS updated to use new |
|
cdk updated cashubtc/cdk@7009b0d |
|
Nutshell updated cashubtc/nutshell@11612fe |
Consolidates and Supersedes: #355, #380
Summary
Consolidates the two open NUT-18 payment request proposals around mint preferences, strict mint lists, fee reserve signalling, and required mint payment methods.
This PR keeps the existing
mmint list as the single mint-list field, and adds small companion fields to clarify how that list should be interpreted.Changes
sm(supported_methods) to require that the mint used by the payer supports at least one listed payment method, e.g.bolt11,bolt12,onchainfrom feat(nut-18, nut-26): add preferred_mints to payment requests #355mp(mint_preferred) to signal whether themmint list is strict or preferred (this is a flip frommsin feat: preferred mints #380):false: receiver only accepts proofs from listed mintstrue: listed mints are preferred, but other mints may be acceptedfr(fee_reserve) to signal an additional amount the payer MUST include when paying from a non-preferred mint, to cover potential swap/melt feesRationale
There were overlapping proposals for preferred mints and strict mint lists. Instead of introducing a separate preferred mint list, this keeps the request format minimal:
mremains the mint listmpdefines whether that list is strict or advisoryfrgives wallets a way to compensate for extra fees when ignoring the preferencesmlets receivers express the mint capabilities required for the payment flowThis avoids two competing mint-list fields while covering the three desired behaviours.