-
Notifications
You must be signed in to change notification settings - Fork 165
LUD-21: pinLimit for withdrawRequest - resolves #201 #200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
titusz
wants to merge
14
commits into
lnurl:luds
Choose a base branch
from
bitcoin-ring:withdraw-pin
base: luds
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 8 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
385b922
DRAFT - LUD-XX: pinLimit for withdrawRequest
titusz b2437d5
Merge remote-tracking branch 'upstream/luds' into withdraw-pin
titusz 13b6446
Rename to LUD-21
titusz 6882ab8
add Bolt Card Wallet & Bolt Card PoS
PeterRounce c8fd489
Reduce max pin length to 8
titusz fc80d88
Invalidate LNURLw links after 3 failures
titusz deee7c4
Add missing forward slash in example callback URL
titusz 08f4da8
Re-order LNURLw response fields in example.
titusz 795f56c
Merge branch 'luds' into withdraw-pin
PeterRounce 9b577a5
Merge remote-tracking branch 'upstream/luds' into withdraw-pin
titusz 945029d
Add Bolt Card Pos as supporting LUD 21
titusz 959dc41
Add requirement for a fixed length 6-digit PIN
titusz 1925de1
Change PIN length to 4-digits fixed size
titusz 0fcd53d
Merge branch 'luds' into withdraw-pin
PeterRounce File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| LUD-21: pinLimit for withdrawRequest | ||
| ==================================== | ||
|
|
||
| `author: titusz` `discussion: https://t.me/lnurl/34810` | ||
|
|
||
| --- | ||
|
|
||
| ## Optional Second Factor for `withdrawRequest` Authorization | ||
|
|
||
| Adding the optional `pinLimit` property to an LNURL-withdraw response allows a `SERVICE` to require a PIN to authorize a withdrawal above a given amount. | ||
|
|
||
| ```diff | ||
| { | ||
| "tag": "withdrawRequest", | ||
| "callback": string, | ||
| "defaultDescription": string, | ||
| "minWithdrawable": number, | ||
| + "pinLimit": number, | ||
| "maxWithdrawable": number | ||
| } | ||
| ``` | ||
|
|
||
| The `pinLimit` value must be a positive integer (including 0) with a maximum of 15 digits. If the `pinLimit` property is present and a `WALLET` (Point of Sale) intends to withdraw an amount equal to or greater than the `pinLimit` value (in millisatoshis) it must first acquire a PIN from the user (customer) and then add it as `pin=<pin>` to the query string of the callback URL to authorize the withdrawal. | ||
|
|
||
| **Example callback:** | ||
|
|
||
| `https://ln-example.com?k1=<k1>&pr=<ln-invoice>&pin=<pin>` | ||
|
|
||
| If the `pinLimit` property is used, the `SERVICE` must check for and validate the `pin` query parameter of the callback request according to its policy before paying the invoice. | ||
|
|
||
| ## Wallet Implementation Notes | ||
|
|
||
| If an LNURL-withdraw response includes a `pinLimit` property a `WALLET` should not automatically propose the invoice amount based on the `minWithdrawable`, `maxWithdrawable` or `pinLimit` values. | ||
|
|
||
| When acquiring a PIN from the user (customer) via a PIN entry screen a `WALLET` should show the invoice amount on that same screen. | ||
|
|
||
| ## Service Implementation Notes | ||
|
|
||
| Other than a maximum length of 8 digits this document makes no assumptions about whether PINs are static (multiple-use) or one-time passwords (OTPs) or other digit based PIN security schemes. | ||
|
|
||
| A `SERVICE` may add the `pinLimit` property to its LNURL-withdraw response in accordance with its individual security policy. | ||
|
|
||
| A `SERVICE` should protect against brute force attacks by invalidating LNURLw links after the third PIN authorization failure. | ||
|
|
||
| ## Security Considerations | ||
|
|
||
| PIN support improves security in cases of lost or maliciously scanned NFC payment devices. | ||
|
|
||
| Implementors should be aware that the PIN is leaked to the merchant point of sales device when entered by the customer. | ||
|
|
||
| Depending on the implementation of a `SERVICE`, security can be improved by using one-time PINs or by appropriate privacy configuration of NFC payment devices (e.g., enabling Random-ID support). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.