Interface QueryOptions

Hierarchy

  • QueryOptions

Properties

callback?: ((messages: waku_message.WakuMessage[]) => boolean | void)

Type declaration

    • (messages: waku_message.WakuMessage[]): boolean | void
    • Callback called on pages of stored messages as they are retrieved.

      Allows for a faster access to the results as it is called as soon as a page is received. Traversal of the pages is done automatically so this function will invoked for each retrieved page.

      If the call on a page returns true, then traversal of the pages is aborted. For example, this can be used for the caller to stop the query after a specific message is found.

      Parameters

      Returns boolean | void

decryptionParams?: DecryptionParams[]

Keys that will be used to decrypt messages.

It can be Asymmetric Private Keys and Symmetric Keys in the same array, all keys will be tried with both methods.

pageDirection?: PageDirection

The direction in which pages are retrieved:

Note: This does not affect the ordering of messages with the page (oldest message is always first).

Default

BACKWARD

pageSize?: number

The number of message per page.

Default

DefaultPageSize

peerId?: PeerId

The peer to query. If undefined, a pseudo-random peer is selected from the connected Waku Store peers.

pubSubTopic?: string

The pubsub topic to pass to the query. See Waku v2 Topic Usage Recommendations.

timeFilter?: TimeFilter

Retrieve messages with a timestamp within the provided values.

Generated using TypeDoc