Skip to Content
本页目录

Nostr

使用 OneKey Provider 集成 Nostr 功能。

快速链接

最小示例

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)

事件

  • accountChanged 通知详见事件。

常见错误

  • 4001:用户拒绝
  • 无效参数:需符合 NIP-07 规范
最后更新于