AppleSauce
    Preparing search index...

    Class NostrConnectSigner

    Implements

    Index

    Constructors

    Properties

    auths: Set<string> = ...
    clientSecret: string = ...

    A secret used when initiating a connection from the client side

    isConnected: boolean = false

    Whether the signer is connected to the remote signer

    listening: boolean = false

    Whether the signer is listening for events

    log: Debugger = ...
    nip04?: {
        decrypt: (
            pubkey: string,
            ciphertext: string,
        ) => string | Promise<string>;
        encrypt: (pubkey: string, plaintext: string) => string | Promise<string>;
    }
    nip44?: {
        decrypt: (
            pubkey: string,
            ciphertext: string,
        ) => string | Promise<string>;
        encrypt: (pubkey: string, plaintext: string) => string | Promise<string>;
    }
    onAuth: (url: string) => Promise<void> = defaultHandleAuth

    A method for handling "auth" requests

    pubkey?: string

    The users pubkey

    publishMethod: NostrPublishMethod

    A method that is called when an event needs to be published

    relays: string[]

    Relays to communicate over

    remote?: string

    The remote signer pubkey

    req?: Unsubscribable

    The currently active REQ subscription

    requests: Map<string, Deferred<any>> = ...
    signer: SimpleSigner

    The local client signer

    subscriptionMethod: NostrSubscriptionMethod

    The active nostr subscription

    verifyEvent: (event: Event) => event is VerifiedEvent = verifyEvent
    publishMethod: undefined | NostrPublishMethod = undefined

    A fallback method to use for publishMethod if none is pass in when creating the signer

    subscriptionMethod: undefined | NostrSubscriptionMethod = undefined

    A fallback method to use for subscriptionMethod if none is pass in when creating the signer

    Accessors

    Methods

    • Request to create an account on the remote signer

      Parameters

      • username: string
      • domain: string
      • Optionalemail: string
      • Optionalpermissions: string[]

      Returns Promise<string>

    • Parameters

      • content: string
      • target: undefined | string = ...
      • kind: number = kinds.NostrConnect

      Returns Promise<VerifiedEvent>

    • Request to sign an event

      Parameters

      • template: EventTemplate & { pubkey?: string }

      Returns Promise<VerifiedEvent>