lnurl / luds

lnurl specifications
596 stars 140 forks source link

LUD-03: Provide recommendation for zero balance withdrawal response #232

Open wbobeirne opened 1 year ago

wbobeirne commented 1 year ago

LUD-03 should provide an explicit recommendation for what to do if a requester has no amount they could withdraw. Right now someone could choose to implement this as:

  1. minWithdrawable and maxWithdrawable as 0
  2. Return an {"status": "ERROR"} error

While either approach should probably be handled from clients, it would be nice to have an expectation around this and reduce ambiguity.

As an aside, it might also be wise to specify that the *Withdrawable amounts should never be negative, unless there's a case for that that I'm not thinking of.

hsjoberg commented 1 year ago

I think it makes sense to set min/maxWithdrawable to 0, instead of returning an error.

This would mean LUD-14 and LUD-19 are still discoverable.