Skip to content
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

Add additional "unused" option to newaddr RPC #8100

Open
michaelWuensch opened this issue Feb 18, 2025 · 0 comments
Open

Add additional "unused" option to newaddr RPC #8100

michaelWuensch opened this issue Feb 18, 2025 · 0 comments

Comments

@michaelWuensch
Copy link

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/).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant