Skip to Content
dAppsNostr
On this page

Nostr

Integrate Nostr capabilities using OneKey’s provider.

Minimal pattern

const provider = window.$onekey?.nostr if (!provider) throw new Error('OneKey Nostr provider not detected') const pubkey = await provider.getPublicKey() // Example: sign an event (fill your own event fields) // const signed = await provider.signEvent(event)

Events

  • See Events for the accountChanged notification

Common errors

  • 4001: user rejected
  • Invalid params: match NIP‑07 expectations
Last updated on