Adds time-based query parameters to the store rpc api (#376)

* adds time window

* clarifies the sub-second precision of time values

* minor correction
This commit is contained in:
Sanaz Taheri Boshrooyeh 2021-05-21 10:35:43 -07:00 committed by GitHub
parent 7fe5140c25
commit 8ce881e8c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -51,6 +51,7 @@ Refer to [`Waku Message` specification](https://github.com/vacp2p/specs/blob/mas
| `payload` | `String` | mandatory | The message payload as a hex encoded data string | | `payload` | `String` | mandatory | The message payload as a hex encoded data string |
| `contentTopic` | `String` | optional | Message content topic for optional content-based filtering | | `contentTopic` | `String` | optional | Message content topic for optional content-based filtering |
| `version` | `Number` | optional | Message version. Used to indicate type of payload encryption. Default version is 0 (no payload encryption). | | `version` | `Number` | optional | Message version. Used to indicate type of payload encryption. Default version is 0 (no payload encryption). |
| `timestamp` | `Number` | optional | The time at which the message is generated by its sender. This field holds the Unix epoch time in seconds as a 64-bits float value. The fractional part represents sub-seconds. |
## Method naming ## Method naming
@ -220,6 +221,8 @@ The `get_waku_v2_store_v1_messages` method retrieves historical messages on spec
| ----: | :---: | :---: |----------- | | ----: | :---: | :---: |----------- |
| `pubsubTopic` | `String` | optional | The pubsub topic on which a [`WakuMessage`](#WakuMessage) is published | | `pubsubTopic` | `String` | optional | The pubsub topic on which a [`WakuMessage`](#WakuMessage) is published |
| `contentFilters` | `Array`[[`ContentFilter`](#contentfilter)] | optional | Array of content filters to query for historical messages | | `contentFilters` | `Array`[[`ContentFilter`](#contentfilter)] | optional | Array of content filters to query for historical messages |
| `startTime` | `Number`| optional | The inclusive lower bound on the [`timestamp`](/spec/14#Payloads) of queried [`WakuMessage`s](#WakuMessage). This parameter holds the Unix epoch time in seconds as a 64-bits float value. The fractional part represents sub-seconds. |
| `endTime` | `Number` | optional | The inclusive upper bound on the [`timestamp`](/spec/14#Payloads) of queried [`WakuMessage`s](#WakuMessage). This parameter holds the Unix epoch time in seconds as a 64-bits float value. The fractional part represents sub-seconds. |
| `pagingOptions` | [`PagingOptions`](#PagingOptions) | optional | Pagination information | | `pagingOptions` | [`PagingOptions`](#PagingOptions) | optional | Pagination information |
#### Response #### Response