@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.
Files changed (153) hide show
  1. package/dist/package.json +15 -16
  2. package/dist/src/connection/ConnectionManager.js +18 -8
  3. package/dist/src/connection/ConnectionManager.js.map +1 -1
  4. package/dist/src/connection/Handshaker.d.ts +1 -1
  5. package/dist/src/connection/Handshaker.js +9 -5
  6. package/dist/src/connection/Handshaker.js.map +1 -1
  7. package/dist/src/connection/ManagedConnection.js +17 -7
  8. package/dist/src/connection/ManagedConnection.js.map +1 -1
  9. package/dist/src/connection/connectivityChecker.js +20 -10
  10. package/dist/src/connection/connectivityChecker.js.map +1 -1
  11. package/dist/src/connection/connectivityRequestHandler.js +3 -3
  12. package/dist/src/connection/connectivityRequestHandler.js.map +1 -1
  13. package/dist/src/connection/simulator/Simulator.js +3 -2
  14. package/dist/src/connection/simulator/Simulator.js.map +1 -1
  15. package/dist/src/connection/simulator/pings.d.ts +1 -1
  16. package/dist/src/connection/simulator/pings.js +3 -3
  17. package/dist/src/connection/simulator/pings.js.map +1 -1
  18. package/dist/src/connection/webrtc/NodeWebrtcConnection.js +0 -2
  19. package/dist/src/connection/webrtc/NodeWebrtcConnection.js.map +1 -1
  20. package/dist/src/connection/webrtc/WebrtcConnector.js +19 -9
  21. package/dist/src/connection/webrtc/WebrtcConnector.js.map +1 -1
  22. package/dist/src/connection/webrtc/iceServerAsString.js +1 -2
  23. package/dist/src/connection/webrtc/iceServerAsString.js.map +1 -1
  24. package/dist/src/connection/websocket/AbstractWebsocketClientConnection.d.ts +0 -2
  25. package/dist/src/connection/websocket/WebsocketClientConnectorRpcLocal.d.ts +0 -1
  26. package/dist/src/connection/websocket/WebsocketServerConnection.d.ts +0 -1
  27. package/dist/src/connection/websocket/WebsocketServerConnector.js +28 -18
  28. package/dist/src/connection/websocket/WebsocketServerConnector.js.map +1 -1
  29. package/dist/src/dht/DhtNode.d.ts +1 -0
  30. package/dist/src/dht/DhtNode.js +3 -2
  31. package/dist/src/dht/DhtNode.js.map +1 -1
  32. package/dist/src/dht/DhtNodeRpcLocal.d.ts +1 -1
  33. package/dist/src/dht/PeerManager.d.ts +2 -1
  34. package/dist/src/dht/PeerManager.js +2 -1
  35. package/dist/src/dht/PeerManager.js.map +1 -1
  36. package/dist/src/dht/contact/SortedContactList.js +1 -1
  37. package/dist/src/dht/contact/SortedContactList.js.map +1 -1
  38. package/dist/src/dht/discovery/DiscoverySession.d.ts +0 -1
  39. package/dist/src/dht/discovery/PeerDiscovery.d.ts +0 -1
  40. package/dist/src/dht/discovery/RingDiscoverySession.d.ts +0 -1
  41. package/dist/src/dht/recursive-operation/RecursiveOperationManager.d.ts +2 -2
  42. package/dist/src/dht/routing/DuplicateDetector.js.map +1 -1
  43. package/dist/src/dht/routing/RoutingSession.js +2 -2
  44. package/dist/src/dht/routing/RoutingSession.js.map +1 -1
  45. package/dist/src/dht/routing/RoutingTablesCache.d.ts +1 -1
  46. package/dist/src/dht/store/LocalDataStore.js +1 -1
  47. package/dist/src/dht/store/LocalDataStore.js.map +1 -1
  48. package/dist/src/dht/store/StoreManager.d.ts +1 -1
  49. package/dist/src/dht/store/StoreRpcLocal.d.ts +1 -1
  50. package/dist/src/helpers/AddressTools.js +2 -3
  51. package/dist/src/helpers/AddressTools.js.map +1 -1
  52. package/dist/src/helpers/debugHelpers.js +2 -2
  53. package/dist/src/helpers/debugHelpers.js.map +1 -1
  54. package/dist/src/helpers/protoClasses.d.ts +1 -1
  55. package/dist/src/helpers/protoClasses.js.map +1 -1
  56. package/dist/src/helpers/protoToString.js +1 -2
  57. package/dist/src/helpers/protoToString.js.map +1 -1
  58. package/dist/src/helpers/version.d.ts +1 -1
  59. package/dist/src/helpers/version.js +4 -4
  60. package/dist/src/helpers/version.js.map +1 -1
  61. package/eslint.config.mjs +12 -0
  62. package/jest.config.ts +12 -0
  63. package/package.json +15 -16
  64. package/protos/DhtRpc.proto +6 -4
  65. package/src/connection/ConnectionManager.ts +2 -2
  66. package/src/connection/Handshaker.ts +15 -11
  67. package/src/connection/connectivityChecker.ts +4 -4
  68. package/src/connection/connectivityRequestHandler.ts +3 -3
  69. package/src/connection/simulator/Simulator.ts +4 -3
  70. package/src/connection/simulator/pings.ts +1 -1
  71. package/src/connection/webrtc/NodeWebrtcConnection.ts +0 -2
  72. package/src/connection/webrtc/WebrtcConnector.ts +3 -3
  73. package/src/connection/websocket/WebsocketServerConnector.ts +17 -13
  74. package/src/dht/DhtNode.ts +8 -3
  75. package/src/dht/DhtNodeRpcLocal.ts +1 -1
  76. package/src/dht/PeerManager.ts +4 -2
  77. package/src/dht/contact/SortedContactList.ts +1 -1
  78. package/src/dht/recursive-operation/RecursiveOperationManager.ts +1 -1
  79. package/src/dht/routing/DuplicateDetector.ts +1 -1
  80. package/src/dht/routing/RoutingSession.ts +2 -2
  81. package/src/dht/routing/RoutingTablesCache.ts +1 -1
  82. package/src/dht/store/LocalDataStore.ts +1 -1
  83. package/src/dht/store/StoreManager.ts +1 -1
  84. package/src/dht/store/StoreRpcLocal.ts +1 -1
  85. package/src/helpers/protoClasses.ts +1 -1
  86. package/src/helpers/version.ts +2 -2
  87. package/test/benchmark/Find.test.ts +3 -3
  88. package/test/benchmark/KademliaCorrectness.test.ts +2 -2
  89. package/test/benchmark/RingCorrectness.test.ts +3 -3
  90. package/test/benchmark/hybrid-network-simulation/RingContactList.test.ts +2 -2
  91. package/test/end-to-end/WebsocketConnectionRequest.test.ts +2 -2
  92. package/test/end-to-end/memory-leak.test.ts +2 -2
  93. package/test/integration/ConnectionLocking.test.ts +32 -22
  94. package/test/integration/ConnectionManager.test.ts +3 -3
  95. package/test/integration/ConnectivityChecking.test.ts +1 -1
  96. package/test/integration/DhtNode.test.ts +2 -2
  97. package/test/integration/GeoIpConnectivityChecking.test.ts +6 -6
  98. package/test/integration/Layer1-scale.test.ts +1 -1
  99. package/test/integration/RouteMessage.test.ts +4 -4
  100. package/test/integration/SimultaneousConnections.test.ts +9 -9
  101. package/test/integration/StoreOnDhtWithThreeNodes.test.ts +1 -1
  102. package/test/integration/StoreOnDhtWithTwoNodes.test.ts +3 -3
  103. package/test/integration/StoreRpcRemote.test.ts +1 -1
  104. package/test/integration/WebrtcConnectionManagement.test.ts +0 -28
  105. package/test/integration/WebrtcConnectorRpc.test.ts +5 -5
  106. package/test/integration/WebsocketConnectionManagement.test.ts +3 -3
  107. package/test/integration/rpc-connections-over-webrtc.test.ts +8 -43
  108. package/test/unit/AutoCertifierClientFacade.test.ts +6 -6
  109. package/test/unit/Handshaker.test.ts +1 -1
  110. package/test/unit/ListeningRpcCommunicator.test.ts +3 -3
  111. package/test/unit/PeerManager.test.ts +2 -2
  112. package/test/unit/RecursiveOperationSession.test.ts +2 -2
  113. package/test/unit/RoutingSession.test.ts +7 -0
  114. package/test/unit/SortedContactList.test.ts +3 -3
  115. package/test/unit/StoreManager.test.ts +2 -2
  116. package/test/unit/connectivityRequestHandler.test.ts +5 -5
  117. package/test/unit/customMatchers.test.ts +18 -0
  118. package/test/unit/getClosestNodes.test.ts +1 -1
  119. package/test/unit/version.test.ts +9 -9
  120. package/test/utils/customMatchers.ts +6 -6
  121. package/test/utils/topology.ts +0 -1
  122. package/test/utils/utils.ts +2 -2
  123. package/.eslintignore +0 -5
  124. package/.eslintrc +0 -3
  125. package/dist/generated/google/protobuf/any.d.ts +0 -180
  126. package/dist/generated/google/protobuf/any.js +0 -155
  127. package/dist/generated/google/protobuf/any.js.map +0 -1
  128. package/dist/generated/google/protobuf/empty.d.ts +0 -31
  129. package/dist/generated/google/protobuf/empty.js +0 -32
  130. package/dist/generated/google/protobuf/empty.js.map +0 -1
  131. package/dist/generated/google/protobuf/timestamp.d.ts +0 -155
  132. package/dist/generated/google/protobuf/timestamp.js +0 -136
  133. package/dist/generated/google/protobuf/timestamp.js.map +0 -1
  134. package/dist/generated/packages/dht/protos/DhtRpc.client.d.ts +0 -361
  135. package/dist/generated/packages/dht/protos/DhtRpc.client.js +0 -285
  136. package/dist/generated/packages/dht/protos/DhtRpc.client.js.map +0 -1
  137. package/dist/generated/packages/dht/protos/DhtRpc.d.ts +0 -991
  138. package/dist/generated/packages/dht/protos/DhtRpc.js +0 -675
  139. package/dist/generated/packages/dht/protos/DhtRpc.js.map +0 -1
  140. package/dist/generated/packages/dht/protos/DhtRpc.server.d.ts +0 -162
  141. package/dist/generated/packages/dht/protos/DhtRpc.server.js +0 -3
  142. package/dist/generated/packages/dht/protos/DhtRpc.server.js.map +0 -1
  143. package/dist/generated/packages/proto-rpc/protos/ProtoRpc.d.ts +0 -87
  144. package/dist/generated/packages/proto-rpc/protos/ProtoRpc.js +0 -66
  145. package/dist/generated/packages/proto-rpc/protos/ProtoRpc.js.map +0 -1
  146. package/generated/google/protobuf/any.ts +0 -326
  147. package/generated/google/protobuf/empty.ts +0 -81
  148. package/generated/google/protobuf/timestamp.ts +0 -287
  149. package/generated/packages/dht/protos/DhtRpc.client.ts +0 -419
  150. package/generated/packages/dht/protos/DhtRpc.server.ts +0 -165
  151. package/generated/packages/dht/protos/DhtRpc.ts +0 -1266
  152. package/generated/packages/proto-rpc/protos/ProtoRpc.ts +0 -108
  153. package/jest.config.js +0 -5
@@ -1,419 +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/dht/protos/DhtRpc.proto" (package "dht", syntax proto3)
3
- // tslint:disable
4
- import { ExternalApiRpc } from "./DhtRpc";
5
- import type { ExternalStoreDataResponse } from "./DhtRpc";
6
- import type { ExternalStoreDataRequest } from "./DhtRpc";
7
- import type { ExternalFetchDataResponse } from "./DhtRpc";
8
- import type { ExternalFetchDataRequest } from "./DhtRpc";
9
- import { ConnectionLockRpc } from "./DhtRpc";
10
- import type { SetPrivateRequest } from "./DhtRpc";
11
- import type { DisconnectNotice } from "./DhtRpc";
12
- import type { UnlockRequest } from "./DhtRpc";
13
- import type { LockResponse } from "./DhtRpc";
14
- import type { LockRequest } from "./DhtRpc";
15
- import { WebrtcConnectorRpc } from "./DhtRpc";
16
- import type { IceCandidate } from "./DhtRpc";
17
- import type { RtcAnswer } from "./DhtRpc";
18
- import type { RtcOffer } from "./DhtRpc";
19
- import type { WebrtcConnectionRequest } from "./DhtRpc";
20
- import { WebsocketClientConnectorRpc } from "./DhtRpc";
21
- import type { WebsocketConnectionRequest } from "./DhtRpc";
22
- import { RecursiveOperationSessionRpc } from "./DhtRpc";
23
- import type { RecursiveOperationResponse } from "./DhtRpc";
24
- import { StoreRpc } from "./DhtRpc";
25
- import type { ReplicateDataRequest } from "./DhtRpc";
26
- import type { StoreDataResponse } from "./DhtRpc";
27
- import type { StoreDataRequest } from "./DhtRpc";
28
- import { RecursiveOperationRpc } from "./DhtRpc";
29
- import { RouterRpc } from "./DhtRpc";
30
- import type { RouteMessageAck } from "./DhtRpc";
31
- import type { RouteMessageWrapper } from "./DhtRpc";
32
- import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
33
- import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
34
- import { DhtNodeRpc } from "./DhtRpc";
35
- import type { Empty } from "../../../google/protobuf/empty";
36
- import type { LeaveNotice } from "./DhtRpc";
37
- import type { PingResponse } from "./DhtRpc";
38
- import type { PingRequest } from "./DhtRpc";
39
- import type { ClosestRingPeersResponse } from "./DhtRpc";
40
- import type { ClosestRingPeersRequest } from "./DhtRpc";
41
- import { stackIntercept } from "@protobuf-ts/runtime-rpc";
42
- import type { ClosestPeersResponse } from "./DhtRpc";
43
- import type { ClosestPeersRequest } from "./DhtRpc";
44
- import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
45
- import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
46
- /**
47
- * @generated from protobuf service dht.DhtNodeRpc
48
- */
49
- export interface IDhtNodeRpcClient {
50
- /**
51
- * TODO rename to getClosestNeighbors (breaking change)
52
- *
53
- * @generated from protobuf rpc: getClosestPeers(dht.ClosestPeersRequest) returns (dht.ClosestPeersResponse);
54
- */
55
- getClosestPeers(input: ClosestPeersRequest, options?: RpcOptions): UnaryCall<ClosestPeersRequest, ClosestPeersResponse>;
56
- /**
57
- * TODO rename to getClosestRingContacts (breaking change)
58
- *
59
- * @generated from protobuf rpc: getClosestRingPeers(dht.ClosestRingPeersRequest) returns (dht.ClosestRingPeersResponse);
60
- */
61
- getClosestRingPeers(input: ClosestRingPeersRequest, options?: RpcOptions): UnaryCall<ClosestRingPeersRequest, ClosestRingPeersResponse>;
62
- /**
63
- * @generated from protobuf rpc: ping(dht.PingRequest) returns (dht.PingResponse);
64
- */
65
- ping(input: PingRequest, options?: RpcOptions): UnaryCall<PingRequest, PingResponse>;
66
- /**
67
- * @generated from protobuf rpc: leaveNotice(dht.LeaveNotice) returns (google.protobuf.Empty);
68
- */
69
- leaveNotice(input: LeaveNotice, options?: RpcOptions): UnaryCall<LeaveNotice, Empty>;
70
- }
71
- /**
72
- * @generated from protobuf service dht.DhtNodeRpc
73
- */
74
- export class DhtNodeRpcClient implements IDhtNodeRpcClient, ServiceInfo {
75
- typeName = DhtNodeRpc.typeName;
76
- methods = DhtNodeRpc.methods;
77
- options = DhtNodeRpc.options;
78
- constructor(private readonly _transport: RpcTransport) {
79
- }
80
- /**
81
- * TODO rename to getClosestNeighbors (breaking change)
82
- *
83
- * @generated from protobuf rpc: getClosestPeers(dht.ClosestPeersRequest) returns (dht.ClosestPeersResponse);
84
- */
85
- getClosestPeers(input: ClosestPeersRequest, options?: RpcOptions): UnaryCall<ClosestPeersRequest, ClosestPeersResponse> {
86
- const method = this.methods[0], opt = this._transport.mergeOptions(options);
87
- return stackIntercept<ClosestPeersRequest, ClosestPeersResponse>("unary", this._transport, method, opt, input);
88
- }
89
- /**
90
- * TODO rename to getClosestRingContacts (breaking change)
91
- *
92
- * @generated from protobuf rpc: getClosestRingPeers(dht.ClosestRingPeersRequest) returns (dht.ClosestRingPeersResponse);
93
- */
94
- getClosestRingPeers(input: ClosestRingPeersRequest, options?: RpcOptions): UnaryCall<ClosestRingPeersRequest, ClosestRingPeersResponse> {
95
- const method = this.methods[1], opt = this._transport.mergeOptions(options);
96
- return stackIntercept<ClosestRingPeersRequest, ClosestRingPeersResponse>("unary", this._transport, method, opt, input);
97
- }
98
- /**
99
- * @generated from protobuf rpc: ping(dht.PingRequest) returns (dht.PingResponse);
100
- */
101
- ping(input: PingRequest, options?: RpcOptions): UnaryCall<PingRequest, PingResponse> {
102
- const method = this.methods[2], opt = this._transport.mergeOptions(options);
103
- return stackIntercept<PingRequest, PingResponse>("unary", this._transport, method, opt, input);
104
- }
105
- /**
106
- * @generated from protobuf rpc: leaveNotice(dht.LeaveNotice) returns (google.protobuf.Empty);
107
- */
108
- leaveNotice(input: LeaveNotice, options?: RpcOptions): UnaryCall<LeaveNotice, Empty> {
109
- const method = this.methods[3], opt = this._transport.mergeOptions(options);
110
- return stackIntercept<LeaveNotice, Empty>("unary", this._transport, method, opt, input);
111
- }
112
- }
113
- /**
114
- * @generated from protobuf service dht.RouterRpc
115
- */
116
- export interface IRouterRpcClient {
117
- /**
118
- * @generated from protobuf rpc: routeMessage(dht.RouteMessageWrapper) returns (dht.RouteMessageAck);
119
- */
120
- routeMessage(input: RouteMessageWrapper, options?: RpcOptions): UnaryCall<RouteMessageWrapper, RouteMessageAck>;
121
- /**
122
- * @generated from protobuf rpc: forwardMessage(dht.RouteMessageWrapper) returns (dht.RouteMessageAck);
123
- */
124
- forwardMessage(input: RouteMessageWrapper, options?: RpcOptions): UnaryCall<RouteMessageWrapper, RouteMessageAck>;
125
- }
126
- /**
127
- * @generated from protobuf service dht.RouterRpc
128
- */
129
- export class RouterRpcClient implements IRouterRpcClient, ServiceInfo {
130
- typeName = RouterRpc.typeName;
131
- methods = RouterRpc.methods;
132
- options = RouterRpc.options;
133
- constructor(private readonly _transport: RpcTransport) {
134
- }
135
- /**
136
- * @generated from protobuf rpc: routeMessage(dht.RouteMessageWrapper) returns (dht.RouteMessageAck);
137
- */
138
- routeMessage(input: RouteMessageWrapper, options?: RpcOptions): UnaryCall<RouteMessageWrapper, RouteMessageAck> {
139
- const method = this.methods[0], opt = this._transport.mergeOptions(options);
140
- return stackIntercept<RouteMessageWrapper, RouteMessageAck>("unary", this._transport, method, opt, input);
141
- }
142
- /**
143
- * @generated from protobuf rpc: forwardMessage(dht.RouteMessageWrapper) returns (dht.RouteMessageAck);
144
- */
145
- forwardMessage(input: RouteMessageWrapper, options?: RpcOptions): UnaryCall<RouteMessageWrapper, RouteMessageAck> {
146
- const method = this.methods[1], opt = this._transport.mergeOptions(options);
147
- return stackIntercept<RouteMessageWrapper, RouteMessageAck>("unary", this._transport, method, opt, input);
148
- }
149
- }
150
- /**
151
- * @generated from protobuf service dht.RecursiveOperationRpc
152
- */
153
- export interface IRecursiveOperationRpcClient {
154
- /**
155
- * @generated from protobuf rpc: routeRequest(dht.RouteMessageWrapper) returns (dht.RouteMessageAck);
156
- */
157
- routeRequest(input: RouteMessageWrapper, options?: RpcOptions): UnaryCall<RouteMessageWrapper, RouteMessageAck>;
158
- }
159
- /**
160
- * @generated from protobuf service dht.RecursiveOperationRpc
161
- */
162
- export class RecursiveOperationRpcClient implements IRecursiveOperationRpcClient, ServiceInfo {
163
- typeName = RecursiveOperationRpc.typeName;
164
- methods = RecursiveOperationRpc.methods;
165
- options = RecursiveOperationRpc.options;
166
- constructor(private readonly _transport: RpcTransport) {
167
- }
168
- /**
169
- * @generated from protobuf rpc: routeRequest(dht.RouteMessageWrapper) returns (dht.RouteMessageAck);
170
- */
171
- routeRequest(input: RouteMessageWrapper, options?: RpcOptions): UnaryCall<RouteMessageWrapper, RouteMessageAck> {
172
- const method = this.methods[0], opt = this._transport.mergeOptions(options);
173
- return stackIntercept<RouteMessageWrapper, RouteMessageAck>("unary", this._transport, method, opt, input);
174
- }
175
- }
176
- /**
177
- * @generated from protobuf service dht.StoreRpc
178
- */
179
- export interface IStoreRpcClient {
180
- /**
181
- * @generated from protobuf rpc: storeData(dht.StoreDataRequest) returns (dht.StoreDataResponse);
182
- */
183
- storeData(input: StoreDataRequest, options?: RpcOptions): UnaryCall<StoreDataRequest, StoreDataResponse>;
184
- /**
185
- * @generated from protobuf rpc: replicateData(dht.ReplicateDataRequest) returns (google.protobuf.Empty);
186
- */
187
- replicateData(input: ReplicateDataRequest, options?: RpcOptions): UnaryCall<ReplicateDataRequest, Empty>;
188
- }
189
- /**
190
- * @generated from protobuf service dht.StoreRpc
191
- */
192
- export class StoreRpcClient implements IStoreRpcClient, ServiceInfo {
193
- typeName = StoreRpc.typeName;
194
- methods = StoreRpc.methods;
195
- options = StoreRpc.options;
196
- constructor(private readonly _transport: RpcTransport) {
197
- }
198
- /**
199
- * @generated from protobuf rpc: storeData(dht.StoreDataRequest) returns (dht.StoreDataResponse);
200
- */
201
- storeData(input: StoreDataRequest, options?: RpcOptions): UnaryCall<StoreDataRequest, StoreDataResponse> {
202
- const method = this.methods[0], opt = this._transport.mergeOptions(options);
203
- return stackIntercept<StoreDataRequest, StoreDataResponse>("unary", this._transport, method, opt, input);
204
- }
205
- /**
206
- * @generated from protobuf rpc: replicateData(dht.ReplicateDataRequest) returns (google.protobuf.Empty);
207
- */
208
- replicateData(input: ReplicateDataRequest, options?: RpcOptions): UnaryCall<ReplicateDataRequest, Empty> {
209
- const method = this.methods[1], opt = this._transport.mergeOptions(options);
210
- return stackIntercept<ReplicateDataRequest, Empty>("unary", this._transport, method, opt, input);
211
- }
212
- }
213
- /**
214
- * @generated from protobuf service dht.RecursiveOperationSessionRpc
215
- */
216
- export interface IRecursiveOperationSessionRpcClient {
217
- /**
218
- * @generated from protobuf rpc: sendResponse(dht.RecursiveOperationResponse) returns (google.protobuf.Empty);
219
- */
220
- sendResponse(input: RecursiveOperationResponse, options?: RpcOptions): UnaryCall<RecursiveOperationResponse, Empty>;
221
- }
222
- /**
223
- * @generated from protobuf service dht.RecursiveOperationSessionRpc
224
- */
225
- export class RecursiveOperationSessionRpcClient implements IRecursiveOperationSessionRpcClient, ServiceInfo {
226
- typeName = RecursiveOperationSessionRpc.typeName;
227
- methods = RecursiveOperationSessionRpc.methods;
228
- options = RecursiveOperationSessionRpc.options;
229
- constructor(private readonly _transport: RpcTransport) {
230
- }
231
- /**
232
- * @generated from protobuf rpc: sendResponse(dht.RecursiveOperationResponse) returns (google.protobuf.Empty);
233
- */
234
- sendResponse(input: RecursiveOperationResponse, options?: RpcOptions): UnaryCall<RecursiveOperationResponse, Empty> {
235
- const method = this.methods[0], opt = this._transport.mergeOptions(options);
236
- return stackIntercept<RecursiveOperationResponse, Empty>("unary", this._transport, method, opt, input);
237
- }
238
- }
239
- /**
240
- * @generated from protobuf service dht.WebsocketClientConnectorRpc
241
- */
242
- export interface IWebsocketClientConnectorRpcClient {
243
- /**
244
- * @generated from protobuf rpc: requestConnection(dht.WebsocketConnectionRequest) returns (google.protobuf.Empty);
245
- */
246
- requestConnection(input: WebsocketConnectionRequest, options?: RpcOptions): UnaryCall<WebsocketConnectionRequest, Empty>;
247
- }
248
- /**
249
- * @generated from protobuf service dht.WebsocketClientConnectorRpc
250
- */
251
- export class WebsocketClientConnectorRpcClient implements IWebsocketClientConnectorRpcClient, ServiceInfo {
252
- typeName = WebsocketClientConnectorRpc.typeName;
253
- methods = WebsocketClientConnectorRpc.methods;
254
- options = WebsocketClientConnectorRpc.options;
255
- constructor(private readonly _transport: RpcTransport) {
256
- }
257
- /**
258
- * @generated from protobuf rpc: requestConnection(dht.WebsocketConnectionRequest) returns (google.protobuf.Empty);
259
- */
260
- requestConnection(input: WebsocketConnectionRequest, options?: RpcOptions): UnaryCall<WebsocketConnectionRequest, Empty> {
261
- const method = this.methods[0], opt = this._transport.mergeOptions(options);
262
- return stackIntercept<WebsocketConnectionRequest, Empty>("unary", this._transport, method, opt, input);
263
- }
264
- }
265
- /**
266
- * @generated from protobuf service dht.WebrtcConnectorRpc
267
- */
268
- export interface IWebrtcConnectorRpcClient {
269
- /**
270
- * @generated from protobuf rpc: requestConnection(dht.WebrtcConnectionRequest) returns (google.protobuf.Empty);
271
- */
272
- requestConnection(input: WebrtcConnectionRequest, options?: RpcOptions): UnaryCall<WebrtcConnectionRequest, Empty>;
273
- /**
274
- * @generated from protobuf rpc: rtcOffer(dht.RtcOffer) returns (google.protobuf.Empty);
275
- */
276
- rtcOffer(input: RtcOffer, options?: RpcOptions): UnaryCall<RtcOffer, Empty>;
277
- /**
278
- * @generated from protobuf rpc: rtcAnswer(dht.RtcAnswer) returns (google.protobuf.Empty);
279
- */
280
- rtcAnswer(input: RtcAnswer, options?: RpcOptions): UnaryCall<RtcAnswer, Empty>;
281
- /**
282
- * @generated from protobuf rpc: iceCandidate(dht.IceCandidate) returns (google.protobuf.Empty);
283
- */
284
- iceCandidate(input: IceCandidate, options?: RpcOptions): UnaryCall<IceCandidate, Empty>;
285
- }
286
- /**
287
- * @generated from protobuf service dht.WebrtcConnectorRpc
288
- */
289
- export class WebrtcConnectorRpcClient implements IWebrtcConnectorRpcClient, ServiceInfo {
290
- typeName = WebrtcConnectorRpc.typeName;
291
- methods = WebrtcConnectorRpc.methods;
292
- options = WebrtcConnectorRpc.options;
293
- constructor(private readonly _transport: RpcTransport) {
294
- }
295
- /**
296
- * @generated from protobuf rpc: requestConnection(dht.WebrtcConnectionRequest) returns (google.protobuf.Empty);
297
- */
298
- requestConnection(input: WebrtcConnectionRequest, options?: RpcOptions): UnaryCall<WebrtcConnectionRequest, Empty> {
299
- const method = this.methods[0], opt = this._transport.mergeOptions(options);
300
- return stackIntercept<WebrtcConnectionRequest, Empty>("unary", this._transport, method, opt, input);
301
- }
302
- /**
303
- * @generated from protobuf rpc: rtcOffer(dht.RtcOffer) returns (google.protobuf.Empty);
304
- */
305
- rtcOffer(input: RtcOffer, options?: RpcOptions): UnaryCall<RtcOffer, Empty> {
306
- const method = this.methods[1], opt = this._transport.mergeOptions(options);
307
- return stackIntercept<RtcOffer, Empty>("unary", this._transport, method, opt, input);
308
- }
309
- /**
310
- * @generated from protobuf rpc: rtcAnswer(dht.RtcAnswer) returns (google.protobuf.Empty);
311
- */
312
- rtcAnswer(input: RtcAnswer, options?: RpcOptions): UnaryCall<RtcAnswer, Empty> {
313
- const method = this.methods[2], opt = this._transport.mergeOptions(options);
314
- return stackIntercept<RtcAnswer, Empty>("unary", this._transport, method, opt, input);
315
- }
316
- /**
317
- * @generated from protobuf rpc: iceCandidate(dht.IceCandidate) returns (google.protobuf.Empty);
318
- */
319
- iceCandidate(input: IceCandidate, options?: RpcOptions): UnaryCall<IceCandidate, Empty> {
320
- const method = this.methods[3], opt = this._transport.mergeOptions(options);
321
- return stackIntercept<IceCandidate, Empty>("unary", this._transport, method, opt, input);
322
- }
323
- }
324
- /**
325
- * @generated from protobuf service dht.ConnectionLockRpc
326
- */
327
- export interface IConnectionLockRpcClient {
328
- /**
329
- * @generated from protobuf rpc: lockRequest(dht.LockRequest) returns (dht.LockResponse);
330
- */
331
- lockRequest(input: LockRequest, options?: RpcOptions): UnaryCall<LockRequest, LockResponse>;
332
- /**
333
- * @generated from protobuf rpc: unlockRequest(dht.UnlockRequest) returns (google.protobuf.Empty);
334
- */
335
- unlockRequest(input: UnlockRequest, options?: RpcOptions): UnaryCall<UnlockRequest, Empty>;
336
- /**
337
- * @generated from protobuf rpc: gracefulDisconnect(dht.DisconnectNotice) returns (google.protobuf.Empty);
338
- */
339
- gracefulDisconnect(input: DisconnectNotice, options?: RpcOptions): UnaryCall<DisconnectNotice, Empty>;
340
- /**
341
- * @generated from protobuf rpc: setPrivate(dht.SetPrivateRequest) returns (google.protobuf.Empty);
342
- */
343
- setPrivate(input: SetPrivateRequest, options?: RpcOptions): UnaryCall<SetPrivateRequest, Empty>;
344
- }
345
- /**
346
- * @generated from protobuf service dht.ConnectionLockRpc
347
- */
348
- export class ConnectionLockRpcClient implements IConnectionLockRpcClient, ServiceInfo {
349
- typeName = ConnectionLockRpc.typeName;
350
- methods = ConnectionLockRpc.methods;
351
- options = ConnectionLockRpc.options;
352
- constructor(private readonly _transport: RpcTransport) {
353
- }
354
- /**
355
- * @generated from protobuf rpc: lockRequest(dht.LockRequest) returns (dht.LockResponse);
356
- */
357
- lockRequest(input: LockRequest, options?: RpcOptions): UnaryCall<LockRequest, LockResponse> {
358
- const method = this.methods[0], opt = this._transport.mergeOptions(options);
359
- return stackIntercept<LockRequest, LockResponse>("unary", this._transport, method, opt, input);
360
- }
361
- /**
362
- * @generated from protobuf rpc: unlockRequest(dht.UnlockRequest) returns (google.protobuf.Empty);
363
- */
364
- unlockRequest(input: UnlockRequest, options?: RpcOptions): UnaryCall<UnlockRequest, Empty> {
365
- const method = this.methods[1], opt = this._transport.mergeOptions(options);
366
- return stackIntercept<UnlockRequest, Empty>("unary", this._transport, method, opt, input);
367
- }
368
- /**
369
- * @generated from protobuf rpc: gracefulDisconnect(dht.DisconnectNotice) returns (google.protobuf.Empty);
370
- */
371
- gracefulDisconnect(input: DisconnectNotice, options?: RpcOptions): UnaryCall<DisconnectNotice, Empty> {
372
- const method = this.methods[2], opt = this._transport.mergeOptions(options);
373
- return stackIntercept<DisconnectNotice, Empty>("unary", this._transport, method, opt, input);
374
- }
375
- /**
376
- * @generated from protobuf rpc: setPrivate(dht.SetPrivateRequest) returns (google.protobuf.Empty);
377
- */
378
- setPrivate(input: SetPrivateRequest, options?: RpcOptions): UnaryCall<SetPrivateRequest, Empty> {
379
- const method = this.methods[3], opt = this._transport.mergeOptions(options);
380
- return stackIntercept<SetPrivateRequest, Empty>("unary", this._transport, method, opt, input);
381
- }
382
- }
383
- /**
384
- * @generated from protobuf service dht.ExternalApiRpc
385
- */
386
- export interface IExternalApiRpcClient {
387
- /**
388
- * @generated from protobuf rpc: externalFetchData(dht.ExternalFetchDataRequest) returns (dht.ExternalFetchDataResponse);
389
- */
390
- externalFetchData(input: ExternalFetchDataRequest, options?: RpcOptions): UnaryCall<ExternalFetchDataRequest, ExternalFetchDataResponse>;
391
- /**
392
- * @generated from protobuf rpc: externalStoreData(dht.ExternalStoreDataRequest) returns (dht.ExternalStoreDataResponse);
393
- */
394
- externalStoreData(input: ExternalStoreDataRequest, options?: RpcOptions): UnaryCall<ExternalStoreDataRequest, ExternalStoreDataResponse>;
395
- }
396
- /**
397
- * @generated from protobuf service dht.ExternalApiRpc
398
- */
399
- export class ExternalApiRpcClient implements IExternalApiRpcClient, ServiceInfo {
400
- typeName = ExternalApiRpc.typeName;
401
- methods = ExternalApiRpc.methods;
402
- options = ExternalApiRpc.options;
403
- constructor(private readonly _transport: RpcTransport) {
404
- }
405
- /**
406
- * @generated from protobuf rpc: externalFetchData(dht.ExternalFetchDataRequest) returns (dht.ExternalFetchDataResponse);
407
- */
408
- externalFetchData(input: ExternalFetchDataRequest, options?: RpcOptions): UnaryCall<ExternalFetchDataRequest, ExternalFetchDataResponse> {
409
- const method = this.methods[0], opt = this._transport.mergeOptions(options);
410
- return stackIntercept<ExternalFetchDataRequest, ExternalFetchDataResponse>("unary", this._transport, method, opt, input);
411
- }
412
- /**
413
- * @generated from protobuf rpc: externalStoreData(dht.ExternalStoreDataRequest) returns (dht.ExternalStoreDataResponse);
414
- */
415
- externalStoreData(input: ExternalStoreDataRequest, options?: RpcOptions): UnaryCall<ExternalStoreDataRequest, ExternalStoreDataResponse> {
416
- const method = this.methods[1], opt = this._transport.mergeOptions(options);
417
- return stackIntercept<ExternalStoreDataRequest, ExternalStoreDataResponse>("unary", this._transport, method, opt, input);
418
- }
419
- }
@@ -1,165 +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/dht/protos/DhtRpc.proto" (package "dht", syntax proto3)
3
- // tslint:disable
4
- import { ExternalStoreDataResponse } from "./DhtRpc";
5
- import { ExternalStoreDataRequest } from "./DhtRpc";
6
- import { ExternalFetchDataResponse } from "./DhtRpc";
7
- import { ExternalFetchDataRequest } from "./DhtRpc";
8
- import { SetPrivateRequest } from "./DhtRpc";
9
- import { DisconnectNotice } from "./DhtRpc";
10
- import { UnlockRequest } from "./DhtRpc";
11
- import { LockResponse } from "./DhtRpc";
12
- import { LockRequest } from "./DhtRpc";
13
- import { IceCandidate } from "./DhtRpc";
14
- import { RtcAnswer } from "./DhtRpc";
15
- import { RtcOffer } from "./DhtRpc";
16
- import { WebrtcConnectionRequest } from "./DhtRpc";
17
- import { WebsocketConnectionRequest } from "./DhtRpc";
18
- import { RecursiveOperationResponse } from "./DhtRpc";
19
- import { ReplicateDataRequest } from "./DhtRpc";
20
- import { StoreDataResponse } from "./DhtRpc";
21
- import { StoreDataRequest } from "./DhtRpc";
22
- import { RouteMessageAck } from "./DhtRpc";
23
- import { RouteMessageWrapper } from "./DhtRpc";
24
- import { Empty } from "../../../google/protobuf/empty";
25
- import { LeaveNotice } from "./DhtRpc";
26
- import { PingResponse } from "./DhtRpc";
27
- import { PingRequest } from "./DhtRpc";
28
- import { ClosestRingPeersResponse } from "./DhtRpc";
29
- import { ClosestRingPeersRequest } from "./DhtRpc";
30
- import { ClosestPeersResponse } from "./DhtRpc";
31
- import { ClosestPeersRequest } from "./DhtRpc";
32
- import { ServerCallContext } from "@protobuf-ts/runtime-rpc";
33
- /**
34
- * @generated from protobuf service dht.DhtNodeRpc
35
- */
36
- export interface IDhtNodeRpc<T = ServerCallContext> {
37
- /**
38
- * TODO rename to getClosestNeighbors (breaking change)
39
- *
40
- * @generated from protobuf rpc: getClosestPeers(dht.ClosestPeersRequest) returns (dht.ClosestPeersResponse);
41
- */
42
- getClosestPeers(request: ClosestPeersRequest, context: T): Promise<ClosestPeersResponse>;
43
- /**
44
- * TODO rename to getClosestRingContacts (breaking change)
45
- *
46
- * @generated from protobuf rpc: getClosestRingPeers(dht.ClosestRingPeersRequest) returns (dht.ClosestRingPeersResponse);
47
- */
48
- getClosestRingPeers(request: ClosestRingPeersRequest, context: T): Promise<ClosestRingPeersResponse>;
49
- /**
50
- * @generated from protobuf rpc: ping(dht.PingRequest) returns (dht.PingResponse);
51
- */
52
- ping(request: PingRequest, context: T): Promise<PingResponse>;
53
- /**
54
- * @generated from protobuf rpc: leaveNotice(dht.LeaveNotice) returns (google.protobuf.Empty);
55
- */
56
- leaveNotice(request: LeaveNotice, context: T): Promise<Empty>;
57
- }
58
- /**
59
- * @generated from protobuf service dht.RouterRpc
60
- */
61
- export interface IRouterRpc<T = ServerCallContext> {
62
- /**
63
- * @generated from protobuf rpc: routeMessage(dht.RouteMessageWrapper) returns (dht.RouteMessageAck);
64
- */
65
- routeMessage(request: RouteMessageWrapper, context: T): Promise<RouteMessageAck>;
66
- /**
67
- * @generated from protobuf rpc: forwardMessage(dht.RouteMessageWrapper) returns (dht.RouteMessageAck);
68
- */
69
- forwardMessage(request: RouteMessageWrapper, context: T): Promise<RouteMessageAck>;
70
- }
71
- /**
72
- * @generated from protobuf service dht.RecursiveOperationRpc
73
- */
74
- export interface IRecursiveOperationRpc<T = ServerCallContext> {
75
- /**
76
- * @generated from protobuf rpc: routeRequest(dht.RouteMessageWrapper) returns (dht.RouteMessageAck);
77
- */
78
- routeRequest(request: RouteMessageWrapper, context: T): Promise<RouteMessageAck>;
79
- }
80
- /**
81
- * @generated from protobuf service dht.StoreRpc
82
- */
83
- export interface IStoreRpc<T = ServerCallContext> {
84
- /**
85
- * @generated from protobuf rpc: storeData(dht.StoreDataRequest) returns (dht.StoreDataResponse);
86
- */
87
- storeData(request: StoreDataRequest, context: T): Promise<StoreDataResponse>;
88
- /**
89
- * @generated from protobuf rpc: replicateData(dht.ReplicateDataRequest) returns (google.protobuf.Empty);
90
- */
91
- replicateData(request: ReplicateDataRequest, context: T): Promise<Empty>;
92
- }
93
- /**
94
- * @generated from protobuf service dht.RecursiveOperationSessionRpc
95
- */
96
- export interface IRecursiveOperationSessionRpc<T = ServerCallContext> {
97
- /**
98
- * @generated from protobuf rpc: sendResponse(dht.RecursiveOperationResponse) returns (google.protobuf.Empty);
99
- */
100
- sendResponse(request: RecursiveOperationResponse, context: T): Promise<Empty>;
101
- }
102
- /**
103
- * @generated from protobuf service dht.WebsocketClientConnectorRpc
104
- */
105
- export interface IWebsocketClientConnectorRpc<T = ServerCallContext> {
106
- /**
107
- * @generated from protobuf rpc: requestConnection(dht.WebsocketConnectionRequest) returns (google.protobuf.Empty);
108
- */
109
- requestConnection(request: WebsocketConnectionRequest, context: T): Promise<Empty>;
110
- }
111
- /**
112
- * @generated from protobuf service dht.WebrtcConnectorRpc
113
- */
114
- export interface IWebrtcConnectorRpc<T = ServerCallContext> {
115
- /**
116
- * @generated from protobuf rpc: requestConnection(dht.WebrtcConnectionRequest) returns (google.protobuf.Empty);
117
- */
118
- requestConnection(request: WebrtcConnectionRequest, context: T): Promise<Empty>;
119
- /**
120
- * @generated from protobuf rpc: rtcOffer(dht.RtcOffer) returns (google.protobuf.Empty);
121
- */
122
- rtcOffer(request: RtcOffer, context: T): Promise<Empty>;
123
- /**
124
- * @generated from protobuf rpc: rtcAnswer(dht.RtcAnswer) returns (google.protobuf.Empty);
125
- */
126
- rtcAnswer(request: RtcAnswer, context: T): Promise<Empty>;
127
- /**
128
- * @generated from protobuf rpc: iceCandidate(dht.IceCandidate) returns (google.protobuf.Empty);
129
- */
130
- iceCandidate(request: IceCandidate, context: T): Promise<Empty>;
131
- }
132
- /**
133
- * @generated from protobuf service dht.ConnectionLockRpc
134
- */
135
- export interface IConnectionLockRpc<T = ServerCallContext> {
136
- /**
137
- * @generated from protobuf rpc: lockRequest(dht.LockRequest) returns (dht.LockResponse);
138
- */
139
- lockRequest(request: LockRequest, context: T): Promise<LockResponse>;
140
- /**
141
- * @generated from protobuf rpc: unlockRequest(dht.UnlockRequest) returns (google.protobuf.Empty);
142
- */
143
- unlockRequest(request: UnlockRequest, context: T): Promise<Empty>;
144
- /**
145
- * @generated from protobuf rpc: gracefulDisconnect(dht.DisconnectNotice) returns (google.protobuf.Empty);
146
- */
147
- gracefulDisconnect(request: DisconnectNotice, context: T): Promise<Empty>;
148
- /**
149
- * @generated from protobuf rpc: setPrivate(dht.SetPrivateRequest) returns (google.protobuf.Empty);
150
- */
151
- setPrivate(request: SetPrivateRequest, context: T): Promise<Empty>;
152
- }
153
- /**
154
- * @generated from protobuf service dht.ExternalApiRpc
155
- */
156
- export interface IExternalApiRpc<T = ServerCallContext> {
157
- /**
158
- * @generated from protobuf rpc: externalFetchData(dht.ExternalFetchDataRequest) returns (dht.ExternalFetchDataResponse);
159
- */
160
- externalFetchData(request: ExternalFetchDataRequest, context: T): Promise<ExternalFetchDataResponse>;
161
- /**
162
- * @generated from protobuf rpc: externalStoreData(dht.ExternalStoreDataRequest) returns (dht.ExternalStoreDataResponse);
163
- */
164
- externalStoreData(request: ExternalStoreDataRequest, context: T): Promise<ExternalStoreDataResponse>;
165
- }