Skip to main content

Module nip07

Module nip07 

Source
Expand description

NIP-07 browser signer — a window.nostr extension (Alby, nos2x, …) in the page hosting a web build.

Like NIP-55 the account keeps nothing secret on this device; the identity key stays in the extension. The page owns window.nostr while vector-core may run elsewhere (a worker), so Nip07Backend is a request/response hook the host registers: it forwards each call to the page and resolves with the extension’s answer.

Only extensions with NIP-44 qualify: gift-wrapped DMs need it.

Structs§

Nip07Signer
A VectorSigner over the page’s extension. Cheap to clone.

Traits§

Nip07Backend
The host transport to the page’s window.nostr.

Functions§

nip07_backend
nip07_get_public_key
Ask the extension for its identity. Used at pairing and re-authorization.
set_nip07_backend
Register the page transport. Only a web host has one.