@waku/core 0.0.31-1887f4f.0 → 0.0.31-88a29c3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/{base_protocol-WTp5jKZK.js → base_protocol-0VPHaGce.js} +1 -1
- package/bundle/{index-COT0phC8.js → index-D-yd4hdM.js} +13 -7
- package/bundle/index.js +168 -104
- package/bundle/lib/base_protocol.js +2 -2
- package/bundle/lib/message/version_0.js +2 -2
- package/bundle/{version_0-SMRUXDNR.js → version_0-Du1FfEvY.js} +136 -295
- package/dist/.tsbuildinfo +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/health_manager.d.ts +14 -0
- package/dist/lib/health_manager.js +70 -0
- package/dist/lib/health_manager.js.map +1 -0
- package/dist/lib/store/index.d.ts +3 -43
- package/dist/lib/store/index.js +36 -44
- package/dist/lib/store/index.js.map +1 -1
- package/dist/lib/store/rpc.d.ts +22 -0
- package/dist/lib/store/rpc.js +74 -0
- package/dist/lib/store/rpc.js.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +2 -2
- package/src/lib/health_manager.ts +90 -0
- package/src/lib/store/index.ts +55 -92
- package/src/lib/store/rpc.ts +92 -0
- package/dist/lib/store/history_rpc.d.ts +0 -27
- package/dist/lib/store/history_rpc.js +0 -72
- package/dist/lib/store/history_rpc.js.map +0 -1
- package/src/lib/store/history_rpc.ts +0 -93
@@ -1,4 +1,4 @@
|
|
1
|
-
import { a as allocUnsafe, f as fromString, b as alloc$1, L as Logger, e as determinePubsubTopic } from './index-
|
1
|
+
import { a as allocUnsafe, f as fromString, b as alloc$1, L as Logger, e as determinePubsubTopic } from './index-D-yd4hdM.js';
|
2
2
|
|
3
3
|
/* eslint-disable no-fallthrough */
|
4
4
|
const N1 = Math.pow(2, 7);
|
@@ -2940,113 +2940,26 @@ var WakuMessage$1;
|
|
2940
2940
|
/* eslint-disable @typescript-eslint/no-namespace */
|
2941
2941
|
/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */
|
2942
2942
|
/* eslint-disable @typescript-eslint/no-empty-interface */
|
2943
|
-
var
|
2944
|
-
(function (
|
2943
|
+
var WakuMessageKeyValue;
|
2944
|
+
(function (WakuMessageKeyValue) {
|
2945
2945
|
let _codec;
|
2946
|
-
|
2946
|
+
WakuMessageKeyValue.codec = () => {
|
2947
2947
|
if (_codec == null) {
|
2948
2948
|
_codec = message$1((obj, w, opts = {}) => {
|
2949
2949
|
if (opts.lengthDelimited !== false) {
|
2950
2950
|
w.fork();
|
2951
2951
|
}
|
2952
|
-
if (
|
2952
|
+
if (obj.messageHash != null) {
|
2953
2953
|
w.uint32(10);
|
2954
|
-
w.bytes(obj.
|
2954
|
+
w.bytes(obj.messageHash);
|
2955
2955
|
}
|
2956
|
-
if (
|
2957
|
-
w.uint32(16);
|
2958
|
-
w.sint64(obj.receiverTime);
|
2959
|
-
}
|
2960
|
-
if ((obj.senderTime != null && obj.senderTime !== 0n)) {
|
2961
|
-
w.uint32(24);
|
2962
|
-
w.sint64(obj.senderTime);
|
2963
|
-
}
|
2964
|
-
if ((obj.pubsubTopic != null && obj.pubsubTopic !== '')) {
|
2965
|
-
w.uint32(34);
|
2966
|
-
w.string(obj.pubsubTopic);
|
2967
|
-
}
|
2968
|
-
if (opts.lengthDelimited !== false) {
|
2969
|
-
w.ldelim();
|
2970
|
-
}
|
2971
|
-
}, (reader, length, opts = {}) => {
|
2972
|
-
const obj = {
|
2973
|
-
digest: alloc$1(0),
|
2974
|
-
receiverTime: 0n,
|
2975
|
-
senderTime: 0n,
|
2976
|
-
pubsubTopic: ''
|
2977
|
-
};
|
2978
|
-
const end = length == null ? reader.len : reader.pos + length;
|
2979
|
-
while (reader.pos < end) {
|
2980
|
-
const tag = reader.uint32();
|
2981
|
-
switch (tag >>> 3) {
|
2982
|
-
case 1: {
|
2983
|
-
obj.digest = reader.bytes();
|
2984
|
-
break;
|
2985
|
-
}
|
2986
|
-
case 2: {
|
2987
|
-
obj.receiverTime = reader.sint64();
|
2988
|
-
break;
|
2989
|
-
}
|
2990
|
-
case 3: {
|
2991
|
-
obj.senderTime = reader.sint64();
|
2992
|
-
break;
|
2993
|
-
}
|
2994
|
-
case 4: {
|
2995
|
-
obj.pubsubTopic = reader.string();
|
2996
|
-
break;
|
2997
|
-
}
|
2998
|
-
default: {
|
2999
|
-
reader.skipType(tag & 7);
|
3000
|
-
break;
|
3001
|
-
}
|
3002
|
-
}
|
3003
|
-
}
|
3004
|
-
return obj;
|
3005
|
-
});
|
3006
|
-
}
|
3007
|
-
return _codec;
|
3008
|
-
};
|
3009
|
-
Index.encode = (obj) => {
|
3010
|
-
return encodeMessage(obj, Index.codec());
|
3011
|
-
};
|
3012
|
-
Index.decode = (buf, opts) => {
|
3013
|
-
return decodeMessage(buf, Index.codec(), opts);
|
3014
|
-
};
|
3015
|
-
})(Index || (Index = {}));
|
3016
|
-
var PagingInfo;
|
3017
|
-
(function (PagingInfo) {
|
3018
|
-
(function (Direction) {
|
3019
|
-
Direction["BACKWARD"] = "BACKWARD";
|
3020
|
-
Direction["FORWARD"] = "FORWARD";
|
3021
|
-
})(PagingInfo.Direction || (PagingInfo.Direction = {}));
|
3022
|
-
let __DirectionValues;
|
3023
|
-
(function (__DirectionValues) {
|
3024
|
-
__DirectionValues[__DirectionValues["BACKWARD"] = 0] = "BACKWARD";
|
3025
|
-
__DirectionValues[__DirectionValues["FORWARD"] = 1] = "FORWARD";
|
3026
|
-
})(__DirectionValues || (__DirectionValues = {}));
|
3027
|
-
(function (Direction) {
|
3028
|
-
Direction.codec = () => {
|
3029
|
-
return enumeration(__DirectionValues);
|
3030
|
-
};
|
3031
|
-
})(PagingInfo.Direction || (PagingInfo.Direction = {}));
|
3032
|
-
let _codec;
|
3033
|
-
PagingInfo.codec = () => {
|
3034
|
-
if (_codec == null) {
|
3035
|
-
_codec = message$1((obj, w, opts = {}) => {
|
3036
|
-
if (opts.lengthDelimited !== false) {
|
3037
|
-
w.fork();
|
3038
|
-
}
|
3039
|
-
if (obj.pageSize != null) {
|
3040
|
-
w.uint32(8);
|
3041
|
-
w.uint64(obj.pageSize);
|
3042
|
-
}
|
3043
|
-
if (obj.cursor != null) {
|
2956
|
+
if (obj.message != null) {
|
3044
2957
|
w.uint32(18);
|
3045
|
-
|
2958
|
+
WakuMessage.codec().encode(obj.message, w);
|
3046
2959
|
}
|
3047
|
-
if (obj.
|
3048
|
-
w.uint32(
|
3049
|
-
|
2960
|
+
if (obj.pubsubTopic != null) {
|
2961
|
+
w.uint32(26);
|
2962
|
+
w.string(obj.pubsubTopic);
|
3050
2963
|
}
|
3051
2964
|
if (opts.lengthDelimited !== false) {
|
3052
2965
|
w.ldelim();
|
@@ -3058,17 +2971,17 @@ var PagingInfo;
|
|
3058
2971
|
const tag = reader.uint32();
|
3059
2972
|
switch (tag >>> 3) {
|
3060
2973
|
case 1: {
|
3061
|
-
obj.
|
2974
|
+
obj.messageHash = reader.bytes();
|
3062
2975
|
break;
|
3063
2976
|
}
|
3064
2977
|
case 2: {
|
3065
|
-
obj.
|
3066
|
-
limits: opts.limits?.
|
2978
|
+
obj.message = WakuMessage.codec().decode(reader, reader.uint32(), {
|
2979
|
+
limits: opts.limits?.message
|
3067
2980
|
});
|
3068
2981
|
break;
|
3069
2982
|
}
|
3070
2983
|
case 3: {
|
3071
|
-
obj.
|
2984
|
+
obj.pubsubTopic = reader.string();
|
3072
2985
|
break;
|
3073
2986
|
}
|
3074
2987
|
default: {
|
@@ -3082,217 +2995,125 @@ var PagingInfo;
|
|
3082
2995
|
}
|
3083
2996
|
return _codec;
|
3084
2997
|
};
|
3085
|
-
|
3086
|
-
return encodeMessage(obj,
|
2998
|
+
WakuMessageKeyValue.encode = (obj) => {
|
2999
|
+
return encodeMessage(obj, WakuMessageKeyValue.codec());
|
3087
3000
|
};
|
3088
|
-
|
3089
|
-
return decodeMessage(buf,
|
3001
|
+
WakuMessageKeyValue.decode = (buf, opts) => {
|
3002
|
+
return decodeMessage(buf, WakuMessageKeyValue.codec(), opts);
|
3090
3003
|
};
|
3091
|
-
})(
|
3092
|
-
var
|
3093
|
-
(function (
|
3004
|
+
})(WakuMessageKeyValue || (WakuMessageKeyValue = {}));
|
3005
|
+
var StoreQueryRequest$1;
|
3006
|
+
(function (StoreQueryRequest) {
|
3094
3007
|
let _codec;
|
3095
|
-
|
3008
|
+
StoreQueryRequest.codec = () => {
|
3096
3009
|
if (_codec == null) {
|
3097
3010
|
_codec = message$1((obj, w, opts = {}) => {
|
3098
3011
|
if (opts.lengthDelimited !== false) {
|
3099
3012
|
w.fork();
|
3100
3013
|
}
|
3101
|
-
if ((obj.
|
3014
|
+
if ((obj.requestId != null && obj.requestId !== '')) {
|
3102
3015
|
w.uint32(10);
|
3103
|
-
w.string(obj.
|
3016
|
+
w.string(obj.requestId);
|
3104
3017
|
}
|
3105
|
-
if (
|
3106
|
-
w.
|
3018
|
+
if ((obj.includeData != null && obj.includeData !== false)) {
|
3019
|
+
w.uint32(16);
|
3020
|
+
w.bool(obj.includeData);
|
3107
3021
|
}
|
3108
|
-
|
3109
|
-
|
3110
|
-
|
3111
|
-
}
|
3112
|
-
|
3113
|
-
|
3114
|
-
|
3115
|
-
|
3116
|
-
case 1: {
|
3117
|
-
obj.contentTopic = reader.string();
|
3118
|
-
break;
|
3119
|
-
}
|
3120
|
-
default: {
|
3121
|
-
reader.skipType(tag & 7);
|
3122
|
-
break;
|
3123
|
-
}
|
3022
|
+
if (obj.pubsubTopic != null) {
|
3023
|
+
w.uint32(82);
|
3024
|
+
w.string(obj.pubsubTopic);
|
3025
|
+
}
|
3026
|
+
if (obj.contentTopics != null) {
|
3027
|
+
for (const value of obj.contentTopics) {
|
3028
|
+
w.uint32(90);
|
3029
|
+
w.string(value);
|
3124
3030
|
}
|
3125
3031
|
}
|
3126
|
-
|
3127
|
-
|
3128
|
-
|
3129
|
-
return _codec;
|
3130
|
-
};
|
3131
|
-
ContentFilter.encode = (obj) => {
|
3132
|
-
return encodeMessage(obj, ContentFilter.codec());
|
3133
|
-
};
|
3134
|
-
ContentFilter.decode = (buf, opts) => {
|
3135
|
-
return decodeMessage(buf, ContentFilter.codec(), opts);
|
3136
|
-
};
|
3137
|
-
})(ContentFilter || (ContentFilter = {}));
|
3138
|
-
var HistoryQuery;
|
3139
|
-
(function (HistoryQuery) {
|
3140
|
-
let _codec;
|
3141
|
-
HistoryQuery.codec = () => {
|
3142
|
-
if (_codec == null) {
|
3143
|
-
_codec = message$1((obj, w, opts = {}) => {
|
3144
|
-
if (opts.lengthDelimited !== false) {
|
3145
|
-
w.fork();
|
3032
|
+
if (obj.timeStart != null) {
|
3033
|
+
w.uint32(96);
|
3034
|
+
w.sint64(obj.timeStart);
|
3146
3035
|
}
|
3147
|
-
if (obj.
|
3148
|
-
w.uint32(
|
3149
|
-
w.
|
3036
|
+
if (obj.timeEnd != null) {
|
3037
|
+
w.uint32(104);
|
3038
|
+
w.sint64(obj.timeEnd);
|
3150
3039
|
}
|
3151
|
-
if (obj.
|
3152
|
-
for (const value of obj.
|
3153
|
-
w.uint32(
|
3154
|
-
|
3040
|
+
if (obj.messageHashes != null) {
|
3041
|
+
for (const value of obj.messageHashes) {
|
3042
|
+
w.uint32(162);
|
3043
|
+
w.bytes(value);
|
3155
3044
|
}
|
3156
3045
|
}
|
3157
|
-
if (obj.
|
3158
|
-
w.uint32(
|
3159
|
-
|
3046
|
+
if (obj.paginationCursor != null) {
|
3047
|
+
w.uint32(410);
|
3048
|
+
w.bytes(obj.paginationCursor);
|
3160
3049
|
}
|
3161
|
-
if (obj.
|
3162
|
-
w.uint32(
|
3163
|
-
w.
|
3050
|
+
if ((obj.paginationForward != null && obj.paginationForward !== false)) {
|
3051
|
+
w.uint32(416);
|
3052
|
+
w.bool(obj.paginationForward);
|
3164
3053
|
}
|
3165
|
-
if (obj.
|
3166
|
-
w.uint32(
|
3167
|
-
w.
|
3054
|
+
if (obj.paginationLimit != null) {
|
3055
|
+
w.uint32(424);
|
3056
|
+
w.uint64(obj.paginationLimit);
|
3168
3057
|
}
|
3169
3058
|
if (opts.lengthDelimited !== false) {
|
3170
3059
|
w.ldelim();
|
3171
3060
|
}
|
3172
3061
|
}, (reader, length, opts = {}) => {
|
3173
3062
|
const obj = {
|
3174
|
-
|
3063
|
+
requestId: '',
|
3064
|
+
includeData: false,
|
3065
|
+
contentTopics: [],
|
3066
|
+
messageHashes: [],
|
3067
|
+
paginationForward: false
|
3175
3068
|
};
|
3176
3069
|
const end = length == null ? reader.len : reader.pos + length;
|
3177
3070
|
while (reader.pos < end) {
|
3178
3071
|
const tag = reader.uint32();
|
3179
3072
|
switch (tag >>> 3) {
|
3180
|
-
case
|
3181
|
-
obj.
|
3073
|
+
case 1: {
|
3074
|
+
obj.requestId = reader.string();
|
3182
3075
|
break;
|
3183
3076
|
}
|
3184
|
-
case
|
3185
|
-
|
3186
|
-
throw new CodeError('decode error - map field "contentFilters" had too many elements', 'ERR_MAX_LENGTH');
|
3187
|
-
}
|
3188
|
-
obj.contentFilters.push(ContentFilter.codec().decode(reader, reader.uint32(), {
|
3189
|
-
limits: opts.limits?.contentFilters$
|
3190
|
-
}));
|
3077
|
+
case 2: {
|
3078
|
+
obj.includeData = reader.bool();
|
3191
3079
|
break;
|
3192
3080
|
}
|
3193
|
-
case
|
3194
|
-
obj.
|
3195
|
-
limits: opts.limits?.pagingInfo
|
3196
|
-
});
|
3081
|
+
case 10: {
|
3082
|
+
obj.pubsubTopic = reader.string();
|
3197
3083
|
break;
|
3198
3084
|
}
|
3199
|
-
case
|
3200
|
-
obj.
|
3085
|
+
case 11: {
|
3086
|
+
if (opts.limits?.contentTopics != null && obj.contentTopics.length === opts.limits.contentTopics) {
|
3087
|
+
throw new CodeError('decode error - map field "contentTopics" had too many elements', 'ERR_MAX_LENGTH');
|
3088
|
+
}
|
3089
|
+
obj.contentTopics.push(reader.string());
|
3201
3090
|
break;
|
3202
3091
|
}
|
3203
|
-
case
|
3204
|
-
obj.
|
3092
|
+
case 12: {
|
3093
|
+
obj.timeStart = reader.sint64();
|
3205
3094
|
break;
|
3206
3095
|
}
|
3207
|
-
|
3208
|
-
reader.
|
3096
|
+
case 13: {
|
3097
|
+
obj.timeEnd = reader.sint64();
|
3209
3098
|
break;
|
3210
3099
|
}
|
3211
|
-
|
3212
|
-
|
3213
|
-
|
3214
|
-
});
|
3215
|
-
}
|
3216
|
-
return _codec;
|
3217
|
-
};
|
3218
|
-
HistoryQuery.encode = (obj) => {
|
3219
|
-
return encodeMessage(obj, HistoryQuery.codec());
|
3220
|
-
};
|
3221
|
-
HistoryQuery.decode = (buf, opts) => {
|
3222
|
-
return decodeMessage(buf, HistoryQuery.codec(), opts);
|
3223
|
-
};
|
3224
|
-
})(HistoryQuery || (HistoryQuery = {}));
|
3225
|
-
var HistoryResponse;
|
3226
|
-
(function (HistoryResponse) {
|
3227
|
-
let HistoryError;
|
3228
|
-
(function (HistoryError) {
|
3229
|
-
HistoryError["NONE"] = "NONE";
|
3230
|
-
HistoryError["INVALID_CURSOR"] = "INVALID_CURSOR";
|
3231
|
-
HistoryError["TOO_MANY_REQUESTS"] = "TOO_MANY_REQUESTS";
|
3232
|
-
HistoryError["SERVICE_UNAVAILABLE"] = "SERVICE_UNAVAILABLE";
|
3233
|
-
})(HistoryError = HistoryResponse.HistoryError || (HistoryResponse.HistoryError = {}));
|
3234
|
-
let __HistoryErrorValues;
|
3235
|
-
(function (__HistoryErrorValues) {
|
3236
|
-
__HistoryErrorValues[__HistoryErrorValues["NONE"] = 0] = "NONE";
|
3237
|
-
__HistoryErrorValues[__HistoryErrorValues["INVALID_CURSOR"] = 1] = "INVALID_CURSOR";
|
3238
|
-
__HistoryErrorValues[__HistoryErrorValues["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
|
3239
|
-
__HistoryErrorValues[__HistoryErrorValues["SERVICE_UNAVAILABLE"] = 503] = "SERVICE_UNAVAILABLE";
|
3240
|
-
})(__HistoryErrorValues || (__HistoryErrorValues = {}));
|
3241
|
-
(function (HistoryError) {
|
3242
|
-
HistoryError.codec = () => {
|
3243
|
-
return enumeration(__HistoryErrorValues);
|
3244
|
-
};
|
3245
|
-
})(HistoryError = HistoryResponse.HistoryError || (HistoryResponse.HistoryError = {}));
|
3246
|
-
let _codec;
|
3247
|
-
HistoryResponse.codec = () => {
|
3248
|
-
if (_codec == null) {
|
3249
|
-
_codec = message$1((obj, w, opts = {}) => {
|
3250
|
-
if (opts.lengthDelimited !== false) {
|
3251
|
-
w.fork();
|
3252
|
-
}
|
3253
|
-
if (obj.messages != null) {
|
3254
|
-
for (const value of obj.messages) {
|
3255
|
-
w.uint32(18);
|
3256
|
-
WakuMessage.codec().encode(value, w);
|
3257
|
-
}
|
3258
|
-
}
|
3259
|
-
if (obj.pagingInfo != null) {
|
3260
|
-
w.uint32(26);
|
3261
|
-
PagingInfo.codec().encode(obj.pagingInfo, w);
|
3262
|
-
}
|
3263
|
-
if (obj.error != null && __HistoryErrorValues[obj.error] !== 0) {
|
3264
|
-
w.uint32(32);
|
3265
|
-
HistoryResponse.HistoryError.codec().encode(obj.error, w);
|
3266
|
-
}
|
3267
|
-
if (opts.lengthDelimited !== false) {
|
3268
|
-
w.ldelim();
|
3269
|
-
}
|
3270
|
-
}, (reader, length, opts = {}) => {
|
3271
|
-
const obj = {
|
3272
|
-
messages: [],
|
3273
|
-
error: HistoryError.NONE
|
3274
|
-
};
|
3275
|
-
const end = length == null ? reader.len : reader.pos + length;
|
3276
|
-
while (reader.pos < end) {
|
3277
|
-
const tag = reader.uint32();
|
3278
|
-
switch (tag >>> 3) {
|
3279
|
-
case 2: {
|
3280
|
-
if (opts.limits?.messages != null && obj.messages.length === opts.limits.messages) {
|
3281
|
-
throw new CodeError('decode error - map field "messages" had too many elements', 'ERR_MAX_LENGTH');
|
3100
|
+
case 20: {
|
3101
|
+
if (opts.limits?.messageHashes != null && obj.messageHashes.length === opts.limits.messageHashes) {
|
3102
|
+
throw new CodeError('decode error - map field "messageHashes" had too many elements', 'ERR_MAX_LENGTH');
|
3282
3103
|
}
|
3283
|
-
obj.
|
3284
|
-
limits: opts.limits?.messages$
|
3285
|
-
}));
|
3104
|
+
obj.messageHashes.push(reader.bytes());
|
3286
3105
|
break;
|
3287
3106
|
}
|
3288
|
-
case
|
3289
|
-
obj.
|
3290
|
-
limits: opts.limits?.pagingInfo
|
3291
|
-
});
|
3107
|
+
case 51: {
|
3108
|
+
obj.paginationCursor = reader.bytes();
|
3292
3109
|
break;
|
3293
3110
|
}
|
3294
|
-
case
|
3295
|
-
obj.
|
3111
|
+
case 52: {
|
3112
|
+
obj.paginationForward = reader.bool();
|
3113
|
+
break;
|
3114
|
+
}
|
3115
|
+
case 53: {
|
3116
|
+
obj.paginationLimit = reader.uint64();
|
3296
3117
|
break;
|
3297
3118
|
}
|
3298
3119
|
default: {
|
@@ -3306,17 +3127,17 @@ var HistoryResponse;
|
|
3306
3127
|
}
|
3307
3128
|
return _codec;
|
3308
3129
|
};
|
3309
|
-
|
3310
|
-
return encodeMessage(obj,
|
3130
|
+
StoreQueryRequest.encode = (obj) => {
|
3131
|
+
return encodeMessage(obj, StoreQueryRequest.codec());
|
3311
3132
|
};
|
3312
|
-
|
3313
|
-
return decodeMessage(buf,
|
3133
|
+
StoreQueryRequest.decode = (buf, opts) => {
|
3134
|
+
return decodeMessage(buf, StoreQueryRequest.codec(), opts);
|
3314
3135
|
};
|
3315
|
-
})(
|
3316
|
-
var
|
3317
|
-
(function (
|
3136
|
+
})(StoreQueryRequest$1 || (StoreQueryRequest$1 = {}));
|
3137
|
+
var StoreQueryResponse$1;
|
3138
|
+
(function (StoreQueryResponse) {
|
3318
3139
|
let _codec;
|
3319
|
-
|
3140
|
+
StoreQueryResponse.codec = () => {
|
3320
3141
|
if (_codec == null) {
|
3321
3142
|
_codec = message$1((obj, w, opts = {}) => {
|
3322
3143
|
if (opts.lengthDelimited !== false) {
|
@@ -3326,20 +3147,31 @@ var HistoryRpc$1;
|
|
3326
3147
|
w.uint32(10);
|
3327
3148
|
w.string(obj.requestId);
|
3328
3149
|
}
|
3329
|
-
if (obj.
|
3330
|
-
w.uint32(
|
3331
|
-
|
3150
|
+
if (obj.statusCode != null) {
|
3151
|
+
w.uint32(80);
|
3152
|
+
w.uint32(obj.statusCode);
|
3332
3153
|
}
|
3333
|
-
if (obj.
|
3334
|
-
w.uint32(
|
3335
|
-
|
3154
|
+
if (obj.statusDesc != null) {
|
3155
|
+
w.uint32(90);
|
3156
|
+
w.string(obj.statusDesc);
|
3157
|
+
}
|
3158
|
+
if (obj.messages != null) {
|
3159
|
+
for (const value of obj.messages) {
|
3160
|
+
w.uint32(162);
|
3161
|
+
WakuMessageKeyValue.codec().encode(value, w);
|
3162
|
+
}
|
3163
|
+
}
|
3164
|
+
if (obj.paginationCursor != null) {
|
3165
|
+
w.uint32(410);
|
3166
|
+
w.bytes(obj.paginationCursor);
|
3336
3167
|
}
|
3337
3168
|
if (opts.lengthDelimited !== false) {
|
3338
3169
|
w.ldelim();
|
3339
3170
|
}
|
3340
3171
|
}, (reader, length, opts = {}) => {
|
3341
3172
|
const obj = {
|
3342
|
-
requestId: ''
|
3173
|
+
requestId: '',
|
3174
|
+
messages: []
|
3343
3175
|
};
|
3344
3176
|
const end = length == null ? reader.len : reader.pos + length;
|
3345
3177
|
while (reader.pos < end) {
|
@@ -3349,16 +3181,25 @@ var HistoryRpc$1;
|
|
3349
3181
|
obj.requestId = reader.string();
|
3350
3182
|
break;
|
3351
3183
|
}
|
3352
|
-
case
|
3353
|
-
obj.
|
3354
|
-
limits: opts.limits?.query
|
3355
|
-
});
|
3184
|
+
case 10: {
|
3185
|
+
obj.statusCode = reader.uint32();
|
3356
3186
|
break;
|
3357
3187
|
}
|
3358
|
-
case
|
3359
|
-
obj.
|
3360
|
-
|
3361
|
-
|
3188
|
+
case 11: {
|
3189
|
+
obj.statusDesc = reader.string();
|
3190
|
+
break;
|
3191
|
+
}
|
3192
|
+
case 20: {
|
3193
|
+
if (opts.limits?.messages != null && obj.messages.length === opts.limits.messages) {
|
3194
|
+
throw new CodeError('decode error - map field "messages" had too many elements', 'ERR_MAX_LENGTH');
|
3195
|
+
}
|
3196
|
+
obj.messages.push(WakuMessageKeyValue.codec().decode(reader, reader.uint32(), {
|
3197
|
+
limits: opts.limits?.messages$
|
3198
|
+
}));
|
3199
|
+
break;
|
3200
|
+
}
|
3201
|
+
case 51: {
|
3202
|
+
obj.paginationCursor = reader.bytes();
|
3362
3203
|
break;
|
3363
3204
|
}
|
3364
3205
|
default: {
|
@@ -3372,13 +3213,13 @@ var HistoryRpc$1;
|
|
3372
3213
|
}
|
3373
3214
|
return _codec;
|
3374
3215
|
};
|
3375
|
-
|
3376
|
-
return encodeMessage(obj,
|
3216
|
+
StoreQueryResponse.encode = (obj) => {
|
3217
|
+
return encodeMessage(obj, StoreQueryResponse.codec());
|
3377
3218
|
};
|
3378
|
-
|
3379
|
-
return decodeMessage(buf,
|
3219
|
+
StoreQueryResponse.decode = (buf, opts) => {
|
3220
|
+
return decodeMessage(buf, StoreQueryResponse.codec(), opts);
|
3380
3221
|
};
|
3381
|
-
})(
|
3222
|
+
})(StoreQueryResponse$1 || (StoreQueryResponse$1 = {}));
|
3382
3223
|
var RateLimitProof;
|
3383
3224
|
(function (RateLimitProof) {
|
3384
3225
|
let _codec;
|
@@ -4056,4 +3897,4 @@ var version_0 = /*#__PURE__*/Object.freeze({
|
|
4056
3897
|
proto: message
|
4057
3898
|
});
|
4058
3899
|
|
4059
|
-
export { DecodedMessage as D, Encoder as E, FilterSubscribeRequest as F,
|
3900
|
+
export { DecodedMessage as D, Encoder as E, FilterSubscribeRequest as F, MessagePush as M, PushRpc$1 as P, StoreQueryRequest$1 as S, Version as V, WakuMetadataRequest as W, encode as a, FilterSubscribeResponse$1 as b, PushResponse as c, decode as d, encodingLength as e, StoreQueryResponse$1 as f, createEncoder as g, WakuMetadataResponse as h, createDecoder as i, Decoder as j, message as m, version_0 as v };
|