Class NostrStore<T>

Type Parameters

  • T extends Record<string, any>

Hierarchy

Constructors

  • Type Parameters

    • T extends Record<string, any>

    Parameters

    Returns NostrStore<T>

Properties

_buffer?: Timeout
_data: null | T
_events: Map<"close" | "error" | "ready" | "reject" | "fetch" | "update", Set<Function>>
_filter: null | EventFilter
_init: boolean
_opt: StoreConfig<T>
_prev: null | T
_secret: null | Buff
_signer: SignerAPI
_socket: null | NostrSocket
_updated: null | number
log: {
    debug: ((...s) => null | void);
    info: ((...s) => null | void);
} = ...

Type declaration

  • debug: ((...s) => null | void)
      • (...s): null | void
      • Parameters

        • Rest ...s: unknown[]

        Returns null | void

  • info: ((...s) => null | void)
      • (...s): null | void
      • Parameters

        • Rest ...s: unknown[]

        Returns null | void

list: ((address, signer, filter?, options?) => Promise<StoreItem[]>) = fetch_stores

Type declaration

    • (address, signer, filter?, options?): Promise<StoreItem[]>
    • Fetch a list of recoverable stores from the relay.

      Parameters

      Returns Promise<StoreItem[]>

Accessors

Methods

  • Returns IterableIterator<[string, any]>

  • Parameters

    • err: unknown
    • data: unknown

    Returns void

  • Parameters

    • event: string

    Returns Set<Function>

  • Parameters

    • secret: string

    Returns void

  • Parameters

    • event: string

    Returns void

  • Type Parameters

    • K extends "close" | "error" | "ready" | "reject" | "fetch" | "update"

    Parameters

    Returns void

  • Type Parameters

    • K extends "close" | "error" | "ready" | "reject" | "fetch" | "update"

    Parameters

    • topic: K

    Returns boolean

  • Type Parameters

    • K extends "close" | "error" | "ready" | "reject" | "fetch" | "update"

    Parameters

    • event: K
    • method: ((args) => void | Promise<void>)
        • (args): void | Promise<void>
        • Parameters

          Returns void | Promise<void>

    Returns void

  • Type Parameters

    • K extends "close" | "error" | "ready" | "reject" | "fetch" | "update"

    Parameters

    • event: K
    • method: ((args) => void | Promise<void>)
        • (args): void | Promise<void>
        • Parameters

          Returns void | Promise<void>

    Returns void

  • Type Parameters

    • K extends "close" | "error" | "ready" | "reject" | "fetch" | "update"

    Parameters

    • event: string
    • method: ((args) => void | Promise<void>)
        • (args): void | Promise<void>
        • Parameters

          Returns void | Promise<void>

    Returns void

  • Type Parameters

    • K extends "close" | "error" | "ready" | "reject" | "fetch" | "update"

    Parameters

    • event: K
    • method: ((args) => void | Promise<void>)
        • (args): void | Promise<void>
        • Parameters

          Returns void | Promise<void>

    • timeout: number

    Returns void

Generated using TypeDoc