Skip to content

get_info response includes lud16 field but it's always null #1997

@sat-engineer

Description

@sat-engineer

Description

The get_info NIP-47 response from AlbyHub includes a lud16 field, but it's always null even when the subwallet has a Lightning Address configured.

This creates a problem for apps that need to display the user's Lightning Address: if the NWC connection string was generated before the Lightning Address was configured on the subwallet, there's no way to retrieve it later.

Current Behavior

{
  "result": {
    "alias": null,
    "color": null,
    "pubkey": null,
    "network": null,
    "block_height": null,
    "block_hash": null,
    "methods": ["lookup_invoice", "make_invoice", "get_info", "get_budget"],
    "notifications": [],
    "lud16": null
  },
  "result_type": "get_info"
}

The lud16 field is present but always null, even for subwallets with a Lightning Address.

Expected Behavior

If the subwallet has a Lightning Address configured, get_info should return it:

{
  "result": {
    "lud16": "mysubwallet@getalby.com",
    ...
  }
}

Use Case

We're building sparkpass.events, a Bitcoin-native event ticketing platform. When organizers connect their wallet via NWC, we want to display their Lightning Address in the wallet settings UI.

Current workaround: We extract lud16 from the NWC connection string URL parameter (added in PR #1556). However, this only works if:

  1. AlbyHub version is 1.19.1+
  2. The Lightning Address was configured before generating the NWC connection

If a user:

  1. Creates a subwallet
  2. Generates an NWC connection
  3. Later adds a Lightning Address to the subwallet

...the existing NWC connection string doesn't have lud16, and there's no way to retrieve it via get_info.

Proposed Solution

Populate the lud16 field in get_info responses when the subwallet has a Lightning Address configured. This would allow apps to always retrieve the current Lightning Address, regardless of when the NWC connection was created.

Environment

  • AlbyHub version: Tested via wss://relay.getalby.com/v1
  • NIP-47 encryption: NIP-44

Related

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