Files
welshman/docs/signer/index.md
T
2025-04-09 11:17:12 -07:00

981 B

@welshman/signer

version

A Nostr signer implementation that supports multiple authentication methods and encryption standards.

What's Included

  • ISigner Interface - Unified API across all authentication methods
  • NIP-01 Signer - Core implementation using key-pair cryptography
  • NIP-07 Signer - Browser extension support (nos2x, Alby, etc.)
  • NIP-46 Signer - Remote signing with Nostr Connect protocol
  • NIP-55 Signer - Native app integration via Capacitor
  • NIP-59 Utils - Gift Wrap protocol for secure event encryption

Quick Example

import { makeEvent } from '@welshman/util'
import { ISigner, Nip01Signer, makeSecret } from '@welshman/signer'

const signer: ISigner = new Nip01Signer(makeSecret())

signer.sign(makeEvent(1)).then(signedEvent => console.log(signedEvent))

Installation

npm install @welshman/signer