ElementsProject / ElementsProject/lightning

Add additional "unused" option to newaddr RPC

Open
#8,100 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
3.1k
Forks
1k
Avg merge
4d 10h
Merged PRs (30d)
13

Description

Hi,
on BitBanana I am working on a unified QR-Code which looks like:
bitcoin:[address]?lightning=[bolt12] (like described here: https://bitcoinqr.dev/)

The problem is that every time I want to display the qr code a new Address is generated.
I am worried that if the user displays this QR Code 100 times and always gets paid with bolt 12 the on-chain restore process might get problematic as depending on the implementation the restore process stops scanning for addresses if x addresses in a row were unused.

To avoid this problem I would suggest to add a new "unused" parameter to the newaddr RPC.
If "unused" is specified it would then display the next unused address. So calling it multiple times in a row with that parameter specified would result in the same address while the address is still unused.

LND has a similar feature, there it depends on the type of address and they have "unused" types (https://lightning.engineering/api-docs/api/lnd/lightning/new-address/).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.