@streamr/dht 102.0.0-beta.0 → 102.0.0-beta.1
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/dist/package.json +15 -16
- package/dist/src/connection/ConnectionManager.js +18 -8
- package/dist/src/connection/ConnectionManager.js.map +1 -1
- package/dist/src/connection/Handshaker.d.ts +1 -1
- package/dist/src/connection/Handshaker.js +9 -5
- package/dist/src/connection/Handshaker.js.map +1 -1
- package/dist/src/connection/ManagedConnection.js +17 -7
- package/dist/src/connection/ManagedConnection.js.map +1 -1
- package/dist/src/connection/connectivityChecker.js +20 -10
- package/dist/src/connection/connectivityChecker.js.map +1 -1
- package/dist/src/connection/connectivityRequestHandler.js +3 -3
- package/dist/src/connection/connectivityRequestHandler.js.map +1 -1
- package/dist/src/connection/simulator/Simulator.js +3 -2
- package/dist/src/connection/simulator/Simulator.js.map +1 -1
- package/dist/src/connection/simulator/pings.d.ts +1 -1
- package/dist/src/connection/simulator/pings.js +3 -3
- package/dist/src/connection/simulator/pings.js.map +1 -1
- package/dist/src/connection/webrtc/NodeWebrtcConnection.js +0 -2
- package/dist/src/connection/webrtc/NodeWebrtcConnection.js.map +1 -1
- package/dist/src/connection/webrtc/WebrtcConnector.js +19 -9
- package/dist/src/connection/webrtc/WebrtcConnector.js.map +1 -1
- package/dist/src/connection/webrtc/iceServerAsString.js +1 -2
- package/dist/src/connection/webrtc/iceServerAsString.js.map +1 -1
- package/dist/src/connection/websocket/AbstractWebsocketClientConnection.d.ts +0 -2
- package/dist/src/connection/websocket/WebsocketClientConnectorRpcLocal.d.ts +0 -1
- package/dist/src/connection/websocket/WebsocketServerConnection.d.ts +0 -1
- package/dist/src/connection/websocket/WebsocketServerConnector.js +28 -18
- package/dist/src/connection/websocket/WebsocketServerConnector.js.map +1 -1
- package/dist/src/dht/DhtNode.d.ts +1 -0
- package/dist/src/dht/DhtNode.js +3 -2
- package/dist/src/dht/DhtNode.js.map +1 -1
- package/dist/src/dht/DhtNodeRpcLocal.d.ts +1 -1
- package/dist/src/dht/PeerManager.d.ts +2 -1
- package/dist/src/dht/PeerManager.js +2 -1
- package/dist/src/dht/PeerManager.js.map +1 -1
- package/dist/src/dht/contact/SortedContactList.js +1 -1
- package/dist/src/dht/contact/SortedContactList.js.map +1 -1
- package/dist/src/dht/discovery/DiscoverySession.d.ts +0 -1
- package/dist/src/dht/discovery/PeerDiscovery.d.ts +0 -1
- package/dist/src/dht/discovery/RingDiscoverySession.d.ts +0 -1
- package/dist/src/dht/recursive-operation/RecursiveOperationManager.d.ts +2 -2
- package/dist/src/dht/routing/DuplicateDetector.js.map +1 -1
- package/dist/src/dht/routing/RoutingSession.js +2 -2
- package/dist/src/dht/routing/RoutingSession.js.map +1 -1
- package/dist/src/dht/routing/RoutingTablesCache.d.ts +1 -1
- package/dist/src/dht/store/LocalDataStore.js +1 -1
- package/dist/src/dht/store/LocalDataStore.js.map +1 -1
- package/dist/src/dht/store/StoreManager.d.ts +1 -1
- package/dist/src/dht/store/StoreRpcLocal.d.ts +1 -1
- package/dist/src/helpers/AddressTools.js +2 -3
- package/dist/src/helpers/AddressTools.js.map +1 -1
- package/dist/src/helpers/debugHelpers.js +2 -2
- package/dist/src/helpers/debugHelpers.js.map +1 -1
- package/dist/src/helpers/protoClasses.d.ts +1 -1
- package/dist/src/helpers/protoClasses.js.map +1 -1
- package/dist/src/helpers/protoToString.js +1 -2
- package/dist/src/helpers/protoToString.js.map +1 -1
- package/dist/src/helpers/version.d.ts +1 -1
- package/dist/src/helpers/version.js +4 -4
- package/dist/src/helpers/version.js.map +1 -1
- package/eslint.config.mjs +12 -0
- package/jest.config.ts +12 -0
- package/package.json +15 -16
- package/protos/DhtRpc.proto +6 -4
- package/src/connection/ConnectionManager.ts +2 -2
- package/src/connection/Handshaker.ts +15 -11
- package/src/connection/connectivityChecker.ts +4 -4
- package/src/connection/connectivityRequestHandler.ts +3 -3
- package/src/connection/simulator/Simulator.ts +4 -3
- package/src/connection/simulator/pings.ts +1 -1
- package/src/connection/webrtc/NodeWebrtcConnection.ts +0 -2
- package/src/connection/webrtc/WebrtcConnector.ts +3 -3
- package/src/connection/websocket/WebsocketServerConnector.ts +17 -13
- package/src/dht/DhtNode.ts +8 -3
- package/src/dht/DhtNodeRpcLocal.ts +1 -1
- package/src/dht/PeerManager.ts +4 -2
- package/src/dht/contact/SortedContactList.ts +1 -1
- package/src/dht/recursive-operation/RecursiveOperationManager.ts +1 -1
- package/src/dht/routing/DuplicateDetector.ts +1 -1
- package/src/dht/routing/RoutingSession.ts +2 -2
- package/src/dht/routing/RoutingTablesCache.ts +1 -1
- package/src/dht/store/LocalDataStore.ts +1 -1
- package/src/dht/store/StoreManager.ts +1 -1
- package/src/dht/store/StoreRpcLocal.ts +1 -1
- package/src/helpers/protoClasses.ts +1 -1
- package/src/helpers/version.ts +2 -2
- package/test/benchmark/Find.test.ts +3 -3
- package/test/benchmark/KademliaCorrectness.test.ts +2 -2
- package/test/benchmark/RingCorrectness.test.ts +3 -3
- package/test/benchmark/hybrid-network-simulation/RingContactList.test.ts +2 -2
- package/test/end-to-end/WebsocketConnectionRequest.test.ts +2 -2
- package/test/end-to-end/memory-leak.test.ts +2 -2
- package/test/integration/ConnectionLocking.test.ts +32 -22
- package/test/integration/ConnectionManager.test.ts +3 -3
- package/test/integration/ConnectivityChecking.test.ts +1 -1
- package/test/integration/DhtNode.test.ts +2 -2
- package/test/integration/GeoIpConnectivityChecking.test.ts +6 -6
- package/test/integration/Layer1-scale.test.ts +1 -1
- package/test/integration/RouteMessage.test.ts +4 -4
- package/test/integration/SimultaneousConnections.test.ts +9 -9
- package/test/integration/StoreOnDhtWithThreeNodes.test.ts +1 -1
- package/test/integration/StoreOnDhtWithTwoNodes.test.ts +3 -3
- package/test/integration/StoreRpcRemote.test.ts +1 -1
- package/test/integration/WebrtcConnectionManagement.test.ts +0 -28
- package/test/integration/WebrtcConnectorRpc.test.ts +5 -5
- package/test/integration/WebsocketConnectionManagement.test.ts +3 -3
- package/test/integration/rpc-connections-over-webrtc.test.ts +8 -43
- package/test/unit/AutoCertifierClientFacade.test.ts +6 -6
- package/test/unit/Handshaker.test.ts +1 -1
- package/test/unit/ListeningRpcCommunicator.test.ts +3 -3
- package/test/unit/PeerManager.test.ts +2 -2
- package/test/unit/RecursiveOperationSession.test.ts +2 -2
- package/test/unit/RoutingSession.test.ts +7 -0
- package/test/unit/SortedContactList.test.ts +3 -3
- package/test/unit/StoreManager.test.ts +2 -2
- package/test/unit/connectivityRequestHandler.test.ts +5 -5
- package/test/unit/customMatchers.test.ts +18 -0
- package/test/unit/getClosestNodes.test.ts +1 -1
- package/test/unit/version.test.ts +9 -9
- package/test/utils/customMatchers.ts +6 -6
- package/test/utils/topology.ts +0 -1
- package/test/utils/utils.ts +2 -2
- package/.eslintignore +0 -5
- package/.eslintrc +0 -3
- package/dist/generated/google/protobuf/any.d.ts +0 -180
- package/dist/generated/google/protobuf/any.js +0 -155
- package/dist/generated/google/protobuf/any.js.map +0 -1
- package/dist/generated/google/protobuf/empty.d.ts +0 -31
- package/dist/generated/google/protobuf/empty.js +0 -32
- package/dist/generated/google/protobuf/empty.js.map +0 -1
- package/dist/generated/google/protobuf/timestamp.d.ts +0 -155
- package/dist/generated/google/protobuf/timestamp.js +0 -136
- package/dist/generated/google/protobuf/timestamp.js.map +0 -1
- package/dist/generated/packages/dht/protos/DhtRpc.client.d.ts +0 -361
- package/dist/generated/packages/dht/protos/DhtRpc.client.js +0 -285
- package/dist/generated/packages/dht/protos/DhtRpc.client.js.map +0 -1
- package/dist/generated/packages/dht/protos/DhtRpc.d.ts +0 -991
- package/dist/generated/packages/dht/protos/DhtRpc.js +0 -675
- package/dist/generated/packages/dht/protos/DhtRpc.js.map +0 -1
- package/dist/generated/packages/dht/protos/DhtRpc.server.d.ts +0 -162
- package/dist/generated/packages/dht/protos/DhtRpc.server.js +0 -3
- package/dist/generated/packages/dht/protos/DhtRpc.server.js.map +0 -1
- package/dist/generated/packages/proto-rpc/protos/ProtoRpc.d.ts +0 -87
- package/dist/generated/packages/proto-rpc/protos/ProtoRpc.js +0 -66
- package/dist/generated/packages/proto-rpc/protos/ProtoRpc.js.map +0 -1
- package/generated/google/protobuf/any.ts +0 -326
- package/generated/google/protobuf/empty.ts +0 -81
- package/generated/google/protobuf/timestamp.ts +0 -287
- package/generated/packages/dht/protos/DhtRpc.client.ts +0 -419
- package/generated/packages/dht/protos/DhtRpc.server.ts +0 -165
- package/generated/packages/dht/protos/DhtRpc.ts +0 -1266
- package/generated/packages/proto-rpc/protos/ProtoRpc.ts +0 -108
- package/jest.config.js +0 -5
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.9.4 with parameter server_generic,generate_dependencies,long_type_number
|
|
2
|
-
// @generated from protobuf file "packages/proto-rpc/protos/ProtoRpc.proto" (package "protorpc", syntax proto3)
|
|
3
|
-
// tslint:disable
|
|
4
|
-
import { MessageType } from "@protobuf-ts/runtime";
|
|
5
|
-
import { Empty } from "../../../google/protobuf/empty";
|
|
6
|
-
import { Any } from "../../../google/protobuf/any";
|
|
7
|
-
/**
|
|
8
|
-
* @generated from protobuf message protorpc.RpcMessage
|
|
9
|
-
*/
|
|
10
|
-
export interface RpcMessage {
|
|
11
|
-
/**
|
|
12
|
-
* @generated from protobuf field: map<string, string> header = 1;
|
|
13
|
-
*/
|
|
14
|
-
header: {
|
|
15
|
-
[key: string]: string;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* @generated from protobuf field: google.protobuf.Any body = 2;
|
|
19
|
-
*/
|
|
20
|
-
body?: Any;
|
|
21
|
-
/**
|
|
22
|
-
* @generated from protobuf field: string requestId = 3;
|
|
23
|
-
*/
|
|
24
|
-
requestId: string;
|
|
25
|
-
/**
|
|
26
|
-
* @generated from protobuf field: optional protorpc.RpcErrorType errorType = 4;
|
|
27
|
-
*/
|
|
28
|
-
errorType?: RpcErrorType;
|
|
29
|
-
/**
|
|
30
|
-
* @generated from protobuf field: optional string errorClassName = 5;
|
|
31
|
-
*/
|
|
32
|
-
errorClassName?: string;
|
|
33
|
-
/**
|
|
34
|
-
* @generated from protobuf field: optional string errorCode = 6;
|
|
35
|
-
*/
|
|
36
|
-
errorCode?: string;
|
|
37
|
-
/**
|
|
38
|
-
* @generated from protobuf field: optional string errorMessage = 7;
|
|
39
|
-
*/
|
|
40
|
-
errorMessage?: string;
|
|
41
|
-
}
|
|
42
|
-
// Dummy message to force the generation of the typescript class "google.prototype.Empty"
|
|
43
|
-
// We need this generated class in RpcCommunicator
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* @generated from protobuf message protorpc.Mnfo2uhnf92hvqi2nviouq2hv9puhq
|
|
47
|
-
*/
|
|
48
|
-
export interface Mnfo2uhnf92hvqi2nviouq2hv9puhq {
|
|
49
|
-
/**
|
|
50
|
-
* @generated from protobuf field: google.protobuf.Empty empty = 1;
|
|
51
|
-
*/
|
|
52
|
-
empty?: Empty;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* @generated from protobuf enum protorpc.RpcErrorType
|
|
56
|
-
*/
|
|
57
|
-
export enum RpcErrorType {
|
|
58
|
-
/**
|
|
59
|
-
* @generated from protobuf enum value: SERVER_TIMEOUT = 0;
|
|
60
|
-
*/
|
|
61
|
-
SERVER_TIMEOUT = 0,
|
|
62
|
-
/**
|
|
63
|
-
* @generated from protobuf enum value: CLIENT_TIMEOUT = 1;
|
|
64
|
-
*/
|
|
65
|
-
CLIENT_TIMEOUT = 1,
|
|
66
|
-
/**
|
|
67
|
-
* @generated from protobuf enum value: UNKNOWN_RPC_METHOD = 2;
|
|
68
|
-
*/
|
|
69
|
-
UNKNOWN_RPC_METHOD = 2,
|
|
70
|
-
/**
|
|
71
|
-
* @generated from protobuf enum value: CLIENT_ERROR = 3;
|
|
72
|
-
*/
|
|
73
|
-
CLIENT_ERROR = 3,
|
|
74
|
-
/**
|
|
75
|
-
* @generated from protobuf enum value: SERVER_ERROR = 4;
|
|
76
|
-
*/
|
|
77
|
-
SERVER_ERROR = 4
|
|
78
|
-
}
|
|
79
|
-
// @generated message type with reflection information, may provide speed optimized methods
|
|
80
|
-
class RpcMessage$Type extends MessageType<RpcMessage> {
|
|
81
|
-
constructor() {
|
|
82
|
-
super("protorpc.RpcMessage", [
|
|
83
|
-
{ no: 1, name: "header", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } },
|
|
84
|
-
{ no: 2, name: "body", kind: "message", T: () => Any },
|
|
85
|
-
{ no: 3, name: "requestId", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
86
|
-
{ no: 4, name: "errorType", kind: "enum", opt: true, T: () => ["protorpc.RpcErrorType", RpcErrorType] },
|
|
87
|
-
{ no: 5, name: "errorClassName", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
88
|
-
{ no: 6, name: "errorCode", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
89
|
-
{ no: 7, name: "errorMessage", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
|
|
90
|
-
]);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* @generated MessageType for protobuf message protorpc.RpcMessage
|
|
95
|
-
*/
|
|
96
|
-
export const RpcMessage = new RpcMessage$Type();
|
|
97
|
-
// @generated message type with reflection information, may provide speed optimized methods
|
|
98
|
-
class Mnfo2uhnf92hvqi2nviouq2hv9puhq$Type extends MessageType<Mnfo2uhnf92hvqi2nviouq2hv9puhq> {
|
|
99
|
-
constructor() {
|
|
100
|
-
super("protorpc.Mnfo2uhnf92hvqi2nviouq2hv9puhq", [
|
|
101
|
-
{ no: 1, name: "empty", kind: "message", T: () => Empty }
|
|
102
|
-
]);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* @generated MessageType for protobuf message protorpc.Mnfo2uhnf92hvqi2nviouq2hv9puhq
|
|
107
|
-
*/
|
|
108
|
-
export const Mnfo2uhnf92hvqi2nviouq2hv9puhq = new Mnfo2uhnf92hvqi2nviouq2hv9puhq$Type();
|