@waku/rln 0.1.6-ace7ca2.0 → 0.1.6-b0a2e39.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/index.js +1 -1
- 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 +2 -0
- package/bundle/packages/core/dist/lib/light_push/light_push.js +12 -9
- package/bundle/packages/core/dist/lib/light_push/light_push_v3.js +30 -0
- package/bundle/packages/core/dist/lib/light_push/utils.js +18 -0
- package/bundle/packages/core/dist/lib/message/version_0.js +1 -0
- 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/interfaces/dist/light_push_v3.js +29 -0
- package/bundle/packages/interfaces/dist/protocols.js +10 -0
- package/bundle/packages/proto/dist/generated/light_push.js +3 -3
- 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/constants.js +1 -7
- package/bundle/packages/rln/dist/contract/rln_base_contract.js +8 -34
- package/bundle/packages/rln/dist/contract/rln_contract.js +1 -0
- package/bundle/packages/rln/dist/credentials_manager.js +15 -16
- package/bundle/packages/rln/dist/identity.js +8 -5
- package/bundle/packages/rln/dist/keystore/keystore.js +12 -15
- package/bundle/packages/rln/dist/message.js +2 -0
- package/bundle/packages/rln/dist/rln.js +2 -0
- package/bundle/packages/rln/dist/utils/bytes.js +16 -14
- 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/dist/contract/constants.d.ts +0 -6
- package/dist/contract/constants.js +0 -6
- package/dist/contract/constants.js.map +1 -1
- package/dist/contract/rln_base_contract.d.ts +0 -6
- package/dist/contract/rln_base_contract.js +7 -34
- package/dist/contract/rln_base_contract.js.map +1 -1
- package/dist/contract/test-utils.d.ts +39 -0
- package/dist/contract/test-utils.js +118 -0
- package/dist/contract/test-utils.js.map +1 -0
- package/dist/credentials_manager.js +14 -16
- package/dist/credentials_manager.js.map +1 -1
- package/dist/identity.d.ts +2 -4
- package/dist/identity.js +6 -5
- package/dist/identity.js.map +1 -1
- package/dist/keystore/keystore.js +11 -15
- package/dist/keystore/keystore.js.map +1 -1
- package/dist/utils/bytes.d.ts +6 -2
- package/dist/utils/bytes.js +15 -13
- package/dist/utils/bytes.js.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/contract/constants.ts +0 -9
- package/src/contract/rln_base_contract.ts +14 -49
- package/src/contract/test-utils.ts +179 -0
- package/src/credentials_manager.ts +21 -27
- package/src/identity.ts +7 -5
- package/src/keystore/keystore.ts +24 -28
- package/src/utils/bytes.ts +25 -21
- package/src/utils/index.ts +1 -1
package/bundle/_virtual/utils.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
var utils = {};
|
1
|
+
var utils = {exports: {}};
|
2
2
|
|
3
|
-
export { utils as
|
3
|
+
export { utils as __module };
|
@@ -1,3 +1,3 @@
|
|
1
|
-
var utils = {
|
1
|
+
var utils = {};
|
2
2
|
|
3
|
-
export { utils as
|
3
|
+
export { utils as __exports };
|
package/bundle/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
export { RLNDecoder, RLNEncoder } from './packages/rln/dist/codec.js';
|
2
2
|
export { RLN_ABI } from './packages/rln/dist/contract/abi.js';
|
3
3
|
export { RLNContract } from './packages/rln/dist/contract/rln_contract.js';
|
4
|
-
export {
|
4
|
+
export { DEFAULT_RATE_LIMIT, LINEA_CONTRACT, RATE_LIMIT_PARAMS, RATE_LIMIT_TIERS } from './packages/rln/dist/contract/constants.js';
|
5
5
|
export { MembershipState } from './packages/rln/dist/contract/types.js';
|
6
6
|
export { RLNBaseContract } from './packages/rln/dist/contract/rln_base_contract.js';
|
7
7
|
export { createRLN } from './packages/rln/dist/create.js';
|
@@ -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/utils2.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/utils2.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/utils2.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/utils2.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/utils2.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/utils2.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/utils2.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/utils2.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/utils.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/utils2.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,7 @@ 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_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';
|
@@ -1,15 +1,7 @@
|
|
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';
|
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
|
-
export { PushResponse } from '../../../../proto/dist/generated/light_push.js';
|
9
|
-
import '../../../../proto/dist/generated/store_v3.js';
|
10
|
-
import '../../../../proto/dist/generated/peer_exchange.js';
|
11
|
-
import '../../../../proto/dist/generated/metadata.js';
|
12
|
-
import '../../../../proto/dist/generated/sds_message.js';
|
13
5
|
import '../../../../../node_modules/multiformats/dist/src/bases/base10.js';
|
14
6
|
import '../../../../../node_modules/multiformats/dist/src/bases/base16.js';
|
15
7
|
import '../../../../../node_modules/multiformats/dist/src/bases/base2.js';
|
@@ -23,5 +15,16 @@ import '../../../../../node_modules/multiformats/dist/src/bases/identity.js';
|
|
23
15
|
import '../../../../../node_modules/multiformats/dist/src/codecs/json.js';
|
24
16
|
import { Logger } from '../../../../utils/dist/logger/index.js';
|
25
17
|
import '../../../../../node_modules/it-length-prefixed/dist/src/decode.js';
|
18
|
+
import '../../../../proto/dist/generated/message.js';
|
19
|
+
import '../../../../proto/dist/generated/filter.js';
|
20
|
+
import '../../../../proto/dist/generated/topic_only_message.js';
|
21
|
+
import '../../../../proto/dist/generated/filter_v2.js';
|
22
|
+
import '../../../../proto/dist/generated/light_push.js';
|
23
|
+
import '../../../../proto/dist/generated/light_push_v3.js';
|
24
|
+
import '../../../../proto/dist/generated/store_v3.js';
|
25
|
+
import '../../../../proto/dist/generated/peer_exchange.js';
|
26
|
+
import '../../../../proto/dist/generated/metadata.js';
|
27
|
+
import '../../../../proto/dist/generated/sds_message.js';
|
28
|
+
import './utils.js';
|
26
29
|
|
27
30
|
new Logger("light-push");
|
@@ -0,0 +1,30 @@
|
|
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_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 './utils.js';
|
29
|
+
|
30
|
+
new Logger("light-push-v3");
|
@@ -0,0 +1,18 @@
|
|
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 '../../../../../node_modules/multiformats/dist/src/bases/base10.js';
|
6
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base16.js';
|
7
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base2.js';
|
8
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base256emoji.js';
|
9
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base32.js';
|
10
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base36.js';
|
11
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base58.js';
|
12
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base64.js';
|
13
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/base8.js';
|
14
|
+
import '../../../../../node_modules/multiformats/dist/src/bases/identity.js';
|
15
|
+
import '../../../../../node_modules/multiformats/dist/src/codecs/json.js';
|
16
|
+
import { Logger } from '../../../../utils/dist/logger/index.js';
|
17
|
+
|
18
|
+
new Logger("waku:light-push:utils");
|
@@ -3,6 +3,7 @@ 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_v3.js';
|
6
7
|
import '../../../../proto/dist/generated/store_v3.js';
|
7
8
|
import '../../../../proto/dist/generated/peer_exchange.js';
|
8
9
|
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,7 @@ 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_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';
|
@@ -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,7 @@ 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_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';
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import './protocols.js';
|
2
|
+
|
3
|
+
var LightPushStatusCodeV3;
|
4
|
+
(function (LightPushStatusCodeV3) {
|
5
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["SUCCESS"] = 200] = "SUCCESS";
|
6
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["BAD_REQUEST"] = 400] = "BAD_REQUEST";
|
7
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["PAYLOAD_TOO_LARGE"] = 413] = "PAYLOAD_TOO_LARGE";
|
8
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["INVALID_MESSAGE_ERROR"] = 420] = "INVALID_MESSAGE_ERROR";
|
9
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["UNSUPPORTED_PUBSUB_TOPIC"] = 421] = "UNSUPPORTED_PUBSUB_TOPIC";
|
10
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
|
11
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
|
12
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["SERVICE_NOT_AVAILABLE"] = 503] = "SERVICE_NOT_AVAILABLE";
|
13
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["OUT_OF_RLN_PROOF"] = 504] = "OUT_OF_RLN_PROOF";
|
14
|
+
LightPushStatusCodeV3[LightPushStatusCodeV3["NO_PEERS_TO_RELAY"] = 505] = "NO_PEERS_TO_RELAY";
|
15
|
+
})(LightPushStatusCodeV3 || (LightPushStatusCodeV3 = {}));
|
16
|
+
({
|
17
|
+
[LightPushStatusCodeV3.SUCCESS]: "Message sent successfully",
|
18
|
+
[LightPushStatusCodeV3.BAD_REQUEST]: "Bad request format",
|
19
|
+
[LightPushStatusCodeV3.PAYLOAD_TOO_LARGE]: "Message payload exceeds maximum size",
|
20
|
+
[LightPushStatusCodeV3.INVALID_MESSAGE_ERROR]: "Message validation failed",
|
21
|
+
[LightPushStatusCodeV3.UNSUPPORTED_PUBSUB_TOPIC]: "Unsupported pubsub topic",
|
22
|
+
[LightPushStatusCodeV3.TOO_MANY_REQUESTS]: "Rate limit exceeded",
|
23
|
+
[LightPushStatusCodeV3.INTERNAL_SERVER_ERROR]: "Internal server error",
|
24
|
+
[LightPushStatusCodeV3.SERVICE_NOT_AVAILABLE]: "Service temporarily unavailable",
|
25
|
+
[LightPushStatusCodeV3.OUT_OF_RLN_PROOF]: "RLN proof generation failed",
|
26
|
+
[LightPushStatusCodeV3.NO_PEERS_TO_RELAY]: "No relay peers available"
|
27
|
+
});
|
28
|
+
|
29
|
+
export { LightPushStatusCodeV3 };
|
@@ -74,6 +74,16 @@ var ProtocolError;
|
|
74
74
|
* nwaku: https://github.com/waku-org/nwaku/blob/c3cb06ac6c03f0f382d3941ea53b330f6a8dd127/waku/waku_rln_relay/group_manager/group_manager_base.nim#L201C19-L201C42
|
75
75
|
*/
|
76
76
|
ProtocolError["RLN_PROOF_GENERATION"] = "Proof generation failed";
|
77
|
+
/**
|
78
|
+
* Message validation failed according to Light Push v3 specifications.
|
79
|
+
* This includes validation of message format, fields, or other protocol-specific requirements.
|
80
|
+
*/
|
81
|
+
ProtocolError["INVALID_MESSAGE"] = "Invalid message format";
|
82
|
+
/**
|
83
|
+
* Rate limiting error when too many requests are sent in a short period.
|
84
|
+
* Mitigation: Implement backoff strategy or reduce request frequency.
|
85
|
+
*/
|
86
|
+
ProtocolError["RATE_LIMIT_EXCEEDED"] = "Rate limit exceeded";
|
77
87
|
//
|
78
88
|
// RECEIVE ERRORS SECTION
|
79
89
|
//
|
@@ -122,7 +122,7 @@ var PushResponse;
|
|
122
122
|
return decodeMessage(buf, PushResponse.codec(), opts);
|
123
123
|
};
|
124
124
|
})(PushResponse || (PushResponse = {}));
|
125
|
-
var PushRpc
|
125
|
+
var PushRpc;
|
126
126
|
(function (PushRpc) {
|
127
127
|
let _codec;
|
128
128
|
PushRpc.codec = () => {
|
@@ -187,7 +187,7 @@ var PushRpc$1;
|
|
187
187
|
PushRpc.decode = (buf, opts) => {
|
188
188
|
return decodeMessage(buf, PushRpc.codec(), opts);
|
189
189
|
};
|
190
|
-
})(PushRpc
|
190
|
+
})(PushRpc || (PushRpc = {}));
|
191
191
|
var RateLimitProof;
|
192
192
|
(function (RateLimitProof) {
|
193
193
|
let _codec;
|
@@ -386,4 +386,4 @@ var WakuMessage;
|
|
386
386
|
};
|
387
387
|
})(WakuMessage || (WakuMessage = {}));
|
388
388
|
|
389
|
-
export { PushRequest, PushResponse, PushRpc
|
389
|
+
export { PushRequest, PushResponse, PushRpc, RateLimitProof, WakuMessage };
|