AppleSauce
    Preparing search index...

    NIP-47 Wallet Service implementation

    Index

    Constructors

    Properties

    events$: null | Observable<Event> = null

    Shared observable for all wallet request events

    Map of method handlers

    log: Debugger = ...
    pubkey: null | string = null

    The service's public key

    publishMethod: NostrPublishMethod

    A method for publishing events

    relays: string[]

    The relays to use for the service

    running: boolean = false

    Whether the service is currently running

    secret: Uint8Array

    The client's secret key

    signer: EventSigner

    The signer used for creating and unlocking events

    subscription: null | Subscription = null

    Subscription to the events observable

    subscriptionMethod: NostrSubscriptionMethod

    A method for subscribing to relays

    support: WalletSupport

    Wallet support information

    publishMethod: undefined | NostrPublishMethod = undefined

    A fallback method to use for publishMethod if none is passed in when creating the client

    subscriptionMethod: undefined | NostrSubscriptionMethod = undefined

    A fallback method to use for subscriptionMethod if none is passed in when creating the client

    Accessors

    Methods

    • Get the connection string for the service

      Returns string

    • Handle a wallet request event

      Parameters

      • requestEvent: Event

      Returns Promise<void>

    • Send a notification to the client

      Type Parameters

      Parameters

      • type: T["notification_type"]
      • notification: T["notification"]
      • legacy: boolean = false

      Returns Promise<void>

    • Publish the wallet support event

      Returns Promise<void>

    • Send an error response

      Parameters

      • requestEvent: Event
      • errorType: WalletErrorCode
      • errorMessage: string

      Returns Promise<void>

    • Send a success response

      Type Parameters

      Parameters

      • requestEvent: Event
      • method: T["result_type"]
      • result: T["result"]

      Returns Promise<void>