mirror of
https://github.com/waku-org/js-waku.git
synced 2025-01-11 13:04:41 +00:00
New pubsub_topic
field on the cursor
of Waku Store queries (#596)
This commit is contained in:
parent
09c269da7f
commit
ad5b3ddc7f
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- New `pubsub_topic` field on the `cursor` of Waku Store queries ([#585](https://github.com/status-im/js-waku/issues/595)).
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Add `exports` to `package.json` for NodeJS usage (not officially supported but helpful for experiments).
|
- Add `exports` to `package.json` for NodeJS usage (not officially supported but helpful for experiments).
|
||||||
|
@ -8,6 +8,7 @@ message Index {
|
|||||||
bytes digest = 1;
|
bytes digest = 1;
|
||||||
sint64 received_time = 2;
|
sint64 received_time = 2;
|
||||||
sint64 sender_time = 3;
|
sint64 sender_time = 3;
|
||||||
|
string pubsub_topic = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message PagingInfo {
|
message PagingInfo {
|
||||||
|
@ -9,6 +9,7 @@ export interface Index {
|
|||||||
digest: Uint8Array;
|
digest: Uint8Array;
|
||||||
receivedTime: Long;
|
receivedTime: Long;
|
||||||
senderTime: Long;
|
senderTime: Long;
|
||||||
|
pubsubTopic: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PagingInfo {
|
export interface PagingInfo {
|
||||||
@ -118,6 +119,7 @@ function createBaseIndex(): Index {
|
|||||||
digest: new Uint8Array(),
|
digest: new Uint8Array(),
|
||||||
receivedTime: Long.ZERO,
|
receivedTime: Long.ZERO,
|
||||||
senderTime: Long.ZERO,
|
senderTime: Long.ZERO,
|
||||||
|
pubsubTopic: "",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,6 +134,9 @@ export const Index = {
|
|||||||
if (!message.senderTime.isZero()) {
|
if (!message.senderTime.isZero()) {
|
||||||
writer.uint32(24).sint64(message.senderTime);
|
writer.uint32(24).sint64(message.senderTime);
|
||||||
}
|
}
|
||||||
|
if (message.pubsubTopic !== "") {
|
||||||
|
writer.uint32(34).string(message.pubsubTopic);
|
||||||
|
}
|
||||||
return writer;
|
return writer;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -151,6 +156,9 @@ export const Index = {
|
|||||||
case 3:
|
case 3:
|
||||||
message.senderTime = reader.sint64() as Long;
|
message.senderTime = reader.sint64() as Long;
|
||||||
break;
|
break;
|
||||||
|
case 4:
|
||||||
|
message.pubsubTopic = reader.string();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
reader.skipType(tag & 7);
|
reader.skipType(tag & 7);
|
||||||
break;
|
break;
|
||||||
@ -170,6 +178,7 @@ export const Index = {
|
|||||||
senderTime: isSet(object.senderTime)
|
senderTime: isSet(object.senderTime)
|
||||||
? Long.fromString(object.senderTime)
|
? Long.fromString(object.senderTime)
|
||||||
: Long.ZERO,
|
: Long.ZERO,
|
||||||
|
pubsubTopic: isSet(object.pubsubTopic) ? String(object.pubsubTopic) : "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -183,6 +192,8 @@ export const Index = {
|
|||||||
(obj.receivedTime = (message.receivedTime || Long.ZERO).toString());
|
(obj.receivedTime = (message.receivedTime || Long.ZERO).toString());
|
||||||
message.senderTime !== undefined &&
|
message.senderTime !== undefined &&
|
||||||
(obj.senderTime = (message.senderTime || Long.ZERO).toString());
|
(obj.senderTime = (message.senderTime || Long.ZERO).toString());
|
||||||
|
message.pubsubTopic !== undefined &&
|
||||||
|
(obj.pubsubTopic = message.pubsubTopic);
|
||||||
return obj;
|
return obj;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -197,6 +208,7 @@ export const Index = {
|
|||||||
object.senderTime !== undefined && object.senderTime !== null
|
object.senderTime !== undefined && object.senderTime !== null
|
||||||
? Long.fromValue(object.senderTime)
|
? Long.fromValue(object.senderTime)
|
||||||
: Long.ZERO;
|
: Long.ZERO;
|
||||||
|
message.pubsubTopic = object.pubsubTopic ?? "";
|
||||||
return message;
|
return message;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user