AppleSauce
    Preparing search index...

    Class WalletService<Methods>

    NIP-47 Wallet Service implementation

    Type Parameters

    Index

    Constructors

    Properties

    client: string

    The client's public key

    events$: Observable<WalletRequestEvent> | null = null

    Shared observable for all wallet request events

    getInfo?: () => Promise<
        Partial<Omit<Helpers.WalletInfo, "methods" | "notifications">>,
    >

    A special method for getting the generic wallet information

    Map of method handlers

    log: Debugger = ...
    pubkey: string | null = 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<ArrayBufferLike>

    The client's secret key

    signer: EventSigner

    The signer used for creating and unlocking events

    subscription: Subscription | null = null

    Subscription to the events observable

    subscriptionMethod: NostrSubscriptionMethod

    A method for subscribing to relays

    Wallet support information

    pool: NostrPool | undefined = undefined

    A fallback pool to use if none is pass in when creating the signer

    publishMethod: NostrPublishMethod | undefined = undefined

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

    subscriptionMethod: NostrSubscriptionMethod | undefined = undefined

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

    Methods

    • Get the connection URI for the service

      Returns string

    • 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>