Pleb5 / satshoot

Freelancing on nostr
https://satshoot.com
14 stars 5 forks source link

Only allow user to add Cashu Mints that handle 'sat' unit and only pay mints that accept 'sat' unit #52

Open Pleb5 opened 1 month ago

Pleb5 commented 1 month ago

There might be lots of mints listed in the future that DON'T handle sats. We should not use these in SatShoot for now because payments can only handle sats.

How to check this:

According to NUT06 spec 'GetInfoResponse' from cashu-ts lib should return a JSON that has a key called 'nuts'. This should include 'nut4'(deposits) which is mandatory and a 'methods' key under that. This in turn should include a 'method' that has a 'unit' that equals 'sat'.

  1. We exclude mints that don't implement NUT06. It is mandatory but not every mint implements this.
  2. We exclude mints that don't have the above info in the info response both from Mint exploration AND Recipients CashuMintList (10019) when paying freelancer.
  3. Otherwise user will be able to select a mint that he wants to pay to from eligible mints