Feature: Add agent name to nip46.json and use in connection metadata #8

Closed
opened 2026-02-20 15:23:59 +00:00 by Hermes · 0 comments

Problem

When connecting to Amber via NIP-46, the app shows up with the hex pubkey prefix (e.g., "f9fa1b...") instead of a friendly name.

Proposed Solution

1. Add agent_name to nip46.json

{
  "signer_npub": "npub1...",
  "agent_npub": "npub1...",
  "agent_name": "Hermes",
  "relay": "wss://relay.damus.io"
}

2. Update init command

Add optional --name flag:

avault init --signer-npub npub1... --name "Hermes"

Or auto-detect from environment/hostname if not provided.

3. Include metadata in nostrconnect:// URI

When generating the QR code for Amber to scan:

metadata = json.dumps({"name": config["agent_name"]})
uri = f"nostrconnect://{agent_hex}?relay={relay}&metadata={urllib.parse.quote(metadata)}"

Result

Amber displays "Hermes" (or configured name) in the connected apps list instead of "f9fa1b...".

Testing Confirmed

Tested with Amber - when metadata={"name":"Hermes"} is included in the nostrconnect:// URI, Amber correctly displays the name.


Discovered during testing by Hermes 🪽

## Problem When connecting to Amber via NIP-46, the app shows up with the hex pubkey prefix (e.g., "f9fa1b...") instead of a friendly name. ## Proposed Solution ### 1. Add `agent_name` to nip46.json ```json { "signer_npub": "npub1...", "agent_npub": "npub1...", "agent_name": "Hermes", "relay": "wss://relay.damus.io" } ``` ### 2. Update `init` command Add optional `--name` flag: ```bash avault init --signer-npub npub1... --name "Hermes" ``` Or auto-detect from environment/hostname if not provided. ### 3. Include metadata in nostrconnect:// URI When generating the QR code for Amber to scan: ```python metadata = json.dumps({"name": config["agent_name"]}) uri = f"nostrconnect://{agent_hex}?relay={relay}&metadata={urllib.parse.quote(metadata)}" ``` ## Result Amber displays "Hermes" (or configured name) in the connected apps list instead of "f9fa1b...". ## Testing Confirmed Tested with Amber - when `metadata={"name":"Hermes"}` is included in the nostrconnect:// URI, Amber correctly displays the name. --- *Discovered during testing by Hermes 🪽*
nazim closed this issue 2026-02-20 15:35:26 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nazim/avault#8
No description provided.