Documentation
    Preparing search index...

    Class Store

    StoreSDK is an implementation of the IStoreSDK interface. It provides methods to interact with the Waku Store protocol.

    Implements

    Index

    Constructors

    • Parameters

      • params: StoreConstructorParams

      Returns Store

    Accessors

    • get multicodec(): string

      Returns string

    Methods

    • Creates a cursor based on the provided decoded message.

      Parameters

      Returns StoreCursor

      A StoreCursor representing the message.

    • Queries the Waku Store for historical messages using the provided decoders and options. Returns an asynchronous generator that yields promises of decoded messages.

      Type Parameters

      Parameters

      Returns AsyncGenerator<Promise<undefined | T>[]>

      An asynchronous generator of promises of decoded messages.

      If no peers are available to query or if an error occurs during the query.

    • Queries the Waku Store for historical messages and processes them with the provided callback in order.

      Type Parameters

      Parameters

      • decoders: IDecoder<T>[]

        An array of message decoders.

      • callback: (message: T) => boolean | void | Promise<boolean | void>

        A callback function to process each decoded message.

      • Optionaloptions: Partial<QueryRequestParams>

        Optional query parameters.

      Returns Promise<void>

      A promise that resolves when the query and message processing are completed.

    • Queries the Waku Store for historical messages and processes them with the provided callback using promises.

      Type Parameters

      Parameters

      • decoders: IDecoder<T>[]

        An array of message decoders.

      • callback: (message: Promise<undefined | T>) => boolean | void | Promise<boolean | void>

        A callback function to process each promise of a decoded message.

      • Optionaloptions: Partial<QueryRequestParams>

        Optional query parameters.

      Returns Promise<void>

      A promise that resolves when the query and message processing are completed.

    • Returns void