@streamr/dht 100.0.0-pretestnet.4 → 100.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +90 -8
- package/dist/package.json +70 -0
- package/dist/src/connection/Connection.d.ts +1 -0
- package/dist/src/connection/Connection.js +10 -3
- package/dist/src/connection/Connection.js.map +1 -1
- package/dist/src/connection/ConnectionLockHandler.d.ts +14 -14
- package/dist/src/connection/ConnectionLockHandler.js +22 -16
- package/dist/src/connection/ConnectionLockHandler.js.map +1 -1
- package/dist/src/connection/ConnectionLockRpcLocal.d.ts +3 -3
- package/dist/src/connection/ConnectionLockRpcLocal.js +7 -6
- package/dist/src/connection/ConnectionLockRpcLocal.js.map +1 -1
- package/dist/src/connection/ConnectionLockRpcRemote.d.ts +4 -6
- package/dist/src/connection/ConnectionLockRpcRemote.js +10 -37
- package/dist/src/connection/ConnectionLockRpcRemote.js.map +1 -1
- package/dist/src/connection/ConnectionManager.d.ts +19 -20
- package/dist/src/connection/ConnectionManager.js +132 -117
- package/dist/src/connection/ConnectionManager.js.map +1 -1
- package/dist/src/connection/ConnectorFacade.d.ts +3 -2
- package/dist/src/connection/ConnectorFacade.js +10 -3
- package/dist/src/connection/ConnectorFacade.js.map +1 -1
- package/dist/src/connection/Handshaker.d.ts +3 -1
- package/dist/src/connection/Handshaker.js +18 -9
- package/dist/src/connection/Handshaker.js.map +1 -1
- package/dist/src/connection/IConnection.d.ts +2 -7
- package/dist/src/connection/IConnection.js +1 -8
- package/dist/src/connection/IConnection.js.map +1 -1
- package/dist/src/connection/ManagedConnection.d.ts +5 -7
- package/dist/src/connection/ManagedConnection.js +42 -26
- package/dist/src/connection/ManagedConnection.js.map +1 -1
- package/dist/src/connection/ManagedWebrtcConnection.js.map +1 -1
- package/dist/src/connection/connectivityChecker.d.ts +9 -0
- package/dist/src/connection/connectivityChecker.js +130 -0
- package/dist/src/connection/connectivityChecker.js.map +1 -0
- package/dist/src/connection/connectivityRequestHandler.d.ts +3 -0
- package/dist/src/connection/connectivityRequestHandler.js +101 -0
- package/dist/src/connection/connectivityRequestHandler.js.map +1 -0
- package/dist/src/connection/simulator/Simulator.d.ts +0 -3
- package/dist/src/connection/simulator/Simulator.js +34 -69
- package/dist/src/connection/simulator/Simulator.js.map +1 -1
- package/dist/src/connection/simulator/SimulatorConnection.js +27 -25
- package/dist/src/connection/simulator/SimulatorConnection.js.map +1 -1
- package/dist/src/connection/simulator/SimulatorConnector.js +16 -12
- package/dist/src/connection/simulator/SimulatorConnector.js.map +1 -1
- package/dist/src/connection/simulator/pings.js.map +1 -1
- package/dist/src/connection/webrtc/NodeWebrtcConnection.d.ts +2 -3
- package/dist/src/connection/webrtc/NodeWebrtcConnection.js +40 -27
- package/dist/src/connection/webrtc/NodeWebrtcConnection.js.map +1 -1
- package/dist/src/connection/webrtc/WebrtcConnector.d.ts +0 -2
- package/dist/src/connection/webrtc/WebrtcConnector.js +24 -25
- package/dist/src/connection/webrtc/WebrtcConnector.js.map +1 -1
- package/dist/src/connection/webrtc/WebrtcConnectorRpcLocal.d.ts +2 -2
- package/dist/src/connection/webrtc/WebrtcConnectorRpcLocal.js +27 -20
- package/dist/src/connection/webrtc/WebrtcConnectorRpcLocal.js.map +1 -1
- package/dist/src/connection/webrtc/WebrtcConnectorRpcRemote.d.ts +3 -6
- package/dist/src/connection/webrtc/WebrtcConnectorRpcRemote.js +2 -5
- package/dist/src/connection/webrtc/WebrtcConnectorRpcRemote.js.map +1 -1
- package/dist/src/connection/webrtc/iceServerAsString.js +1 -1
- package/dist/src/connection/webrtc/iceServerAsString.js.map +1 -1
- package/dist/src/connection/websocket/AutoCertifierClientFacade.d.ts +1 -2
- package/dist/src/connection/websocket/AutoCertifierClientFacade.js +6 -4
- package/dist/src/connection/websocket/AutoCertifierClientFacade.js.map +1 -1
- package/dist/src/connection/websocket/ClientWebsocket.d.ts +1 -0
- package/dist/src/connection/websocket/ClientWebsocket.js +14 -7
- package/dist/src/connection/websocket/ClientWebsocket.js.map +1 -1
- package/dist/src/connection/websocket/WebsocketConnector.d.ts +3 -9
- package/dist/src/connection/websocket/WebsocketConnector.js +142 -74
- package/dist/src/connection/websocket/WebsocketConnector.js.map +1 -1
- package/dist/src/connection/websocket/WebsocketConnectorRpcLocal.d.ts +5 -3
- package/dist/src/connection/websocket/WebsocketConnectorRpcLocal.js +9 -12
- package/dist/src/connection/websocket/WebsocketConnectorRpcLocal.js.map +1 -1
- package/dist/src/connection/websocket/WebsocketConnectorRpcRemote.d.ts +4 -7
- package/dist/src/connection/websocket/WebsocketConnectorRpcRemote.js +7 -44
- package/dist/src/connection/websocket/WebsocketConnectorRpcRemote.js.map +1 -1
- package/dist/src/connection/websocket/WebsocketServer.d.ts +1 -4
- package/dist/src/connection/websocket/WebsocketServer.js +49 -40
- package/dist/src/connection/websocket/WebsocketServer.js.map +1 -1
- package/dist/src/connection/websocket/{ServerWebsocket.d.ts → WebsocketServerConnection.d.ts} +8 -4
- package/dist/src/connection/websocket/WebsocketServerConnection.js +97 -0
- package/dist/src/connection/websocket/WebsocketServerConnection.js.map +1 -0
- package/dist/src/dht/DhtNode.d.ts +45 -49
- package/dist/src/dht/DhtNode.js +229 -317
- package/dist/src/dht/DhtNode.js.map +1 -1
- package/dist/src/dht/DhtNodeRpcLocal.d.ts +10 -9
- package/dist/src/dht/DhtNodeRpcLocal.js +19 -11
- package/dist/src/dht/DhtNodeRpcLocal.js.map +1 -1
- package/dist/src/dht/DhtNodeRpcRemote.d.ts +15 -10
- package/dist/src/dht/DhtNodeRpcRemote.js +38 -21
- package/dist/src/dht/DhtNodeRpcRemote.js.map +1 -1
- package/dist/src/dht/ExternalApiRpcLocal.d.ts +7 -6
- package/dist/src/dht/ExternalApiRpcLocal.js +9 -13
- package/dist/src/dht/ExternalApiRpcLocal.js.map +1 -1
- package/dist/src/dht/ExternalApiRpcRemote.d.ts +6 -5
- package/dist/src/dht/ExternalApiRpcRemote.js +10 -7
- package/dist/src/dht/ExternalApiRpcRemote.js.map +1 -1
- package/dist/src/dht/PeerManager.d.ts +61 -0
- package/dist/src/dht/PeerManager.js +288 -0
- package/dist/src/dht/PeerManager.js.map +1 -0
- package/dist/src/dht/contact/Contact.d.ts +2 -2
- package/dist/src/dht/contact/Contact.js +4 -3
- package/dist/src/dht/contact/Contact.js.map +1 -1
- package/dist/src/dht/contact/ContactList.d.ts +8 -8
- package/dist/src/dht/contact/ContactList.js +12 -7
- package/dist/src/dht/contact/ContactList.js.map +1 -1
- package/dist/src/dht/contact/RandomContactList.d.ts +4 -4
- package/dist/src/dht/contact/RandomContactList.js +13 -12
- package/dist/src/dht/contact/RandomContactList.js.map +1 -1
- package/dist/src/dht/contact/RingContactList.d.ts +31 -0
- package/dist/src/dht/contact/RingContactList.js +133 -0
- package/dist/src/dht/contact/RingContactList.js.map +1 -0
- package/dist/src/dht/contact/{Remote.d.ts → RpcRemote.d.ts} +8 -7
- package/dist/src/dht/contact/{Remote.js → RpcRemote.js} +16 -13
- package/dist/src/dht/contact/RpcRemote.js.map +1 -0
- package/dist/src/dht/contact/SortedContactList.d.ts +29 -15
- package/dist/src/dht/contact/SortedContactList.js +79 -42
- package/dist/src/dht/contact/SortedContactList.js.map +1 -1
- package/dist/src/dht/contact/ringIdentifiers.d.ts +16 -0
- package/dist/src/dht/contact/ringIdentifiers.js +54 -0
- package/dist/src/dht/contact/ringIdentifiers.js.map +1 -0
- package/dist/src/dht/discovery/DiscoverySession.d.ts +8 -18
- package/dist/src/dht/discovery/DiscoverySession.js +32 -48
- package/dist/src/dht/discovery/DiscoverySession.js.map +1 -1
- package/dist/src/dht/discovery/PeerDiscovery.d.ts +16 -12
- package/dist/src/dht/discovery/PeerDiscovery.js +82 -39
- package/dist/src/dht/discovery/PeerDiscovery.js.map +1 -1
- package/dist/src/dht/discovery/RingDiscoverySession.d.ts +29 -0
- package/dist/src/dht/discovery/RingDiscoverySession.js +123 -0
- package/dist/src/dht/discovery/RingDiscoverySession.js.map +1 -0
- package/dist/src/dht/recursive-operation/RecursiveOperationManager.d.ts +36 -0
- package/dist/src/dht/recursive-operation/RecursiveOperationManager.js +166 -0
- package/dist/src/dht/recursive-operation/RecursiveOperationManager.js.map +1 -0
- package/dist/src/dht/recursive-operation/RecursiveOperationRpcLocal.d.ts +14 -0
- package/dist/src/dht/recursive-operation/RecursiveOperationRpcLocal.js +26 -0
- package/dist/src/dht/recursive-operation/RecursiveOperationRpcLocal.js.map +1 -0
- package/dist/src/dht/recursive-operation/RecursiveOperationRpcRemote.d.ts +6 -0
- package/dist/src/dht/recursive-operation/RecursiveOperationRpcRemote.js +44 -0
- package/dist/src/dht/recursive-operation/RecursiveOperationRpcRemote.js.map +1 -0
- package/dist/src/dht/recursive-operation/RecursiveOperationSession.d.ts +44 -0
- package/dist/src/dht/recursive-operation/RecursiveOperationSession.js +187 -0
- package/dist/src/dht/recursive-operation/RecursiveOperationSession.js.map +1 -0
- package/dist/src/dht/recursive-operation/RecursiveOperationSessionRpcLocal.d.ts +14 -0
- package/dist/src/dht/recursive-operation/RecursiveOperationSessionRpcLocal.js +20 -0
- package/dist/src/dht/recursive-operation/RecursiveOperationSessionRpcLocal.js.map +1 -0
- package/dist/src/dht/recursive-operation/RecursiveOperationSessionRpcRemote.d.ts +6 -0
- package/dist/src/dht/recursive-operation/RecursiveOperationSessionRpcRemote.js +21 -0
- package/dist/src/dht/recursive-operation/RecursiveOperationSessionRpcRemote.js.map +1 -0
- package/dist/src/dht/routing/DuplicateDetector.d.ts +2 -4
- package/dist/src/dht/routing/DuplicateDetector.js +10 -15
- package/dist/src/dht/routing/DuplicateDetector.js.map +1 -1
- package/dist/src/dht/routing/Router.d.ts +11 -27
- package/dist/src/dht/routing/Router.js +92 -58
- package/dist/src/dht/routing/Router.js.map +1 -1
- package/dist/src/dht/routing/RouterRpcLocal.d.ts +3 -4
- package/dist/src/dht/routing/RouterRpcLocal.js +17 -16
- package/dist/src/dht/routing/RouterRpcLocal.js.map +1 -1
- package/dist/src/dht/routing/RouterRpcRemote.d.ts +3 -3
- package/dist/src/dht/routing/RouterRpcRemote.js +29 -20
- package/dist/src/dht/routing/RouterRpcRemote.js.map +1 -1
- package/dist/src/dht/routing/RoutingSession.d.ts +29 -21
- package/dist/src/dht/routing/RoutingSession.js +93 -68
- package/dist/src/dht/routing/RoutingSession.js.map +1 -1
- package/dist/src/dht/routing/RoutingTablesCache.d.ts +24 -0
- package/dist/src/dht/routing/RoutingTablesCache.js +46 -0
- package/dist/src/dht/routing/RoutingTablesCache.js.map +1 -0
- package/dist/src/dht/routing/getPreviousPeer.js.map +1 -1
- package/dist/src/dht/store/LocalDataStore.d.ts +9 -14
- package/dist/src/dht/store/LocalDataStore.js +46 -72
- package/dist/src/dht/store/LocalDataStore.js.map +1 -1
- package/dist/src/dht/store/StoreManager.d.ts +33 -0
- package/dist/src/dht/store/StoreManager.js +182 -0
- package/dist/src/dht/store/StoreManager.js.map +1 -0
- package/dist/src/dht/store/StoreRpcLocal.d.ts +11 -41
- package/dist/src/dht/store/StoreRpcLocal.js +27 -234
- package/dist/src/dht/store/StoreRpcLocal.js.map +1 -1
- package/dist/src/dht/store/StoreRpcRemote.d.ts +6 -7
- package/dist/src/dht/store/StoreRpcRemote.js +10 -20
- package/dist/src/dht/store/StoreRpcRemote.js.map +1 -1
- package/dist/src/exports.d.ts +5 -3
- package/dist/src/exports.js +10 -8
- package/dist/src/exports.js.map +1 -1
- package/dist/src/helpers/AddressTools.js +2 -0
- package/dist/src/helpers/AddressTools.js.map +1 -1
- package/dist/src/helpers/Connectivity.js.map +1 -1
- package/dist/src/helpers/MapWithTtl.d.ts +14 -0
- package/dist/src/helpers/MapWithTtl.js +60 -0
- package/dist/src/helpers/MapWithTtl.js.map +1 -0
- package/dist/src/helpers/createPeerDescriptor.d.ts +3 -0
- package/dist/src/helpers/createPeerDescriptor.js +57 -0
- package/dist/src/helpers/createPeerDescriptor.js.map +1 -0
- package/dist/src/helpers/createPeerDescriptorSignaturePayload.d.ts +2 -0
- package/dist/src/helpers/createPeerDescriptorSignaturePayload.js +30 -0
- package/dist/src/helpers/createPeerDescriptorSignaturePayload.js.map +1 -0
- package/dist/src/helpers/debugHelpers.js.map +1 -1
- package/dist/src/helpers/errors.js +2 -0
- package/dist/src/helpers/errors.js.map +1 -1
- package/dist/src/helpers/offering.d.ts +4 -0
- package/dist/src/helpers/offering.js +18 -0
- package/dist/src/helpers/offering.js.map +1 -0
- package/dist/src/helpers/protoClasses.js +2 -3
- package/dist/src/helpers/protoClasses.js.map +1 -1
- package/dist/src/helpers/protoToString.js.map +1 -1
- package/dist/src/helpers/version.d.ts +6 -0
- package/dist/src/helpers/version.js +38 -0
- package/dist/src/helpers/version.js.map +1 -0
- package/dist/src/identifiers.d.ts +10 -0
- package/dist/src/identifiers.js +31 -0
- package/dist/src/identifiers.js.map +1 -0
- package/dist/src/proto/google/protobuf/any.js +8 -8
- package/dist/src/proto/google/protobuf/any.js.map +1 -1
- package/dist/src/proto/google/protobuf/empty.js +2 -4
- package/dist/src/proto/google/protobuf/empty.js.map +1 -1
- package/dist/src/proto/google/protobuf/timestamp.js +10 -10
- package/dist/src/proto/google/protobuf/timestamp.js.map +1 -1
- package/dist/src/proto/packages/dht/protos/DhtRpc.client.d.ts +46 -49
- package/dist/src/proto/packages/dht/protos/DhtRpc.client.js +63 -54
- package/dist/src/proto/packages/dht/protos/DhtRpc.client.js.map +1 -1
- package/dist/src/proto/packages/dht/protos/DhtRpc.d.ts +226 -232
- package/dist/src/proto/packages/dht/protos/DhtRpc.js +146 -168
- package/dist/src/proto/packages/dht/protos/DhtRpc.js.map +1 -1
- package/dist/src/proto/packages/dht/protos/DhtRpc.server.d.ts +26 -29
- package/dist/src/proto/packages/proto-rpc/protos/ProtoRpc.js +1 -1
- package/dist/src/rpc-protocol/DhtCallContext.d.ts +2 -2
- package/dist/src/rpc-protocol/DhtCallContext.js +8 -0
- package/dist/src/rpc-protocol/DhtCallContext.js.map +1 -1
- package/dist/src/rpc-protocol/DhtRpcOptions.d.ts +2 -1
- package/dist/src/transport/ITransport.d.ts +10 -2
- package/dist/src/transport/ITransport.js +5 -0
- package/dist/src/transport/ITransport.js.map +1 -1
- package/dist/src/transport/ListeningRpcCommunicator.js +3 -1
- package/dist/src/transport/ListeningRpcCommunicator.js.map +1 -1
- package/dist/src/transport/RoutingRpcCommunicator.d.ts +4 -2
- package/dist/src/transport/RoutingRpcCommunicator.js +19 -12
- package/dist/src/transport/RoutingRpcCommunicator.js.map +1 -1
- package/jest.config.js +4 -1
- package/karma-setup.js +2 -0
- package/karma.config.js +13 -9
- package/package.json +16 -13
- package/protos/DhtRpc.proto +76 -76
- package/src/connection/Connection.ts +6 -1
- package/src/connection/ConnectionLockHandler.ts +30 -22
- package/src/connection/ConnectionLockRpcLocal.ts +7 -12
- package/src/connection/ConnectionLockRpcRemote.ts +9 -19
- package/src/connection/ConnectionManager.ts +132 -138
- package/src/connection/ConnectorFacade.ts +10 -9
- package/src/connection/Handshaker.ts +23 -11
- package/src/connection/IConnection.ts +2 -8
- package/src/connection/ManagedConnection.ts +34 -35
- package/src/connection/connectivityChecker.ts +109 -0
- package/src/connection/connectivityRequestHandler.ts +103 -0
- package/src/connection/simulator/Simulator.ts +6 -37
- package/src/connection/simulator/SimulatorConnection.ts +23 -25
- package/src/connection/simulator/SimulatorConnector.ts +11 -11
- package/src/connection/webrtc/BrowserWebrtcConnection.ts +17 -25
- package/src/connection/webrtc/NodeWebrtcConnection.ts +24 -26
- package/src/connection/webrtc/WebrtcConnector.ts +18 -29
- package/src/connection/webrtc/WebrtcConnectorRpcLocal.ts +29 -24
- package/src/connection/webrtc/WebrtcConnectorRpcRemote.ts +4 -14
- package/src/connection/webrtc/iceServerAsString.ts +1 -1
- package/src/connection/websocket/AutoCertifierClientFacade.ts +4 -6
- package/src/connection/websocket/ClientWebsocket.ts +10 -4
- package/src/connection/websocket/WebsocketConnector.ts +120 -97
- package/src/connection/websocket/WebsocketConnectorRpcLocal.ts +13 -15
- package/src/connection/websocket/WebsocketConnectorRpcRemote.ts +7 -27
- package/src/connection/websocket/WebsocketServer.ts +50 -53
- package/src/connection/websocket/WebsocketServerConnection.ts +104 -0
- package/src/dht/DhtNode.ts +289 -410
- package/src/dht/DhtNodeRpcLocal.ts +25 -17
- package/src/dht/DhtNodeRpcRemote.ts +43 -27
- package/src/dht/ExternalApiRpcLocal.ts +30 -17
- package/src/dht/ExternalApiRpcRemote.ts +14 -11
- package/src/dht/PeerManager.ts +339 -0
- package/src/dht/contact/Contact.ts +4 -4
- package/src/dht/contact/ContactList.ts +11 -10
- package/src/dht/contact/RandomContactList.ts +15 -15
- package/src/dht/contact/RingContactList.ts +151 -0
- package/src/dht/contact/{Remote.ts → RpcRemote.ts} +16 -19
- package/src/dht/contact/SortedContactList.ts +120 -72
- package/src/dht/contact/ringIdentifiers.ts +62 -0
- package/src/dht/discovery/DiscoverySession.ts +36 -61
- package/src/dht/discovery/PeerDiscovery.ts +98 -43
- package/src/dht/discovery/RingDiscoverySession.ts +160 -0
- package/src/dht/recursive-operation/RecursiveOperationManager.ts +246 -0
- package/src/dht/recursive-operation/RecursiveOperationRpcLocal.ts +34 -0
- package/src/dht/recursive-operation/RecursiveOperationRpcRemote.ts +43 -0
- package/src/dht/recursive-operation/RecursiveOperationSession.ts +232 -0
- package/src/dht/recursive-operation/RecursiveOperationSessionRpcLocal.ts +35 -0
- package/src/dht/recursive-operation/RecursiveOperationSessionRpcRemote.ts +30 -0
- package/src/dht/routing/DuplicateDetector.ts +9 -21
- package/src/dht/routing/Router.ts +95 -92
- package/src/dht/routing/RouterRpcLocal.ts +16 -18
- package/src/dht/routing/RouterRpcRemote.ts +26 -24
- package/src/dht/routing/RoutingSession.ts +119 -98
- package/src/dht/routing/RoutingTablesCache.ts +58 -0
- package/src/dht/routing/getPreviousPeer.ts +1 -1
- package/src/dht/store/LocalDataStore.ts +47 -77
- package/src/dht/store/StoreManager.ts +209 -0
- package/src/dht/store/StoreRpcLocal.ts +39 -308
- package/src/dht/store/StoreRpcRemote.ts +13 -31
- package/src/exports.ts +13 -3
- package/src/helpers/AddressTools.ts +2 -0
- package/src/helpers/MapWithTtl.ts +71 -0
- package/src/helpers/createPeerDescriptor.ts +57 -0
- package/src/helpers/createPeerDescriptorSignaturePayload.ts +28 -0
- package/src/helpers/offering.ts +15 -0
- package/src/helpers/protoClasses.ts +4 -6
- package/src/helpers/version.ts +32 -0
- package/src/identifiers.ts +29 -0
- package/src/proto/google/protobuf/any.ts +4 -4
- package/src/proto/google/protobuf/empty.ts +2 -4
- package/src/proto/google/protobuf/timestamp.ts +4 -4
- package/src/proto/packages/dht/protos/DhtRpc.client.ts +65 -68
- package/src/proto/packages/dht/protos/DhtRpc.server.ts +27 -30
- package/src/proto/packages/dht/protos/DhtRpc.ts +297 -313
- package/src/proto/packages/proto-rpc/protos/ProtoRpc.ts +1 -1
- package/src/rpc-protocol/DhtCallContext.ts +2 -2
- package/src/rpc-protocol/DhtRpcOptions.ts +2 -1
- package/src/transport/ITransport.ts +11 -2
- package/src/transport/ListeningRpcCommunicator.ts +1 -1
- package/src/transport/RoutingRpcCommunicator.ts +21 -14
- package/test/RandomGraphSimulation.ts +3 -2
- package/test/benchmark/Find.test.ts +13 -28
- package/test/benchmark/KademliaCorrectness.test.ts +24 -28
- package/test/benchmark/RingCorrectness.test.ts +157 -0
- package/test/benchmark/SortedContactListBenchmark.test.ts +151 -0
- package/test/benchmark/WebsocketServerMemoryLeak.test.ts +41 -0
- package/test/benchmark/hybrid-network-simulation/RingContactList.test.ts +72 -0
- package/test/benchmark/kademlia-simulation/Contact.ts +9 -9
- package/test/benchmark/kademlia-simulation/KademliaSimulation.ts +11 -11
- package/test/benchmark/kademlia-simulation/SimulationNode.ts +29 -25
- package/test/data/generateGroundTruthData.ts +7 -6
- package/test/end-to-end/Layer0-Layer1.test.ts +11 -15
- package/test/end-to-end/Layer0.test.ts +19 -22
- package/test/end-to-end/Layer0MixedConnectionTypes.test.ts +19 -21
- package/test/end-to-end/Layer0Webrtc-Layer1.test.ts +26 -28
- package/test/end-to-end/Layer0Webrtc.test.ts +19 -19
- package/test/end-to-end/Layer1-Scale-WebSocket.test.ts +10 -18
- package/test/end-to-end/Layer1-Scale-Webrtc.test.ts +8 -15
- package/test/end-to-end/RecoveryFromFailedAutoCertification.test.ts +2 -2
- package/test/end-to-end/WebsocketConnectionRequest.test.ts +8 -9
- package/test/end-to-end/memory-leak.test.ts +19 -24
- package/test/integration/ConnectionLocking.test.ts +66 -60
- package/test/integration/ConnectionManager.test.ts +43 -63
- package/test/integration/ConnectivityChecking.test.ts +52 -0
- package/test/integration/DhtJoinPeerDiscovery.test.ts +8 -12
- package/test/integration/DhtNodeExternalAPI.test.ts +17 -21
- package/test/integration/DhtNodeRpcRemote.test.ts +19 -26
- package/test/integration/DhtRpc.test.ts +20 -24
- package/test/integration/Find.test.ts +10 -12
- package/test/integration/Layer1-scale.test.ts +25 -37
- package/test/integration/Mock-Layer1-Layer0.test.ts +39 -59
- package/test/integration/MultipleEntryPointJoining.test.ts +14 -14
- package/test/integration/ReplicateData.test.ts +106 -0
- package/test/integration/RouteMessage.test.ts +42 -68
- package/test/integration/RouterRpcRemote.test.ts +19 -24
- package/test/integration/ScaleDownDht.test.ts +14 -12
- package/test/integration/SimultaneousConnections.test.ts +112 -111
- package/test/integration/Store.test.ts +43 -27
- package/test/integration/StoreAndDelete.test.ts +36 -48
- package/test/integration/StoreOnDhtWithThreeNodes.test.ts +59 -0
- package/test/integration/StoreOnDhtWithTwoNodes.test.ts +17 -37
- package/test/integration/StoreRpcRemote.test.ts +20 -32
- package/test/integration/WebrtcConnectionManagement.test.ts +39 -25
- package/test/integration/WebrtcConnectorRpc.test.ts +6 -11
- package/test/integration/WebsocketConnectionManagement.test.ts +87 -22
- package/test/integration/WebsocketConnectorRpc.test.ts +14 -24
- package/test/integration/{RpcErrors.test.ts → rpc-connections-over-webrpc.test.ts} +15 -26
- package/test/unit/AddressTools.test.ts +4 -0
- package/test/unit/ConnectivityHelpers.test.ts +9 -17
- package/test/unit/DuplicateDetector.test.ts +8 -5
- package/test/unit/LocalDataStore.test.ts +78 -75
- package/test/unit/PeerManager.test.ts +33 -0
- package/test/unit/RandomContactList.test.ts +12 -9
- package/test/unit/RecursiveOperationManager.test.ts +157 -0
- package/test/unit/RecursiveOperationSession.test.ts +68 -0
- package/test/unit/Router.test.ts +52 -35
- package/test/unit/RoutingSession.test.ts +79 -0
- package/test/unit/SortedContactList.test.ts +61 -30
- package/test/unit/StoreManager.test.ts +138 -0
- package/test/unit/WebsocketConnector.test.ts +27 -35
- package/test/unit/connectivityRequestHandler.test.ts +104 -0
- package/test/unit/createPeerDescriptor.test.ts +69 -0
- package/test/unit/customMatchers.test.ts +16 -0
- package/test/unit/version.test.ts +18 -0
- package/test/utils/FakeTransport.ts +47 -0
- package/test/utils/customMatchers.ts +71 -0
- package/test/utils/mock/MockRpcCommunicator.ts +7 -0
- package/test/utils/mock/Router.ts +13 -3
- package/test/utils/mock/Transport.ts +1 -1
- package/test/utils/mock/mockDataEntry.ts +38 -0
- package/test/utils/utils.ts +104 -107
- package/tsconfig.browser.json +2 -1
- package/tsconfig.jest.json +4 -2
- package/tsconfig.node.json +4 -2
- package/dist/src/connection/ConnectivityChecker.d.ts +0 -17
- package/dist/src/connection/ConnectivityChecker.js +0 -208
- package/dist/src/connection/ConnectivityChecker.js.map +0 -1
- package/dist/src/connection/websocket/ServerWebsocket.js +0 -100
- package/dist/src/connection/websocket/ServerWebsocket.js.map +0 -1
- package/dist/src/dht/contact/Remote.js.map +0 -1
- package/dist/src/dht/find/FindRpcLocal.d.ts +0 -14
- package/dist/src/dht/find/FindRpcLocal.js +0 -25
- package/dist/src/dht/find/FindRpcLocal.js.map +0 -1
- package/dist/src/dht/find/FindSession.d.ts +0 -44
- package/dist/src/dht/find/FindSession.js +0 -145
- package/dist/src/dht/find/FindSession.js.map +0 -1
- package/dist/src/dht/find/FindSessionRpcLocal.d.ts +0 -12
- package/dist/src/dht/find/FindSessionRpcLocal.js +0 -17
- package/dist/src/dht/find/FindSessionRpcLocal.js.map +0 -1
- package/dist/src/dht/find/FindSessionRpcRemote.d.ts +0 -6
- package/dist/src/dht/find/FindSessionRpcRemote.js +0 -21
- package/dist/src/dht/find/FindSessionRpcRemote.js.map +0 -1
- package/dist/src/dht/find/Finder.d.ts +0 -49
- package/dist/src/dht/find/Finder.js +0 -184
- package/dist/src/dht/find/Finder.js.map +0 -1
- package/dist/src/dht/routing/FindRpcRemote.d.ts +0 -6
- package/dist/src/dht/routing/FindRpcRemote.js +0 -41
- package/dist/src/dht/routing/FindRpcRemote.js.map +0 -1
- package/dist/src/helpers/PeerID.d.ts +0 -24
- package/dist/src/helpers/PeerID.js +0 -78
- package/dist/src/helpers/PeerID.js.map +0 -1
- package/dist/src/helpers/UUID.d.ts +0 -8
- package/dist/src/helpers/UUID.js +0 -36
- package/dist/src/helpers/UUID.js.map +0 -1
- package/dist/src/helpers/kademliaId.d.ts +0 -1
- package/dist/src/helpers/kademliaId.js +0 -14
- package/dist/src/helpers/kademliaId.js.map +0 -1
- package/dist/src/helpers/peerIdFromPeerDescriptor.d.ts +0 -6
- package/dist/src/helpers/peerIdFromPeerDescriptor.js +0 -23
- package/dist/src/helpers/peerIdFromPeerDescriptor.js.map +0 -1
- package/src/connection/ConnectivityChecker.ts +0 -199
- package/src/connection/websocket/ServerWebsocket.ts +0 -114
- package/src/dht/find/FindRpcLocal.ts +0 -35
- package/src/dht/find/FindSession.ts +0 -178
- package/src/dht/find/FindSessionRpcLocal.ts +0 -25
- package/src/dht/find/FindSessionRpcRemote.ts +0 -30
- package/src/dht/find/Finder.ts +0 -275
- package/src/dht/routing/FindRpcRemote.ts +0 -40
- package/src/helpers/PeerID.ts +0 -88
- package/src/helpers/UUID.ts +0 -35
- package/src/helpers/kademliaId.ts +0 -8
- package/src/helpers/peerIdFromPeerDescriptor.ts +0 -20
- package/test/integration/MigrateData.test.ts +0 -204
- package/test/unit/Finder.test.ts +0 -110
- package/test/unit/PeerID.test.ts +0 -22
- package/test/unit/UUID.test.ts +0 -55
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import ipaddr from 'ipaddr.js'
|
|
2
2
|
|
|
3
3
|
// IPv4 private address ranges as specified by RFC 1918
|
|
4
|
+
// and private loopback addresses
|
|
4
5
|
const IPv4PrivateRanges = [
|
|
5
6
|
'10.0.0.0/8',
|
|
6
7
|
'172.16.0.0/12',
|
|
7
8
|
'192.168.0.0/16',
|
|
9
|
+
'127.0.0.0/8'
|
|
8
10
|
].map((a) => ipaddr.parseCIDR(a))
|
|
9
11
|
|
|
10
12
|
export function isPrivateIPv4(address: string): boolean {
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
interface ValueWrapper<V> {
|
|
2
|
+
value: V
|
|
3
|
+
timeout: NodeJS.Timeout
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export class MapWithTtl<K, V> {
|
|
7
|
+
|
|
8
|
+
private readonly delegate: Map<K, ValueWrapper<V>> = new Map()
|
|
9
|
+
private readonly getTtl: (value: V) => number
|
|
10
|
+
|
|
11
|
+
constructor(getTtl: (value: V) => number) {
|
|
12
|
+
this.getTtl = getTtl
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
set(key: K, value: V): void {
|
|
16
|
+
const existing = this.delegate.get(key)
|
|
17
|
+
if (existing !== undefined) {
|
|
18
|
+
clearTimeout(existing.timeout)
|
|
19
|
+
}
|
|
20
|
+
this.delegate.set(key, {
|
|
21
|
+
value,
|
|
22
|
+
timeout: this.createTimeout(key, value)
|
|
23
|
+
})
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
get(key: K): V | undefined {
|
|
27
|
+
const wrapper = this.delegate.get(key)
|
|
28
|
+
return wrapper?.value
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
has(key: K): boolean {
|
|
32
|
+
return this.delegate.has(key)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
delete(key: K): void {
|
|
36
|
+
const existing = this.delegate.get(key)
|
|
37
|
+
if (existing !== undefined) {
|
|
38
|
+
clearTimeout(existing.timeout)
|
|
39
|
+
this.delegate.delete(key)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
clear(): void {
|
|
44
|
+
this.delegate.forEach((value) => {
|
|
45
|
+
clearTimeout(value.timeout)
|
|
46
|
+
})
|
|
47
|
+
this.delegate.clear()
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
size(): number {
|
|
51
|
+
return this.delegate.size
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
*values(): IterableIterator<V> {
|
|
55
|
+
for (const v of this.delegate.values()) {
|
|
56
|
+
yield v.value
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
forEach(cb: (value: V, key: K) => void): void {
|
|
61
|
+
this.delegate.forEach((valueWrapper: ValueWrapper<V>, key: K) => {
|
|
62
|
+
cb(valueWrapper.value, key)
|
|
63
|
+
})
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
private createTimeout(key: K, value: V): NodeJS.Timeout {
|
|
67
|
+
return setTimeout(() => {
|
|
68
|
+
this.delete(key)
|
|
69
|
+
}, this.getTtl(value))
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createSignature,
|
|
3
|
+
hash
|
|
4
|
+
} from '@streamr/utils'
|
|
5
|
+
import crypto from 'crypto'
|
|
6
|
+
import { isBrowserEnvironment } from '../helpers/browser/isBrowserEnvironment'
|
|
7
|
+
import { createPeerDescriptorSignaturePayload } from '../helpers/createPeerDescriptorSignaturePayload'
|
|
8
|
+
import { DhtAddress, DhtAddressRaw, getRawFromDhtAddress } from '../identifiers'
|
|
9
|
+
import {
|
|
10
|
+
ConnectivityResponse,
|
|
11
|
+
NodeType,
|
|
12
|
+
PeerDescriptor
|
|
13
|
+
} from '../proto/packages/dht/protos/DhtRpc'
|
|
14
|
+
|
|
15
|
+
const calculateNodeIdRaw = (ipAddress: number, privateKey: Uint8Array): DhtAddressRaw => {
|
|
16
|
+
// nodeId is calculated as
|
|
17
|
+
// concatenate(
|
|
18
|
+
// get104leastSignificatBits(hash(ipAddress)),
|
|
19
|
+
// get56leastSignificatBits(sign(ipAddress))
|
|
20
|
+
// )
|
|
21
|
+
const ipAsBuffer = Buffer.alloc(4)
|
|
22
|
+
ipAsBuffer.writeUInt32BE(ipAddress)
|
|
23
|
+
const ipHash = hash(ipAsBuffer)
|
|
24
|
+
const signature = createSignature(ipAsBuffer, privateKey)
|
|
25
|
+
const nodeIdRaw = Buffer.concat([
|
|
26
|
+
ipHash.subarray(ipHash.length - 13, ipHash.length),
|
|
27
|
+
signature.subarray(signature.length - 7, signature.length)
|
|
28
|
+
])
|
|
29
|
+
return nodeIdRaw
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const createPeerDescriptor = (connectivityResponse: ConnectivityResponse, region: number, nodeId?: DhtAddress): PeerDescriptor => {
|
|
33
|
+
const privateKey = crypto.randomBytes(32)
|
|
34
|
+
const publicKey = crypto.randomBytes(20) // TODO calculate publicKey from privateKey
|
|
35
|
+
let nodeIdRaw: DhtAddressRaw
|
|
36
|
+
if (nodeId !== undefined) {
|
|
37
|
+
nodeIdRaw = getRawFromDhtAddress(nodeId)
|
|
38
|
+
} else {
|
|
39
|
+
nodeIdRaw = calculateNodeIdRaw(connectivityResponse.ipAddress, privateKey)
|
|
40
|
+
}
|
|
41
|
+
const ret: PeerDescriptor = {
|
|
42
|
+
nodeId: nodeIdRaw,
|
|
43
|
+
type: isBrowserEnvironment() ? NodeType.BROWSER : NodeType.NODEJS,
|
|
44
|
+
ipAddress: connectivityResponse.ipAddress,
|
|
45
|
+
region,
|
|
46
|
+
publicKey
|
|
47
|
+
}
|
|
48
|
+
if (connectivityResponse.websocket) {
|
|
49
|
+
ret.websocket = {
|
|
50
|
+
host: connectivityResponse.websocket.host,
|
|
51
|
+
port: connectivityResponse.websocket.port,
|
|
52
|
+
tls: connectivityResponse.websocket.tls
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
ret.signature = createSignature(createPeerDescriptorSignaturePayload(ret), privateKey)
|
|
56
|
+
return ret
|
|
57
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ConnectivityMethod, PeerDescriptor } from '../proto/packages/dht/protos/DhtRpc'
|
|
2
|
+
|
|
3
|
+
function convertUnsignedIntegerToBuffer(number: number): Buffer {
|
|
4
|
+
const buffer = Buffer.alloc(4)
|
|
5
|
+
buffer.writeUInt32BE(number)
|
|
6
|
+
return buffer
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const createPeerDescriptorSignaturePayload = (peerDescriptor: PeerDescriptor): Uint8Array => {
|
|
10
|
+
const separator = Buffer.from(',')
|
|
11
|
+
const buffers = [
|
|
12
|
+
peerDescriptor.type !== undefined ? convertUnsignedIntegerToBuffer(peerDescriptor.type) : new Uint8Array(0),
|
|
13
|
+
separator,
|
|
14
|
+
peerDescriptor.udp !== undefined ? ConnectivityMethod.toBinary(peerDescriptor.udp) : new Uint8Array(0),
|
|
15
|
+
separator,
|
|
16
|
+
peerDescriptor.tcp !== undefined ? ConnectivityMethod.toBinary(peerDescriptor.tcp) : new Uint8Array(0),
|
|
17
|
+
separator,
|
|
18
|
+
peerDescriptor.websocket !== undefined ? ConnectivityMethod.toBinary(peerDescriptor.websocket) : new Uint8Array(0),
|
|
19
|
+
separator,
|
|
20
|
+
peerDescriptor.region !== undefined ? convertUnsignedIntegerToBuffer(peerDescriptor.region) : new Uint8Array(0),
|
|
21
|
+
separator,
|
|
22
|
+
peerDescriptor.ipAddress !== undefined ? convertUnsignedIntegerToBuffer(peerDescriptor.ipAddress) : new Uint8Array(0),
|
|
23
|
+
separator,
|
|
24
|
+
peerDescriptor.publicKey !== undefined ? Buffer.from(peerDescriptor.publicKey) : new Uint8Array(0)
|
|
25
|
+
]
|
|
26
|
+
return Buffer.concat(buffers)
|
|
27
|
+
}
|
|
28
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import crypto from 'crypto'
|
|
2
|
+
import { DhtAddress } from '../identifiers'
|
|
3
|
+
|
|
4
|
+
type Offerer = 'local' | 'remote'
|
|
5
|
+
|
|
6
|
+
export const getOfferer = (localNodeId: DhtAddress, remoteNodeId: DhtAddress): Offerer => {
|
|
7
|
+
return getOfferingHash(localNodeId + ',' + remoteNodeId) < getOfferingHash(remoteNodeId + ',' + localNodeId)
|
|
8
|
+
? 'local'
|
|
9
|
+
: 'remote'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const getOfferingHash = (idPair: string): number => {
|
|
13
|
+
const buffer = crypto.createHash('md5').update(idPair).digest()
|
|
14
|
+
return buffer.readInt32LE(0)
|
|
15
|
+
}
|
|
@@ -13,12 +13,11 @@ import {
|
|
|
13
13
|
PeerDescriptor,
|
|
14
14
|
PingRequest,
|
|
15
15
|
PingResponse,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
RecursiveOperationResponse,
|
|
17
|
+
RecursiveOperationRequest,
|
|
18
18
|
RouteMessageAck,
|
|
19
19
|
RouteMessageWrapper,
|
|
20
20
|
WebsocketConnectionRequest,
|
|
21
|
-
WebsocketConnectionResponse,
|
|
22
21
|
WebrtcConnectionRequest,
|
|
23
22
|
RtcOffer,
|
|
24
23
|
RtcAnswer,
|
|
@@ -32,8 +31,8 @@ import {
|
|
|
32
31
|
export const protoClasses: Array<IMessageType<any>> = [
|
|
33
32
|
ClosestPeersRequest,
|
|
34
33
|
ClosestPeersResponse,
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
RecursiveOperationRequest,
|
|
35
|
+
RecursiveOperationResponse,
|
|
37
36
|
PingRequest,
|
|
38
37
|
PingResponse,
|
|
39
38
|
LeaveNotice,
|
|
@@ -48,7 +47,6 @@ export const protoClasses: Array<IMessageType<any>> = [
|
|
|
48
47
|
HandshakeResponse,
|
|
49
48
|
Message,
|
|
50
49
|
WebsocketConnectionRequest,
|
|
51
|
-
WebsocketConnectionResponse,
|
|
52
50
|
WebrtcConnectionRequest,
|
|
53
51
|
RtcOffer,
|
|
54
52
|
RtcAnswer,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export const LOCAL_PROTOCOL_VERSION = '1.0'
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* When two nodes negotiate whether they are compatible or not, it is up to the
|
|
5
|
+
* newer version to decide if it supports the old version or not.
|
|
6
|
+
*
|
|
7
|
+
* The older version assumes optimistically that it may be supported by the newer
|
|
8
|
+
* version. It can't know for sure, but the other node will tell if it is not
|
|
9
|
+
* supported (e.g. rejecting the handshake with UNSUPPORTED_VERSION error).
|
|
10
|
+
*/
|
|
11
|
+
export const isMaybeSupportedVersion = (remoteVersion: string): boolean => {
|
|
12
|
+
const localMajor = parseVersion(LOCAL_PROTOCOL_VERSION)!.major
|
|
13
|
+
const remoteMajor = parseVersion(remoteVersion)?.major
|
|
14
|
+
if ((remoteMajor === undefined) || (remoteMajor < localMajor)) {
|
|
15
|
+
return false
|
|
16
|
+
} else {
|
|
17
|
+
// TODO implement proper checking when there are new protocol versions
|
|
18
|
+
return true
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const parseVersion = (version: string): { major: number, minor: number } | undefined => {
|
|
23
|
+
const parts = version.split('.')
|
|
24
|
+
if (parts.length === 2) {
|
|
25
|
+
const values = parts.map((p) => Number(p))
|
|
26
|
+
if (!values.some((v) => isNaN(v))) {
|
|
27
|
+
return { major: values[0], minor: values[1] }
|
|
28
|
+
}
|
|
29
|
+
} else {
|
|
30
|
+
return undefined
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BrandedString, areEqualBinaries, binaryToHex, hexToBinary } from '@streamr/utils'
|
|
2
|
+
import crypto from 'crypto'
|
|
3
|
+
import { PeerDescriptor } from './proto/packages/dht/protos/DhtRpc'
|
|
4
|
+
|
|
5
|
+
// https://www.scs.stanford.edu/~dm/home/papers/kpos.pdf
|
|
6
|
+
export const KADEMLIA_ID_LENGTH_IN_BYTES = 20
|
|
7
|
+
|
|
8
|
+
export type DhtAddress = BrandedString<'DhtAddress'>
|
|
9
|
+
export type DhtAddressRaw = Uint8Array
|
|
10
|
+
|
|
11
|
+
export const getDhtAddressFromRaw = (raw: DhtAddressRaw): DhtAddress => {
|
|
12
|
+
return binaryToHex(raw) as unknown as DhtAddress
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const getRawFromDhtAddress = (address: DhtAddress): DhtAddressRaw => {
|
|
16
|
+
return hexToBinary(address) as unknown as DhtAddressRaw
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const getNodeIdFromPeerDescriptor = (peerDescriptor: PeerDescriptor): DhtAddress => {
|
|
20
|
+
return getDhtAddressFromRaw(peerDescriptor.nodeId)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const areEqualPeerDescriptors = (peerDescriptor1: PeerDescriptor, peerDescriptor2: PeerDescriptor): boolean => {
|
|
24
|
+
return areEqualBinaries(peerDescriptor1.nodeId, peerDescriptor2.nodeId)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const createRandomDhtAddress = (): DhtAddress => {
|
|
28
|
+
return getDhtAddressFromRaw(crypto.randomBytes(KADEMLIA_ID_LENGTH_IN_BYTES))
|
|
29
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.9.
|
|
1
|
+
// @generated by protobuf-ts 2.9.3 with parameter server_generic,generate_dependencies,long_type_number
|
|
2
2
|
// @generated from protobuf file "google/protobuf/any.proto" (package "google.protobuf", syntax proto3)
|
|
3
3
|
// tslint:disable
|
|
4
4
|
//
|
|
@@ -39,7 +39,6 @@ import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
|
39
39
|
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
40
40
|
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
41
41
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
42
|
-
import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
|
|
43
42
|
import { isJsonObject } from "@protobuf-ts/runtime";
|
|
44
43
|
import { typeofJsonValue } from "@protobuf-ts/runtime";
|
|
45
44
|
import type { JsonValue } from "@protobuf-ts/runtime";
|
|
@@ -272,8 +271,9 @@ class Any$Type extends MessageType<Any> {
|
|
|
272
271
|
return name;
|
|
273
272
|
}
|
|
274
273
|
create(value?: PartialMessage<Any>): Any {
|
|
275
|
-
const message =
|
|
276
|
-
|
|
274
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
275
|
+
message.typeUrl = "";
|
|
276
|
+
message.value = new Uint8Array(0);
|
|
277
277
|
if (value !== undefined)
|
|
278
278
|
reflectionMergePartial<Any>(this, message, value);
|
|
279
279
|
return message;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.9.
|
|
1
|
+
// @generated by protobuf-ts 2.9.3 with parameter server_generic,generate_dependencies,long_type_number
|
|
2
2
|
// @generated from protobuf file "google/protobuf/empty.proto" (package "google.protobuf", syntax proto3)
|
|
3
3
|
// tslint:disable
|
|
4
4
|
//
|
|
@@ -39,7 +39,6 @@ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
|
39
39
|
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
40
40
|
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
41
41
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
42
|
-
import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
|
|
43
42
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
44
43
|
/**
|
|
45
44
|
* A generic empty message that you can re-use to avoid defining duplicated
|
|
@@ -62,8 +61,7 @@ class Empty$Type extends MessageType<Empty> {
|
|
|
62
61
|
super("google.protobuf.Empty", []);
|
|
63
62
|
}
|
|
64
63
|
create(value?: PartialMessage<Empty>): Empty {
|
|
65
|
-
const message =
|
|
66
|
-
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
64
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
67
65
|
if (value !== undefined)
|
|
68
66
|
reflectionMergePartial<Empty>(this, message, value);
|
|
69
67
|
return message;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.9.
|
|
1
|
+
// @generated by protobuf-ts 2.9.3 with parameter server_generic,generate_dependencies,long_type_number
|
|
2
2
|
// @generated from protobuf file "google/protobuf/timestamp.proto" (package "google.protobuf", syntax proto3)
|
|
3
3
|
// tslint:disable
|
|
4
4
|
//
|
|
@@ -40,7 +40,6 @@ import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
|
40
40
|
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
41
41
|
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
42
42
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
43
|
-
import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
|
|
44
43
|
import { typeofJsonValue } from "@protobuf-ts/runtime";
|
|
45
44
|
import type { JsonValue } from "@protobuf-ts/runtime";
|
|
46
45
|
import type { JsonReadOptions } from "@protobuf-ts/runtime";
|
|
@@ -234,8 +233,9 @@ class Timestamp$Type extends MessageType<Timestamp> {
|
|
|
234
233
|
return target;
|
|
235
234
|
}
|
|
236
235
|
create(value?: PartialMessage<Timestamp>): Timestamp {
|
|
237
|
-
const message =
|
|
238
|
-
|
|
236
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
237
|
+
message.seconds = 0;
|
|
238
|
+
message.nanos = 0;
|
|
239
239
|
if (value !== undefined)
|
|
240
240
|
reflectionMergePartial<Timestamp>(this, message, value);
|
|
241
241
|
return message;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.9.
|
|
1
|
+
// @generated by protobuf-ts 2.9.3 with parameter server_generic,generate_dependencies,long_type_number
|
|
2
2
|
// @generated from protobuf file "packages/dht/protos/DhtRpc.proto" (package "dht", syntax proto3)
|
|
3
3
|
// tslint:disable
|
|
4
4
|
import { ExternalApiRpc } from "./DhtRpc";
|
|
5
5
|
import type { ExternalStoreDataResponse } from "./DhtRpc";
|
|
6
6
|
import type { ExternalStoreDataRequest } from "./DhtRpc";
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
7
|
+
import type { ExternalFetchDataResponse } from "./DhtRpc";
|
|
8
|
+
import type { ExternalFetchDataRequest } from "./DhtRpc";
|
|
9
9
|
import { ConnectionLockRpc } from "./DhtRpc";
|
|
10
|
-
import type { DisconnectNoticeResponse } from "./DhtRpc";
|
|
11
10
|
import type { DisconnectNotice } from "./DhtRpc";
|
|
12
11
|
import type { UnlockRequest } from "./DhtRpc";
|
|
13
12
|
import type { LockResponse } from "./DhtRpc";
|
|
@@ -18,18 +17,14 @@ import type { RtcAnswer } from "./DhtRpc";
|
|
|
18
17
|
import type { RtcOffer } from "./DhtRpc";
|
|
19
18
|
import type { WebrtcConnectionRequest } from "./DhtRpc";
|
|
20
19
|
import { WebsocketConnectorRpc } from "./DhtRpc";
|
|
21
|
-
import type { WebsocketConnectionResponse } from "./DhtRpc";
|
|
22
20
|
import type { WebsocketConnectionRequest } from "./DhtRpc";
|
|
23
|
-
import {
|
|
24
|
-
import type {
|
|
21
|
+
import { RecursiveOperationSessionRpc } from "./DhtRpc";
|
|
22
|
+
import type { RecursiveOperationResponse } from "./DhtRpc";
|
|
25
23
|
import { StoreRpc } from "./DhtRpc";
|
|
26
|
-
import type {
|
|
27
|
-
import type { DeleteDataRequest } from "./DhtRpc";
|
|
28
|
-
import type { MigrateDataResponse } from "./DhtRpc";
|
|
29
|
-
import type { MigrateDataRequest } from "./DhtRpc";
|
|
24
|
+
import type { ReplicateDataRequest } from "./DhtRpc";
|
|
30
25
|
import type { StoreDataResponse } from "./DhtRpc";
|
|
31
26
|
import type { StoreDataRequest } from "./DhtRpc";
|
|
32
|
-
import {
|
|
27
|
+
import { RecursiveOperationRpc } from "./DhtRpc";
|
|
33
28
|
import { RouterRpc } from "./DhtRpc";
|
|
34
29
|
import type { RouteMessageAck } from "./DhtRpc";
|
|
35
30
|
import type { RouteMessageWrapper } from "./DhtRpc";
|
|
@@ -40,6 +35,8 @@ import type { Empty } from "../../../google/protobuf/empty";
|
|
|
40
35
|
import type { LeaveNotice } from "./DhtRpc";
|
|
41
36
|
import type { PingResponse } from "./DhtRpc";
|
|
42
37
|
import type { PingRequest } from "./DhtRpc";
|
|
38
|
+
import type { ClosestRingPeersResponse } from "./DhtRpc";
|
|
39
|
+
import type { ClosestRingPeersRequest } from "./DhtRpc";
|
|
43
40
|
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
|
|
44
41
|
import type { ClosestPeersResponse } from "./DhtRpc";
|
|
45
42
|
import type { ClosestPeersRequest } from "./DhtRpc";
|
|
@@ -53,6 +50,10 @@ export interface IDhtNodeRpcClient {
|
|
|
53
50
|
* @generated from protobuf rpc: getClosestPeers(dht.ClosestPeersRequest) returns (dht.ClosestPeersResponse);
|
|
54
51
|
*/
|
|
55
52
|
getClosestPeers(input: ClosestPeersRequest, options?: RpcOptions): UnaryCall<ClosestPeersRequest, ClosestPeersResponse>;
|
|
53
|
+
/**
|
|
54
|
+
* @generated from protobuf rpc: getClosestRingPeers(dht.ClosestRingPeersRequest) returns (dht.ClosestRingPeersResponse);
|
|
55
|
+
*/
|
|
56
|
+
getClosestRingPeers(input: ClosestRingPeersRequest, options?: RpcOptions): UnaryCall<ClosestRingPeersRequest, ClosestRingPeersResponse>;
|
|
56
57
|
/**
|
|
57
58
|
* @generated from protobuf rpc: ping(dht.PingRequest) returns (dht.PingResponse);
|
|
58
59
|
*/
|
|
@@ -78,18 +79,25 @@ export class DhtNodeRpcClient implements IDhtNodeRpcClient, ServiceInfo {
|
|
|
78
79
|
const method = this.methods[0], opt = this._transport.mergeOptions(options);
|
|
79
80
|
return stackIntercept<ClosestPeersRequest, ClosestPeersResponse>("unary", this._transport, method, opt, input);
|
|
80
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* @generated from protobuf rpc: getClosestRingPeers(dht.ClosestRingPeersRequest) returns (dht.ClosestRingPeersResponse);
|
|
84
|
+
*/
|
|
85
|
+
getClosestRingPeers(input: ClosestRingPeersRequest, options?: RpcOptions): UnaryCall<ClosestRingPeersRequest, ClosestRingPeersResponse> {
|
|
86
|
+
const method = this.methods[1], opt = this._transport.mergeOptions(options);
|
|
87
|
+
return stackIntercept<ClosestRingPeersRequest, ClosestRingPeersResponse>("unary", this._transport, method, opt, input);
|
|
88
|
+
}
|
|
81
89
|
/**
|
|
82
90
|
* @generated from protobuf rpc: ping(dht.PingRequest) returns (dht.PingResponse);
|
|
83
91
|
*/
|
|
84
92
|
ping(input: PingRequest, options?: RpcOptions): UnaryCall<PingRequest, PingResponse> {
|
|
85
|
-
const method = this.methods[
|
|
93
|
+
const method = this.methods[2], opt = this._transport.mergeOptions(options);
|
|
86
94
|
return stackIntercept<PingRequest, PingResponse>("unary", this._transport, method, opt, input);
|
|
87
95
|
}
|
|
88
96
|
/**
|
|
89
97
|
* @generated from protobuf rpc: leaveNotice(dht.LeaveNotice) returns (google.protobuf.Empty);
|
|
90
98
|
*/
|
|
91
99
|
leaveNotice(input: LeaveNotice, options?: RpcOptions): UnaryCall<LeaveNotice, Empty> {
|
|
92
|
-
const method = this.methods[
|
|
100
|
+
const method = this.methods[3], opt = this._transport.mergeOptions(options);
|
|
93
101
|
return stackIntercept<LeaveNotice, Empty>("unary", this._transport, method, opt, input);
|
|
94
102
|
}
|
|
95
103
|
}
|
|
@@ -131,27 +139,27 @@ export class RouterRpcClient implements IRouterRpcClient, ServiceInfo {
|
|
|
131
139
|
}
|
|
132
140
|
}
|
|
133
141
|
/**
|
|
134
|
-
* @generated from protobuf service dht.
|
|
142
|
+
* @generated from protobuf service dht.RecursiveOperationRpc
|
|
135
143
|
*/
|
|
136
|
-
export interface
|
|
144
|
+
export interface IRecursiveOperationRpcClient {
|
|
137
145
|
/**
|
|
138
|
-
* @generated from protobuf rpc:
|
|
146
|
+
* @generated from protobuf rpc: routeRequest(dht.RouteMessageWrapper) returns (dht.RouteMessageAck);
|
|
139
147
|
*/
|
|
140
|
-
|
|
148
|
+
routeRequest(input: RouteMessageWrapper, options?: RpcOptions): UnaryCall<RouteMessageWrapper, RouteMessageAck>;
|
|
141
149
|
}
|
|
142
150
|
/**
|
|
143
|
-
* @generated from protobuf service dht.
|
|
151
|
+
* @generated from protobuf service dht.RecursiveOperationRpc
|
|
144
152
|
*/
|
|
145
|
-
export class
|
|
146
|
-
typeName =
|
|
147
|
-
methods =
|
|
148
|
-
options =
|
|
153
|
+
export class RecursiveOperationRpcClient implements IRecursiveOperationRpcClient, ServiceInfo {
|
|
154
|
+
typeName = RecursiveOperationRpc.typeName;
|
|
155
|
+
methods = RecursiveOperationRpc.methods;
|
|
156
|
+
options = RecursiveOperationRpc.options;
|
|
149
157
|
constructor(private readonly _transport: RpcTransport) {
|
|
150
158
|
}
|
|
151
159
|
/**
|
|
152
|
-
* @generated from protobuf rpc:
|
|
160
|
+
* @generated from protobuf rpc: routeRequest(dht.RouteMessageWrapper) returns (dht.RouteMessageAck);
|
|
153
161
|
*/
|
|
154
|
-
|
|
162
|
+
routeRequest(input: RouteMessageWrapper, options?: RpcOptions): UnaryCall<RouteMessageWrapper, RouteMessageAck> {
|
|
155
163
|
const method = this.methods[0], opt = this._transport.mergeOptions(options);
|
|
156
164
|
return stackIntercept<RouteMessageWrapper, RouteMessageAck>("unary", this._transport, method, opt, input);
|
|
157
165
|
}
|
|
@@ -165,13 +173,9 @@ export interface IStoreRpcClient {
|
|
|
165
173
|
*/
|
|
166
174
|
storeData(input: StoreDataRequest, options?: RpcOptions): UnaryCall<StoreDataRequest, StoreDataResponse>;
|
|
167
175
|
/**
|
|
168
|
-
* @generated from protobuf rpc:
|
|
169
|
-
*/
|
|
170
|
-
migrateData(input: MigrateDataRequest, options?: RpcOptions): UnaryCall<MigrateDataRequest, MigrateDataResponse>;
|
|
171
|
-
/**
|
|
172
|
-
* @generated from protobuf rpc: deleteData(dht.DeleteDataRequest) returns (dht.DeleteDataResponse);
|
|
176
|
+
* @generated from protobuf rpc: replicateData(dht.ReplicateDataRequest) returns (google.protobuf.Empty);
|
|
173
177
|
*/
|
|
174
|
-
|
|
178
|
+
replicateData(input: ReplicateDataRequest, options?: RpcOptions): UnaryCall<ReplicateDataRequest, Empty>;
|
|
175
179
|
}
|
|
176
180
|
/**
|
|
177
181
|
* @generated from protobuf service dht.StoreRpc
|
|
@@ -190,44 +194,37 @@ export class StoreRpcClient implements IStoreRpcClient, ServiceInfo {
|
|
|
190
194
|
return stackIntercept<StoreDataRequest, StoreDataResponse>("unary", this._transport, method, opt, input);
|
|
191
195
|
}
|
|
192
196
|
/**
|
|
193
|
-
* @generated from protobuf rpc:
|
|
197
|
+
* @generated from protobuf rpc: replicateData(dht.ReplicateDataRequest) returns (google.protobuf.Empty);
|
|
194
198
|
*/
|
|
195
|
-
|
|
199
|
+
replicateData(input: ReplicateDataRequest, options?: RpcOptions): UnaryCall<ReplicateDataRequest, Empty> {
|
|
196
200
|
const method = this.methods[1], opt = this._transport.mergeOptions(options);
|
|
197
|
-
return stackIntercept<
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* @generated from protobuf rpc: deleteData(dht.DeleteDataRequest) returns (dht.DeleteDataResponse);
|
|
201
|
-
*/
|
|
202
|
-
deleteData(input: DeleteDataRequest, options?: RpcOptions): UnaryCall<DeleteDataRequest, DeleteDataResponse> {
|
|
203
|
-
const method = this.methods[2], opt = this._transport.mergeOptions(options);
|
|
204
|
-
return stackIntercept<DeleteDataRequest, DeleteDataResponse>("unary", this._transport, method, opt, input);
|
|
201
|
+
return stackIntercept<ReplicateDataRequest, Empty>("unary", this._transport, method, opt, input);
|
|
205
202
|
}
|
|
206
203
|
}
|
|
207
204
|
/**
|
|
208
|
-
* @generated from protobuf service dht.
|
|
205
|
+
* @generated from protobuf service dht.RecursiveOperationSessionRpc
|
|
209
206
|
*/
|
|
210
|
-
export interface
|
|
207
|
+
export interface IRecursiveOperationSessionRpcClient {
|
|
211
208
|
/**
|
|
212
|
-
* @generated from protobuf rpc:
|
|
209
|
+
* @generated from protobuf rpc: sendResponse(dht.RecursiveOperationResponse) returns (google.protobuf.Empty);
|
|
213
210
|
*/
|
|
214
|
-
|
|
211
|
+
sendResponse(input: RecursiveOperationResponse, options?: RpcOptions): UnaryCall<RecursiveOperationResponse, Empty>;
|
|
215
212
|
}
|
|
216
213
|
/**
|
|
217
|
-
* @generated from protobuf service dht.
|
|
214
|
+
* @generated from protobuf service dht.RecursiveOperationSessionRpc
|
|
218
215
|
*/
|
|
219
|
-
export class
|
|
220
|
-
typeName =
|
|
221
|
-
methods =
|
|
222
|
-
options =
|
|
216
|
+
export class RecursiveOperationSessionRpcClient implements IRecursiveOperationSessionRpcClient, ServiceInfo {
|
|
217
|
+
typeName = RecursiveOperationSessionRpc.typeName;
|
|
218
|
+
methods = RecursiveOperationSessionRpc.methods;
|
|
219
|
+
options = RecursiveOperationSessionRpc.options;
|
|
223
220
|
constructor(private readonly _transport: RpcTransport) {
|
|
224
221
|
}
|
|
225
222
|
/**
|
|
226
|
-
* @generated from protobuf rpc:
|
|
223
|
+
* @generated from protobuf rpc: sendResponse(dht.RecursiveOperationResponse) returns (google.protobuf.Empty);
|
|
227
224
|
*/
|
|
228
|
-
|
|
225
|
+
sendResponse(input: RecursiveOperationResponse, options?: RpcOptions): UnaryCall<RecursiveOperationResponse, Empty> {
|
|
229
226
|
const method = this.methods[0], opt = this._transport.mergeOptions(options);
|
|
230
|
-
return stackIntercept<
|
|
227
|
+
return stackIntercept<RecursiveOperationResponse, Empty>("unary", this._transport, method, opt, input);
|
|
231
228
|
}
|
|
232
229
|
}
|
|
233
230
|
/**
|
|
@@ -235,9 +232,9 @@ export class FindSessionRpcClient implements IFindSessionRpcClient, ServiceInfo
|
|
|
235
232
|
*/
|
|
236
233
|
export interface IWebsocketConnectorRpcClient {
|
|
237
234
|
/**
|
|
238
|
-
* @generated from protobuf rpc: requestConnection(dht.WebsocketConnectionRequest) returns (
|
|
235
|
+
* @generated from protobuf rpc: requestConnection(dht.WebsocketConnectionRequest) returns (google.protobuf.Empty);
|
|
239
236
|
*/
|
|
240
|
-
requestConnection(input: WebsocketConnectionRequest, options?: RpcOptions): UnaryCall<WebsocketConnectionRequest,
|
|
237
|
+
requestConnection(input: WebsocketConnectionRequest, options?: RpcOptions): UnaryCall<WebsocketConnectionRequest, Empty>;
|
|
241
238
|
}
|
|
242
239
|
/**
|
|
243
240
|
* @generated from protobuf service dht.WebsocketConnectorRpc
|
|
@@ -249,11 +246,11 @@ export class WebsocketConnectorRpcClient implements IWebsocketConnectorRpcClient
|
|
|
249
246
|
constructor(private readonly _transport: RpcTransport) {
|
|
250
247
|
}
|
|
251
248
|
/**
|
|
252
|
-
* @generated from protobuf rpc: requestConnection(dht.WebsocketConnectionRequest) returns (
|
|
249
|
+
* @generated from protobuf rpc: requestConnection(dht.WebsocketConnectionRequest) returns (google.protobuf.Empty);
|
|
253
250
|
*/
|
|
254
|
-
requestConnection(input: WebsocketConnectionRequest, options?: RpcOptions): UnaryCall<WebsocketConnectionRequest,
|
|
251
|
+
requestConnection(input: WebsocketConnectionRequest, options?: RpcOptions): UnaryCall<WebsocketConnectionRequest, Empty> {
|
|
255
252
|
const method = this.methods[0], opt = this._transport.mergeOptions(options);
|
|
256
|
-
return stackIntercept<WebsocketConnectionRequest,
|
|
253
|
+
return stackIntercept<WebsocketConnectionRequest, Empty>("unary", this._transport, method, opt, input);
|
|
257
254
|
}
|
|
258
255
|
}
|
|
259
256
|
/**
|
|
@@ -328,9 +325,9 @@ export interface IConnectionLockRpcClient {
|
|
|
328
325
|
*/
|
|
329
326
|
unlockRequest(input: UnlockRequest, options?: RpcOptions): UnaryCall<UnlockRequest, Empty>;
|
|
330
327
|
/**
|
|
331
|
-
* @generated from protobuf rpc: gracefulDisconnect(dht.DisconnectNotice) returns (
|
|
328
|
+
* @generated from protobuf rpc: gracefulDisconnect(dht.DisconnectNotice) returns (google.protobuf.Empty);
|
|
332
329
|
*/
|
|
333
|
-
gracefulDisconnect(input: DisconnectNotice, options?: RpcOptions): UnaryCall<DisconnectNotice,
|
|
330
|
+
gracefulDisconnect(input: DisconnectNotice, options?: RpcOptions): UnaryCall<DisconnectNotice, Empty>;
|
|
334
331
|
}
|
|
335
332
|
/**
|
|
336
333
|
* @generated from protobuf service dht.ConnectionLockRpc
|
|
@@ -356,11 +353,11 @@ export class ConnectionLockRpcClient implements IConnectionLockRpcClient, Servic
|
|
|
356
353
|
return stackIntercept<UnlockRequest, Empty>("unary", this._transport, method, opt, input);
|
|
357
354
|
}
|
|
358
355
|
/**
|
|
359
|
-
* @generated from protobuf rpc: gracefulDisconnect(dht.DisconnectNotice) returns (
|
|
356
|
+
* @generated from protobuf rpc: gracefulDisconnect(dht.DisconnectNotice) returns (google.protobuf.Empty);
|
|
360
357
|
*/
|
|
361
|
-
gracefulDisconnect(input: DisconnectNotice, options?: RpcOptions): UnaryCall<DisconnectNotice,
|
|
358
|
+
gracefulDisconnect(input: DisconnectNotice, options?: RpcOptions): UnaryCall<DisconnectNotice, Empty> {
|
|
362
359
|
const method = this.methods[2], opt = this._transport.mergeOptions(options);
|
|
363
|
-
return stackIntercept<DisconnectNotice,
|
|
360
|
+
return stackIntercept<DisconnectNotice, Empty>("unary", this._transport, method, opt, input);
|
|
364
361
|
}
|
|
365
362
|
}
|
|
366
363
|
/**
|
|
@@ -368,9 +365,9 @@ export class ConnectionLockRpcClient implements IConnectionLockRpcClient, Servic
|
|
|
368
365
|
*/
|
|
369
366
|
export interface IExternalApiRpcClient {
|
|
370
367
|
/**
|
|
371
|
-
* @generated from protobuf rpc:
|
|
368
|
+
* @generated from protobuf rpc: externalFetchData(dht.ExternalFetchDataRequest) returns (dht.ExternalFetchDataResponse);
|
|
372
369
|
*/
|
|
373
|
-
|
|
370
|
+
externalFetchData(input: ExternalFetchDataRequest, options?: RpcOptions): UnaryCall<ExternalFetchDataRequest, ExternalFetchDataResponse>;
|
|
374
371
|
/**
|
|
375
372
|
* @generated from protobuf rpc: externalStoreData(dht.ExternalStoreDataRequest) returns (dht.ExternalStoreDataResponse);
|
|
376
373
|
*/
|
|
@@ -386,11 +383,11 @@ export class ExternalApiRpcClient implements IExternalApiRpcClient, ServiceInfo
|
|
|
386
383
|
constructor(private readonly _transport: RpcTransport) {
|
|
387
384
|
}
|
|
388
385
|
/**
|
|
389
|
-
* @generated from protobuf rpc:
|
|
386
|
+
* @generated from protobuf rpc: externalFetchData(dht.ExternalFetchDataRequest) returns (dht.ExternalFetchDataResponse);
|
|
390
387
|
*/
|
|
391
|
-
|
|
388
|
+
externalFetchData(input: ExternalFetchDataRequest, options?: RpcOptions): UnaryCall<ExternalFetchDataRequest, ExternalFetchDataResponse> {
|
|
392
389
|
const method = this.methods[0], opt = this._transport.mergeOptions(options);
|
|
393
|
-
return stackIntercept<
|
|
390
|
+
return stackIntercept<ExternalFetchDataRequest, ExternalFetchDataResponse>("unary", this._transport, method, opt, input);
|
|
394
391
|
}
|
|
395
392
|
/**
|
|
396
393
|
* @generated from protobuf rpc: externalStoreData(dht.ExternalStoreDataRequest) returns (dht.ExternalStoreDataResponse);
|