@waku/rln 0.1.6-10590da.0 → 0.1.6-3730abc.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/_virtual/utils.js +2 -2
- package/bundle/_virtual/utils2.js +2 -2
- package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/@noble/hashes/_sha2.js +1 -1
- package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/@noble/hashes/hmac.js +1 -1
- package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/@noble/hashes/pbkdf2.js +1 -1
- package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/@noble/hashes/scrypt.js +1 -1
- package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/@noble/hashes/sha256.js +1 -1
- package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/@noble/hashes/sha512.js +1 -1
- package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/@noble/hashes/utils.js +1 -1
- package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/random.js +1 -1
- package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/utils.js +2 -2
- package/bundle/packages/core/dist/lib/filter/filter.js +2 -0
- package/bundle/packages/core/dist/lib/light_push/light_push.js +2 -0
- package/bundle/packages/core/dist/lib/light_push/light_push_v3.js +30 -0
- package/bundle/packages/core/dist/lib/light_push/status_codes.js +25 -0
- package/bundle/packages/core/dist/lib/light_push/status_codes_v3.js +31 -0
- package/bundle/packages/core/dist/lib/message/version_0.js +3 -4
- package/bundle/packages/core/dist/lib/metadata/metadata.js +2 -0
- package/bundle/packages/core/dist/lib/store/store.js +2 -0
- package/bundle/packages/proto/dist/generated/light_push.js +28 -22
- package/bundle/packages/proto/dist/generated/light_push_v2.js +389 -0
- package/bundle/packages/proto/dist/generated/light_push_v3.js +348 -0
- package/bundle/packages/rln/dist/contract/rln_base_contract.js +2 -2
- package/bundle/packages/rln/dist/credentials_manager.js +1 -6
- package/bundle/packages/rln/dist/identity.js +1 -1
- package/bundle/packages/rln/dist/message.js +25 -0
- package/bundle/packages/rln/dist/rln.js +14 -0
- package/bundle/packages/rln/dist/utils/bytes.js +2 -6
- package/dist/.tsbuildinfo +1 -1
- package/dist/contract/rln_base_contract.d.ts +1 -1
- package/dist/contract/rln_base_contract.js +2 -2
- package/dist/contract/rln_base_contract.js.map +1 -1
- package/dist/credentials_manager.js +1 -6
- package/dist/credentials_manager.js.map +1 -1
- package/dist/identity.js +1 -1
- package/dist/identity.js.map +1 -1
- package/dist/message.d.ts +5 -4
- package/dist/message.js +2 -0
- package/dist/message.js.map +1 -1
- package/dist/utils/bytes.js +2 -6
- package/dist/utils/bytes.js.map +1 -1
- package/package.json +1 -1
- package/src/contract/rln_base_contract.ts +2 -2
- package/src/credentials_manager.ts +1 -8
- package/src/identity.ts +1 -1
- package/src/message.ts +7 -4
- package/src/utils/bytes.ts +2 -6
package/bundle/_virtual/utils.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
var utils = {
|
1
|
+
var utils = {};
|
2
2
|
|
3
|
-
export { utils as
|
3
|
+
export { utils as __exports };
|
@@ -1,3 +1,3 @@
|
|
1
|
-
var utils = {};
|
1
|
+
var utils = {exports: {}};
|
2
2
|
|
3
|
-
export { utils as
|
3
|
+
export { utils as __module };
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { __exports as _sha2 } from '../../../../../../_virtual/_sha2.js';
|
2
2
|
import './_assert.js';
|
3
3
|
import './utils.js';
|
4
|
-
import { __exports as utils } from '../../../../../../_virtual/
|
4
|
+
import { __exports as utils } from '../../../../../../_virtual/utils.js';
|
5
5
|
import { __exports as _assert } from '../../../../../../_virtual/_assert.js';
|
6
6
|
|
7
7
|
Object.defineProperty(_sha2, "__esModule", { value: true });
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { __exports as hmac } from '../../../../../../_virtual/hmac.js';
|
2
2
|
import './_assert.js';
|
3
3
|
import './utils.js';
|
4
|
-
import { __exports as utils } from '../../../../../../_virtual/
|
4
|
+
import { __exports as utils } from '../../../../../../_virtual/utils.js';
|
5
5
|
import { __exports as _assert } from '../../../../../../_virtual/_assert.js';
|
6
6
|
|
7
7
|
(function (exports) {
|
@@ -2,7 +2,7 @@ import { __exports as pbkdf2$1 } from '../../../../../../_virtual/pbkdf22.js';
|
|
2
2
|
import './_assert.js';
|
3
3
|
import './hmac.js';
|
4
4
|
import './utils.js';
|
5
|
-
import { __exports as utils } from '../../../../../../_virtual/
|
5
|
+
import { __exports as utils } from '../../../../../../_virtual/utils.js';
|
6
6
|
import { __exports as _assert } from '../../../../../../_virtual/_assert.js';
|
7
7
|
import { __exports as hmac } from '../../../../../../_virtual/hmac.js';
|
8
8
|
|
@@ -3,7 +3,7 @@ import './_assert.js';
|
|
3
3
|
import './sha256.js';
|
4
4
|
import './pbkdf2.js';
|
5
5
|
import './utils.js';
|
6
|
-
import { __exports as utils } from '../../../../../../_virtual/
|
6
|
+
import { __exports as utils } from '../../../../../../_virtual/utils.js';
|
7
7
|
import { __exports as _assert } from '../../../../../../_virtual/_assert.js';
|
8
8
|
import { __exports as pbkdf2 } from '../../../../../../_virtual/pbkdf22.js';
|
9
9
|
import { __exports as sha256 } from '../../../../../../_virtual/sha2562.js';
|
@@ -2,7 +2,7 @@ import { __exports as sha256 } from '../../../../../../_virtual/sha2562.js';
|
|
2
2
|
import './_sha2.js';
|
3
3
|
import './utils.js';
|
4
4
|
import { __exports as _sha2 } from '../../../../../../_virtual/_sha2.js';
|
5
|
-
import { __exports as utils } from '../../../../../../_virtual/
|
5
|
+
import { __exports as utils } from '../../../../../../_virtual/utils.js';
|
6
6
|
|
7
7
|
Object.defineProperty(sha256, "__esModule", { value: true });
|
8
8
|
sha256.sha224 = sha256.sha256 = void 0;
|
@@ -4,7 +4,7 @@ import './_u64.js';
|
|
4
4
|
import './utils.js';
|
5
5
|
import { __exports as _u64 } from '../../../../../../_virtual/_u64.js';
|
6
6
|
import { __exports as _sha2 } from '../../../../../../_virtual/_sha2.js';
|
7
|
-
import { __exports as utils } from '../../../../../../_virtual/
|
7
|
+
import { __exports as utils } from '../../../../../../_virtual/utils.js';
|
8
8
|
|
9
9
|
Object.defineProperty(sha512, "__esModule", { value: true });
|
10
10
|
sha512.sha384 = sha512.sha512_256 = sha512.sha512_224 = sha512.sha512 = sha512.SHA512 = void 0;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { __exports as utils } from '../../../../../../_virtual/
|
1
|
+
import { __exports as utils } from '../../../../../../_virtual/utils.js';
|
2
2
|
import './cryptoBrowser.js';
|
3
3
|
import { __exports as cryptoBrowser } from '../../../../../../_virtual/cryptoBrowser.js';
|
4
4
|
|
package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/random.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { __exports as random } from '../../../../../_virtual/random.js';
|
2
2
|
import '../@noble/hashes/utils.js';
|
3
|
-
import { __exports as utils } from '../../../../../_virtual/
|
3
|
+
import { __exports as utils } from '../../../../../_virtual/utils.js';
|
4
4
|
|
5
5
|
Object.defineProperty(random, "__esModule", { value: true });
|
6
6
|
random.getRandomBytes = random.getRandomBytesSync = void 0;
|
package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/utils.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
import { commonjsGlobal } from '../../../../../_virtual/_commonjsHelpers.js';
|
2
2
|
import { commonjsRequire } from '../../../../../_virtual/_commonjs-dynamic-modules.js';
|
3
|
-
import { __module as utils } from '../../../../../_virtual/
|
3
|
+
import { __module as utils } from '../../../../../_virtual/utils2.js';
|
4
4
|
import '../@noble/hashes/_assert.js';
|
5
5
|
import '../@noble/hashes/utils.js';
|
6
6
|
import { __exports as _assert } from '../../../../../_virtual/_assert.js';
|
7
|
-
import { __exports as utils$1 } from '../../../../../_virtual/
|
7
|
+
import { __exports as utils$1 } from '../../../../../_virtual/utils.js';
|
8
8
|
|
9
9
|
utils.exports;
|
10
10
|
|
@@ -19,6 +19,8 @@ import '../../../../proto/dist/generated/filter.js';
|
|
19
19
|
import '../../../../proto/dist/generated/topic_only_message.js';
|
20
20
|
import '../../../../proto/dist/generated/filter_v2.js';
|
21
21
|
import '../../../../proto/dist/generated/light_push.js';
|
22
|
+
import '../../../../proto/dist/generated/light_push_v2.js';
|
23
|
+
import '../../../../proto/dist/generated/light_push_v3.js';
|
22
24
|
import '../../../../proto/dist/generated/store_v3.js';
|
23
25
|
import '../../../../proto/dist/generated/peer_exchange.js';
|
24
26
|
import '../../../../proto/dist/generated/metadata.js';
|
@@ -6,6 +6,8 @@ import '../../../../proto/dist/generated/filter.js';
|
|
6
6
|
import '../../../../proto/dist/generated/topic_only_message.js';
|
7
7
|
import '../../../../proto/dist/generated/filter_v2.js';
|
8
8
|
export { PushResponse } from '../../../../proto/dist/generated/light_push.js';
|
9
|
+
import '../../../../proto/dist/generated/light_push_v2.js';
|
10
|
+
import '../../../../proto/dist/generated/light_push_v3.js';
|
9
11
|
import '../../../../proto/dist/generated/store_v3.js';
|
10
12
|
import '../../../../proto/dist/generated/peer_exchange.js';
|
11
13
|
import '../../../../proto/dist/generated/metadata.js';
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import '../../../../interfaces/dist/protocols.js';
|
2
|
+
import '../../../../interfaces/dist/connection_manager.js';
|
3
|
+
import '../../../../interfaces/dist/health_indicator.js';
|
4
|
+
import '../../../../proto/dist/generated/message.js';
|
5
|
+
import '../../../../proto/dist/generated/filter.js';
|
6
|
+
import '../../../../proto/dist/generated/topic_only_message.js';
|
7
|
+
import '../../../../proto/dist/generated/filter_v2.js';
|
8
|
+
import '../../../../proto/dist/generated/light_push.js';
|
9
|
+
import '../../../../proto/dist/generated/light_push_v2.js';
|
10
|
+
import '../../../../proto/dist/generated/light_push_v3.js';
|
11
|
+
import '../../../../proto/dist/generated/store_v3.js';
|
12
|
+
import '../../../../proto/dist/generated/peer_exchange.js';
|
13
|
+
import '../../../../proto/dist/generated/metadata.js';
|
14
|
+
import '../../../../proto/dist/generated/sds_message.js';
|
15
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base10.js';
|
16
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base16.js';
|
17
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base2.js';
|
18
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base256emoji.js';
|
19
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base32.js';
|
20
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base36.js';
|
21
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base58.js';
|
22
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base64.js';
|
23
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base8.js';
|
24
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/identity.js';
|
25
|
+
import '../../../../../node_modules/multiformats/dist/src/codecs/json.js';
|
26
|
+
import { Logger } from '../../../../utils/dist/logger/index.js';
|
27
|
+
import '../../../../../node_modules/it-length-prefixed/dist/src/decode.js';
|
28
|
+
import './status_codes_v3.js';
|
29
|
+
|
30
|
+
new Logger("light-push-v3");
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import '../../../../interfaces/dist/protocols.js';
|
2
|
+
import '../../../../interfaces/dist/connection_manager.js';
|
3
|
+
import '../../../../interfaces/dist/health_indicator.js';
|
4
|
+
|
5
|
+
var LightPushStatusCode;
|
6
|
+
(function (LightPushStatusCode) {
|
7
|
+
LightPushStatusCode[LightPushStatusCode["SUCCESS"] = 200] = "SUCCESS";
|
8
|
+
LightPushStatusCode[LightPushStatusCode["BAD_REQUEST"] = 400] = "BAD_REQUEST";
|
9
|
+
LightPushStatusCode[LightPushStatusCode["UNSUPPORTED_PUBSUB_TOPIC"] = 404] = "UNSUPPORTED_PUBSUB_TOPIC";
|
10
|
+
LightPushStatusCode[LightPushStatusCode["REQUEST_TOO_LARGE"] = 413] = "REQUEST_TOO_LARGE";
|
11
|
+
LightPushStatusCode[LightPushStatusCode["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
|
12
|
+
LightPushStatusCode[LightPushStatusCode["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
|
13
|
+
LightPushStatusCode[LightPushStatusCode["NO_PEERS_TO_RELAY"] = 503] = "NO_PEERS_TO_RELAY";
|
14
|
+
})(LightPushStatusCode || (LightPushStatusCode = {}));
|
15
|
+
({
|
16
|
+
[LightPushStatusCode.SUCCESS]: "Message pushed successfully",
|
17
|
+
[LightPushStatusCode.BAD_REQUEST]: "Invalid request format or missing required fields",
|
18
|
+
[LightPushStatusCode.UNSUPPORTED_PUBSUB_TOPIC]: "The specified pubsub topic is not supported",
|
19
|
+
[LightPushStatusCode.REQUEST_TOO_LARGE]: "Message size exceeds maximum allowed size",
|
20
|
+
[LightPushStatusCode.TOO_MANY_REQUESTS]: "Rate limit exceeded, too many requests",
|
21
|
+
[LightPushStatusCode.INTERNAL_SERVER_ERROR]: "Internal server error occurred",
|
22
|
+
[LightPushStatusCode.NO_PEERS_TO_RELAY]: "No relay peers available to forward the message"
|
23
|
+
});
|
24
|
+
|
25
|
+
export { LightPushStatusCode };
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import '../../../../interfaces/dist/protocols.js';
|
2
|
+
import '../../../../interfaces/dist/connection_manager.js';
|
3
|
+
import '../../../../interfaces/dist/health_indicator.js';
|
4
|
+
|
5
|
+
var LightPushStatusCodeV3;
|
6
|
+
(function (LightPushStatusCodeV3) {
|
7
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["SUCCESS"] = 200] = "SUCCESS";
|
8
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["BAD_REQUEST"] = 400] = "BAD_REQUEST";
|
9
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["PAYLOAD_TOO_LARGE"] = 413] = "PAYLOAD_TOO_LARGE";
|
10
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["INVALID_MESSAGE_ERROR"] = 420] = "INVALID_MESSAGE_ERROR";
|
11
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["UNSUPPORTED_PUBSUB_TOPIC"] = 421] = "UNSUPPORTED_PUBSUB_TOPIC";
|
12
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
|
13
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
|
14
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["SERVICE_NOT_AVAILABLE"] = 503] = "SERVICE_NOT_AVAILABLE";
|
15
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["OUT_OF_RLN_PROOF"] = 504] = "OUT_OF_RLN_PROOF";
|
16
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["NO_PEERS_TO_RELAY"] = 505] = "NO_PEERS_TO_RELAY";
|
17
|
+
})(LightPushStatusCodeV3 || (LightPushStatusCodeV3 = {}));
|
18
|
+
({
|
19
|
+
[LightPushStatusCodeV3.SUCCESS]: "Message sent successfully",
|
20
|
+
[LightPushStatusCodeV3.BAD_REQUEST]: "Bad request format",
|
21
|
+
[LightPushStatusCodeV3.PAYLOAD_TOO_LARGE]: "Message payload exceeds maximum size",
|
22
|
+
[LightPushStatusCodeV3.INVALID_MESSAGE_ERROR]: "Message validation failed",
|
23
|
+
[LightPushStatusCodeV3.UNSUPPORTED_PUBSUB_TOPIC]: "Unsupported pubsub topic",
|
24
|
+
[LightPushStatusCodeV3.TOO_MANY_REQUESTS]: "Rate limit exceeded",
|
25
|
+
[LightPushStatusCodeV3.INTERNAL_SERVER_ERROR]: "Internal server error",
|
26
|
+
[LightPushStatusCodeV3.SERVICE_NOT_AVAILABLE]: "Service temporarily unavailable",
|
27
|
+
[LightPushStatusCodeV3.OUT_OF_RLN_PROOF]: "RLN proof generation failed",
|
28
|
+
[LightPushStatusCodeV3.NO_PEERS_TO_RELAY]: "No relay peers available"
|
29
|
+
});
|
30
|
+
|
31
|
+
export { LightPushStatusCodeV3 };
|
@@ -3,6 +3,8 @@ import '../../../../proto/dist/generated/filter.js';
|
|
3
3
|
import '../../../../proto/dist/generated/topic_only_message.js';
|
4
4
|
import '../../../../proto/dist/generated/filter_v2.js';
|
5
5
|
import '../../../../proto/dist/generated/light_push.js';
|
6
|
+
import '../../../../proto/dist/generated/light_push_v2.js';
|
7
|
+
import '../../../../proto/dist/generated/light_push_v3.js';
|
6
8
|
import '../../../../proto/dist/generated/store_v3.js';
|
7
9
|
import '../../../../proto/dist/generated/peer_exchange.js';
|
8
10
|
import '../../../../proto/dist/generated/metadata.js';
|
@@ -29,9 +31,6 @@ class DecodedMessage {
|
|
29
31
|
get contentTopic() {
|
30
32
|
return this.proto.contentTopic;
|
31
33
|
}
|
32
|
-
get _rawTimestamp() {
|
33
|
-
return this.proto.timestamp;
|
34
|
-
}
|
35
34
|
get timestamp() {
|
36
35
|
// In the case we receive a value that is bigger than JS's max number,
|
37
36
|
// we catch the error and return undefined.
|
@@ -53,7 +52,7 @@ class DecodedMessage {
|
|
53
52
|
get version() {
|
54
53
|
// https://rfc.vac.dev/spec/14/
|
55
54
|
// > If omitted, the value SHOULD be interpreted as version 0.
|
56
|
-
return this.proto.version ??
|
55
|
+
return this.proto.version ?? Version;
|
57
56
|
}
|
58
57
|
get rateLimitProof() {
|
59
58
|
return this.proto.rateLimitProof;
|
@@ -6,6 +6,8 @@ import '../../../../proto/dist/generated/filter.js';
|
|
6
6
|
import '../../../../proto/dist/generated/topic_only_message.js';
|
7
7
|
import '../../../../proto/dist/generated/filter_v2.js';
|
8
8
|
import '../../../../proto/dist/generated/light_push.js';
|
9
|
+
import '../../../../proto/dist/generated/light_push_v2.js';
|
10
|
+
import '../../../../proto/dist/generated/light_push_v3.js';
|
9
11
|
import '../../../../proto/dist/generated/store_v3.js';
|
10
12
|
import '../../../../proto/dist/generated/peer_exchange.js';
|
11
13
|
import '../../../../proto/dist/generated/metadata.js';
|
@@ -19,6 +19,8 @@ import '../../../../proto/dist/generated/filter.js';
|
|
19
19
|
import '../../../../proto/dist/generated/topic_only_message.js';
|
20
20
|
import '../../../../proto/dist/generated/filter_v2.js';
|
21
21
|
import '../../../../proto/dist/generated/light_push.js';
|
22
|
+
import '../../../../proto/dist/generated/light_push_v2.js';
|
23
|
+
import '../../../../proto/dist/generated/light_push_v3.js';
|
22
24
|
import '../../../../proto/dist/generated/store_v3.js';
|
23
25
|
import '../../../../proto/dist/generated/peer_exchange.js';
|
24
26
|
import '../../../../proto/dist/generated/metadata.js';
|
@@ -21,30 +21,28 @@ var PushRequest;
|
|
21
21
|
if (opts.lengthDelimited !== false) {
|
22
22
|
w.fork();
|
23
23
|
}
|
24
|
-
if (
|
25
|
-
w.uint32(
|
24
|
+
if (obj.pubsubTopic != null) {
|
25
|
+
w.uint32(162);
|
26
26
|
w.string(obj.pubsubTopic);
|
27
27
|
}
|
28
28
|
if (obj.message != null) {
|
29
|
-
w.uint32(
|
29
|
+
w.uint32(170);
|
30
30
|
WakuMessage.codec().encode(obj.message, w);
|
31
31
|
}
|
32
32
|
if (opts.lengthDelimited !== false) {
|
33
33
|
w.ldelim();
|
34
34
|
}
|
35
35
|
}, (reader, length, opts = {}) => {
|
36
|
-
const obj = {
|
37
|
-
pubsubTopic: ''
|
38
|
-
};
|
36
|
+
const obj = {};
|
39
37
|
const end = length == null ? reader.len : reader.pos + length;
|
40
38
|
while (reader.pos < end) {
|
41
39
|
const tag = reader.uint32();
|
42
40
|
switch (tag >>> 3) {
|
43
|
-
case
|
41
|
+
case 20: {
|
44
42
|
obj.pubsubTopic = reader.string();
|
45
43
|
break;
|
46
44
|
}
|
47
|
-
case
|
45
|
+
case 21: {
|
48
46
|
obj.message = WakuMessage.codec().decode(reader, reader.uint32(), {
|
49
47
|
limits: opts.limits?.message
|
50
48
|
});
|
@@ -77,31 +75,39 @@ var PushResponse;
|
|
77
75
|
if (opts.lengthDelimited !== false) {
|
78
76
|
w.fork();
|
79
77
|
}
|
80
|
-
if ((obj.
|
81
|
-
w.uint32(
|
82
|
-
w.
|
78
|
+
if ((obj.statusCode != null && obj.statusCode !== 0)) {
|
79
|
+
w.uint32(160);
|
80
|
+
w.uint32(obj.statusCode);
|
83
81
|
}
|
84
|
-
if (obj.
|
85
|
-
w.uint32(
|
86
|
-
w.string(obj.
|
82
|
+
if (obj.statusDesc != null) {
|
83
|
+
w.uint32(242);
|
84
|
+
w.string(obj.statusDesc);
|
85
|
+
}
|
86
|
+
if (obj.relayPeerCount != null) {
|
87
|
+
w.uint32(320);
|
88
|
+
w.uint32(obj.relayPeerCount);
|
87
89
|
}
|
88
90
|
if (opts.lengthDelimited !== false) {
|
89
91
|
w.ldelim();
|
90
92
|
}
|
91
93
|
}, (reader, length, opts = {}) => {
|
92
94
|
const obj = {
|
93
|
-
|
95
|
+
statusCode: 0
|
94
96
|
};
|
95
97
|
const end = length == null ? reader.len : reader.pos + length;
|
96
98
|
while (reader.pos < end) {
|
97
99
|
const tag = reader.uint32();
|
98
100
|
switch (tag >>> 3) {
|
99
|
-
case
|
100
|
-
obj.
|
101
|
+
case 20: {
|
102
|
+
obj.statusCode = reader.uint32();
|
101
103
|
break;
|
102
104
|
}
|
103
|
-
case
|
104
|
-
obj.
|
105
|
+
case 30: {
|
106
|
+
obj.statusDesc = reader.string();
|
107
|
+
break;
|
108
|
+
}
|
109
|
+
case 40: {
|
110
|
+
obj.relayPeerCount = reader.uint32();
|
105
111
|
break;
|
106
112
|
}
|
107
113
|
default: {
|
@@ -122,7 +128,7 @@ var PushResponse;
|
|
122
128
|
return decodeMessage(buf, PushResponse.codec(), opts);
|
123
129
|
};
|
124
130
|
})(PushResponse || (PushResponse = {}));
|
125
|
-
var PushRpc
|
131
|
+
var PushRpc;
|
126
132
|
(function (PushRpc) {
|
127
133
|
let _codec;
|
128
134
|
PushRpc.codec = () => {
|
@@ -187,7 +193,7 @@ var PushRpc$1;
|
|
187
193
|
PushRpc.decode = (buf, opts) => {
|
188
194
|
return decodeMessage(buf, PushRpc.codec(), opts);
|
189
195
|
};
|
190
|
-
})(PushRpc
|
196
|
+
})(PushRpc || (PushRpc = {}));
|
191
197
|
var RateLimitProof;
|
192
198
|
(function (RateLimitProof) {
|
193
199
|
let _codec;
|
@@ -386,4 +392,4 @@ var WakuMessage;
|
|
386
392
|
};
|
387
393
|
})(WakuMessage || (WakuMessage = {}));
|
388
394
|
|
389
|
-
export { PushRequest, PushResponse, PushRpc
|
395
|
+
export { PushRequest, PushResponse, PushRpc, RateLimitProof, WakuMessage };
|