@streamr/dht 103.1.2 → 103.2.0-experiment.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.
Files changed (303) hide show
  1. package/dist/exports-browser.cjs +7636 -0
  2. package/dist/exports-browser.cjs.map +1 -0
  3. package/dist/exports-browser.d.ts +1321 -0
  4. package/dist/exports-browser.js +7611 -0
  5. package/dist/exports-browser.js.map +1 -0
  6. package/dist/exports-nodejs.cjs +7833 -0
  7. package/dist/exports-nodejs.cjs.map +1 -0
  8. package/dist/exports-nodejs.d.ts +1321 -0
  9. package/dist/exports-nodejs.js +7808 -0
  10. package/dist/exports-nodejs.js.map +1 -0
  11. package/package.json +41 -25
  12. package/dist/generated/google/protobuf/any.d.ts +0 -180
  13. package/dist/generated/google/protobuf/any.js +0 -155
  14. package/dist/generated/google/protobuf/any.js.map +0 -1
  15. package/dist/generated/google/protobuf/empty.d.ts +0 -31
  16. package/dist/generated/google/protobuf/empty.js +0 -45
  17. package/dist/generated/google/protobuf/empty.js.map +0 -1
  18. package/dist/generated/google/protobuf/timestamp.d.ts +0 -156
  19. package/dist/generated/google/protobuf/timestamp.js +0 -136
  20. package/dist/generated/google/protobuf/timestamp.js.map +0 -1
  21. package/dist/generated/packages/dht/protos/DhtRpc.client.d.ts +0 -371
  22. package/dist/generated/packages/dht/protos/DhtRpc.client.js +0 -292
  23. package/dist/generated/packages/dht/protos/DhtRpc.client.js.map +0 -1
  24. package/dist/generated/packages/dht/protos/DhtRpc.d.ts +0 -1031
  25. package/dist/generated/packages/dht/protos/DhtRpc.js +0 -702
  26. package/dist/generated/packages/dht/protos/DhtRpc.js.map +0 -1
  27. package/dist/generated/packages/dht/protos/DhtRpc.server.d.ts +0 -168
  28. package/dist/generated/packages/dht/protos/DhtRpc.server.js +0 -3
  29. package/dist/generated/packages/dht/protos/DhtRpc.server.js.map +0 -1
  30. package/dist/generated/packages/proto-rpc/protos/ProtoRpc.d.ts +0 -87
  31. package/dist/generated/packages/proto-rpc/protos/ProtoRpc.js +0 -66
  32. package/dist/generated/packages/proto-rpc/protos/ProtoRpc.js.map +0 -1
  33. package/dist/package.json +0 -61
  34. package/dist/src/connection/Connection.d.ts +0 -12
  35. package/dist/src/connection/Connection.js +0 -30
  36. package/dist/src/connection/Connection.js.map +0 -1
  37. package/dist/src/connection/ConnectionLockRpcLocal.d.ts +0 -22
  38. package/dist/src/connection/ConnectionLockRpcLocal.js +0 -54
  39. package/dist/src/connection/ConnectionLockRpcLocal.js.map +0 -1
  40. package/dist/src/connection/ConnectionLockRpcRemote.d.ts +0 -10
  41. package/dist/src/connection/ConnectionLockRpcRemote.js +0 -61
  42. package/dist/src/connection/ConnectionLockRpcRemote.js.map +0 -1
  43. package/dist/src/connection/ConnectionLockStates.d.ts +0 -27
  44. package/dist/src/connection/ConnectionLockStates.js +0 -114
  45. package/dist/src/connection/ConnectionLockStates.js.map +0 -1
  46. package/dist/src/connection/ConnectionManager.d.ts +0 -85
  47. package/dist/src/connection/ConnectionManager.js +0 -569
  48. package/dist/src/connection/ConnectionManager.js.map +0 -1
  49. package/dist/src/connection/ConnectionsView.d.ts +0 -7
  50. package/dist/src/connection/ConnectionsView.js +0 -3
  51. package/dist/src/connection/ConnectionsView.js.map +0 -1
  52. package/dist/src/connection/ConnectorFacade.d.ts +0 -58
  53. package/dist/src/connection/ConnectorFacade.js +0 -154
  54. package/dist/src/connection/ConnectorFacade.js.map +0 -1
  55. package/dist/src/connection/Handshaker.d.ts +0 -27
  56. package/dist/src/connection/Handshaker.js +0 -179
  57. package/dist/src/connection/Handshaker.js.map +0 -1
  58. package/dist/src/connection/IConnection.d.ts +0 -32
  59. package/dist/src/connection/IConnection.js +0 -12
  60. package/dist/src/connection/IConnection.js.map +0 -1
  61. package/dist/src/connection/ManagedConnection.d.ts +0 -30
  62. package/dist/src/connection/ManagedConnection.js +0 -129
  63. package/dist/src/connection/ManagedConnection.js.map +0 -1
  64. package/dist/src/connection/OutputBuffer.d.ts +0 -9
  65. package/dist/src/connection/OutputBuffer.js +0 -26
  66. package/dist/src/connection/OutputBuffer.js.map +0 -1
  67. package/dist/src/connection/PendingConnection.d.ts +0 -19
  68. package/dist/src/connection/PendingConnection.js +0 -59
  69. package/dist/src/connection/PendingConnection.js.map +0 -1
  70. package/dist/src/connection/connectivityChecker.d.ts +0 -9
  71. package/dist/src/connection/connectivityChecker.js +0 -138
  72. package/dist/src/connection/connectivityChecker.js.map +0 -1
  73. package/dist/src/connection/connectivityRequestHandler.d.ts +0 -4
  74. package/dist/src/connection/connectivityRequestHandler.js +0 -108
  75. package/dist/src/connection/connectivityRequestHandler.js.map +0 -1
  76. package/dist/src/connection/simulator/Simulator.d.ts +0 -36
  77. package/dist/src/connection/simulator/Simulator.js +0 -290
  78. package/dist/src/connection/simulator/Simulator.js.map +0 -1
  79. package/dist/src/connection/simulator/SimulatorConnection.d.ts +0 -18
  80. package/dist/src/connection/simulator/SimulatorConnection.js +0 -123
  81. package/dist/src/connection/simulator/SimulatorConnection.js.map +0 -1
  82. package/dist/src/connection/simulator/SimulatorConnector.d.ts +0 -16
  83. package/dist/src/connection/simulator/SimulatorConnector.js +0 -80
  84. package/dist/src/connection/simulator/SimulatorConnector.js.map +0 -1
  85. package/dist/src/connection/simulator/SimulatorTransport.d.ts +0 -6
  86. package/dist/src/connection/simulator/SimulatorTransport.js +0 -17
  87. package/dist/src/connection/simulator/SimulatorTransport.js.map +0 -1
  88. package/dist/src/connection/simulator/pings.d.ts +0 -21
  89. package/dist/src/connection/simulator/pings.js +0 -61
  90. package/dist/src/connection/simulator/pings.js.map +0 -1
  91. package/dist/src/connection/webrtc/BrowserWebrtcConnection.d.ts +0 -37
  92. package/dist/src/connection/webrtc/BrowserWebrtcConnection.js +0 -229
  93. package/dist/src/connection/webrtc/BrowserWebrtcConnection.js.map +0 -1
  94. package/dist/src/connection/webrtc/IWebrtcConnection.d.ts +0 -21
  95. package/dist/src/connection/webrtc/IWebrtcConnection.js +0 -9
  96. package/dist/src/connection/webrtc/IWebrtcConnection.js.map +0 -1
  97. package/dist/src/connection/webrtc/NodeWebrtcConnection.d.ts +0 -45
  98. package/dist/src/connection/webrtc/NodeWebrtcConnection.js +0 -229
  99. package/dist/src/connection/webrtc/NodeWebrtcConnection.js.map +0 -1
  100. package/dist/src/connection/webrtc/WebrtcConnector.d.ts +0 -43
  101. package/dist/src/connection/webrtc/WebrtcConnector.js +0 -208
  102. package/dist/src/connection/webrtc/WebrtcConnector.js.map +0 -1
  103. package/dist/src/connection/webrtc/WebrtcConnectorRpcLocal.d.ts +0 -26
  104. package/dist/src/connection/webrtc/WebrtcConnectorRpcLocal.js +0 -82
  105. package/dist/src/connection/webrtc/WebrtcConnectorRpcLocal.js.map +0 -1
  106. package/dist/src/connection/webrtc/WebrtcConnectorRpcRemote.d.ts +0 -8
  107. package/dist/src/connection/webrtc/WebrtcConnectorRpcRemote.js +0 -50
  108. package/dist/src/connection/webrtc/WebrtcConnectorRpcRemote.js.map +0 -1
  109. package/dist/src/connection/webrtc/iceServerAsString.d.ts +0 -2
  110. package/dist/src/connection/webrtc/iceServerAsString.js +0 -17
  111. package/dist/src/connection/webrtc/iceServerAsString.js.map +0 -1
  112. package/dist/src/connection/websocket/AbstractWebsocketClientConnection.d.ts +0 -27
  113. package/dist/src/connection/websocket/AbstractWebsocketClientConnection.js +0 -107
  114. package/dist/src/connection/websocket/AbstractWebsocketClientConnection.js.map +0 -1
  115. package/dist/src/connection/websocket/AutoCertifierClientFacade.d.ts +0 -26
  116. package/dist/src/connection/websocket/AutoCertifierClientFacade.js +0 -39
  117. package/dist/src/connection/websocket/AutoCertifierClientFacade.js.map +0 -1
  118. package/dist/src/connection/websocket/BrowserWebsocketClientConnection.d.ts +0 -7
  119. package/dist/src/connection/websocket/BrowserWebsocketClientConnection.js +0 -44
  120. package/dist/src/connection/websocket/BrowserWebsocketClientConnection.js.map +0 -1
  121. package/dist/src/connection/websocket/NodeWebsocketClientConnection.d.ts +0 -7
  122. package/dist/src/connection/websocket/NodeWebsocketClientConnection.js +0 -39
  123. package/dist/src/connection/websocket/NodeWebsocketClientConnection.js.map +0 -1
  124. package/dist/src/connection/websocket/WebsocketClientConnector.d.ts +0 -26
  125. package/dist/src/connection/websocket/WebsocketClientConnector.js +0 -86
  126. package/dist/src/connection/websocket/WebsocketClientConnector.js.map +0 -1
  127. package/dist/src/connection/websocket/WebsocketClientConnectorRpcLocal.d.ts +0 -18
  128. package/dist/src/connection/websocket/WebsocketClientConnectorRpcLocal.js +0 -23
  129. package/dist/src/connection/websocket/WebsocketClientConnectorRpcLocal.js.map +0 -1
  130. package/dist/src/connection/websocket/WebsocketClientConnectorRpcRemote.d.ts +0 -5
  131. package/dist/src/connection/websocket/WebsocketClientConnectorRpcRemote.js +0 -17
  132. package/dist/src/connection/websocket/WebsocketClientConnectorRpcRemote.js.map +0 -1
  133. package/dist/src/connection/websocket/WebsocketServer.d.ts +0 -25
  134. package/dist/src/connection/websocket/WebsocketServer.js +0 -146
  135. package/dist/src/connection/websocket/WebsocketServer.js.map +0 -1
  136. package/dist/src/connection/websocket/WebsocketServerConnection.d.ts +0 -22
  137. package/dist/src/connection/websocket/WebsocketServerConnection.js +0 -101
  138. package/dist/src/connection/websocket/WebsocketServerConnection.js.map +0 -1
  139. package/dist/src/connection/websocket/WebsocketServerConnector.d.ts +0 -44
  140. package/dist/src/connection/websocket/WebsocketServerConnector.js +0 -279
  141. package/dist/src/connection/websocket/WebsocketServerConnector.js.map +0 -1
  142. package/dist/src/dht/DhtNode.d.ts +0 -119
  143. package/dist/src/dht/DhtNode.js +0 -500
  144. package/dist/src/dht/DhtNode.js.map +0 -1
  145. package/dist/src/dht/DhtNodeRpcLocal.d.ts +0 -23
  146. package/dist/src/dht/DhtNodeRpcLocal.js +0 -54
  147. package/dist/src/dht/DhtNodeRpcLocal.js.map +0 -1
  148. package/dist/src/dht/DhtNodeRpcRemote.d.ts +0 -25
  149. package/dist/src/dht/DhtNodeRpcRemote.js +0 -83
  150. package/dist/src/dht/DhtNodeRpcRemote.js.map +0 -1
  151. package/dist/src/dht/ExternalApiRpcLocal.d.ts +0 -18
  152. package/dist/src/dht/ExternalApiRpcLocal.js +0 -32
  153. package/dist/src/dht/ExternalApiRpcLocal.js.map +0 -1
  154. package/dist/src/dht/ExternalApiRpcRemote.d.ts +0 -10
  155. package/dist/src/dht/ExternalApiRpcRemote.js +0 -58
  156. package/dist/src/dht/ExternalApiRpcRemote.js.map +0 -1
  157. package/dist/src/dht/PeerManager.d.ts +0 -63
  158. package/dist/src/dht/PeerManager.js +0 -251
  159. package/dist/src/dht/PeerManager.js.map +0 -1
  160. package/dist/src/dht/contact/Contact.d.ts +0 -8
  161. package/dist/src/dht/contact/Contact.js +0 -18
  162. package/dist/src/dht/contact/Contact.js.map +0 -1
  163. package/dist/src/dht/contact/ContactList.d.ts +0 -19
  164. package/dist/src/dht/contact/ContactList.js +0 -35
  165. package/dist/src/dht/contact/ContactList.js.map +0 -1
  166. package/dist/src/dht/contact/RandomContactList.d.ts +0 -11
  167. package/dist/src/dht/contact/RandomContactList.js +0 -47
  168. package/dist/src/dht/contact/RandomContactList.js.map +0 -1
  169. package/dist/src/dht/contact/RingContactList.d.ts +0 -28
  170. package/dist/src/dht/contact/RingContactList.js +0 -126
  171. package/dist/src/dht/contact/RingContactList.js.map +0 -1
  172. package/dist/src/dht/contact/RpcRemote.d.ts +0 -19
  173. package/dist/src/dht/contact/RpcRemote.js +0 -61
  174. package/dist/src/dht/contact/RpcRemote.js.map +0 -1
  175. package/dist/src/dht/contact/SortedContactList.d.ts +0 -37
  176. package/dist/src/dht/contact/SortedContactList.js +0 -134
  177. package/dist/src/dht/contact/SortedContactList.js.map +0 -1
  178. package/dist/src/dht/contact/getClosestNodes.d.ts +0 -6
  179. package/dist/src/dht/contact/getClosestNodes.js +0 -19
  180. package/dist/src/dht/contact/getClosestNodes.js.map +0 -1
  181. package/dist/src/dht/contact/ringIdentifiers.d.ts +0 -16
  182. package/dist/src/dht/contact/ringIdentifiers.js +0 -54
  183. package/dist/src/dht/contact/ringIdentifiers.js.map +0 -1
  184. package/dist/src/dht/discovery/DiscoverySession.d.ts +0 -29
  185. package/dist/src/dht/discovery/DiscoverySession.js +0 -102
  186. package/dist/src/dht/discovery/DiscoverySession.js.map +0 -1
  187. package/dist/src/dht/discovery/PeerDiscovery.d.ts +0 -42
  188. package/dist/src/dht/discovery/PeerDiscovery.js +0 -193
  189. package/dist/src/dht/discovery/PeerDiscovery.js.map +0 -1
  190. package/dist/src/dht/discovery/RingDiscoverySession.d.ts +0 -28
  191. package/dist/src/dht/discovery/RingDiscoverySession.js +0 -116
  192. package/dist/src/dht/discovery/RingDiscoverySession.js.map +0 -1
  193. package/dist/src/dht/recursive-operation/RecursiveOperationManager.d.ts +0 -38
  194. package/dist/src/dht/recursive-operation/RecursiveOperationManager.js +0 -165
  195. package/dist/src/dht/recursive-operation/RecursiveOperationManager.js.map +0 -1
  196. package/dist/src/dht/recursive-operation/RecursiveOperationRpcLocal.d.ts +0 -14
  197. package/dist/src/dht/recursive-operation/RecursiveOperationRpcLocal.js +0 -26
  198. package/dist/src/dht/recursive-operation/RecursiveOperationRpcLocal.js.map +0 -1
  199. package/dist/src/dht/recursive-operation/RecursiveOperationRpcRemote.d.ts +0 -6
  200. package/dist/src/dht/recursive-operation/RecursiveOperationRpcRemote.js +0 -44
  201. package/dist/src/dht/recursive-operation/RecursiveOperationRpcRemote.js.map +0 -1
  202. package/dist/src/dht/recursive-operation/RecursiveOperationSession.d.ts +0 -45
  203. package/dist/src/dht/recursive-operation/RecursiveOperationSession.js +0 -185
  204. package/dist/src/dht/recursive-operation/RecursiveOperationSession.js.map +0 -1
  205. package/dist/src/dht/recursive-operation/RecursiveOperationSessionRpcLocal.d.ts +0 -14
  206. package/dist/src/dht/recursive-operation/RecursiveOperationSessionRpcLocal.js +0 -20
  207. package/dist/src/dht/recursive-operation/RecursiveOperationSessionRpcLocal.js.map +0 -1
  208. package/dist/src/dht/recursive-operation/RecursiveOperationSessionRpcRemote.d.ts +0 -6
  209. package/dist/src/dht/recursive-operation/RecursiveOperationSessionRpcRemote.js +0 -21
  210. package/dist/src/dht/recursive-operation/RecursiveOperationSessionRpcRemote.js.map +0 -1
  211. package/dist/src/dht/routing/DuplicateDetector.d.ts +0 -10
  212. package/dist/src/dht/routing/DuplicateDetector.js +0 -31
  213. package/dist/src/dht/routing/DuplicateDetector.js.map +0 -1
  214. package/dist/src/dht/routing/Router.d.ts +0 -35
  215. package/dist/src/dht/routing/Router.js +0 -204
  216. package/dist/src/dht/routing/Router.js.map +0 -1
  217. package/dist/src/dht/routing/RouterRpcLocal.d.ts +0 -20
  218. package/dist/src/dht/routing/RouterRpcLocal.js +0 -67
  219. package/dist/src/dht/routing/RouterRpcLocal.js.map +0 -1
  220. package/dist/src/dht/routing/RouterRpcRemote.d.ts +0 -8
  221. package/dist/src/dht/routing/RouterRpcRemote.js +0 -81
  222. package/dist/src/dht/routing/RouterRpcRemote.js.map +0 -1
  223. package/dist/src/dht/routing/RoutingSession.d.ts +0 -56
  224. package/dist/src/dht/routing/RoutingSession.js +0 -201
  225. package/dist/src/dht/routing/RoutingSession.js.map +0 -1
  226. package/dist/src/dht/routing/RoutingTablesCache.d.ts +0 -24
  227. package/dist/src/dht/routing/RoutingTablesCache.js +0 -46
  228. package/dist/src/dht/routing/RoutingTablesCache.js.map +0 -1
  229. package/dist/src/dht/routing/getPreviousPeer.d.ts +0 -2
  230. package/dist/src/dht/routing/getPreviousPeer.js +0 -12
  231. package/dist/src/dht/routing/getPreviousPeer.js.map +0 -1
  232. package/dist/src/dht/store/LocalDataStore.d.ts +0 -14
  233. package/dist/src/dht/store/LocalDataStore.js +0 -78
  234. package/dist/src/dht/store/LocalDataStore.js.map +0 -1
  235. package/dist/src/dht/store/StoreManager.d.ts +0 -32
  236. package/dist/src/dht/store/StoreManager.js +0 -126
  237. package/dist/src/dht/store/StoreManager.js.map +0 -1
  238. package/dist/src/dht/store/StoreRpcLocal.d.ts +0 -21
  239. package/dist/src/dht/store/StoreRpcLocal.js +0 -65
  240. package/dist/src/dht/store/StoreRpcLocal.js.map +0 -1
  241. package/dist/src/dht/store/StoreRpcRemote.d.ts +0 -7
  242. package/dist/src/dht/store/StoreRpcRemote.js +0 -29
  243. package/dist/src/dht/store/StoreRpcRemote.js.map +0 -1
  244. package/dist/src/exports.d.ts +0 -25
  245. package/dist/src/exports.js +0 -48
  246. package/dist/src/exports.js.map +0 -1
  247. package/dist/src/helpers/AddressTools.d.ts +0 -2
  248. package/dist/src/helpers/AddressTools.js +0 -32
  249. package/dist/src/helpers/AddressTools.js.map +0 -1
  250. package/dist/src/helpers/Connectivity.d.ts +0 -4
  251. package/dist/src/helpers/Connectivity.js +0 -24
  252. package/dist/src/helpers/Connectivity.js.map +0 -1
  253. package/dist/src/helpers/browser/isBrowserEnvironment.d.ts +0 -1
  254. package/dist/src/helpers/browser/isBrowserEnvironment.js +0 -6
  255. package/dist/src/helpers/browser/isBrowserEnvironment.js.map +0 -1
  256. package/dist/src/helpers/browser/isBrowserEnvironment_override.d.ts +0 -1
  257. package/dist/src/helpers/browser/isBrowserEnvironment_override.js +0 -7
  258. package/dist/src/helpers/browser/isBrowserEnvironment_override.js.map +0 -1
  259. package/dist/src/helpers/createPeerDescriptor.d.ts +0 -3
  260. package/dist/src/helpers/createPeerDescriptor.js +0 -58
  261. package/dist/src/helpers/createPeerDescriptor.js.map +0 -1
  262. package/dist/src/helpers/createPeerDescriptorSignaturePayload.d.ts +0 -2
  263. package/dist/src/helpers/createPeerDescriptorSignaturePayload.js +0 -30
  264. package/dist/src/helpers/createPeerDescriptorSignaturePayload.js.map +0 -1
  265. package/dist/src/helpers/debugHelpers.d.ts +0 -3
  266. package/dist/src/helpers/debugHelpers.js +0 -11
  267. package/dist/src/helpers/debugHelpers.js.map +0 -1
  268. package/dist/src/helpers/errors.d.ts +0 -72
  269. package/dist/src/helpers/errors.js +0 -97
  270. package/dist/src/helpers/errors.js.map +0 -1
  271. package/dist/src/helpers/offering.d.ts +0 -4
  272. package/dist/src/helpers/offering.js +0 -18
  273. package/dist/src/helpers/offering.js.map +0 -1
  274. package/dist/src/helpers/protoClasses.d.ts +0 -2
  275. package/dist/src/helpers/protoClasses.js +0 -32
  276. package/dist/src/helpers/protoClasses.js.map +0 -1
  277. package/dist/src/helpers/protoToString.d.ts +0 -2
  278. package/dist/src/helpers/protoToString.js +0 -19
  279. package/dist/src/helpers/protoToString.js.map +0 -1
  280. package/dist/src/helpers/version.d.ts +0 -6
  281. package/dist/src/helpers/version.js +0 -38
  282. package/dist/src/helpers/version.js.map +0 -1
  283. package/dist/src/identifiers.d.ts +0 -10
  284. package/dist/src/identifiers.js +0 -31
  285. package/dist/src/identifiers.js.map +0 -1
  286. package/dist/src/rpc-protocol/DhtCallContext.d.ts +0 -12
  287. package/dist/src/rpc-protocol/DhtCallContext.js +0 -17
  288. package/dist/src/rpc-protocol/DhtCallContext.js.map +0 -1
  289. package/dist/src/rpc-protocol/DhtRpcOptions.d.ts +0 -10
  290. package/dist/src/rpc-protocol/DhtRpcOptions.js +0 -3
  291. package/dist/src/rpc-protocol/DhtRpcOptions.js.map +0 -1
  292. package/dist/src/transport/ITransport.d.ts +0 -31
  293. package/dist/src/transport/ITransport.js +0 -9
  294. package/dist/src/transport/ITransport.js.map +0 -1
  295. package/dist/src/transport/ListeningRpcCommunicator.d.ts +0 -11
  296. package/dist/src/transport/ListeningRpcCommunicator.js +0 -31
  297. package/dist/src/transport/ListeningRpcCommunicator.js.map +0 -1
  298. package/dist/src/transport/RoutingRpcCommunicator.d.ts +0 -10
  299. package/dist/src/transport/RoutingRpcCommunicator.js +0 -60
  300. package/dist/src/transport/RoutingRpcCommunicator.js.map +0 -1
  301. package/dist/src/types/ServiceID.d.ts +0 -1
  302. package/dist/src/types/ServiceID.js +0 -3
  303. package/dist/src/types/ServiceID.js.map +0 -1
@@ -1,156 +0,0 @@
1
- import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
2
- import type { IBinaryWriter } from "@protobuf-ts/runtime";
3
- import type { BinaryReadOptions } from "@protobuf-ts/runtime";
4
- import type { IBinaryReader } from "@protobuf-ts/runtime";
5
- import type { PartialMessage } from "@protobuf-ts/runtime";
6
- import type { JsonValue } from "@protobuf-ts/runtime";
7
- import type { JsonReadOptions } from "@protobuf-ts/runtime";
8
- import type { JsonWriteOptions } from "@protobuf-ts/runtime";
9
- import { MessageType } from "@protobuf-ts/runtime";
10
- /**
11
- * A Timestamp represents a point in time independent of any time zone or local
12
- * calendar, encoded as a count of seconds and fractions of seconds at
13
- * nanosecond resolution. The count is relative to an epoch at UTC midnight on
14
- * January 1, 1970, in the proleptic Gregorian calendar which extends the
15
- * Gregorian calendar backwards to year one.
16
- *
17
- * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
18
- * second table is needed for interpretation, using a [24-hour linear
19
- * smear](https://developers.google.com/time/smear).
20
- *
21
- * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
22
- * restricting to that range, we ensure that we can convert to and from [RFC
23
- * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
24
- *
25
- * # Examples
26
- *
27
- * Example 1: Compute Timestamp from POSIX `time()`.
28
- *
29
- * Timestamp timestamp;
30
- * timestamp.set_seconds(time(NULL));
31
- * timestamp.set_nanos(0);
32
- *
33
- * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
34
- *
35
- * struct timeval tv;
36
- * gettimeofday(&tv, NULL);
37
- *
38
- * Timestamp timestamp;
39
- * timestamp.set_seconds(tv.tv_sec);
40
- * timestamp.set_nanos(tv.tv_usec * 1000);
41
- *
42
- * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
43
- *
44
- * FILETIME ft;
45
- * GetSystemTimeAsFileTime(&ft);
46
- * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
47
- *
48
- * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
49
- * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
50
- * Timestamp timestamp;
51
- * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
52
- * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
53
- *
54
- * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
55
- *
56
- * long millis = System.currentTimeMillis();
57
- *
58
- * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
59
- * .setNanos((int) ((millis % 1000) * 1000000)).build();
60
- *
61
- * Example 5: Compute Timestamp from Java `Instant.now()`.
62
- *
63
- * Instant now = Instant.now();
64
- *
65
- * Timestamp timestamp =
66
- * Timestamp.newBuilder().setSeconds(now.getEpochSecond())
67
- * .setNanos(now.getNano()).build();
68
- *
69
- * Example 6: Compute Timestamp from current time in Python.
70
- *
71
- * timestamp = Timestamp()
72
- * timestamp.GetCurrentTime()
73
- *
74
- * # JSON Mapping
75
- *
76
- * In JSON format, the Timestamp type is encoded as a string in the
77
- * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
78
- * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
79
- * where {year} is always expressed using four digits while {month}, {day},
80
- * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
81
- * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
82
- * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
83
- * is required. A proto3 JSON serializer should always use UTC (as indicated by
84
- * "Z") when printing the Timestamp type and a proto3 JSON parser should be
85
- * able to accept both UTC and other timezones (as indicated by an offset).
86
- *
87
- * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
88
- * 01:30 UTC on January 15, 2017.
89
- *
90
- * In JavaScript, one can convert a Date object to this format using the
91
- * standard
92
- * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
93
- * method. In Python, a standard `datetime.datetime` object can be converted
94
- * to this format using
95
- * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
96
- * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
97
- * the Joda Time's [`ISODateTimeFormat.dateTime()`](
98
- * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
99
- * ) to obtain a formatter capable of generating timestamps in this format.
100
- *
101
- *
102
- * @generated from protobuf message google.protobuf.Timestamp
103
- */
104
- export interface Timestamp {
105
- /**
106
- * Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
107
- * be between -315576000000 and 315576000000 inclusive (which corresponds to
108
- * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).
109
- *
110
- * @generated from protobuf field: int64 seconds = 1
111
- */
112
- seconds: number;
113
- /**
114
- * Non-negative fractions of a second at nanosecond resolution. This field is
115
- * the nanosecond portion of the duration, not an alternative to seconds.
116
- * Negative second values with fractions must still have non-negative nanos
117
- * values that count forward in time. Must be between 0 and 999,999,999
118
- * inclusive.
119
- *
120
- * @generated from protobuf field: int32 nanos = 2
121
- */
122
- nanos: number;
123
- }
124
- declare class Timestamp$Type extends MessageType<Timestamp> {
125
- constructor();
126
- /**
127
- * Creates a new `Timestamp` for the current time.
128
- */
129
- now(): Timestamp;
130
- /**
131
- * Converts a `Timestamp` to a JavaScript Date.
132
- */
133
- toDate(message: Timestamp): Date;
134
- /**
135
- * Converts a JavaScript Date to a `Timestamp`.
136
- */
137
- fromDate(date: Date): Timestamp;
138
- /**
139
- * In JSON format, the `Timestamp` type is encoded as a string
140
- * in the RFC 3339 format.
141
- */
142
- internalJsonWrite(message: Timestamp, options: JsonWriteOptions): JsonValue;
143
- /**
144
- * In JSON format, the `Timestamp` type is encoded as a string
145
- * in the RFC 3339 format.
146
- */
147
- internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Timestamp): Timestamp;
148
- create(value?: PartialMessage<Timestamp>): Timestamp;
149
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Timestamp): Timestamp;
150
- internalBinaryWrite(message: Timestamp, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
151
- }
152
- /**
153
- * @generated MessageType for protobuf message google.protobuf.Timestamp
154
- */
155
- export declare const Timestamp: Timestamp$Type;
156
- export {};
@@ -1,136 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Timestamp = void 0;
4
- const runtime_1 = require("@protobuf-ts/runtime");
5
- const runtime_2 = require("@protobuf-ts/runtime");
6
- const runtime_3 = require("@protobuf-ts/runtime");
7
- const runtime_4 = require("@protobuf-ts/runtime");
8
- const runtime_5 = require("@protobuf-ts/runtime");
9
- const runtime_6 = require("@protobuf-ts/runtime");
10
- // @generated message type with reflection information, may provide speed optimized methods
11
- class Timestamp$Type extends runtime_6.MessageType {
12
- constructor() {
13
- super("google.protobuf.Timestamp", [
14
- { no: 1, name: "seconds", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
15
- { no: 2, name: "nanos", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
16
- ]);
17
- }
18
- /**
19
- * Creates a new `Timestamp` for the current time.
20
- */
21
- now() {
22
- const msg = this.create();
23
- const ms = Date.now();
24
- msg.seconds = runtime_5.PbLong.from(Math.floor(ms / 1000)).toNumber();
25
- msg.nanos = (ms % 1000) * 1000000;
26
- return msg;
27
- }
28
- /**
29
- * Converts a `Timestamp` to a JavaScript Date.
30
- */
31
- toDate(message) {
32
- return new Date(runtime_5.PbLong.from(message.seconds).toNumber() * 1000 + Math.ceil(message.nanos / 1000000));
33
- }
34
- /**
35
- * Converts a JavaScript Date to a `Timestamp`.
36
- */
37
- fromDate(date) {
38
- const msg = this.create();
39
- const ms = date.getTime();
40
- msg.seconds = runtime_5.PbLong.from(Math.floor(ms / 1000)).toNumber();
41
- msg.nanos = ((ms % 1000) + (ms < 0 && ms % 1000 !== 0 ? 1000 : 0)) * 1000000;
42
- return msg;
43
- }
44
- /**
45
- * In JSON format, the `Timestamp` type is encoded as a string
46
- * in the RFC 3339 format.
47
- */
48
- internalJsonWrite(message, options) {
49
- let ms = runtime_5.PbLong.from(message.seconds).toNumber() * 1000;
50
- if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z"))
51
- throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");
52
- if (message.nanos < 0)
53
- throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative.");
54
- let z = "Z";
55
- if (message.nanos > 0) {
56
- let nanosStr = (message.nanos + 1000000000).toString().substring(1);
57
- if (nanosStr.substring(3) === "000000")
58
- z = "." + nanosStr.substring(0, 3) + "Z";
59
- else if (nanosStr.substring(6) === "000")
60
- z = "." + nanosStr.substring(0, 6) + "Z";
61
- else
62
- z = "." + nanosStr + "Z";
63
- }
64
- return new Date(ms).toISOString().replace(".000Z", z);
65
- }
66
- /**
67
- * In JSON format, the `Timestamp` type is encoded as a string
68
- * in the RFC 3339 format.
69
- */
70
- internalJsonRead(json, options, target) {
71
- if (typeof json !== "string")
72
- throw new Error("Unable to parse Timestamp from JSON " + (0, runtime_4.typeofJsonValue)(json) + ".");
73
- let matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);
74
- if (!matches)
75
- throw new Error("Unable to parse Timestamp from JSON. Invalid format.");
76
- let ms = Date.parse(matches[1] + "-" + matches[2] + "-" + matches[3] + "T" + matches[4] + ":" + matches[5] + ":" + matches[6] + (matches[8] ? matches[8] : "Z"));
77
- if (Number.isNaN(ms))
78
- throw new Error("Unable to parse Timestamp from JSON. Invalid value.");
79
- if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z"))
80
- throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");
81
- if (!target)
82
- target = this.create();
83
- target.seconds = runtime_5.PbLong.from(ms / 1000).toNumber();
84
- target.nanos = 0;
85
- if (matches[7])
86
- target.nanos = (parseInt("1" + matches[7] + "0".repeat(9 - matches[7].length)) - 1000000000);
87
- return target;
88
- }
89
- create(value) {
90
- const message = globalThis.Object.create((this.messagePrototype));
91
- message.seconds = 0;
92
- message.nanos = 0;
93
- if (value !== undefined)
94
- (0, runtime_3.reflectionMergePartial)(this, message, value);
95
- return message;
96
- }
97
- internalBinaryRead(reader, length, options, target) {
98
- let message = target ?? this.create(), end = reader.pos + length;
99
- while (reader.pos < end) {
100
- let [fieldNo, wireType] = reader.tag();
101
- switch (fieldNo) {
102
- case /* int64 seconds */ 1:
103
- message.seconds = reader.int64().toNumber();
104
- break;
105
- case /* int32 nanos */ 2:
106
- message.nanos = reader.int32();
107
- break;
108
- default:
109
- let u = options.readUnknownField;
110
- if (u === "throw")
111
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
112
- let d = reader.skip(wireType);
113
- if (u !== false)
114
- (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
115
- }
116
- }
117
- return message;
118
- }
119
- internalBinaryWrite(message, writer, options) {
120
- /* int64 seconds = 1; */
121
- if (message.seconds !== 0)
122
- writer.tag(1, runtime_1.WireType.Varint).int64(message.seconds);
123
- /* int32 nanos = 2; */
124
- if (message.nanos !== 0)
125
- writer.tag(2, runtime_1.WireType.Varint).int32(message.nanos);
126
- let u = options.writeUnknownFields;
127
- if (u !== false)
128
- (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
129
- return writer;
130
- }
131
- }
132
- /**
133
- * @generated MessageType for protobuf message google.protobuf.Timestamp
134
- */
135
- exports.Timestamp = new Timestamp$Type();
136
- //# sourceMappingURL=timest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I,OAAO,CAAC,KAAK,KAAK,CAAC;YACnB,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,kBAAQ,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACxD,IAAI,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC;QACnC,IAAI,CAAC,KAAK,KAAK;YACX,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,6BAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAClF,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AACD;;GAEG;AACU,QAAA,SAAS,GAAG,IAAI,cAAc,EAAE,CAAC"}
@@ -1,371 +0,0 @@
1
- import type { ExternalFindClosestNodesResponse } from "./DhtRpc";
2
- import type { ExternalFindClosestNodesRequest } from "./DhtRpc";
3
- import type { ExternalStoreDataResponse } from "./DhtRpc";
4
- import type { ExternalStoreDataRequest } from "./DhtRpc";
5
- import type { ExternalFetchDataResponse } from "./DhtRpc";
6
- import type { ExternalFetchDataRequest } from "./DhtRpc";
7
- import type { SetPrivateRequest } from "./DhtRpc";
8
- import type { DisconnectNotice } from "./DhtRpc";
9
- import type { UnlockRequest } from "./DhtRpc";
10
- import type { LockResponse } from "./DhtRpc";
11
- import type { LockRequest } from "./DhtRpc";
12
- import type { IceCandidate } from "./DhtRpc";
13
- import type { RtcAnswer } from "./DhtRpc";
14
- import type { RtcOffer } from "./DhtRpc";
15
- import type { WebrtcConnectionRequest } from "./DhtRpc";
16
- import type { WebsocketConnectionRequest } from "./DhtRpc";
17
- import type { RecursiveOperationResponse } from "./DhtRpc";
18
- import type { ReplicateDataRequest } from "./DhtRpc";
19
- import type { StoreDataResponse } from "./DhtRpc";
20
- import type { StoreDataRequest } from "./DhtRpc";
21
- import type { RouteMessageAck } from "./DhtRpc";
22
- import type { RouteMessageWrapper } from "./DhtRpc";
23
- import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
24
- import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
25
- import type { Empty } from "../../../google/protobuf/empty";
26
- import type { LeaveNotice } from "./DhtRpc";
27
- import type { PingResponse } from "./DhtRpc";
28
- import type { PingRequest } from "./DhtRpc";
29
- import type { ClosestRingPeersResponse } from "./DhtRpc";
30
- import type { ClosestRingPeersRequest } from "./DhtRpc";
31
- import type { ClosestPeersResponse } from "./DhtRpc";
32
- import type { ClosestPeersRequest } from "./DhtRpc";
33
- import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
34
- import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
35
- /**
36
- * @generated from protobuf service dht.DhtNodeRpc
37
- */
38
- export interface IDhtNodeRpcClient {
39
- /**
40
- * TODO rename to getClosestNeighbors (breaking change)
41
- *
42
- * @generated from protobuf rpc: getClosestPeers
43
- */
44
- getClosestPeers(input: ClosestPeersRequest, options?: RpcOptions): UnaryCall<ClosestPeersRequest, ClosestPeersResponse>;
45
- /**
46
- * TODO rename to getClosestRingContacts (breaking change)
47
- *
48
- * @generated from protobuf rpc: getClosestRingPeers
49
- */
50
- getClosestRingPeers(input: ClosestRingPeersRequest, options?: RpcOptions): UnaryCall<ClosestRingPeersRequest, ClosestRingPeersResponse>;
51
- /**
52
- * @generated from protobuf rpc: ping
53
- */
54
- ping(input: PingRequest, options?: RpcOptions): UnaryCall<PingRequest, PingResponse>;
55
- /**
56
- * @generated from protobuf rpc: leaveNotice
57
- */
58
- leaveNotice(input: LeaveNotice, options?: RpcOptions): UnaryCall<LeaveNotice, Empty>;
59
- }
60
- /**
61
- * @generated from protobuf service dht.DhtNodeRpc
62
- */
63
- export declare class DhtNodeRpcClient implements IDhtNodeRpcClient, ServiceInfo {
64
- private readonly _transport;
65
- typeName: string;
66
- methods: import("@protobuf-ts/runtime-rpc").MethodInfo<any, any>[];
67
- options: {
68
- [extensionName: string]: import("@protobuf-ts/runtime").JsonValue;
69
- };
70
- constructor(_transport: RpcTransport);
71
- /**
72
- * TODO rename to getClosestNeighbors (breaking change)
73
- *
74
- * @generated from protobuf rpc: getClosestPeers
75
- */
76
- getClosestPeers(input: ClosestPeersRequest, options?: RpcOptions): UnaryCall<ClosestPeersRequest, ClosestPeersResponse>;
77
- /**
78
- * TODO rename to getClosestRingContacts (breaking change)
79
- *
80
- * @generated from protobuf rpc: getClosestRingPeers
81
- */
82
- getClosestRingPeers(input: ClosestRingPeersRequest, options?: RpcOptions): UnaryCall<ClosestRingPeersRequest, ClosestRingPeersResponse>;
83
- /**
84
- * @generated from protobuf rpc: ping
85
- */
86
- ping(input: PingRequest, options?: RpcOptions): UnaryCall<PingRequest, PingResponse>;
87
- /**
88
- * @generated from protobuf rpc: leaveNotice
89
- */
90
- leaveNotice(input: LeaveNotice, options?: RpcOptions): UnaryCall<LeaveNotice, Empty>;
91
- }
92
- /**
93
- * @generated from protobuf service dht.RouterRpc
94
- */
95
- export interface IRouterRpcClient {
96
- /**
97
- * @generated from protobuf rpc: routeMessage
98
- */
99
- routeMessage(input: RouteMessageWrapper, options?: RpcOptions): UnaryCall<RouteMessageWrapper, RouteMessageAck>;
100
- /**
101
- * @generated from protobuf rpc: forwardMessage
102
- */
103
- forwardMessage(input: RouteMessageWrapper, options?: RpcOptions): UnaryCall<RouteMessageWrapper, RouteMessageAck>;
104
- }
105
- /**
106
- * @generated from protobuf service dht.RouterRpc
107
- */
108
- export declare class RouterRpcClient implements IRouterRpcClient, ServiceInfo {
109
- private readonly _transport;
110
- typeName: string;
111
- methods: import("@protobuf-ts/runtime-rpc").MethodInfo<any, any>[];
112
- options: {
113
- [extensionName: string]: import("@protobuf-ts/runtime").JsonValue;
114
- };
115
- constructor(_transport: RpcTransport);
116
- /**
117
- * @generated from protobuf rpc: routeMessage
118
- */
119
- routeMessage(input: RouteMessageWrapper, options?: RpcOptions): UnaryCall<RouteMessageWrapper, RouteMessageAck>;
120
- /**
121
- * @generated from protobuf rpc: forwardMessage
122
- */
123
- forwardMessage(input: RouteMessageWrapper, options?: RpcOptions): UnaryCall<RouteMessageWrapper, RouteMessageAck>;
124
- }
125
- /**
126
- * @generated from protobuf service dht.RecursiveOperationRpc
127
- */
128
- export interface IRecursiveOperationRpcClient {
129
- /**
130
- * @generated from protobuf rpc: routeRequest
131
- */
132
- routeRequest(input: RouteMessageWrapper, options?: RpcOptions): UnaryCall<RouteMessageWrapper, RouteMessageAck>;
133
- }
134
- /**
135
- * @generated from protobuf service dht.RecursiveOperationRpc
136
- */
137
- export declare class RecursiveOperationRpcClient implements IRecursiveOperationRpcClient, ServiceInfo {
138
- private readonly _transport;
139
- typeName: string;
140
- methods: import("@protobuf-ts/runtime-rpc").MethodInfo<any, any>[];
141
- options: {
142
- [extensionName: string]: import("@protobuf-ts/runtime").JsonValue;
143
- };
144
- constructor(_transport: RpcTransport);
145
- /**
146
- * @generated from protobuf rpc: routeRequest
147
- */
148
- routeRequest(input: RouteMessageWrapper, options?: RpcOptions): UnaryCall<RouteMessageWrapper, RouteMessageAck>;
149
- }
150
- /**
151
- * @generated from protobuf service dht.StoreRpc
152
- */
153
- export interface IStoreRpcClient {
154
- /**
155
- * @generated from protobuf rpc: storeData
156
- */
157
- storeData(input: StoreDataRequest, options?: RpcOptions): UnaryCall<StoreDataRequest, StoreDataResponse>;
158
- /**
159
- * @generated from protobuf rpc: replicateData
160
- */
161
- replicateData(input: ReplicateDataRequest, options?: RpcOptions): UnaryCall<ReplicateDataRequest, Empty>;
162
- }
163
- /**
164
- * @generated from protobuf service dht.StoreRpc
165
- */
166
- export declare class StoreRpcClient implements IStoreRpcClient, ServiceInfo {
167
- private readonly _transport;
168
- typeName: string;
169
- methods: import("@protobuf-ts/runtime-rpc").MethodInfo<any, any>[];
170
- options: {
171
- [extensionName: string]: import("@protobuf-ts/runtime").JsonValue;
172
- };
173
- constructor(_transport: RpcTransport);
174
- /**
175
- * @generated from protobuf rpc: storeData
176
- */
177
- storeData(input: StoreDataRequest, options?: RpcOptions): UnaryCall<StoreDataRequest, StoreDataResponse>;
178
- /**
179
- * @generated from protobuf rpc: replicateData
180
- */
181
- replicateData(input: ReplicateDataRequest, options?: RpcOptions): UnaryCall<ReplicateDataRequest, Empty>;
182
- }
183
- /**
184
- * @generated from protobuf service dht.RecursiveOperationSessionRpc
185
- */
186
- export interface IRecursiveOperationSessionRpcClient {
187
- /**
188
- * @generated from protobuf rpc: sendResponse
189
- */
190
- sendResponse(input: RecursiveOperationResponse, options?: RpcOptions): UnaryCall<RecursiveOperationResponse, Empty>;
191
- }
192
- /**
193
- * @generated from protobuf service dht.RecursiveOperationSessionRpc
194
- */
195
- export declare class RecursiveOperationSessionRpcClient implements IRecursiveOperationSessionRpcClient, ServiceInfo {
196
- private readonly _transport;
197
- typeName: string;
198
- methods: import("@protobuf-ts/runtime-rpc").MethodInfo<any, any>[];
199
- options: {
200
- [extensionName: string]: import("@protobuf-ts/runtime").JsonValue;
201
- };
202
- constructor(_transport: RpcTransport);
203
- /**
204
- * @generated from protobuf rpc: sendResponse
205
- */
206
- sendResponse(input: RecursiveOperationResponse, options?: RpcOptions): UnaryCall<RecursiveOperationResponse, Empty>;
207
- }
208
- /**
209
- * @generated from protobuf service dht.WebsocketClientConnectorRpc
210
- */
211
- export interface IWebsocketClientConnectorRpcClient {
212
- /**
213
- * @generated from protobuf rpc: requestConnection
214
- */
215
- requestConnection(input: WebsocketConnectionRequest, options?: RpcOptions): UnaryCall<WebsocketConnectionRequest, Empty>;
216
- }
217
- /**
218
- * @generated from protobuf service dht.WebsocketClientConnectorRpc
219
- */
220
- export declare class WebsocketClientConnectorRpcClient implements IWebsocketClientConnectorRpcClient, ServiceInfo {
221
- private readonly _transport;
222
- typeName: string;
223
- methods: import("@protobuf-ts/runtime-rpc").MethodInfo<any, any>[];
224
- options: {
225
- [extensionName: string]: import("@protobuf-ts/runtime").JsonValue;
226
- };
227
- constructor(_transport: RpcTransport);
228
- /**
229
- * @generated from protobuf rpc: requestConnection
230
- */
231
- requestConnection(input: WebsocketConnectionRequest, options?: RpcOptions): UnaryCall<WebsocketConnectionRequest, Empty>;
232
- }
233
- /**
234
- * @generated from protobuf service dht.WebrtcConnectorRpc
235
- */
236
- export interface IWebrtcConnectorRpcClient {
237
- /**
238
- * @generated from protobuf rpc: requestConnection
239
- */
240
- requestConnection(input: WebrtcConnectionRequest, options?: RpcOptions): UnaryCall<WebrtcConnectionRequest, Empty>;
241
- /**
242
- * @generated from protobuf rpc: rtcOffer
243
- */
244
- rtcOffer(input: RtcOffer, options?: RpcOptions): UnaryCall<RtcOffer, Empty>;
245
- /**
246
- * @generated from protobuf rpc: rtcAnswer
247
- */
248
- rtcAnswer(input: RtcAnswer, options?: RpcOptions): UnaryCall<RtcAnswer, Empty>;
249
- /**
250
- * @generated from protobuf rpc: iceCandidate
251
- */
252
- iceCandidate(input: IceCandidate, options?: RpcOptions): UnaryCall<IceCandidate, Empty>;
253
- }
254
- /**
255
- * @generated from protobuf service dht.WebrtcConnectorRpc
256
- */
257
- export declare class WebrtcConnectorRpcClient implements IWebrtcConnectorRpcClient, ServiceInfo {
258
- private readonly _transport;
259
- typeName: string;
260
- methods: import("@protobuf-ts/runtime-rpc").MethodInfo<any, any>[];
261
- options: {
262
- [extensionName: string]: import("@protobuf-ts/runtime").JsonValue;
263
- };
264
- constructor(_transport: RpcTransport);
265
- /**
266
- * @generated from protobuf rpc: requestConnection
267
- */
268
- requestConnection(input: WebrtcConnectionRequest, options?: RpcOptions): UnaryCall<WebrtcConnectionRequest, Empty>;
269
- /**
270
- * @generated from protobuf rpc: rtcOffer
271
- */
272
- rtcOffer(input: RtcOffer, options?: RpcOptions): UnaryCall<RtcOffer, Empty>;
273
- /**
274
- * @generated from protobuf rpc: rtcAnswer
275
- */
276
- rtcAnswer(input: RtcAnswer, options?: RpcOptions): UnaryCall<RtcAnswer, Empty>;
277
- /**
278
- * @generated from protobuf rpc: iceCandidate
279
- */
280
- iceCandidate(input: IceCandidate, options?: RpcOptions): UnaryCall<IceCandidate, Empty>;
281
- }
282
- /**
283
- * @generated from protobuf service dht.ConnectionLockRpc
284
- */
285
- export interface IConnectionLockRpcClient {
286
- /**
287
- * @generated from protobuf rpc: lockRequest
288
- */
289
- lockRequest(input: LockRequest, options?: RpcOptions): UnaryCall<LockRequest, LockResponse>;
290
- /**
291
- * @generated from protobuf rpc: unlockRequest
292
- */
293
- unlockRequest(input: UnlockRequest, options?: RpcOptions): UnaryCall<UnlockRequest, Empty>;
294
- /**
295
- * @generated from protobuf rpc: gracefulDisconnect
296
- */
297
- gracefulDisconnect(input: DisconnectNotice, options?: RpcOptions): UnaryCall<DisconnectNotice, Empty>;
298
- /**
299
- * @generated from protobuf rpc: setPrivate
300
- */
301
- setPrivate(input: SetPrivateRequest, options?: RpcOptions): UnaryCall<SetPrivateRequest, Empty>;
302
- }
303
- /**
304
- * @generated from protobuf service dht.ConnectionLockRpc
305
- */
306
- export declare class ConnectionLockRpcClient implements IConnectionLockRpcClient, ServiceInfo {
307
- private readonly _transport;
308
- typeName: string;
309
- methods: import("@protobuf-ts/runtime-rpc").MethodInfo<any, any>[];
310
- options: {
311
- [extensionName: string]: import("@protobuf-ts/runtime").JsonValue;
312
- };
313
- constructor(_transport: RpcTransport);
314
- /**
315
- * @generated from protobuf rpc: lockRequest
316
- */
317
- lockRequest(input: LockRequest, options?: RpcOptions): UnaryCall<LockRequest, LockResponse>;
318
- /**
319
- * @generated from protobuf rpc: unlockRequest
320
- */
321
- unlockRequest(input: UnlockRequest, options?: RpcOptions): UnaryCall<UnlockRequest, Empty>;
322
- /**
323
- * @generated from protobuf rpc: gracefulDisconnect
324
- */
325
- gracefulDisconnect(input: DisconnectNotice, options?: RpcOptions): UnaryCall<DisconnectNotice, Empty>;
326
- /**
327
- * @generated from protobuf rpc: setPrivate
328
- */
329
- setPrivate(input: SetPrivateRequest, options?: RpcOptions): UnaryCall<SetPrivateRequest, Empty>;
330
- }
331
- /**
332
- * @generated from protobuf service dht.ExternalApiRpc
333
- */
334
- export interface IExternalApiRpcClient {
335
- /**
336
- * @generated from protobuf rpc: externalFetchData
337
- */
338
- externalFetchData(input: ExternalFetchDataRequest, options?: RpcOptions): UnaryCall<ExternalFetchDataRequest, ExternalFetchDataResponse>;
339
- /**
340
- * @generated from protobuf rpc: externalStoreData
341
- */
342
- externalStoreData(input: ExternalStoreDataRequest, options?: RpcOptions): UnaryCall<ExternalStoreDataRequest, ExternalStoreDataResponse>;
343
- /**
344
- * @generated from protobuf rpc: externalFindClosestNodes
345
- */
346
- externalFindClosestNodes(input: ExternalFindClosestNodesRequest, options?: RpcOptions): UnaryCall<ExternalFindClosestNodesRequest, ExternalFindClosestNodesResponse>;
347
- }
348
- /**
349
- * @generated from protobuf service dht.ExternalApiRpc
350
- */
351
- export declare class ExternalApiRpcClient implements IExternalApiRpcClient, ServiceInfo {
352
- private readonly _transport;
353
- typeName: string;
354
- methods: import("@protobuf-ts/runtime-rpc").MethodInfo<any, any>[];
355
- options: {
356
- [extensionName: string]: import("@protobuf-ts/runtime").JsonValue;
357
- };
358
- constructor(_transport: RpcTransport);
359
- /**
360
- * @generated from protobuf rpc: externalFetchData
361
- */
362
- externalFetchData(input: ExternalFetchDataRequest, options?: RpcOptions): UnaryCall<ExternalFetchDataRequest, ExternalFetchDataResponse>;
363
- /**
364
- * @generated from protobuf rpc: externalStoreData
365
- */
366
- externalStoreData(input: ExternalStoreDataRequest, options?: RpcOptions): UnaryCall<ExternalStoreDataRequest, ExternalStoreDataResponse>;
367
- /**
368
- * @generated from protobuf rpc: externalFindClosestNodes
369
- */
370
- externalFindClosestNodes(input: ExternalFindClosestNodesRequest, options?: RpcOptions): UnaryCall<ExternalFindClosestNodesRequest, ExternalFindClosestNodesResponse>;
371
- }