@waku/core 0.0.36-76fb1ea.0 → 0.0.36-86bbf5b.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-DbwKyDLW.js → base_protocol-DvQrudwy.js} +1 -1
- package/bundle/{index-JnhMR9ZE.js → index-CTo1my9M.js} +1 -20
- package/bundle/index.js +44 -377
- package/bundle/lib/base_protocol.js +2 -2
- package/bundle/lib/message/version_0.js +2 -2
- package/bundle/{version_0-sWyv9XWm.js → version_0-CyeTW0Vr.js} +57 -780
- package/dist/.tsbuildinfo +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/connection_manager/connection_manager.d.ts +1 -1
- package/dist/lib/connection_manager/connection_manager.js +1 -1
- package/dist/lib/light_push/index.d.ts +1 -5
- package/dist/lib/light_push/index.js +1 -5
- package/dist/lib/light_push/index.js.map +1 -1
- package/dist/lib/light_push/light_push.d.ts +4 -3
- package/dist/lib/light_push/light_push.js +21 -12
- package/dist/lib/light_push/light_push.js.map +1 -1
- package/dist/lib/light_push/push_rpc.d.ts +1 -1
- package/dist/lib/light_push/push_rpc.js.map +1 -1
- package/dist/lib/light_push/utils.d.ts +0 -6
- package/dist/lib/light_push/utils.js +0 -41
- package/dist/lib/light_push/utils.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +0 -5
- package/src/lib/connection_manager/connection_manager.ts +1 -1
- package/src/lib/light_push/index.ts +1 -22
- package/src/lib/light_push/light_push.ts +25 -19
- package/src/lib/light_push/push_rpc.ts +1 -1
- package/src/lib/light_push/utils.ts +0 -57
- package/dist/lib/light_push/light_push_v3.d.ts +0 -9
- package/dist/lib/light_push/light_push_v3.js +0 -171
- package/dist/lib/light_push/light_push_v3.js.map +0 -1
- package/dist/lib/light_push/push_rpc_v2.d.ts +0 -11
- package/dist/lib/light_push/push_rpc_v2.js +0 -32
- package/dist/lib/light_push/push_rpc_v2.js.map +0 -1
- package/dist/lib/light_push/push_rpc_v3.d.ts +0 -11
- package/dist/lib/light_push/push_rpc_v3.js +0 -33
- package/dist/lib/light_push/push_rpc_v3.js.map +0 -1
- package/dist/lib/light_push/status_codes.d.ts +0 -14
- package/dist/lib/light_push/status_codes.js +0 -49
- package/dist/lib/light_push/status_codes.js.map +0 -1
- package/dist/lib/light_push/status_codes_v3.d.ts +0 -4
- package/dist/lib/light_push/status_codes_v3.js +0 -53
- package/dist/lib/light_push/status_codes_v3.js.map +0 -1
- package/src/lib/light_push/light_push_v3.ts +0 -232
- package/src/lib/light_push/push_rpc_v2.ts +0 -38
- package/src/lib/light_push/push_rpc_v3.ts +0 -46
- package/src/lib/light_push/status_codes.ts +0 -71
- package/src/lib/light_push/status_codes_v3.ts +0 -80
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { g as base256emoji, h as base64, i as base58, j as base36, k as base32, l as base16, m as base10, n as base8, o as base2, p as identityBase, L as Logger } from './index-CTo1my9M.js';
|
2
2
|
|
3
3
|
/**
|
4
4
|
* Returns a `Uint8Array` of the requested size. Referenced memory will
|
@@ -1530,7 +1530,7 @@ class MaxLengthError extends Error {
|
|
1530
1530
|
/* eslint-disable @typescript-eslint/no-namespace */
|
1531
1531
|
/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */
|
1532
1532
|
/* eslint-disable @typescript-eslint/no-empty-interface */
|
1533
|
-
var RateLimitProof$
|
1533
|
+
var RateLimitProof$4;
|
1534
1534
|
(function (RateLimitProof) {
|
1535
1535
|
let _codec;
|
1536
1536
|
RateLimitProof.codec = () => {
|
@@ -1629,8 +1629,8 @@ var RateLimitProof$6;
|
|
1629
1629
|
RateLimitProof.decode = (buf, opts) => {
|
1630
1630
|
return decodeMessage(buf, RateLimitProof.codec(), opts);
|
1631
1631
|
};
|
1632
|
-
})(RateLimitProof$
|
1633
|
-
var WakuMessage$
|
1632
|
+
})(RateLimitProof$4 || (RateLimitProof$4 = {}));
|
1633
|
+
var WakuMessage$4;
|
1634
1634
|
(function (WakuMessage) {
|
1635
1635
|
let _codec;
|
1636
1636
|
WakuMessage.codec = () => {
|
@@ -1661,7 +1661,7 @@ var WakuMessage$6;
|
|
1661
1661
|
}
|
1662
1662
|
if (obj.rateLimitProof != null) {
|
1663
1663
|
w.uint32(170);
|
1664
|
-
RateLimitProof$
|
1664
|
+
RateLimitProof$4.codec().encode(obj.rateLimitProof, w);
|
1665
1665
|
}
|
1666
1666
|
if (obj.ephemeral != null) {
|
1667
1667
|
w.uint32(248);
|
@@ -1700,7 +1700,7 @@ var WakuMessage$6;
|
|
1700
1700
|
break;
|
1701
1701
|
}
|
1702
1702
|
case 21: {
|
1703
|
-
obj.rateLimitProof = RateLimitProof$
|
1703
|
+
obj.rateLimitProof = RateLimitProof$4.codec().decode(reader, reader.uint32(), {
|
1704
1704
|
limits: opts.limits?.rateLimitProof
|
1705
1705
|
});
|
1706
1706
|
break;
|
@@ -1726,12 +1726,12 @@ var WakuMessage$6;
|
|
1726
1726
|
WakuMessage.decode = (buf, opts) => {
|
1727
1727
|
return decodeMessage(buf, WakuMessage.codec(), opts);
|
1728
1728
|
};
|
1729
|
-
})(WakuMessage$
|
1729
|
+
})(WakuMessage$4 || (WakuMessage$4 = {}));
|
1730
1730
|
|
1731
1731
|
var message = /*#__PURE__*/Object.freeze({
|
1732
1732
|
__proto__: null,
|
1733
|
-
get RateLimitProof () { return RateLimitProof$
|
1734
|
-
get WakuMessage () { return WakuMessage$
|
1733
|
+
get RateLimitProof () { return RateLimitProof$4; },
|
1734
|
+
get WakuMessage () { return WakuMessage$4; }
|
1735
1735
|
});
|
1736
1736
|
|
1737
1737
|
/* eslint-disable import/export */
|
@@ -1867,7 +1867,7 @@ var MessagePush$1;
|
|
1867
1867
|
if (obj.messages != null) {
|
1868
1868
|
for (const value of obj.messages) {
|
1869
1869
|
w.uint32(10);
|
1870
|
-
WakuMessage$
|
1870
|
+
WakuMessage$3.codec().encode(value, w);
|
1871
1871
|
}
|
1872
1872
|
}
|
1873
1873
|
if (opts.lengthDelimited !== false) {
|
@@ -1885,7 +1885,7 @@ var MessagePush$1;
|
|
1885
1885
|
if (opts.limits?.messages != null && obj.messages.length === opts.limits.messages) {
|
1886
1886
|
throw new MaxLengthError('Decode error - map field "messages" had too many elements');
|
1887
1887
|
}
|
1888
|
-
obj.messages.push(WakuMessage$
|
1888
|
+
obj.messages.push(WakuMessage$3.codec().decode(reader, reader.uint32(), {
|
1889
1889
|
limits: opts.limits?.messages$
|
1890
1890
|
}));
|
1891
1891
|
break;
|
@@ -1974,7 +1974,7 @@ var FilterRpc;
|
|
1974
1974
|
return decodeMessage(buf, FilterRpc.codec(), opts);
|
1975
1975
|
};
|
1976
1976
|
})(FilterRpc || (FilterRpc = {}));
|
1977
|
-
var RateLimitProof$
|
1977
|
+
var RateLimitProof$3;
|
1978
1978
|
(function (RateLimitProof) {
|
1979
1979
|
let _codec;
|
1980
1980
|
RateLimitProof.codec = () => {
|
@@ -2073,8 +2073,8 @@ var RateLimitProof$5;
|
|
2073
2073
|
RateLimitProof.decode = (buf, opts) => {
|
2074
2074
|
return decodeMessage(buf, RateLimitProof.codec(), opts);
|
2075
2075
|
};
|
2076
|
-
})(RateLimitProof$
|
2077
|
-
var WakuMessage$
|
2076
|
+
})(RateLimitProof$3 || (RateLimitProof$3 = {}));
|
2077
|
+
var WakuMessage$3;
|
2078
2078
|
(function (WakuMessage) {
|
2079
2079
|
let _codec;
|
2080
2080
|
WakuMessage.codec = () => {
|
@@ -2105,7 +2105,7 @@ var WakuMessage$5;
|
|
2105
2105
|
}
|
2106
2106
|
if (obj.rateLimitProof != null) {
|
2107
2107
|
w.uint32(170);
|
2108
|
-
RateLimitProof$
|
2108
|
+
RateLimitProof$3.codec().encode(obj.rateLimitProof, w);
|
2109
2109
|
}
|
2110
2110
|
if (obj.ephemeral != null) {
|
2111
2111
|
w.uint32(248);
|
@@ -2144,7 +2144,7 @@ var WakuMessage$5;
|
|
2144
2144
|
break;
|
2145
2145
|
}
|
2146
2146
|
case 21: {
|
2147
|
-
obj.rateLimitProof = RateLimitProof$
|
2147
|
+
obj.rateLimitProof = RateLimitProof$3.codec().decode(reader, reader.uint32(), {
|
2148
2148
|
limits: opts.limits?.rateLimitProof
|
2149
2149
|
});
|
2150
2150
|
break;
|
@@ -2170,7 +2170,7 @@ var WakuMessage$5;
|
|
2170
2170
|
WakuMessage.decode = (buf, opts) => {
|
2171
2171
|
return decodeMessage(buf, WakuMessage.codec(), opts);
|
2172
2172
|
};
|
2173
|
-
})(WakuMessage$
|
2173
|
+
})(WakuMessage$3 || (WakuMessage$3 = {}));
|
2174
2174
|
|
2175
2175
|
/* eslint-disable import/export */
|
2176
2176
|
/* eslint-disable complexity */
|
@@ -2399,7 +2399,7 @@ var MessagePush;
|
|
2399
2399
|
}
|
2400
2400
|
if (obj.wakuMessage != null) {
|
2401
2401
|
w.uint32(10);
|
2402
|
-
WakuMessage$
|
2402
|
+
WakuMessage$2.codec().encode(obj.wakuMessage, w);
|
2403
2403
|
}
|
2404
2404
|
if (obj.pubsubTopic != null) {
|
2405
2405
|
w.uint32(18);
|
@@ -2415,7 +2415,7 @@ var MessagePush;
|
|
2415
2415
|
const tag = reader.uint32();
|
2416
2416
|
switch (tag >>> 3) {
|
2417
2417
|
case 1: {
|
2418
|
-
obj.wakuMessage = WakuMessage$
|
2418
|
+
obj.wakuMessage = WakuMessage$2.codec().decode(reader, reader.uint32(), {
|
2419
2419
|
limits: opts.limits?.wakuMessage
|
2420
2420
|
});
|
2421
2421
|
break;
|
@@ -2442,7 +2442,7 @@ var MessagePush;
|
|
2442
2442
|
return decodeMessage(buf, MessagePush.codec(), opts);
|
2443
2443
|
};
|
2444
2444
|
})(MessagePush || (MessagePush = {}));
|
2445
|
-
var RateLimitProof$
|
2445
|
+
var RateLimitProof$2;
|
2446
2446
|
(function (RateLimitProof) {
|
2447
2447
|
let _codec;
|
2448
2448
|
RateLimitProof.codec = () => {
|
@@ -2541,8 +2541,8 @@ var RateLimitProof$4;
|
|
2541
2541
|
RateLimitProof.decode = (buf, opts) => {
|
2542
2542
|
return decodeMessage(buf, RateLimitProof.codec(), opts);
|
2543
2543
|
};
|
2544
|
-
})(RateLimitProof$
|
2545
|
-
var WakuMessage$
|
2544
|
+
})(RateLimitProof$2 || (RateLimitProof$2 = {}));
|
2545
|
+
var WakuMessage$2;
|
2546
2546
|
(function (WakuMessage) {
|
2547
2547
|
let _codec;
|
2548
2548
|
WakuMessage.codec = () => {
|
@@ -2573,7 +2573,7 @@ var WakuMessage$4;
|
|
2573
2573
|
}
|
2574
2574
|
if (obj.rateLimitProof != null) {
|
2575
2575
|
w.uint32(170);
|
2576
|
-
RateLimitProof$
|
2576
|
+
RateLimitProof$2.codec().encode(obj.rateLimitProof, w);
|
2577
2577
|
}
|
2578
2578
|
if (obj.ephemeral != null) {
|
2579
2579
|
w.uint32(248);
|
@@ -2612,7 +2612,7 @@ var WakuMessage$4;
|
|
2612
2612
|
break;
|
2613
2613
|
}
|
2614
2614
|
case 21: {
|
2615
|
-
obj.rateLimitProof = RateLimitProof$
|
2615
|
+
obj.rateLimitProof = RateLimitProof$2.codec().decode(reader, reader.uint32(), {
|
2616
2616
|
limits: opts.limits?.rateLimitProof
|
2617
2617
|
});
|
2618
2618
|
break;
|
@@ -2638,14 +2638,14 @@ var WakuMessage$4;
|
|
2638
2638
|
WakuMessage.decode = (buf, opts) => {
|
2639
2639
|
return decodeMessage(buf, WakuMessage.codec(), opts);
|
2640
2640
|
};
|
2641
|
-
})(WakuMessage$
|
2641
|
+
})(WakuMessage$2 || (WakuMessage$2 = {}));
|
2642
2642
|
|
2643
2643
|
/* eslint-disable import/export */
|
2644
2644
|
/* eslint-disable complexity */
|
2645
2645
|
/* eslint-disable @typescript-eslint/no-namespace */
|
2646
2646
|
/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */
|
2647
2647
|
/* eslint-disable @typescript-eslint/no-empty-interface */
|
2648
|
-
var PushRequest
|
2648
|
+
var PushRequest;
|
2649
2649
|
(function (PushRequest) {
|
2650
2650
|
let _codec;
|
2651
2651
|
PushRequest.codec = () => {
|
@@ -2654,29 +2654,31 @@ var PushRequest$1;
|
|
2654
2654
|
if (opts.lengthDelimited !== false) {
|
2655
2655
|
w.fork();
|
2656
2656
|
}
|
2657
|
-
if (obj.pubsubTopic != null) {
|
2658
|
-
w.uint32(
|
2657
|
+
if ((obj.pubsubTopic != null && obj.pubsubTopic !== '')) {
|
2658
|
+
w.uint32(10);
|
2659
2659
|
w.string(obj.pubsubTopic);
|
2660
2660
|
}
|
2661
2661
|
if (obj.message != null) {
|
2662
|
-
w.uint32(
|
2663
|
-
WakuMessage$
|
2662
|
+
w.uint32(18);
|
2663
|
+
WakuMessage$1.codec().encode(obj.message, w);
|
2664
2664
|
}
|
2665
2665
|
if (opts.lengthDelimited !== false) {
|
2666
2666
|
w.ldelim();
|
2667
2667
|
}
|
2668
2668
|
}, (reader, length, opts = {}) => {
|
2669
|
-
const obj = {
|
2669
|
+
const obj = {
|
2670
|
+
pubsubTopic: ''
|
2671
|
+
};
|
2670
2672
|
const end = length == null ? reader.len : reader.pos + length;
|
2671
2673
|
while (reader.pos < end) {
|
2672
2674
|
const tag = reader.uint32();
|
2673
2675
|
switch (tag >>> 3) {
|
2674
|
-
case
|
2676
|
+
case 1: {
|
2675
2677
|
obj.pubsubTopic = reader.string();
|
2676
2678
|
break;
|
2677
2679
|
}
|
2678
|
-
case
|
2679
|
-
obj.message = WakuMessage$
|
2680
|
+
case 2: {
|
2681
|
+
obj.message = WakuMessage$1.codec().decode(reader, reader.uint32(), {
|
2680
2682
|
limits: opts.limits?.message
|
2681
2683
|
});
|
2682
2684
|
break;
|
@@ -2698,8 +2700,8 @@ var PushRequest$1;
|
|
2698
2700
|
PushRequest.decode = (buf, opts) => {
|
2699
2701
|
return decodeMessage(buf, PushRequest.codec(), opts);
|
2700
2702
|
};
|
2701
|
-
})(PushRequest
|
2702
|
-
var PushResponse
|
2703
|
+
})(PushRequest || (PushRequest = {}));
|
2704
|
+
var PushResponse;
|
2703
2705
|
(function (PushResponse) {
|
2704
2706
|
let _codec;
|
2705
2707
|
PushResponse.codec = () => {
|
@@ -2708,39 +2710,31 @@ var PushResponse$1;
|
|
2708
2710
|
if (opts.lengthDelimited !== false) {
|
2709
2711
|
w.fork();
|
2710
2712
|
}
|
2711
|
-
if ((obj.
|
2712
|
-
w.uint32(
|
2713
|
-
w.
|
2714
|
-
}
|
2715
|
-
if (obj.statusDesc != null) {
|
2716
|
-
w.uint32(242);
|
2717
|
-
w.string(obj.statusDesc);
|
2713
|
+
if ((obj.isSuccess != null && obj.isSuccess !== false)) {
|
2714
|
+
w.uint32(8);
|
2715
|
+
w.bool(obj.isSuccess);
|
2718
2716
|
}
|
2719
|
-
if (obj.
|
2720
|
-
w.uint32(
|
2721
|
-
w.
|
2717
|
+
if (obj.info != null) {
|
2718
|
+
w.uint32(18);
|
2719
|
+
w.string(obj.info);
|
2722
2720
|
}
|
2723
2721
|
if (opts.lengthDelimited !== false) {
|
2724
2722
|
w.ldelim();
|
2725
2723
|
}
|
2726
2724
|
}, (reader, length, opts = {}) => {
|
2727
2725
|
const obj = {
|
2728
|
-
|
2726
|
+
isSuccess: false
|
2729
2727
|
};
|
2730
2728
|
const end = length == null ? reader.len : reader.pos + length;
|
2731
2729
|
while (reader.pos < end) {
|
2732
2730
|
const tag = reader.uint32();
|
2733
2731
|
switch (tag >>> 3) {
|
2734
|
-
case
|
2735
|
-
obj.
|
2736
|
-
break;
|
2737
|
-
}
|
2738
|
-
case 30: {
|
2739
|
-
obj.statusDesc = reader.string();
|
2732
|
+
case 1: {
|
2733
|
+
obj.isSuccess = reader.bool();
|
2740
2734
|
break;
|
2741
2735
|
}
|
2742
|
-
case
|
2743
|
-
obj.
|
2736
|
+
case 2: {
|
2737
|
+
obj.info = reader.string();
|
2744
2738
|
break;
|
2745
2739
|
}
|
2746
2740
|
default: {
|
@@ -2760,7 +2754,7 @@ var PushResponse$1;
|
|
2760
2754
|
PushResponse.decode = (buf, opts) => {
|
2761
2755
|
return decodeMessage(buf, PushResponse.codec(), opts);
|
2762
2756
|
};
|
2763
|
-
})(PushResponse
|
2757
|
+
})(PushResponse || (PushResponse = {}));
|
2764
2758
|
var PushRpc$1;
|
2765
2759
|
(function (PushRpc) {
|
2766
2760
|
let _codec;
|
@@ -2776,11 +2770,11 @@ var PushRpc$1;
|
|
2776
2770
|
}
|
2777
2771
|
if (obj.request != null) {
|
2778
2772
|
w.uint32(18);
|
2779
|
-
PushRequest
|
2773
|
+
PushRequest.codec().encode(obj.request, w);
|
2780
2774
|
}
|
2781
2775
|
if (obj.response != null) {
|
2782
2776
|
w.uint32(26);
|
2783
|
-
PushResponse
|
2777
|
+
PushResponse.codec().encode(obj.response, w);
|
2784
2778
|
}
|
2785
2779
|
if (opts.lengthDelimited !== false) {
|
2786
2780
|
w.ldelim();
|
@@ -2798,13 +2792,13 @@ var PushRpc$1;
|
|
2798
2792
|
break;
|
2799
2793
|
}
|
2800
2794
|
case 2: {
|
2801
|
-
obj.request = PushRequest
|
2795
|
+
obj.request = PushRequest.codec().decode(reader, reader.uint32(), {
|
2802
2796
|
limits: opts.limits?.request
|
2803
2797
|
});
|
2804
2798
|
break;
|
2805
2799
|
}
|
2806
2800
|
case 3: {
|
2807
|
-
obj.response = PushResponse
|
2801
|
+
obj.response = PushResponse.codec().decode(reader, reader.uint32(), {
|
2808
2802
|
limits: opts.limits?.response
|
2809
2803
|
});
|
2810
2804
|
break;
|
@@ -2827,723 +2821,6 @@ var PushRpc$1;
|
|
2827
2821
|
return decodeMessage(buf, PushRpc.codec(), opts);
|
2828
2822
|
};
|
2829
2823
|
})(PushRpc$1 || (PushRpc$1 = {}));
|
2830
|
-
var RateLimitProof$3;
|
2831
|
-
(function (RateLimitProof) {
|
2832
|
-
let _codec;
|
2833
|
-
RateLimitProof.codec = () => {
|
2834
|
-
if (_codec == null) {
|
2835
|
-
_codec = message$1((obj, w, opts = {}) => {
|
2836
|
-
if (opts.lengthDelimited !== false) {
|
2837
|
-
w.fork();
|
2838
|
-
}
|
2839
|
-
if ((obj.proof != null && obj.proof.byteLength > 0)) {
|
2840
|
-
w.uint32(10);
|
2841
|
-
w.bytes(obj.proof);
|
2842
|
-
}
|
2843
|
-
if ((obj.merkleRoot != null && obj.merkleRoot.byteLength > 0)) {
|
2844
|
-
w.uint32(18);
|
2845
|
-
w.bytes(obj.merkleRoot);
|
2846
|
-
}
|
2847
|
-
if ((obj.epoch != null && obj.epoch.byteLength > 0)) {
|
2848
|
-
w.uint32(26);
|
2849
|
-
w.bytes(obj.epoch);
|
2850
|
-
}
|
2851
|
-
if ((obj.shareX != null && obj.shareX.byteLength > 0)) {
|
2852
|
-
w.uint32(34);
|
2853
|
-
w.bytes(obj.shareX);
|
2854
|
-
}
|
2855
|
-
if ((obj.shareY != null && obj.shareY.byteLength > 0)) {
|
2856
|
-
w.uint32(42);
|
2857
|
-
w.bytes(obj.shareY);
|
2858
|
-
}
|
2859
|
-
if ((obj.nullifier != null && obj.nullifier.byteLength > 0)) {
|
2860
|
-
w.uint32(50);
|
2861
|
-
w.bytes(obj.nullifier);
|
2862
|
-
}
|
2863
|
-
if ((obj.rlnIdentifier != null && obj.rlnIdentifier.byteLength > 0)) {
|
2864
|
-
w.uint32(58);
|
2865
|
-
w.bytes(obj.rlnIdentifier);
|
2866
|
-
}
|
2867
|
-
if (opts.lengthDelimited !== false) {
|
2868
|
-
w.ldelim();
|
2869
|
-
}
|
2870
|
-
}, (reader, length, opts = {}) => {
|
2871
|
-
const obj = {
|
2872
|
-
proof: alloc$1(0),
|
2873
|
-
merkleRoot: alloc$1(0),
|
2874
|
-
epoch: alloc$1(0),
|
2875
|
-
shareX: alloc$1(0),
|
2876
|
-
shareY: alloc$1(0),
|
2877
|
-
nullifier: alloc$1(0),
|
2878
|
-
rlnIdentifier: alloc$1(0)
|
2879
|
-
};
|
2880
|
-
const end = length == null ? reader.len : reader.pos + length;
|
2881
|
-
while (reader.pos < end) {
|
2882
|
-
const tag = reader.uint32();
|
2883
|
-
switch (tag >>> 3) {
|
2884
|
-
case 1: {
|
2885
|
-
obj.proof = reader.bytes();
|
2886
|
-
break;
|
2887
|
-
}
|
2888
|
-
case 2: {
|
2889
|
-
obj.merkleRoot = reader.bytes();
|
2890
|
-
break;
|
2891
|
-
}
|
2892
|
-
case 3: {
|
2893
|
-
obj.epoch = reader.bytes();
|
2894
|
-
break;
|
2895
|
-
}
|
2896
|
-
case 4: {
|
2897
|
-
obj.shareX = reader.bytes();
|
2898
|
-
break;
|
2899
|
-
}
|
2900
|
-
case 5: {
|
2901
|
-
obj.shareY = reader.bytes();
|
2902
|
-
break;
|
2903
|
-
}
|
2904
|
-
case 6: {
|
2905
|
-
obj.nullifier = reader.bytes();
|
2906
|
-
break;
|
2907
|
-
}
|
2908
|
-
case 7: {
|
2909
|
-
obj.rlnIdentifier = reader.bytes();
|
2910
|
-
break;
|
2911
|
-
}
|
2912
|
-
default: {
|
2913
|
-
reader.skipType(tag & 7);
|
2914
|
-
break;
|
2915
|
-
}
|
2916
|
-
}
|
2917
|
-
}
|
2918
|
-
return obj;
|
2919
|
-
});
|
2920
|
-
}
|
2921
|
-
return _codec;
|
2922
|
-
};
|
2923
|
-
RateLimitProof.encode = (obj) => {
|
2924
|
-
return encodeMessage(obj, RateLimitProof.codec());
|
2925
|
-
};
|
2926
|
-
RateLimitProof.decode = (buf, opts) => {
|
2927
|
-
return decodeMessage(buf, RateLimitProof.codec(), opts);
|
2928
|
-
};
|
2929
|
-
})(RateLimitProof$3 || (RateLimitProof$3 = {}));
|
2930
|
-
var WakuMessage$3;
|
2931
|
-
(function (WakuMessage) {
|
2932
|
-
let _codec;
|
2933
|
-
WakuMessage.codec = () => {
|
2934
|
-
if (_codec == null) {
|
2935
|
-
_codec = message$1((obj, w, opts = {}) => {
|
2936
|
-
if (opts.lengthDelimited !== false) {
|
2937
|
-
w.fork();
|
2938
|
-
}
|
2939
|
-
if ((obj.payload != null && obj.payload.byteLength > 0)) {
|
2940
|
-
w.uint32(10);
|
2941
|
-
w.bytes(obj.payload);
|
2942
|
-
}
|
2943
|
-
if ((obj.contentTopic != null && obj.contentTopic !== '')) {
|
2944
|
-
w.uint32(18);
|
2945
|
-
w.string(obj.contentTopic);
|
2946
|
-
}
|
2947
|
-
if (obj.version != null) {
|
2948
|
-
w.uint32(24);
|
2949
|
-
w.uint32(obj.version);
|
2950
|
-
}
|
2951
|
-
if (obj.timestamp != null) {
|
2952
|
-
w.uint32(80);
|
2953
|
-
w.sint64(obj.timestamp);
|
2954
|
-
}
|
2955
|
-
if (obj.meta != null) {
|
2956
|
-
w.uint32(90);
|
2957
|
-
w.bytes(obj.meta);
|
2958
|
-
}
|
2959
|
-
if (obj.rateLimitProof != null) {
|
2960
|
-
w.uint32(170);
|
2961
|
-
RateLimitProof$3.codec().encode(obj.rateLimitProof, w);
|
2962
|
-
}
|
2963
|
-
if (obj.ephemeral != null) {
|
2964
|
-
w.uint32(248);
|
2965
|
-
w.bool(obj.ephemeral);
|
2966
|
-
}
|
2967
|
-
if (opts.lengthDelimited !== false) {
|
2968
|
-
w.ldelim();
|
2969
|
-
}
|
2970
|
-
}, (reader, length, opts = {}) => {
|
2971
|
-
const obj = {
|
2972
|
-
payload: alloc$1(0),
|
2973
|
-
contentTopic: ''
|
2974
|
-
};
|
2975
|
-
const end = length == null ? reader.len : reader.pos + length;
|
2976
|
-
while (reader.pos < end) {
|
2977
|
-
const tag = reader.uint32();
|
2978
|
-
switch (tag >>> 3) {
|
2979
|
-
case 1: {
|
2980
|
-
obj.payload = reader.bytes();
|
2981
|
-
break;
|
2982
|
-
}
|
2983
|
-
case 2: {
|
2984
|
-
obj.contentTopic = reader.string();
|
2985
|
-
break;
|
2986
|
-
}
|
2987
|
-
case 3: {
|
2988
|
-
obj.version = reader.uint32();
|
2989
|
-
break;
|
2990
|
-
}
|
2991
|
-
case 10: {
|
2992
|
-
obj.timestamp = reader.sint64();
|
2993
|
-
break;
|
2994
|
-
}
|
2995
|
-
case 11: {
|
2996
|
-
obj.meta = reader.bytes();
|
2997
|
-
break;
|
2998
|
-
}
|
2999
|
-
case 21: {
|
3000
|
-
obj.rateLimitProof = RateLimitProof$3.codec().decode(reader, reader.uint32(), {
|
3001
|
-
limits: opts.limits?.rateLimitProof
|
3002
|
-
});
|
3003
|
-
break;
|
3004
|
-
}
|
3005
|
-
case 31: {
|
3006
|
-
obj.ephemeral = reader.bool();
|
3007
|
-
break;
|
3008
|
-
}
|
3009
|
-
default: {
|
3010
|
-
reader.skipType(tag & 7);
|
3011
|
-
break;
|
3012
|
-
}
|
3013
|
-
}
|
3014
|
-
}
|
3015
|
-
return obj;
|
3016
|
-
});
|
3017
|
-
}
|
3018
|
-
return _codec;
|
3019
|
-
};
|
3020
|
-
WakuMessage.encode = (obj) => {
|
3021
|
-
return encodeMessage(obj, WakuMessage.codec());
|
3022
|
-
};
|
3023
|
-
WakuMessage.decode = (buf, opts) => {
|
3024
|
-
return decodeMessage(buf, WakuMessage.codec(), opts);
|
3025
|
-
};
|
3026
|
-
})(WakuMessage$3 || (WakuMessage$3 = {}));
|
3027
|
-
|
3028
|
-
/* eslint-disable import/export */
|
3029
|
-
/* eslint-disable complexity */
|
3030
|
-
/* eslint-disable @typescript-eslint/no-namespace */
|
3031
|
-
/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */
|
3032
|
-
/* eslint-disable @typescript-eslint/no-empty-interface */
|
3033
|
-
var PushRequest;
|
3034
|
-
(function (PushRequest) {
|
3035
|
-
let _codec;
|
3036
|
-
PushRequest.codec = () => {
|
3037
|
-
if (_codec == null) {
|
3038
|
-
_codec = message$1((obj, w, opts = {}) => {
|
3039
|
-
if (opts.lengthDelimited !== false) {
|
3040
|
-
w.fork();
|
3041
|
-
}
|
3042
|
-
if ((obj.pubsubTopic != null && obj.pubsubTopic !== '')) {
|
3043
|
-
w.uint32(10);
|
3044
|
-
w.string(obj.pubsubTopic);
|
3045
|
-
}
|
3046
|
-
if (obj.message != null) {
|
3047
|
-
w.uint32(18);
|
3048
|
-
WakuMessage$2.codec().encode(obj.message, w);
|
3049
|
-
}
|
3050
|
-
if (opts.lengthDelimited !== false) {
|
3051
|
-
w.ldelim();
|
3052
|
-
}
|
3053
|
-
}, (reader, length, opts = {}) => {
|
3054
|
-
const obj = {
|
3055
|
-
pubsubTopic: ''
|
3056
|
-
};
|
3057
|
-
const end = length == null ? reader.len : reader.pos + length;
|
3058
|
-
while (reader.pos < end) {
|
3059
|
-
const tag = reader.uint32();
|
3060
|
-
switch (tag >>> 3) {
|
3061
|
-
case 1: {
|
3062
|
-
obj.pubsubTopic = reader.string();
|
3063
|
-
break;
|
3064
|
-
}
|
3065
|
-
case 2: {
|
3066
|
-
obj.message = WakuMessage$2.codec().decode(reader, reader.uint32(), {
|
3067
|
-
limits: opts.limits?.message
|
3068
|
-
});
|
3069
|
-
break;
|
3070
|
-
}
|
3071
|
-
default: {
|
3072
|
-
reader.skipType(tag & 7);
|
3073
|
-
break;
|
3074
|
-
}
|
3075
|
-
}
|
3076
|
-
}
|
3077
|
-
return obj;
|
3078
|
-
});
|
3079
|
-
}
|
3080
|
-
return _codec;
|
3081
|
-
};
|
3082
|
-
PushRequest.encode = (obj) => {
|
3083
|
-
return encodeMessage(obj, PushRequest.codec());
|
3084
|
-
};
|
3085
|
-
PushRequest.decode = (buf, opts) => {
|
3086
|
-
return decodeMessage(buf, PushRequest.codec(), opts);
|
3087
|
-
};
|
3088
|
-
})(PushRequest || (PushRequest = {}));
|
3089
|
-
var PushResponse;
|
3090
|
-
(function (PushResponse) {
|
3091
|
-
let _codec;
|
3092
|
-
PushResponse.codec = () => {
|
3093
|
-
if (_codec == null) {
|
3094
|
-
_codec = message$1((obj, w, opts = {}) => {
|
3095
|
-
if (opts.lengthDelimited !== false) {
|
3096
|
-
w.fork();
|
3097
|
-
}
|
3098
|
-
if ((obj.isSuccess != null && obj.isSuccess !== false)) {
|
3099
|
-
w.uint32(8);
|
3100
|
-
w.bool(obj.isSuccess);
|
3101
|
-
}
|
3102
|
-
if (obj.info != null) {
|
3103
|
-
w.uint32(18);
|
3104
|
-
w.string(obj.info);
|
3105
|
-
}
|
3106
|
-
if (opts.lengthDelimited !== false) {
|
3107
|
-
w.ldelim();
|
3108
|
-
}
|
3109
|
-
}, (reader, length, opts = {}) => {
|
3110
|
-
const obj = {
|
3111
|
-
isSuccess: false
|
3112
|
-
};
|
3113
|
-
const end = length == null ? reader.len : reader.pos + length;
|
3114
|
-
while (reader.pos < end) {
|
3115
|
-
const tag = reader.uint32();
|
3116
|
-
switch (tag >>> 3) {
|
3117
|
-
case 1: {
|
3118
|
-
obj.isSuccess = reader.bool();
|
3119
|
-
break;
|
3120
|
-
}
|
3121
|
-
case 2: {
|
3122
|
-
obj.info = reader.string();
|
3123
|
-
break;
|
3124
|
-
}
|
3125
|
-
default: {
|
3126
|
-
reader.skipType(tag & 7);
|
3127
|
-
break;
|
3128
|
-
}
|
3129
|
-
}
|
3130
|
-
}
|
3131
|
-
return obj;
|
3132
|
-
});
|
3133
|
-
}
|
3134
|
-
return _codec;
|
3135
|
-
};
|
3136
|
-
PushResponse.encode = (obj) => {
|
3137
|
-
return encodeMessage(obj, PushResponse.codec());
|
3138
|
-
};
|
3139
|
-
PushResponse.decode = (buf, opts) => {
|
3140
|
-
return decodeMessage(buf, PushResponse.codec(), opts);
|
3141
|
-
};
|
3142
|
-
})(PushResponse || (PushResponse = {}));
|
3143
|
-
var PushRpc;
|
3144
|
-
(function (PushRpc) {
|
3145
|
-
let _codec;
|
3146
|
-
PushRpc.codec = () => {
|
3147
|
-
if (_codec == null) {
|
3148
|
-
_codec = message$1((obj, w, opts = {}) => {
|
3149
|
-
if (opts.lengthDelimited !== false) {
|
3150
|
-
w.fork();
|
3151
|
-
}
|
3152
|
-
if ((obj.requestId != null && obj.requestId !== '')) {
|
3153
|
-
w.uint32(10);
|
3154
|
-
w.string(obj.requestId);
|
3155
|
-
}
|
3156
|
-
if (obj.request != null) {
|
3157
|
-
w.uint32(18);
|
3158
|
-
PushRequest.codec().encode(obj.request, w);
|
3159
|
-
}
|
3160
|
-
if (obj.response != null) {
|
3161
|
-
w.uint32(26);
|
3162
|
-
PushResponse.codec().encode(obj.response, w);
|
3163
|
-
}
|
3164
|
-
if (opts.lengthDelimited !== false) {
|
3165
|
-
w.ldelim();
|
3166
|
-
}
|
3167
|
-
}, (reader, length, opts = {}) => {
|
3168
|
-
const obj = {
|
3169
|
-
requestId: ''
|
3170
|
-
};
|
3171
|
-
const end = length == null ? reader.len : reader.pos + length;
|
3172
|
-
while (reader.pos < end) {
|
3173
|
-
const tag = reader.uint32();
|
3174
|
-
switch (tag >>> 3) {
|
3175
|
-
case 1: {
|
3176
|
-
obj.requestId = reader.string();
|
3177
|
-
break;
|
3178
|
-
}
|
3179
|
-
case 2: {
|
3180
|
-
obj.request = PushRequest.codec().decode(reader, reader.uint32(), {
|
3181
|
-
limits: opts.limits?.request
|
3182
|
-
});
|
3183
|
-
break;
|
3184
|
-
}
|
3185
|
-
case 3: {
|
3186
|
-
obj.response = PushResponse.codec().decode(reader, reader.uint32(), {
|
3187
|
-
limits: opts.limits?.response
|
3188
|
-
});
|
3189
|
-
break;
|
3190
|
-
}
|
3191
|
-
default: {
|
3192
|
-
reader.skipType(tag & 7);
|
3193
|
-
break;
|
3194
|
-
}
|
3195
|
-
}
|
3196
|
-
}
|
3197
|
-
return obj;
|
3198
|
-
});
|
3199
|
-
}
|
3200
|
-
return _codec;
|
3201
|
-
};
|
3202
|
-
PushRpc.encode = (obj) => {
|
3203
|
-
return encodeMessage(obj, PushRpc.codec());
|
3204
|
-
};
|
3205
|
-
PushRpc.decode = (buf, opts) => {
|
3206
|
-
return decodeMessage(buf, PushRpc.codec(), opts);
|
3207
|
-
};
|
3208
|
-
})(PushRpc || (PushRpc = {}));
|
3209
|
-
var RateLimitProof$2;
|
3210
|
-
(function (RateLimitProof) {
|
3211
|
-
let _codec;
|
3212
|
-
RateLimitProof.codec = () => {
|
3213
|
-
if (_codec == null) {
|
3214
|
-
_codec = message$1((obj, w, opts = {}) => {
|
3215
|
-
if (opts.lengthDelimited !== false) {
|
3216
|
-
w.fork();
|
3217
|
-
}
|
3218
|
-
if ((obj.proof != null && obj.proof.byteLength > 0)) {
|
3219
|
-
w.uint32(10);
|
3220
|
-
w.bytes(obj.proof);
|
3221
|
-
}
|
3222
|
-
if ((obj.merkleRoot != null && obj.merkleRoot.byteLength > 0)) {
|
3223
|
-
w.uint32(18);
|
3224
|
-
w.bytes(obj.merkleRoot);
|
3225
|
-
}
|
3226
|
-
if ((obj.epoch != null && obj.epoch.byteLength > 0)) {
|
3227
|
-
w.uint32(26);
|
3228
|
-
w.bytes(obj.epoch);
|
3229
|
-
}
|
3230
|
-
if ((obj.shareX != null && obj.shareX.byteLength > 0)) {
|
3231
|
-
w.uint32(34);
|
3232
|
-
w.bytes(obj.shareX);
|
3233
|
-
}
|
3234
|
-
if ((obj.shareY != null && obj.shareY.byteLength > 0)) {
|
3235
|
-
w.uint32(42);
|
3236
|
-
w.bytes(obj.shareY);
|
3237
|
-
}
|
3238
|
-
if ((obj.nullifier != null && obj.nullifier.byteLength > 0)) {
|
3239
|
-
w.uint32(50);
|
3240
|
-
w.bytes(obj.nullifier);
|
3241
|
-
}
|
3242
|
-
if ((obj.rlnIdentifier != null && obj.rlnIdentifier.byteLength > 0)) {
|
3243
|
-
w.uint32(58);
|
3244
|
-
w.bytes(obj.rlnIdentifier);
|
3245
|
-
}
|
3246
|
-
if (opts.lengthDelimited !== false) {
|
3247
|
-
w.ldelim();
|
3248
|
-
}
|
3249
|
-
}, (reader, length, opts = {}) => {
|
3250
|
-
const obj = {
|
3251
|
-
proof: alloc$1(0),
|
3252
|
-
merkleRoot: alloc$1(0),
|
3253
|
-
epoch: alloc$1(0),
|
3254
|
-
shareX: alloc$1(0),
|
3255
|
-
shareY: alloc$1(0),
|
3256
|
-
nullifier: alloc$1(0),
|
3257
|
-
rlnIdentifier: alloc$1(0)
|
3258
|
-
};
|
3259
|
-
const end = length == null ? reader.len : reader.pos + length;
|
3260
|
-
while (reader.pos < end) {
|
3261
|
-
const tag = reader.uint32();
|
3262
|
-
switch (tag >>> 3) {
|
3263
|
-
case 1: {
|
3264
|
-
obj.proof = reader.bytes();
|
3265
|
-
break;
|
3266
|
-
}
|
3267
|
-
case 2: {
|
3268
|
-
obj.merkleRoot = reader.bytes();
|
3269
|
-
break;
|
3270
|
-
}
|
3271
|
-
case 3: {
|
3272
|
-
obj.epoch = reader.bytes();
|
3273
|
-
break;
|
3274
|
-
}
|
3275
|
-
case 4: {
|
3276
|
-
obj.shareX = reader.bytes();
|
3277
|
-
break;
|
3278
|
-
}
|
3279
|
-
case 5: {
|
3280
|
-
obj.shareY = reader.bytes();
|
3281
|
-
break;
|
3282
|
-
}
|
3283
|
-
case 6: {
|
3284
|
-
obj.nullifier = reader.bytes();
|
3285
|
-
break;
|
3286
|
-
}
|
3287
|
-
case 7: {
|
3288
|
-
obj.rlnIdentifier = reader.bytes();
|
3289
|
-
break;
|
3290
|
-
}
|
3291
|
-
default: {
|
3292
|
-
reader.skipType(tag & 7);
|
3293
|
-
break;
|
3294
|
-
}
|
3295
|
-
}
|
3296
|
-
}
|
3297
|
-
return obj;
|
3298
|
-
});
|
3299
|
-
}
|
3300
|
-
return _codec;
|
3301
|
-
};
|
3302
|
-
RateLimitProof.encode = (obj) => {
|
3303
|
-
return encodeMessage(obj, RateLimitProof.codec());
|
3304
|
-
};
|
3305
|
-
RateLimitProof.decode = (buf, opts) => {
|
3306
|
-
return decodeMessage(buf, RateLimitProof.codec(), opts);
|
3307
|
-
};
|
3308
|
-
})(RateLimitProof$2 || (RateLimitProof$2 = {}));
|
3309
|
-
var WakuMessage$2;
|
3310
|
-
(function (WakuMessage) {
|
3311
|
-
let _codec;
|
3312
|
-
WakuMessage.codec = () => {
|
3313
|
-
if (_codec == null) {
|
3314
|
-
_codec = message$1((obj, w, opts = {}) => {
|
3315
|
-
if (opts.lengthDelimited !== false) {
|
3316
|
-
w.fork();
|
3317
|
-
}
|
3318
|
-
if ((obj.payload != null && obj.payload.byteLength > 0)) {
|
3319
|
-
w.uint32(10);
|
3320
|
-
w.bytes(obj.payload);
|
3321
|
-
}
|
3322
|
-
if ((obj.contentTopic != null && obj.contentTopic !== '')) {
|
3323
|
-
w.uint32(18);
|
3324
|
-
w.string(obj.contentTopic);
|
3325
|
-
}
|
3326
|
-
if (obj.version != null) {
|
3327
|
-
w.uint32(24);
|
3328
|
-
w.uint32(obj.version);
|
3329
|
-
}
|
3330
|
-
if (obj.timestamp != null) {
|
3331
|
-
w.uint32(80);
|
3332
|
-
w.sint64(obj.timestamp);
|
3333
|
-
}
|
3334
|
-
if (obj.meta != null) {
|
3335
|
-
w.uint32(90);
|
3336
|
-
w.bytes(obj.meta);
|
3337
|
-
}
|
3338
|
-
if (obj.rateLimitProof != null) {
|
3339
|
-
w.uint32(170);
|
3340
|
-
RateLimitProof$2.codec().encode(obj.rateLimitProof, w);
|
3341
|
-
}
|
3342
|
-
if (obj.ephemeral != null) {
|
3343
|
-
w.uint32(248);
|
3344
|
-
w.bool(obj.ephemeral);
|
3345
|
-
}
|
3346
|
-
if (opts.lengthDelimited !== false) {
|
3347
|
-
w.ldelim();
|
3348
|
-
}
|
3349
|
-
}, (reader, length, opts = {}) => {
|
3350
|
-
const obj = {
|
3351
|
-
payload: alloc$1(0),
|
3352
|
-
contentTopic: ''
|
3353
|
-
};
|
3354
|
-
const end = length == null ? reader.len : reader.pos + length;
|
3355
|
-
while (reader.pos < end) {
|
3356
|
-
const tag = reader.uint32();
|
3357
|
-
switch (tag >>> 3) {
|
3358
|
-
case 1: {
|
3359
|
-
obj.payload = reader.bytes();
|
3360
|
-
break;
|
3361
|
-
}
|
3362
|
-
case 2: {
|
3363
|
-
obj.contentTopic = reader.string();
|
3364
|
-
break;
|
3365
|
-
}
|
3366
|
-
case 3: {
|
3367
|
-
obj.version = reader.uint32();
|
3368
|
-
break;
|
3369
|
-
}
|
3370
|
-
case 10: {
|
3371
|
-
obj.timestamp = reader.sint64();
|
3372
|
-
break;
|
3373
|
-
}
|
3374
|
-
case 11: {
|
3375
|
-
obj.meta = reader.bytes();
|
3376
|
-
break;
|
3377
|
-
}
|
3378
|
-
case 21: {
|
3379
|
-
obj.rateLimitProof = RateLimitProof$2.codec().decode(reader, reader.uint32(), {
|
3380
|
-
limits: opts.limits?.rateLimitProof
|
3381
|
-
});
|
3382
|
-
break;
|
3383
|
-
}
|
3384
|
-
case 31: {
|
3385
|
-
obj.ephemeral = reader.bool();
|
3386
|
-
break;
|
3387
|
-
}
|
3388
|
-
default: {
|
3389
|
-
reader.skipType(tag & 7);
|
3390
|
-
break;
|
3391
|
-
}
|
3392
|
-
}
|
3393
|
-
}
|
3394
|
-
return obj;
|
3395
|
-
});
|
3396
|
-
}
|
3397
|
-
return _codec;
|
3398
|
-
};
|
3399
|
-
WakuMessage.encode = (obj) => {
|
3400
|
-
return encodeMessage(obj, WakuMessage.codec());
|
3401
|
-
};
|
3402
|
-
WakuMessage.decode = (buf, opts) => {
|
3403
|
-
return decodeMessage(buf, WakuMessage.codec(), opts);
|
3404
|
-
};
|
3405
|
-
})(WakuMessage$2 || (WakuMessage$2 = {}));
|
3406
|
-
|
3407
|
-
/* eslint-disable import/export */
|
3408
|
-
/* eslint-disable complexity */
|
3409
|
-
/* eslint-disable @typescript-eslint/no-namespace */
|
3410
|
-
/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */
|
3411
|
-
/* eslint-disable @typescript-eslint/no-empty-interface */
|
3412
|
-
var LightpushRequest;
|
3413
|
-
(function (LightpushRequest) {
|
3414
|
-
let _codec;
|
3415
|
-
LightpushRequest.codec = () => {
|
3416
|
-
if (_codec == null) {
|
3417
|
-
_codec = message$1((obj, w, opts = {}) => {
|
3418
|
-
if (opts.lengthDelimited !== false) {
|
3419
|
-
w.fork();
|
3420
|
-
}
|
3421
|
-
if ((obj.requestId != null && obj.requestId !== '')) {
|
3422
|
-
w.uint32(10);
|
3423
|
-
w.string(obj.requestId);
|
3424
|
-
}
|
3425
|
-
if (obj.pubsubTopic != null) {
|
3426
|
-
w.uint32(162);
|
3427
|
-
w.string(obj.pubsubTopic);
|
3428
|
-
}
|
3429
|
-
if (obj.message != null) {
|
3430
|
-
w.uint32(170);
|
3431
|
-
WakuMessage$1.codec().encode(obj.message, w);
|
3432
|
-
}
|
3433
|
-
if (opts.lengthDelimited !== false) {
|
3434
|
-
w.ldelim();
|
3435
|
-
}
|
3436
|
-
}, (reader, length, opts = {}) => {
|
3437
|
-
const obj = {
|
3438
|
-
requestId: ''
|
3439
|
-
};
|
3440
|
-
const end = length == null ? reader.len : reader.pos + length;
|
3441
|
-
while (reader.pos < end) {
|
3442
|
-
const tag = reader.uint32();
|
3443
|
-
switch (tag >>> 3) {
|
3444
|
-
case 1: {
|
3445
|
-
obj.requestId = reader.string();
|
3446
|
-
break;
|
3447
|
-
}
|
3448
|
-
case 20: {
|
3449
|
-
obj.pubsubTopic = reader.string();
|
3450
|
-
break;
|
3451
|
-
}
|
3452
|
-
case 21: {
|
3453
|
-
obj.message = WakuMessage$1.codec().decode(reader, reader.uint32(), {
|
3454
|
-
limits: opts.limits?.message
|
3455
|
-
});
|
3456
|
-
break;
|
3457
|
-
}
|
3458
|
-
default: {
|
3459
|
-
reader.skipType(tag & 7);
|
3460
|
-
break;
|
3461
|
-
}
|
3462
|
-
}
|
3463
|
-
}
|
3464
|
-
return obj;
|
3465
|
-
});
|
3466
|
-
}
|
3467
|
-
return _codec;
|
3468
|
-
};
|
3469
|
-
LightpushRequest.encode = (obj) => {
|
3470
|
-
return encodeMessage(obj, LightpushRequest.codec());
|
3471
|
-
};
|
3472
|
-
LightpushRequest.decode = (buf, opts) => {
|
3473
|
-
return decodeMessage(buf, LightpushRequest.codec(), opts);
|
3474
|
-
};
|
3475
|
-
})(LightpushRequest || (LightpushRequest = {}));
|
3476
|
-
var LightpushResponse;
|
3477
|
-
(function (LightpushResponse) {
|
3478
|
-
let _codec;
|
3479
|
-
LightpushResponse.codec = () => {
|
3480
|
-
if (_codec == null) {
|
3481
|
-
_codec = message$1((obj, w, opts = {}) => {
|
3482
|
-
if (opts.lengthDelimited !== false) {
|
3483
|
-
w.fork();
|
3484
|
-
}
|
3485
|
-
if ((obj.requestId != null && obj.requestId !== '')) {
|
3486
|
-
w.uint32(10);
|
3487
|
-
w.string(obj.requestId);
|
3488
|
-
}
|
3489
|
-
if ((obj.statusCode != null && obj.statusCode !== 0)) {
|
3490
|
-
w.uint32(80);
|
3491
|
-
w.uint32(obj.statusCode);
|
3492
|
-
}
|
3493
|
-
if (obj.statusDesc != null) {
|
3494
|
-
w.uint32(90);
|
3495
|
-
w.string(obj.statusDesc);
|
3496
|
-
}
|
3497
|
-
if (obj.relayPeerCount != null) {
|
3498
|
-
w.uint32(96);
|
3499
|
-
w.uint32(obj.relayPeerCount);
|
3500
|
-
}
|
3501
|
-
if (opts.lengthDelimited !== false) {
|
3502
|
-
w.ldelim();
|
3503
|
-
}
|
3504
|
-
}, (reader, length, opts = {}) => {
|
3505
|
-
const obj = {
|
3506
|
-
requestId: '',
|
3507
|
-
statusCode: 0
|
3508
|
-
};
|
3509
|
-
const end = length == null ? reader.len : reader.pos + length;
|
3510
|
-
while (reader.pos < end) {
|
3511
|
-
const tag = reader.uint32();
|
3512
|
-
switch (tag >>> 3) {
|
3513
|
-
case 1: {
|
3514
|
-
obj.requestId = reader.string();
|
3515
|
-
break;
|
3516
|
-
}
|
3517
|
-
case 10: {
|
3518
|
-
obj.statusCode = reader.uint32();
|
3519
|
-
break;
|
3520
|
-
}
|
3521
|
-
case 11: {
|
3522
|
-
obj.statusDesc = reader.string();
|
3523
|
-
break;
|
3524
|
-
}
|
3525
|
-
case 12: {
|
3526
|
-
obj.relayPeerCount = reader.uint32();
|
3527
|
-
break;
|
3528
|
-
}
|
3529
|
-
default: {
|
3530
|
-
reader.skipType(tag & 7);
|
3531
|
-
break;
|
3532
|
-
}
|
3533
|
-
}
|
3534
|
-
}
|
3535
|
-
return obj;
|
3536
|
-
});
|
3537
|
-
}
|
3538
|
-
return _codec;
|
3539
|
-
};
|
3540
|
-
LightpushResponse.encode = (obj) => {
|
3541
|
-
return encodeMessage(obj, LightpushResponse.codec());
|
3542
|
-
};
|
3543
|
-
LightpushResponse.decode = (buf, opts) => {
|
3544
|
-
return decodeMessage(buf, LightpushResponse.codec(), opts);
|
3545
|
-
};
|
3546
|
-
})(LightpushResponse || (LightpushResponse = {}));
|
3547
2824
|
var RateLimitProof$1;
|
3548
2825
|
(function (RateLimitProof) {
|
3549
2826
|
let _codec;
|
@@ -5312,7 +4589,7 @@ class Encoder {
|
|
5312
4589
|
}
|
5313
4590
|
}
|
5314
4591
|
async toWire(message$1) {
|
5315
|
-
return WakuMessage$
|
4592
|
+
return WakuMessage$4.encode(await this.toProtoObj(message$1));
|
5316
4593
|
}
|
5317
4594
|
async toProtoObj(message) {
|
5318
4595
|
const timestamp = message.timestamp ?? new Date();
|
@@ -5354,7 +4631,7 @@ class Decoder {
|
|
5354
4631
|
}
|
5355
4632
|
}
|
5356
4633
|
fromWireToProtoObj(bytes) {
|
5357
|
-
const protoMessage = WakuMessage$
|
4634
|
+
const protoMessage = WakuMessage$4.decode(bytes);
|
5358
4635
|
return Promise.resolve({
|
5359
4636
|
payload: protoMessage.payload,
|
5360
4637
|
contentTopic: protoMessage.contentTopic,
|
@@ -5400,4 +4677,4 @@ var version_0 = /*#__PURE__*/Object.freeze({
|
|
5400
4677
|
proto: message
|
5401
4678
|
});
|
5402
4679
|
|
5403
|
-
export {
|
4680
|
+
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, allocUnsafe as a, alloc$1 as b, encode as c, decode as d, encodingLength as e, FilterSubscribeResponse$1 as f, PushResponse as g, StoreQueryResponse$1 as h, bases as i, fromString as j, createEncoder as k, bytesToUtf8 as l, pubsubTopicsToShardInfo as m, WakuMetadataResponse as n, concat as o, pubsubTopicToSingleShardInfo as p, sha256 as q, bytesToHex as r, shardInfoToPubsubTopics as s, toString as t, utf8ToBytes as u, version_0 as v, numberToBytes as w, createDecoder as x, message as y, Decoder as z };
|