n_signer USB Test

Connection

Connect to the signer (Teensy 4.1 USB CDC, CYD CH340 serial, etc.) via Web Serial, then exercise every algorithm and verb in the n_signer API. Chrome/Edge/Brave/Opera only.

Disconnected

    

get_info (version / capabilities)

No approval required. Safe to call before the mnemonic is loaded.


    

get_public_key (algorithm)


    

nostr_get_public_key


    

sign / verify


    

encapsulate / decapsulate (ml-kem-768)


    

derive_shared_secret (x25519)


    

derive (secp256k1 HMAC-SHA256)


    

nostr_sign_event


    

nostr_mine_event

Slow on ESP32 — uses single-threaded PoW. Keep difficulty low.


    

nostr_nip04_encrypt / decrypt


    

nostr_nip44_encrypt / decrypt


    

encrypt / decrypt (otp)

OTP pad is bound from the SD card (Teensy 4.1) or derived from the mnemonic (CYD). Offset advances monotonically.


    
n_signer
ready
Web Serial

n_signer USB Test

A browser control panel for any n_signer hardware signer (Teensy 4.1, CYD ESP32-2432S028, etc.). Speaks the n_signer JSON-RPC protocol over Web Serial at 115200 baud.

Getting started

1. Plug the signer into a USB port (Teensy 4.1 enumerates as /dev/ttyACM*, CYD CH340 enumerates as /dev/ttyUSB*).

2. Click Connect Web Serial and pick the signer's port.

3. get_info fires automatically and reports firmware version + supported verbs.

4. Enter a mnemonic on the signer's touchscreen to enable the signing verbs.

Auth envelope

Every request is signed with a demo secp256k1 key (priv = 0x0102…2020). The signer verifies the kind-27235 auth event and replays-protects by event id.

Transports

Frames are 4-byte big-endian length + UTF-8 JSON payload. Same wire format as the host Unix-socket and TCP transports.

demo v1