@waku/rln 0.1.6-b7e9b08.0 → 0.1.6-f911bf8.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/index.js +2 -1
- package/bundle/node_modules/@ethersproject/keccak256/lib.esm/index.js +1 -1
- package/bundle/node_modules/{@ethersproject/keccak256/node_modules/js-sha3 → js-sha3}/src/sha3.js +2 -2
- package/bundle/packages/core/dist/lib/connection_manager/connection_manager.js +0 -3
- package/bundle/packages/core/dist/lib/connection_manager/keep_alive_manager.js +3 -3
- package/bundle/packages/core/dist/lib/filter/filter.js +0 -3
- package/bundle/packages/core/dist/lib/light_push/light_push.js +0 -3
- package/bundle/packages/core/dist/lib/metadata/metadata.js +0 -3
- package/bundle/packages/core/dist/lib/store/store.js +3 -3
- package/bundle/packages/rln/dist/codec.js +3 -3
- package/bundle/packages/rln/dist/contract/constants.js +1 -0
- package/bundle/packages/rln/dist/contract/rln_base_contract.js +130 -74
- package/bundle/packages/rln/dist/contract/rln_contract.js +3 -3
- package/bundle/packages/rln/dist/credentials_manager.js +4 -4
- package/bundle/packages/rln/dist/identity.js +1 -1
- package/bundle/packages/rln/dist/keystore/keystore.js +4 -4
- package/bundle/packages/rln/dist/rln.js +3 -3
- package/bundle/packages/rln/dist/utils/bytes.js +6 -2
- package/bundle/packages/rln/dist/utils/epoch.js +3 -3
- package/bundle/packages/utils/dist/common/sharding/index.js +4 -4
- package/dist/.tsbuildinfo +1 -1
- package/dist/contract/index.d.ts +1 -0
- package/dist/contract/index.js +1 -0
- package/dist/contract/index.js.map +1 -1
- package/dist/contract/rln_base_contract.d.ts +32 -22
- package/dist/contract/rln_base_contract.js +127 -71
- package/dist/contract/rln_base_contract.js.map +1 -1
- package/dist/contract/types.d.ts +5 -0
- package/dist/contract/types.js.map +1 -1
- package/dist/credentials_manager.js +1 -1
- package/dist/credentials_manager.js.map +1 -1
- package/dist/identity.js +1 -1
- package/dist/identity.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/keystore/keystore.js.map +1 -1
- package/dist/keystore/types.d.ts +2 -2
- package/dist/utils/bytes.js +6 -2
- package/dist/utils/bytes.js.map +1 -1
- package/package.json +1 -1
- package/src/contract/index.ts +1 -0
- package/src/contract/rln_base_contract.ts +166 -102
- package/src/contract/types.ts +5 -0
- package/src/credentials_manager.ts +1 -1
- package/src/identity.ts +1 -1
- package/src/index.ts +3 -1
- package/src/keystore/keystore.ts +4 -2
- package/src/keystore/types.ts +2 -2
- package/src/utils/bytes.ts +6 -2
- package/bundle/packages/utils/node_modules/@waku/interfaces/dist/connection_manager.js +0 -19
- package/bundle/packages/utils/node_modules/@waku/interfaces/dist/health_indicator.js +0 -12
- package/bundle/packages/utils/node_modules/@waku/interfaces/dist/protocols.js +0 -92
- /package/bundle/packages/{utils/node_modules/@waku/interfaces → interfaces}/dist/constants.js +0 -0
- /package/bundle/{node_modules → packages/rln/node_modules}/uuid/dist/esm-browser/native.js +0 -0
- /package/bundle/{node_modules → packages/rln/node_modules}/uuid/dist/esm-browser/rng.js +0 -0
- /package/bundle/{node_modules → packages/rln/node_modules}/uuid/dist/esm-browser/stringify.js +0 -0
- /package/bundle/{node_modules → packages/rln/node_modules}/uuid/dist/esm-browser/v4.js +0 -0
@@ -1,92 +0,0 @@
|
|
1
|
-
var Protocols;
|
2
|
-
(function (Protocols) {
|
3
|
-
Protocols["Relay"] = "relay";
|
4
|
-
Protocols["Store"] = "store";
|
5
|
-
Protocols["LightPush"] = "lightpush";
|
6
|
-
Protocols["Filter"] = "filter";
|
7
|
-
})(Protocols || (Protocols = {}));
|
8
|
-
var ProtocolError;
|
9
|
-
(function (ProtocolError) {
|
10
|
-
//
|
11
|
-
// GENERAL ERRORS SECTION
|
12
|
-
//
|
13
|
-
/**
|
14
|
-
* Could not determine the origin of the fault. Best to check connectivity and try again
|
15
|
-
* */
|
16
|
-
ProtocolError["GENERIC_FAIL"] = "Generic error";
|
17
|
-
/**
|
18
|
-
* The remote peer rejected the message. Information provided by the remote peer
|
19
|
-
* is logged. Review message validity, or mitigation for `NO_PEER_AVAILABLE`
|
20
|
-
* or `DECODE_FAILED` can be used.
|
21
|
-
*/
|
22
|
-
ProtocolError["REMOTE_PEER_REJECTED"] = "Remote peer rejected";
|
23
|
-
/**
|
24
|
-
* Failure to protobuf decode the message. May be due to a remote peer issue,
|
25
|
-
* ensuring that messages are sent via several peer enable mitigation of this error.
|
26
|
-
*/
|
27
|
-
ProtocolError["DECODE_FAILED"] = "Failed to decode";
|
28
|
-
/**
|
29
|
-
* Failure to find a peer with suitable protocols. This may due to a connection issue.
|
30
|
-
* Mitigation can be: retrying after a given time period, display connectivity issue
|
31
|
-
* to user or listening for `peer:connected:bootstrap` or `peer:connected:peer-exchange`
|
32
|
-
* on the connection manager before retrying.
|
33
|
-
*/
|
34
|
-
ProtocolError["NO_PEER_AVAILABLE"] = "No peer available";
|
35
|
-
/**
|
36
|
-
* Failure to find a stream to the peer. This may be because the connection with the peer is not still alive.
|
37
|
-
* Mitigation can be: retrying after a given time period, or mitigation for `NO_PEER_AVAILABLE` can be used.
|
38
|
-
*/
|
39
|
-
ProtocolError["NO_STREAM_AVAILABLE"] = "No stream available";
|
40
|
-
/**
|
41
|
-
* The remote peer did not behave as expected. Mitigation for `NO_PEER_AVAILABLE`
|
42
|
-
* or `DECODE_FAILED` can be used.
|
43
|
-
*/
|
44
|
-
ProtocolError["NO_RESPONSE"] = "No response received";
|
45
|
-
//
|
46
|
-
// SEND ERRORS SECTION
|
47
|
-
//
|
48
|
-
/**
|
49
|
-
* Failure to protobuf encode the message. This is not recoverable and needs
|
50
|
-
* further investigation.
|
51
|
-
*/
|
52
|
-
ProtocolError["ENCODE_FAILED"] = "Failed to encode";
|
53
|
-
/**
|
54
|
-
* The message payload is empty, making the message invalid. Ensure that a non-empty
|
55
|
-
* payload is set on the outgoing message.
|
56
|
-
*/
|
57
|
-
ProtocolError["EMPTY_PAYLOAD"] = "Payload is empty";
|
58
|
-
/**
|
59
|
-
* The message size is above the maximum message size allowed on the Waku Network.
|
60
|
-
* Compressing the message or using an alternative strategy for large messages is recommended.
|
61
|
-
*/
|
62
|
-
ProtocolError["SIZE_TOO_BIG"] = "Size is too big";
|
63
|
-
/**
|
64
|
-
* The PubsubTopic passed to the send function is not configured on the Waku node.
|
65
|
-
* Please ensure that the PubsubTopic is used when initializing the Waku node.
|
66
|
-
*/
|
67
|
-
ProtocolError["TOPIC_NOT_CONFIGURED"] = "Topic not configured";
|
68
|
-
/**
|
69
|
-
* Fails when
|
70
|
-
*/
|
71
|
-
ProtocolError["STREAM_ABORTED"] = "Stream aborted";
|
72
|
-
/**
|
73
|
-
* General proof generation error message.
|
74
|
-
* nwaku: https://github.com/waku-org/nwaku/blob/c3cb06ac6c03f0f382d3941ea53b330f6a8dd127/waku/waku_rln_relay/group_manager/group_manager_base.nim#L201C19-L201C42
|
75
|
-
*/
|
76
|
-
ProtocolError["RLN_PROOF_GENERATION"] = "Proof generation failed";
|
77
|
-
//
|
78
|
-
// RECEIVE ERRORS SECTION
|
79
|
-
//
|
80
|
-
/**
|
81
|
-
* The pubsub topic configured on the decoder does not match the pubsub topic setup on the protocol.
|
82
|
-
* Ensure that the pubsub topic used for decoder creation is the same as the one used for protocol.
|
83
|
-
*/
|
84
|
-
ProtocolError["TOPIC_DECODER_MISMATCH"] = "Topic decoder mismatch";
|
85
|
-
/**
|
86
|
-
* The topics passed in the decoders do not match each other, or don't exist at all.
|
87
|
-
* Ensure that all the pubsub topics used in the decoders are valid and match each other.
|
88
|
-
*/
|
89
|
-
ProtocolError["INVALID_DECODER_TOPICS"] = "Invalid decoder topics";
|
90
|
-
})(ProtocolError || (ProtocolError = {}));
|
91
|
-
|
92
|
-
export { ProtocolError, Protocols };
|
/package/bundle/packages/{utils/node_modules/@waku/interfaces → interfaces}/dist/constants.js
RENAMED
File without changes
|
File without changes
|
File without changes
|
/package/bundle/{node_modules → packages/rln/node_modules}/uuid/dist/esm-browser/stringify.js
RENAMED
File without changes
|
File without changes
|