mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-17 05:03:11 +00:00
* feat: write proto * chore: move store v2 to a subdir * chore: update v3 proto * feat: create custom RPC * feat: implement storev3 core * chore: set store v3 as default * chore: move v2 related code * chore: update v2 imports * feat: add store-v3 sdk implementation * fix: rebase * chore: add ts-doc for store query request params * chore: update tests for new API * fix: use nanoseconds instead of millisecond for timerange * chore: improve store * chore: remove store v2 * chore: update tests * chore: fix legacy imports & proto * tests: remove manual reversal as its part of the API, update incorrect cursor error msg * chore: update default page size * chore: account for MAX_PAGE_SIZE from nwaku * fix: test * fix: sorting tests
42 lines
1.2 KiB
Protocol Buffer
42 lines
1.2 KiB
Protocol Buffer
// Protocol identifier: /vac/waku/store-query/3.0.0
|
|
syntax = "proto3";
|
|
|
|
import "message.proto";
|
|
|
|
message WakuMessageKeyValue {
|
|
optional bytes message_hash = 1; // Globally unique key for a Waku Message
|
|
|
|
// Full message content and associated pubsub_topic as value
|
|
optional WakuMessage message = 2;
|
|
optional string pubsub_topic = 3;
|
|
}
|
|
|
|
message StoreQueryRequest {
|
|
string request_id = 1;
|
|
bool include_data = 2; // Response should include full message content
|
|
|
|
// Filter criteria for content-filtered queries
|
|
optional string pubsub_topic = 10;
|
|
repeated string content_topics = 11;
|
|
optional sint64 time_start = 12;
|
|
optional sint64 time_end = 13;
|
|
|
|
// List of key criteria for lookup queries
|
|
repeated bytes message_hashes = 20; // Message hashes (keys) to lookup
|
|
|
|
// Pagination info. 50 Reserved
|
|
optional bytes pagination_cursor = 51; // Message hash (key) from where to start query (exclusive)
|
|
bool pagination_forward = 52;
|
|
optional uint64 pagination_limit = 53;
|
|
}
|
|
|
|
message StoreQueryResponse {
|
|
string request_id = 1;
|
|
|
|
optional uint32 status_code = 10;
|
|
optional string status_desc = 11;
|
|
|
|
repeated WakuMessageKeyValue messages = 20;
|
|
|
|
optional bytes pagination_cursor = 51;
|
|
} |