Skip to content

docs: add Nip46Lab as a neutral reference client for NIP-46 triage#21

Merged
DocNR merged 1 commit into
mainfrom
docs/nip46lab-reference-client
May 1, 2026
Merged

docs: add Nip46Lab as a neutral reference client for NIP-46 triage#21
DocNR merged 1 commit into
mainfrom
docs/nip46lab-reference-client

Conversation

@DocNR
Copy link
Copy Markdown
Owner

@DocNR DocNR commented Apr 30, 2026

Summary

  • Adds Reference test clients section to docs/nip46-compatibility.md, positioning Nip46Lab (browser-based NIP-46 testbench) and Amber (Android signer) as complementary triage tools — Nip46Lab confirms the bug is on the signer side, Amber confirms the bug is on the client side.
  • Extends Triage guide Step 1's "Only Clave fails" bullet with an optional Nip46Lab reproduction path. If Nip46Lab also fails the same way against Clave, that strongly confirms the bug is signer-side rather than in the original client's NIP-46 layer.
  • Expands the NIP-46 interop issue template "Already triaged?" hint with concrete examples (two-signer test, Nip46Lab reference test).

Why

The triage guide's Step 1 currently routes everyone to "test against another signer" — which means installing Amber on Android. Nip46Lab is a single-page HTML testbench (no install) by greenart7c3 (also Amber's author), giving us the inverse direction: a neutral client in a browser tab. Closes a real diagnostic gap for incoming nip46-compat-labeled issues.

No matrix row added — Nip46Lab is a debug tool, not an end-user client to interop with.

Validation

Manually exercised the bunker:// flow end-to-end against Clave build 31 before adding the recommendation. Per-RPC results:

RPC Result
connect Secret echo accepted (the JS equivalent of the rust-nostr to_ack()? parser trip-wire is not present in Nip46Lab)
get_public_key Returns signer pubkey, reproducible across multiple calls
ping Returns pong
sign_event (kind 1) Returns valid Schnorr-signed event
switch_relays Returns string "null" per PR #7 (Coracle/welshman fix)

Encrypt/decrypt RPCs were exercised with empty pubkey fields and Clave returned spec-shaped error messages ("Invalid public key" / "Invalid base64") — validates input handling. Happy-path encrypt/decrypt not tested due to a Nip46Lab UX gap (recipient field doesn't default to user pubkey); the underlying transport is exercised by every other RPC anyway.

Test plan

  • docs/nip46-compatibility.md renders correctly on github.com (markdown formatting matches surrounding sections)
  • All links resolve (Nip46Lab, Amber, internal anchors)
  • Issue template preview shows the updated "Already triaged?" hint without breaking existing fields
  • No regression — diff is additive only, except for the small Step 1 bullet revision

Notes

Nip46Lab itself is brand-new (created 2026-04-30, single commit). I observed two minor UI/state issues in Nip46Lab worth filing upstream separately:

  1. Re-init reuses the signer pubkey as the new ephemeral identity (causes self-loop events that get dropped silently)
  2. The encrypt/decrypt recipient field doesn't default to the user's own pubkey after get_public_key resolves — would enable one-click self-roundtrip testing

Neither affects this doc PR's recommendation since first-session bunker flow works correctly.

🤖 Generated with Claude Code

Adds a "Reference test clients" section to docs/nip46-compatibility.md
positioning Nip46Lab and Amber as complementary triage tools (Nip46Lab
verifies the signer-side; Amber verifies the client-side). Updates Triage
guide Step 1 with an optional Nip46Lab reproduction step, and extends the
"Already triaged?" hint in the NIP-46 interop issue template with concrete
examples of useful pre-filing narrowing.

Validated bunker:// flow against Clave build 31 — connect (secret echo
accepted), get_public_key, ping, sign_event, switch_relays all return
spec-shaped responses. Validation log: troubleshooting/2026-04-30-nip46lab-validation.md
in working notes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@DocNR DocNR merged commit bb39b7a into main May 1, 2026
@DocNR DocNR deleted the docs/nip46lab-reference-client branch May 1, 2026 01:20
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

Successfully merging this pull request may close these issues.

1 participant