Skip to content

Add additional "unused" option to newaddr RPC #8100

@michaelWuensch

Description

@michaelWuensch

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions