@waku/rln 0.1.6-4997440.0 → 0.1.6-76fb1ea.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/connection_manager/connection_manager.js +1 -0
- package/bundle/packages/core/dist/lib/connection_manager/keep_alive_manager.js +1 -0
- package/bundle/packages/core/dist/lib/filter/filter.js +3 -0
- package/bundle/packages/core/dist/lib/light_push/light_push.js +3 -0
- package/bundle/packages/core/dist/lib/light_push/light_push_v3.js +31 -0
- package/bundle/packages/core/dist/lib/light_push/status_codes.js +26 -0
- package/bundle/packages/core/dist/lib/light_push/status_codes_v3.js +17 -0
- package/bundle/packages/core/dist/lib/message/version_0.js +2 -0
- package/bundle/packages/core/dist/lib/metadata/metadata.js +3 -0
- package/bundle/packages/core/dist/lib/store/store.js +3 -0
- package/bundle/packages/interfaces/dist/light_push_v3.js +16 -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/codec.js +1 -0
- package/bundle/packages/rln/dist/contract/rln_base_contract.js +1 -0
- package/bundle/packages/rln/dist/contract/rln_contract.js +1 -0
- package/bundle/packages/rln/dist/credentials_manager.js +1 -0
- package/bundle/packages/rln/dist/keystore/keystore.js +1 -0
- package/bundle/packages/rln/dist/message.js +15 -0
- package/bundle/packages/rln/dist/rln.js +15 -0
- package/bundle/packages/rln/dist/utils/epoch.js +1 -0
- package/bundle/packages/utils/dist/common/sharding/index.js +1 -0
- package/dist/.tsbuildinfo +1 -1
- package/package.json +1 -1
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
|
|
@@ -12,6 +12,7 @@ import '../../../../../node_modules/multiformats/dist/src/codecs/json.js';
|
|
12
12
|
import '../../../../../node_modules/@multiformats/multiaddr/dist/src/convert.js';
|
13
13
|
import '../../../../../node_modules/@multiformats/multiaddr/dist/src/protocols-table.js';
|
14
14
|
import '../../../../../node_modules/@multiformats/multiaddr/dist/src/multiaddr.js';
|
15
|
+
import '../../../../interfaces/dist/light_push_v3.js';
|
15
16
|
import '../../../../interfaces/dist/protocols.js';
|
16
17
|
import '../../../../interfaces/dist/connection_manager.js';
|
17
18
|
import '../../../../interfaces/dist/health_indicator.js';
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import '../../../../interfaces/dist/light_push_v3.js';
|
1
2
|
import '../../../../interfaces/dist/protocols.js';
|
2
3
|
import '../../../../interfaces/dist/connection_manager.js';
|
3
4
|
import '../../../../interfaces/dist/health_indicator.js';
|
@@ -19,6 +20,8 @@ import '../../../../proto/dist/generated/filter.js';
|
|
19
20
|
import '../../../../proto/dist/generated/topic_only_message.js';
|
20
21
|
import '../../../../proto/dist/generated/filter_v2.js';
|
21
22
|
import '../../../../proto/dist/generated/light_push.js';
|
23
|
+
import '../../../../proto/dist/generated/light_push_v2.js';
|
24
|
+
import '../../../../proto/dist/generated/light_push_v3.js';
|
22
25
|
import '../../../../proto/dist/generated/store_v3.js';
|
23
26
|
import '../../../../proto/dist/generated/peer_exchange.js';
|
24
27
|
import '../../../../proto/dist/generated/metadata.js';
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import '../../../../interfaces/dist/light_push_v3.js';
|
1
2
|
import '../../../../interfaces/dist/protocols.js';
|
2
3
|
import '../../../../interfaces/dist/connection_manager.js';
|
3
4
|
import '../../../../interfaces/dist/health_indicator.js';
|
@@ -6,6 +7,8 @@ import '../../../../proto/dist/generated/filter.js';
|
|
6
7
|
import '../../../../proto/dist/generated/topic_only_message.js';
|
7
8
|
import '../../../../proto/dist/generated/filter_v2.js';
|
8
9
|
export { PushResponse } from '../../../../proto/dist/generated/light_push.js';
|
10
|
+
import '../../../../proto/dist/generated/light_push_v2.js';
|
11
|
+
import '../../../../proto/dist/generated/light_push_v3.js';
|
9
12
|
import '../../../../proto/dist/generated/store_v3.js';
|
10
13
|
import '../../../../proto/dist/generated/peer_exchange.js';
|
11
14
|
import '../../../../proto/dist/generated/metadata.js';
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import '../../../../interfaces/dist/light_push_v3.js';
|
2
|
+
import '../../../../interfaces/dist/protocols.js';
|
3
|
+
import '../../../../interfaces/dist/connection_manager.js';
|
4
|
+
import '../../../../interfaces/dist/health_indicator.js';
|
5
|
+
import '../../../../proto/dist/generated/message.js';
|
6
|
+
import '../../../../proto/dist/generated/filter.js';
|
7
|
+
import '../../../../proto/dist/generated/topic_only_message.js';
|
8
|
+
import '../../../../proto/dist/generated/filter_v2.js';
|
9
|
+
import '../../../../proto/dist/generated/light_push.js';
|
10
|
+
import '../../../../proto/dist/generated/light_push_v2.js';
|
11
|
+
import '../../../../proto/dist/generated/light_push_v3.js';
|
12
|
+
import '../../../../proto/dist/generated/store_v3.js';
|
13
|
+
import '../../../../proto/dist/generated/peer_exchange.js';
|
14
|
+
import '../../../../proto/dist/generated/metadata.js';
|
15
|
+
import '../../../../proto/dist/generated/sds_message.js';
|
16
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base10.js';
|
17
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base16.js';
|
18
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base2.js';
|
19
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base256emoji.js';
|
20
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base32.js';
|
21
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base36.js';
|
22
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base58.js';
|
23
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base64.js';
|
24
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base8.js';
|
25
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/identity.js';
|
26
|
+
import '../../../../../node_modules/multiformats/dist/src/codecs/json.js';
|
27
|
+
import { Logger } from '../../../../utils/dist/logger/index.js';
|
28
|
+
import '../../../../../node_modules/it-length-prefixed/dist/src/decode.js';
|
29
|
+
import './status_codes_v3.js';
|
30
|
+
|
31
|
+
new Logger("light-push-v3");
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import '../../../../interfaces/dist/light_push_v3.js';
|
2
|
+
import '../../../../interfaces/dist/protocols.js';
|
3
|
+
import '../../../../interfaces/dist/connection_manager.js';
|
4
|
+
import '../../../../interfaces/dist/health_indicator.js';
|
5
|
+
|
6
|
+
var LightPushStatusCode;
|
7
|
+
(function (LightPushStatusCode) {
|
8
|
+
LightPushStatusCode[LightPushStatusCode["SUCCESS"] = 200] = "SUCCESS";
|
9
|
+
LightPushStatusCode[LightPushStatusCode["BAD_REQUEST"] = 400] = "BAD_REQUEST";
|
10
|
+
LightPushStatusCode[LightPushStatusCode["UNSUPPORTED_PUBSUB_TOPIC"] = 404] = "UNSUPPORTED_PUBSUB_TOPIC";
|
11
|
+
LightPushStatusCode[LightPushStatusCode["REQUEST_TOO_LARGE"] = 413] = "REQUEST_TOO_LARGE";
|
12
|
+
LightPushStatusCode[LightPushStatusCode["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
|
13
|
+
LightPushStatusCode[LightPushStatusCode["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
|
14
|
+
LightPushStatusCode[LightPushStatusCode["NO_PEERS_TO_RELAY"] = 503] = "NO_PEERS_TO_RELAY";
|
15
|
+
})(LightPushStatusCode || (LightPushStatusCode = {}));
|
16
|
+
({
|
17
|
+
[LightPushStatusCode.SUCCESS]: "Message pushed successfully",
|
18
|
+
[LightPushStatusCode.BAD_REQUEST]: "Invalid request format or missing required fields",
|
19
|
+
[LightPushStatusCode.UNSUPPORTED_PUBSUB_TOPIC]: "The specified pubsub topic is not supported",
|
20
|
+
[LightPushStatusCode.REQUEST_TOO_LARGE]: "Message size exceeds maximum allowed size",
|
21
|
+
[LightPushStatusCode.TOO_MANY_REQUESTS]: "Rate limit exceeded, too many requests",
|
22
|
+
[LightPushStatusCode.INTERNAL_SERVER_ERROR]: "Internal server error occurred",
|
23
|
+
[LightPushStatusCode.NO_PEERS_TO_RELAY]: "No relay peers available to forward the message"
|
24
|
+
});
|
25
|
+
|
26
|
+
export { LightPushStatusCode };
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { LightPushStatusCodeV3 } from '../../../../interfaces/dist/light_push_v3.js';
|
2
|
+
import '../../../../interfaces/dist/protocols.js';
|
3
|
+
import '../../../../interfaces/dist/connection_manager.js';
|
4
|
+
import '../../../../interfaces/dist/health_indicator.js';
|
5
|
+
|
6
|
+
({
|
7
|
+
[LightPushStatusCodeV3.SUCCESS]: "Message sent successfully",
|
8
|
+
[LightPushStatusCodeV3.BAD_REQUEST]: "Bad request format",
|
9
|
+
[LightPushStatusCodeV3.PAYLOAD_TOO_LARGE]: "Message payload exceeds maximum size",
|
10
|
+
[LightPushStatusCodeV3.INVALID_MESSAGE_ERROR]: "Message validation failed",
|
11
|
+
[LightPushStatusCodeV3.UNSUPPORTED_PUBSUB_TOPIC]: "Unsupported pubsub topic",
|
12
|
+
[LightPushStatusCodeV3.TOO_MANY_REQUESTS]: "Rate limit exceeded",
|
13
|
+
[LightPushStatusCodeV3.INTERNAL_SERVER_ERROR]: "Internal server error",
|
14
|
+
[LightPushStatusCodeV3.SERVICE_NOT_AVAILABLE]: "Service temporarily unavailable",
|
15
|
+
[LightPushStatusCodeV3.OUT_OF_RLN_PROOF]: "RLN proof generation failed",
|
16
|
+
[LightPushStatusCodeV3.NO_PEERS_TO_RELAY]: "No relay peers available"
|
17
|
+
});
|
@@ -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';
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import '../../../../interfaces/dist/light_push_v3.js';
|
1
2
|
import '../../../../interfaces/dist/protocols.js';
|
2
3
|
import '../../../../interfaces/dist/connection_manager.js';
|
3
4
|
import '../../../../interfaces/dist/health_indicator.js';
|
@@ -6,6 +7,8 @@ import '../../../../proto/dist/generated/filter.js';
|
|
6
7
|
import '../../../../proto/dist/generated/topic_only_message.js';
|
7
8
|
import '../../../../proto/dist/generated/filter_v2.js';
|
8
9
|
import '../../../../proto/dist/generated/light_push.js';
|
10
|
+
import '../../../../proto/dist/generated/light_push_v2.js';
|
11
|
+
import '../../../../proto/dist/generated/light_push_v3.js';
|
9
12
|
import '../../../../proto/dist/generated/store_v3.js';
|
10
13
|
import '../../../../proto/dist/generated/peer_exchange.js';
|
11
14
|
import '../../../../proto/dist/generated/metadata.js';
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import '../../../../interfaces/dist/light_push_v3.js';
|
1
2
|
import '../../../../interfaces/dist/protocols.js';
|
2
3
|
import '../../../../interfaces/dist/connection_manager.js';
|
3
4
|
import '../../../../interfaces/dist/health_indicator.js';
|
@@ -19,6 +20,8 @@ import '../../../../proto/dist/generated/filter.js';
|
|
19
20
|
import '../../../../proto/dist/generated/topic_only_message.js';
|
20
21
|
import '../../../../proto/dist/generated/filter_v2.js';
|
21
22
|
import '../../../../proto/dist/generated/light_push.js';
|
23
|
+
import '../../../../proto/dist/generated/light_push_v2.js';
|
24
|
+
import '../../../../proto/dist/generated/light_push_v3.js';
|
22
25
|
import '../../../../proto/dist/generated/store_v3.js';
|
23
26
|
import '../../../../proto/dist/generated/peer_exchange.js';
|
24
27
|
import '../../../../proto/dist/generated/metadata.js';
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// Light Push V3 Protocol Types and Constants
|
2
|
+
var LightPushStatusCodeV3;
|
3
|
+
(function (LightPushStatusCodeV3) {
|
4
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["SUCCESS"] = 200] = "SUCCESS";
|
5
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["BAD_REQUEST"] = 400] = "BAD_REQUEST";
|
6
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["PAYLOAD_TOO_LARGE"] = 413] = "PAYLOAD_TOO_LARGE";
|
7
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["INVALID_MESSAGE_ERROR"] = 420] = "INVALID_MESSAGE_ERROR";
|
8
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["UNSUPPORTED_PUBSUB_TOPIC"] = 421] = "UNSUPPORTED_PUBSUB_TOPIC";
|
9
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
|
10
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
|
11
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["SERVICE_NOT_AVAILABLE"] = 503] = "SERVICE_NOT_AVAILABLE";
|
12
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["OUT_OF_RLN_PROOF"] = 504] = "OUT_OF_RLN_PROOF";
|
13
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["NO_PEERS_TO_RELAY"] = 505] = "NO_PEERS_TO_RELAY";
|
14
|
+
})(LightPushStatusCodeV3 || (LightPushStatusCodeV3 = {}));
|
15
|
+
|
16
|
+
export { LightPushStatusCodeV3 };
|
@@ -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 };
|