A signer that works with nostr-signing-device

Implements

Constructors

Properties

lastCommand: null | Deferred<string> = null
log: Debugger = ...
nip04: {
    decrypt: (
        pubkey: string,
        ciphertext: string,
    ) => string | Promise<string>;
    encrypt: (pubkey: string, plaintext: string) => string | Promise<string>;
}
pubkey?: string
verifyEvent: (event: Event) => event is VerifiedEvent = verifyEvent
writer: null | WritableStreamDefaultWriter<string> = null
METHOD_LOG: string = "/log"
METHOD_PING: string = "/ping"
METHOD_PUBLIC_KEY: string = "/public-key"
METHOD_RESTORE: string = "/restore"
METHOD_SHARED_SECRET: string = "/shared-secret"
METHOD_SIGN_MESSAGE: string = "/sign-message"
PUBLIC_METHODS: string[] = ...
SUPPORTED: boolean = ...

Accessors

Methods

  • Parameters

    • reader: ReadableStreamDefaultReader<string>

    Returns (separator?: string) => Promise<{ done: boolean; value: string }>

  • Requires the device to sign an event

    Parameters

    • draft: EventTemplate & { pubkey?: string }

    Returns Promise<VerifiedEvent>