lnurl / luds

lnurl specifications
584 stars 138 forks source link

LUDS-06 what is the definition of number? #224

Open pieterjm opened 1 year ago

pieterjm commented 1 year ago

What is the exact specification of number in LUDS-06? A number can be an integer or floating point number.

hsjoberg commented 1 year ago

The data types in LUDs adhere to the primitive data types of Typescript. https://github.com/lnurl/luds/pull/137

The comment for each field in LUD-06 is giving additional context

{
    "callback": string, // The URL from LN SERVICE which will accept the pay request parameters
    "maxSendable": number, // Max millisatoshi amount LN SERVICE is willing to receive
    "minSendable": number, // Min millisatoshi amount LN SERVICE is willing to receive, can not be less than 1 or more than `maxSendable`
    "metadata": string, // Metadata json which must be presented as raw string here, this is required to pass signature verification at a later step
    "tag": "payRequest" // Type of LNURL
}

Millisatoshi should have any decimals, as that makes no sense. An integer should be expected.

What seperators are accepted?

None. That's not allowed in JSON.

pieterjm commented 1 year ago

Then I think it would be better to change 'number' into 'integer'