@streamr/dht 100.0.0-pretestnet.6 → 100.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +19 -10
- 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 +1 -2
- package/dist/src/connection/webrtc/WebrtcConnector.js +36 -32
- package/dist/src/connection/webrtc/WebrtcConnector.js.map +1 -1
- package/dist/src/connection/webrtc/WebrtcConnectorRpcLocal.d.ts +4 -2
- package/dist/src/connection/webrtc/WebrtcConnectorRpcLocal.js +28 -22
- 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 +17 -14
- 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 +24 -12
- 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 +25 -27
- package/src/connection/webrtc/WebrtcConnector.ts +31 -36
- package/src/connection/webrtc/WebrtcConnectorRpcLocal.ts +31 -25
- 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,9 +1,9 @@
|
|
|
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 { Empty } from "../../../google/protobuf/empty";
|
|
5
5
|
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
|
6
|
-
import { MessageType
|
|
6
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
7
7
|
import { RpcMessage } from "../../proto-rpc/protos/ProtoRpc";
|
|
8
8
|
import { Timestamp } from "../../../google/protobuf/timestamp";
|
|
9
9
|
import { Any } from "../../../google/protobuf/any";
|
|
@@ -14,30 +14,30 @@ import { Any } from "../../../google/protobuf/any";
|
|
|
14
14
|
*/
|
|
15
15
|
export interface StoreDataRequest {
|
|
16
16
|
/**
|
|
17
|
-
* @generated from protobuf field: bytes
|
|
17
|
+
* @generated from protobuf field: bytes key = 1;
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
key: Uint8Array;
|
|
20
20
|
/**
|
|
21
21
|
* @generated from protobuf field: google.protobuf.Any data = 2;
|
|
22
22
|
*/
|
|
23
23
|
data?: Any;
|
|
24
24
|
/**
|
|
25
|
-
* @generated from protobuf field:
|
|
25
|
+
* @generated from protobuf field: bytes creator = 3;
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
creator: Uint8Array;
|
|
28
28
|
/**
|
|
29
|
-
* @generated from protobuf field: google.protobuf.Timestamp
|
|
29
|
+
* @generated from protobuf field: google.protobuf.Timestamp createdAt = 4;
|
|
30
|
+
*/
|
|
31
|
+
createdAt?: Timestamp;
|
|
32
|
+
/**
|
|
33
|
+
* @generated from protobuf field: uint32 ttl = 5;
|
|
30
34
|
*/
|
|
31
|
-
|
|
35
|
+
ttl: number;
|
|
32
36
|
}
|
|
33
37
|
/**
|
|
34
38
|
* @generated from protobuf message dht.StoreDataResponse
|
|
35
39
|
*/
|
|
36
40
|
export interface StoreDataResponse {
|
|
37
|
-
/**
|
|
38
|
-
* @generated from protobuf field: string error = 1;
|
|
39
|
-
*/
|
|
40
|
-
error: string;
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* @generated from protobuf message dht.ExternalStoreDataRequest
|
|
@@ -62,86 +62,59 @@ export interface ExternalStoreDataResponse {
|
|
|
62
62
|
storers: PeerDescriptor[];
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
|
-
* @generated from protobuf message dht.
|
|
66
|
-
*/
|
|
67
|
-
export interface MigrateDataRequest {
|
|
68
|
-
/**
|
|
69
|
-
* @generated from protobuf field: dht.DataEntry dataEntry = 1;
|
|
70
|
-
*/
|
|
71
|
-
dataEntry?: DataEntry;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* @generated from protobuf message dht.MigrateDataResponse
|
|
75
|
-
*/
|
|
76
|
-
export interface MigrateDataResponse {
|
|
77
|
-
/**
|
|
78
|
-
* @generated from protobuf field: string error = 1;
|
|
79
|
-
*/
|
|
80
|
-
error: string;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* @generated from protobuf message dht.DeleteDataRequest
|
|
84
|
-
*/
|
|
85
|
-
export interface DeleteDataRequest {
|
|
86
|
-
/**
|
|
87
|
-
* @generated from protobuf field: bytes kademliaId = 1;
|
|
88
|
-
*/
|
|
89
|
-
kademliaId: Uint8Array;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* @generated from protobuf message dht.DeleteDataResponse
|
|
65
|
+
* @generated from protobuf message dht.ReplicateDataRequest
|
|
93
66
|
*/
|
|
94
|
-
export interface
|
|
67
|
+
export interface ReplicateDataRequest {
|
|
95
68
|
/**
|
|
96
|
-
* @generated from protobuf field:
|
|
69
|
+
* @generated from protobuf field: dht.DataEntry entry = 1;
|
|
97
70
|
*/
|
|
98
|
-
|
|
71
|
+
entry?: DataEntry;
|
|
99
72
|
}
|
|
100
73
|
/**
|
|
101
74
|
* @generated from protobuf message dht.DataEntry
|
|
102
75
|
*/
|
|
103
76
|
export interface DataEntry {
|
|
104
77
|
/**
|
|
105
|
-
* @generated from protobuf field:
|
|
78
|
+
* @generated from protobuf field: bytes key = 1;
|
|
79
|
+
*/
|
|
80
|
+
key: Uint8Array;
|
|
81
|
+
/**
|
|
82
|
+
* @generated from protobuf field: google.protobuf.Any data = 2;
|
|
106
83
|
*/
|
|
107
|
-
|
|
84
|
+
data?: Any;
|
|
108
85
|
/**
|
|
109
|
-
* @generated from protobuf field: bytes
|
|
86
|
+
* @generated from protobuf field: bytes creator = 3;
|
|
110
87
|
*/
|
|
111
|
-
|
|
88
|
+
creator: Uint8Array;
|
|
112
89
|
/**
|
|
113
|
-
* @generated from protobuf field: google.protobuf.
|
|
90
|
+
* @generated from protobuf field: google.protobuf.Timestamp createdAt = 4;
|
|
114
91
|
*/
|
|
115
|
-
|
|
92
|
+
createdAt?: Timestamp;
|
|
116
93
|
/**
|
|
117
|
-
* @generated from protobuf field: google.protobuf.Timestamp storedAt =
|
|
94
|
+
* @generated from protobuf field: google.protobuf.Timestamp storedAt = 5;
|
|
118
95
|
*/
|
|
119
96
|
storedAt?: Timestamp;
|
|
120
97
|
/**
|
|
121
|
-
* @generated from protobuf field: uint32 ttl =
|
|
98
|
+
* @generated from protobuf field: uint32 ttl = 6;
|
|
122
99
|
*/
|
|
123
100
|
ttl: number; // milliseconds
|
|
124
101
|
/**
|
|
125
|
-
* @generated from protobuf field: bool stale =
|
|
102
|
+
* @generated from protobuf field: bool stale = 7;
|
|
126
103
|
*/
|
|
127
104
|
stale: boolean;
|
|
128
105
|
/**
|
|
129
|
-
* @generated from protobuf field: bool deleted =
|
|
106
|
+
* @generated from protobuf field: bool deleted = 8;
|
|
130
107
|
*/
|
|
131
108
|
deleted: boolean;
|
|
132
|
-
/**
|
|
133
|
-
* @generated from protobuf field: google.protobuf.Timestamp storerTime = 8;
|
|
134
|
-
*/
|
|
135
|
-
storerTime?: Timestamp;
|
|
136
109
|
}
|
|
137
110
|
/**
|
|
138
111
|
* @generated from protobuf message dht.ClosestPeersRequest
|
|
139
112
|
*/
|
|
140
113
|
export interface ClosestPeersRequest {
|
|
141
114
|
/**
|
|
142
|
-
* @generated from protobuf field: bytes
|
|
115
|
+
* @generated from protobuf field: bytes nodeId = 1;
|
|
143
116
|
*/
|
|
144
|
-
|
|
117
|
+
nodeId: Uint8Array;
|
|
145
118
|
/**
|
|
146
119
|
* @generated from protobuf field: string requestId = 2;
|
|
147
120
|
*/
|
|
@@ -161,22 +134,52 @@ export interface ClosestPeersResponse {
|
|
|
161
134
|
requestId: string;
|
|
162
135
|
}
|
|
163
136
|
/**
|
|
164
|
-
* @generated from protobuf message dht.
|
|
137
|
+
* @generated from protobuf message dht.ClosestRingPeersRequest
|
|
165
138
|
*/
|
|
166
|
-
export interface
|
|
139
|
+
export interface ClosestRingPeersRequest {
|
|
140
|
+
/**
|
|
141
|
+
* @generated from protobuf field: bytes ringId = 1;
|
|
142
|
+
*/
|
|
143
|
+
ringId: Uint8Array;
|
|
144
|
+
/**
|
|
145
|
+
* @generated from protobuf field: string requestId = 2;
|
|
146
|
+
*/
|
|
147
|
+
requestId: string;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* @generated from protobuf message dht.ClosestRingPeersResponse
|
|
151
|
+
*/
|
|
152
|
+
export interface ClosestRingPeersResponse {
|
|
153
|
+
/**
|
|
154
|
+
* @generated from protobuf field: repeated dht.PeerDescriptor leftPeers = 1;
|
|
155
|
+
*/
|
|
156
|
+
leftPeers: PeerDescriptor[];
|
|
157
|
+
/**
|
|
158
|
+
* @generated from protobuf field: repeated dht.PeerDescriptor rightPeers = 2;
|
|
159
|
+
*/
|
|
160
|
+
rightPeers: PeerDescriptor[];
|
|
161
|
+
/**
|
|
162
|
+
* @generated from protobuf field: string requestId = 3;
|
|
163
|
+
*/
|
|
164
|
+
requestId: string;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* @generated from protobuf message dht.RecursiveOperationRequest
|
|
168
|
+
*/
|
|
169
|
+
export interface RecursiveOperationRequest {
|
|
167
170
|
/**
|
|
168
171
|
* @generated from protobuf field: string sessionId = 1;
|
|
169
172
|
*/
|
|
170
173
|
sessionId: string;
|
|
171
174
|
/**
|
|
172
|
-
* @generated from protobuf field:
|
|
175
|
+
* @generated from protobuf field: dht.RecursiveOperation operation = 2;
|
|
173
176
|
*/
|
|
174
|
-
|
|
177
|
+
operation: RecursiveOperation;
|
|
175
178
|
}
|
|
176
179
|
/**
|
|
177
|
-
* @generated from protobuf message dht.
|
|
180
|
+
* @generated from protobuf message dht.RecursiveOperationResponse
|
|
178
181
|
*/
|
|
179
|
-
export interface
|
|
182
|
+
export interface RecursiveOperationResponse {
|
|
180
183
|
/**
|
|
181
184
|
* @generated from protobuf field: repeated dht.PeerDescriptor closestConnectedPeers = 1;
|
|
182
185
|
*/
|
|
@@ -186,9 +189,9 @@ export interface FindResponse {
|
|
|
186
189
|
*/
|
|
187
190
|
dataEntries: DataEntry[];
|
|
188
191
|
/**
|
|
189
|
-
* @generated from protobuf field:
|
|
192
|
+
* @generated from protobuf field: bool noCloserNodesFound = 3;
|
|
190
193
|
*/
|
|
191
|
-
noCloserNodesFound
|
|
194
|
+
noCloserNodesFound: boolean;
|
|
192
195
|
/**
|
|
193
196
|
* @generated from protobuf field: repeated dht.PeerDescriptor routingPath = 4;
|
|
194
197
|
*/
|
|
@@ -216,19 +219,15 @@ export interface PingResponse {
|
|
|
216
219
|
* @generated from protobuf message dht.LeaveNotice
|
|
217
220
|
*/
|
|
218
221
|
export interface LeaveNotice {
|
|
219
|
-
/**
|
|
220
|
-
* @generated from protobuf field: string serviceId = 1;
|
|
221
|
-
*/
|
|
222
|
-
serviceId: string;
|
|
223
222
|
}
|
|
224
223
|
/**
|
|
225
224
|
* @generated from protobuf message dht.PeerDescriptor
|
|
226
225
|
*/
|
|
227
226
|
export interface PeerDescriptor {
|
|
228
227
|
/**
|
|
229
|
-
* @generated from protobuf field: bytes
|
|
228
|
+
* @generated from protobuf field: bytes nodeId = 1;
|
|
230
229
|
*/
|
|
231
|
-
|
|
230
|
+
nodeId: Uint8Array;
|
|
232
231
|
/**
|
|
233
232
|
* @generated from protobuf field: dht.NodeType type = 2;
|
|
234
233
|
*/
|
|
@@ -249,6 +248,20 @@ export interface PeerDescriptor {
|
|
|
249
248
|
* @generated from protobuf field: optional uint32 region = 6;
|
|
250
249
|
*/
|
|
251
250
|
region?: number;
|
|
251
|
+
/**
|
|
252
|
+
* @generated from protobuf field: optional uint32 ipAddress = 7;
|
|
253
|
+
*/
|
|
254
|
+
ipAddress?: number;
|
|
255
|
+
/**
|
|
256
|
+
* @generated from protobuf field: optional bytes publicKey = 8;
|
|
257
|
+
*/
|
|
258
|
+
publicKey?: Uint8Array;
|
|
259
|
+
/**
|
|
260
|
+
* signature of fields 2-8
|
|
261
|
+
*
|
|
262
|
+
* @generated from protobuf field: optional bytes signature = 9;
|
|
263
|
+
*/
|
|
264
|
+
signature?: Uint8Array;
|
|
252
265
|
}
|
|
253
266
|
/**
|
|
254
267
|
* @generated from protobuf message dht.ConnectivityMethod
|
|
@@ -272,17 +285,17 @@ export interface ConnectivityMethod {
|
|
|
272
285
|
*/
|
|
273
286
|
export interface RouteMessageWrapper {
|
|
274
287
|
/**
|
|
275
|
-
* @generated from protobuf field:
|
|
288
|
+
* @generated from protobuf field: string requestId = 1;
|
|
276
289
|
*/
|
|
277
|
-
|
|
290
|
+
requestId: string;
|
|
278
291
|
/**
|
|
279
|
-
* @generated from protobuf field:
|
|
292
|
+
* @generated from protobuf field: dht.PeerDescriptor sourcePeer = 2;
|
|
280
293
|
*/
|
|
281
|
-
|
|
294
|
+
sourcePeer?: PeerDescriptor;
|
|
282
295
|
/**
|
|
283
|
-
* @generated from protobuf field:
|
|
296
|
+
* @generated from protobuf field: bytes target = 3;
|
|
284
297
|
*/
|
|
285
|
-
|
|
298
|
+
target: Uint8Array;
|
|
286
299
|
/**
|
|
287
300
|
* @generated from protobuf field: dht.Message message = 4;
|
|
288
301
|
*/
|
|
@@ -295,6 +308,10 @@ export interface RouteMessageWrapper {
|
|
|
295
308
|
* @generated from protobuf field: repeated dht.PeerDescriptor routingPath = 6;
|
|
296
309
|
*/
|
|
297
310
|
routingPath: PeerDescriptor[];
|
|
311
|
+
/**
|
|
312
|
+
* @generated from protobuf field: repeated string parallelRootNodeIds = 7;
|
|
313
|
+
*/
|
|
314
|
+
parallelRootNodeIds: string[];
|
|
298
315
|
}
|
|
299
316
|
/**
|
|
300
317
|
* @generated from protobuf message dht.RouteMessageAck
|
|
@@ -305,12 +322,10 @@ export interface RouteMessageAck {
|
|
|
305
322
|
*/
|
|
306
323
|
requestId: string;
|
|
307
324
|
/**
|
|
308
|
-
* @generated from protobuf field:
|
|
325
|
+
* @generated from protobuf field: optional dht.RouteMessageError error = 2;
|
|
309
326
|
*/
|
|
310
|
-
error
|
|
327
|
+
error?: RouteMessageError;
|
|
311
328
|
}
|
|
312
|
-
// Correspond to the MessageType Enum
|
|
313
|
-
|
|
314
329
|
/**
|
|
315
330
|
* @generated from protobuf message dht.ConnectivityRequest
|
|
316
331
|
*/
|
|
@@ -348,6 +363,14 @@ export interface ConnectivityResponse {
|
|
|
348
363
|
* @generated from protobuf field: dht.ConnectivityMethod websocket = 3;
|
|
349
364
|
*/
|
|
350
365
|
websocket?: ConnectivityMethod;
|
|
366
|
+
/**
|
|
367
|
+
* @generated from protobuf field: uint32 ipAddress = 4;
|
|
368
|
+
*/
|
|
369
|
+
ipAddress: number;
|
|
370
|
+
/**
|
|
371
|
+
* @generated from protobuf field: string version = 5;
|
|
372
|
+
*/
|
|
373
|
+
version: string;
|
|
351
374
|
}
|
|
352
375
|
/**
|
|
353
376
|
* @generated from protobuf message dht.HandshakeRequest
|
|
@@ -361,6 +384,10 @@ export interface HandshakeRequest {
|
|
|
361
384
|
* @generated from protobuf field: optional dht.PeerDescriptor targetPeerDescriptor = 2;
|
|
362
385
|
*/
|
|
363
386
|
targetPeerDescriptor?: PeerDescriptor;
|
|
387
|
+
/**
|
|
388
|
+
* @generated from protobuf field: string version = 3;
|
|
389
|
+
*/
|
|
390
|
+
version: string;
|
|
364
391
|
}
|
|
365
392
|
/**
|
|
366
393
|
* @generated from protobuf message dht.HandshakeResponse
|
|
@@ -374,7 +401,13 @@ export interface HandshakeResponse {
|
|
|
374
401
|
* @generated from protobuf field: optional dht.HandshakeError error = 2;
|
|
375
402
|
*/
|
|
376
403
|
error?: HandshakeError;
|
|
404
|
+
/**
|
|
405
|
+
* @generated from protobuf field: string version = 3;
|
|
406
|
+
*/
|
|
407
|
+
version: string;
|
|
377
408
|
}
|
|
409
|
+
// Wraps all messages
|
|
410
|
+
|
|
378
411
|
/**
|
|
379
412
|
* @generated from protobuf message dht.Message
|
|
380
413
|
*/
|
|
@@ -384,25 +417,27 @@ export interface Message {
|
|
|
384
417
|
*/
|
|
385
418
|
messageId: string;
|
|
386
419
|
/**
|
|
387
|
-
* @generated from protobuf field: dht.
|
|
388
|
-
*/
|
|
389
|
-
messageType: MessageType;
|
|
390
|
-
/**
|
|
391
|
-
* @generated from protobuf field: dht.PeerDescriptor sourceDescriptor = 3;
|
|
420
|
+
* @generated from protobuf field: dht.PeerDescriptor sourceDescriptor = 2;
|
|
392
421
|
*/
|
|
393
422
|
sourceDescriptor?: PeerDescriptor;
|
|
394
423
|
/**
|
|
395
|
-
* @generated from protobuf field: dht.PeerDescriptor targetDescriptor =
|
|
424
|
+
* @generated from protobuf field: dht.PeerDescriptor targetDescriptor = 3;
|
|
396
425
|
*/
|
|
397
426
|
targetDescriptor?: PeerDescriptor;
|
|
398
427
|
/**
|
|
399
|
-
* @generated from protobuf field: string serviceId =
|
|
428
|
+
* @generated from protobuf field: string serviceId = 4;
|
|
400
429
|
*/
|
|
401
430
|
serviceId: string; // id of the RPC service
|
|
402
431
|
/**
|
|
403
432
|
* @generated from protobuf oneof: body
|
|
404
433
|
*/
|
|
405
434
|
body: {
|
|
435
|
+
oneofKind: "rpcMessage";
|
|
436
|
+
/**
|
|
437
|
+
* @generated from protobuf field: protorpc.RpcMessage rpcMessage = 5;
|
|
438
|
+
*/
|
|
439
|
+
rpcMessage: RpcMessage;
|
|
440
|
+
} | {
|
|
406
441
|
oneofKind: "connectivityRequest";
|
|
407
442
|
/**
|
|
408
443
|
* @generated from protobuf field: dht.ConnectivityRequest connectivityRequest = 6;
|
|
@@ -427,17 +462,11 @@ export interface Message {
|
|
|
427
462
|
*/
|
|
428
463
|
handshakeResponse: HandshakeResponse;
|
|
429
464
|
} | {
|
|
430
|
-
oneofKind: "
|
|
431
|
-
/**
|
|
432
|
-
* @generated from protobuf field: protorpc.RpcMessage rpcMessage = 10;
|
|
433
|
-
*/
|
|
434
|
-
rpcMessage: RpcMessage;
|
|
435
|
-
} | {
|
|
436
|
-
oneofKind: "findRequest";
|
|
465
|
+
oneofKind: "recursiveOperationRequest";
|
|
437
466
|
/**
|
|
438
|
-
* @generated from protobuf field: dht.
|
|
467
|
+
* @generated from protobuf field: dht.RecursiveOperationRequest recursiveOperationRequest = 10;
|
|
439
468
|
*/
|
|
440
|
-
|
|
469
|
+
recursiveOperationRequest: RecursiveOperationRequest;
|
|
441
470
|
} | {
|
|
442
471
|
oneofKind: undefined;
|
|
443
472
|
};
|
|
@@ -451,15 +480,6 @@ export interface Message {
|
|
|
451
480
|
*/
|
|
452
481
|
export interface WebsocketConnectionRequest {
|
|
453
482
|
}
|
|
454
|
-
/**
|
|
455
|
-
* @generated from protobuf message dht.WebsocketConnectionResponse
|
|
456
|
-
*/
|
|
457
|
-
export interface WebsocketConnectionResponse {
|
|
458
|
-
/**
|
|
459
|
-
* @generated from protobuf field: bool accepted = 1;
|
|
460
|
-
*/
|
|
461
|
-
accepted: boolean;
|
|
462
|
-
}
|
|
463
483
|
/**
|
|
464
484
|
* WebRTC
|
|
465
485
|
*
|
|
@@ -536,10 +556,6 @@ export interface LockResponse {
|
|
|
536
556
|
* @generated from protobuf field: bool accepted = 1;
|
|
537
557
|
*/
|
|
538
558
|
accepted: boolean;
|
|
539
|
-
/**
|
|
540
|
-
* @generated from protobuf field: optional bool reason = 2;
|
|
541
|
-
*/
|
|
542
|
-
reason?: boolean;
|
|
543
559
|
}
|
|
544
560
|
/**
|
|
545
561
|
* @generated from protobuf message dht.DisconnectNotice
|
|
@@ -551,31 +567,39 @@ export interface DisconnectNotice {
|
|
|
551
567
|
disconnectMode: DisconnectMode;
|
|
552
568
|
}
|
|
553
569
|
/**
|
|
554
|
-
* @generated from protobuf message dht.
|
|
570
|
+
* @generated from protobuf message dht.ExternalFetchDataRequest
|
|
555
571
|
*/
|
|
556
|
-
export interface
|
|
572
|
+
export interface ExternalFetchDataRequest {
|
|
573
|
+
/**
|
|
574
|
+
* @generated from protobuf field: bytes key = 1;
|
|
575
|
+
*/
|
|
576
|
+
key: Uint8Array;
|
|
557
577
|
}
|
|
558
578
|
/**
|
|
559
|
-
* @generated from protobuf message dht.
|
|
579
|
+
* @generated from protobuf message dht.ExternalFetchDataResponse
|
|
560
580
|
*/
|
|
561
|
-
export interface
|
|
581
|
+
export interface ExternalFetchDataResponse {
|
|
562
582
|
/**
|
|
563
|
-
* @generated from protobuf field:
|
|
583
|
+
* @generated from protobuf field: repeated dht.DataEntry entries = 1;
|
|
564
584
|
*/
|
|
565
|
-
|
|
585
|
+
entries: DataEntry[];
|
|
566
586
|
}
|
|
567
587
|
/**
|
|
568
|
-
* @generated from protobuf
|
|
588
|
+
* @generated from protobuf enum dht.RecursiveOperation
|
|
569
589
|
*/
|
|
570
|
-
export
|
|
590
|
+
export enum RecursiveOperation {
|
|
571
591
|
/**
|
|
572
|
-
* @generated from protobuf
|
|
592
|
+
* @generated from protobuf enum value: FIND_CLOSEST_NODES = 0;
|
|
573
593
|
*/
|
|
574
|
-
|
|
594
|
+
FIND_CLOSEST_NODES = 0,
|
|
595
|
+
/**
|
|
596
|
+
* @generated from protobuf enum value: FETCH_DATA = 1;
|
|
597
|
+
*/
|
|
598
|
+
FETCH_DATA = 1,
|
|
575
599
|
/**
|
|
576
|
-
* @generated from protobuf
|
|
600
|
+
* @generated from protobuf enum value: DELETE_DATA = 2;
|
|
577
601
|
*/
|
|
578
|
-
|
|
602
|
+
DELETE_DATA = 2
|
|
579
603
|
}
|
|
580
604
|
/**
|
|
581
605
|
* @generated from protobuf enum dht.NodeType
|
|
@@ -588,11 +612,7 @@ export enum NodeType {
|
|
|
588
612
|
/**
|
|
589
613
|
* @generated from protobuf enum value: BROWSER = 1;
|
|
590
614
|
*/
|
|
591
|
-
BROWSER = 1
|
|
592
|
-
/**
|
|
593
|
-
* @generated from protobuf enum value: VIRTUAL = 3;
|
|
594
|
-
*/
|
|
595
|
-
VIRTUAL = 3
|
|
615
|
+
BROWSER = 1
|
|
596
616
|
}
|
|
597
617
|
/**
|
|
598
618
|
* @generated from protobuf enum dht.RpcResponseError
|
|
@@ -616,48 +636,41 @@ export enum RpcResponseError {
|
|
|
616
636
|
UNKNOWN_RPC_METHOD = 3
|
|
617
637
|
}
|
|
618
638
|
/**
|
|
619
|
-
* @generated from protobuf enum dht.
|
|
639
|
+
* @generated from protobuf enum dht.RouteMessageError
|
|
620
640
|
*/
|
|
621
|
-
export enum
|
|
641
|
+
export enum RouteMessageError {
|
|
622
642
|
/**
|
|
623
|
-
* @generated from protobuf enum value:
|
|
643
|
+
* @generated from protobuf enum value: NO_TARGETS = 0;
|
|
624
644
|
*/
|
|
625
|
-
|
|
645
|
+
NO_TARGETS = 0,
|
|
626
646
|
/**
|
|
627
|
-
* @generated from protobuf enum value:
|
|
647
|
+
* @generated from protobuf enum value: DUPLICATE = 1;
|
|
648
|
+
*/
|
|
649
|
+
DUPLICATE = 1,
|
|
650
|
+
/**
|
|
651
|
+
* TODO: can this be removed? If DhtNode is already stopped the server side requests
|
|
652
|
+
* should not be processed
|
|
653
|
+
*
|
|
654
|
+
* @generated from protobuf enum value: STOPPED = 2;
|
|
628
655
|
*/
|
|
629
|
-
|
|
656
|
+
STOPPED = 2
|
|
630
657
|
}
|
|
631
|
-
// Wraps all messages
|
|
632
|
-
|
|
633
658
|
/**
|
|
634
|
-
* @generated from protobuf enum dht.
|
|
659
|
+
* @generated from protobuf enum dht.HandshakeError
|
|
635
660
|
*/
|
|
636
|
-
export enum
|
|
637
|
-
/**
|
|
638
|
-
* @generated from protobuf enum value: RPC = 0;
|
|
639
|
-
*/
|
|
640
|
-
RPC = 0,
|
|
641
|
-
/**
|
|
642
|
-
* @generated from protobuf enum value: CONNECTIVITY_REQUEST = 1;
|
|
643
|
-
*/
|
|
644
|
-
CONNECTIVITY_REQUEST = 1,
|
|
645
|
-
/**
|
|
646
|
-
* @generated from protobuf enum value: CONNECTIVITY_RESPONSE = 2;
|
|
647
|
-
*/
|
|
648
|
-
CONNECTIVITY_RESPONSE = 2,
|
|
661
|
+
export enum HandshakeError {
|
|
649
662
|
/**
|
|
650
|
-
* @generated from protobuf enum value:
|
|
663
|
+
* @generated from protobuf enum value: DUPLICATE_CONNECTION = 0;
|
|
651
664
|
*/
|
|
652
|
-
|
|
665
|
+
DUPLICATE_CONNECTION = 0,
|
|
653
666
|
/**
|
|
654
|
-
* @generated from protobuf enum value:
|
|
667
|
+
* @generated from protobuf enum value: INVALID_TARGET_PEER_DESCRIPTOR = 1;
|
|
655
668
|
*/
|
|
656
|
-
|
|
669
|
+
INVALID_TARGET_PEER_DESCRIPTOR = 1,
|
|
657
670
|
/**
|
|
658
|
-
* @generated from protobuf enum value:
|
|
671
|
+
* @generated from protobuf enum value: UNSUPPORTED_VERSION = 2;
|
|
659
672
|
*/
|
|
660
|
-
|
|
673
|
+
UNSUPPORTED_VERSION = 2
|
|
661
674
|
}
|
|
662
675
|
/**
|
|
663
676
|
* @generated from protobuf enum dht.DisconnectMode
|
|
@@ -673,13 +686,14 @@ export enum DisconnectMode {
|
|
|
673
686
|
LEAVING = 1
|
|
674
687
|
}
|
|
675
688
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
676
|
-
class StoreDataRequest$Type extends MessageType
|
|
689
|
+
class StoreDataRequest$Type extends MessageType<StoreDataRequest> {
|
|
677
690
|
constructor() {
|
|
678
691
|
super("dht.StoreDataRequest", [
|
|
679
|
-
{ no: 1, name: "
|
|
692
|
+
{ no: 1, name: "key", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
680
693
|
{ no: 2, name: "data", kind: "message", T: () => Any },
|
|
681
|
-
{ no: 3, name: "
|
|
682
|
-
{ no: 4, name: "
|
|
694
|
+
{ no: 3, name: "creator", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
695
|
+
{ no: 4, name: "createdAt", kind: "message", T: () => Timestamp },
|
|
696
|
+
{ no: 5, name: "ttl", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }
|
|
683
697
|
]);
|
|
684
698
|
}
|
|
685
699
|
}
|
|
@@ -688,11 +702,9 @@ class StoreDataRequest$Type extends MessageType$<StoreDataRequest> {
|
|
|
688
702
|
*/
|
|
689
703
|
export const StoreDataRequest = new StoreDataRequest$Type();
|
|
690
704
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
691
|
-
class StoreDataResponse$Type extends MessageType
|
|
705
|
+
class StoreDataResponse$Type extends MessageType<StoreDataResponse> {
|
|
692
706
|
constructor() {
|
|
693
|
-
super("dht.StoreDataResponse", [
|
|
694
|
-
{ no: 1, name: "error", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
695
|
-
]);
|
|
707
|
+
super("dht.StoreDataResponse", []);
|
|
696
708
|
}
|
|
697
709
|
}
|
|
698
710
|
/**
|
|
@@ -700,7 +712,7 @@ class StoreDataResponse$Type extends MessageType$<StoreDataResponse> {
|
|
|
700
712
|
*/
|
|
701
713
|
export const StoreDataResponse = new StoreDataResponse$Type();
|
|
702
714
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
703
|
-
class ExternalStoreDataRequest$Type extends MessageType
|
|
715
|
+
class ExternalStoreDataRequest$Type extends MessageType<ExternalStoreDataRequest> {
|
|
704
716
|
constructor() {
|
|
705
717
|
super("dht.ExternalStoreDataRequest", [
|
|
706
718
|
{ no: 1, name: "key", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
@@ -713,7 +725,7 @@ class ExternalStoreDataRequest$Type extends MessageType$<ExternalStoreDataReques
|
|
|
713
725
|
*/
|
|
714
726
|
export const ExternalStoreDataRequest = new ExternalStoreDataRequest$Type();
|
|
715
727
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
716
|
-
class ExternalStoreDataResponse$Type extends MessageType
|
|
728
|
+
class ExternalStoreDataResponse$Type extends MessageType<ExternalStoreDataResponse> {
|
|
717
729
|
constructor() {
|
|
718
730
|
super("dht.ExternalStoreDataResponse", [
|
|
719
731
|
{ no: 1, name: "storers", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => PeerDescriptor }
|
|
@@ -725,128 +737,119 @@ class ExternalStoreDataResponse$Type extends MessageType$<ExternalStoreDataRespo
|
|
|
725
737
|
*/
|
|
726
738
|
export const ExternalStoreDataResponse = new ExternalStoreDataResponse$Type();
|
|
727
739
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
728
|
-
class
|
|
740
|
+
class ReplicateDataRequest$Type extends MessageType<ReplicateDataRequest> {
|
|
729
741
|
constructor() {
|
|
730
|
-
super("dht.
|
|
731
|
-
{ no: 1, name: "
|
|
742
|
+
super("dht.ReplicateDataRequest", [
|
|
743
|
+
{ no: 1, name: "entry", kind: "message", T: () => DataEntry }
|
|
732
744
|
]);
|
|
733
745
|
}
|
|
734
746
|
}
|
|
735
747
|
/**
|
|
736
|
-
* @generated MessageType for protobuf message dht.
|
|
748
|
+
* @generated MessageType for protobuf message dht.ReplicateDataRequest
|
|
737
749
|
*/
|
|
738
|
-
export const
|
|
750
|
+
export const ReplicateDataRequest = new ReplicateDataRequest$Type();
|
|
739
751
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
740
|
-
class
|
|
752
|
+
class DataEntry$Type extends MessageType<DataEntry> {
|
|
741
753
|
constructor() {
|
|
742
|
-
super("dht.
|
|
743
|
-
{ no: 1, name: "
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
*/
|
|
750
|
-
|
|
751
|
-
// @generated message type with reflection information, may provide speed optimized methods
|
|
752
|
-
class DeleteDataRequest$Type extends MessageType$<DeleteDataRequest> {
|
|
753
|
-
constructor() {
|
|
754
|
-
super("dht.DeleteDataRequest", [
|
|
755
|
-
{ no: 1, name: "kademliaId", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
|
|
754
|
+
super("dht.DataEntry", [
|
|
755
|
+
{ no: 1, name: "key", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
756
|
+
{ no: 2, name: "data", kind: "message", T: () => Any },
|
|
757
|
+
{ no: 3, name: "creator", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
758
|
+
{ no: 4, name: "createdAt", kind: "message", T: () => Timestamp },
|
|
759
|
+
{ no: 5, name: "storedAt", kind: "message", T: () => Timestamp },
|
|
760
|
+
{ no: 6, name: "ttl", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
|
|
761
|
+
{ no: 7, name: "stale", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
762
|
+
{ no: 8, name: "deleted", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
756
763
|
]);
|
|
757
764
|
}
|
|
758
765
|
}
|
|
759
766
|
/**
|
|
760
|
-
* @generated MessageType for protobuf message dht.
|
|
767
|
+
* @generated MessageType for protobuf message dht.DataEntry
|
|
761
768
|
*/
|
|
762
|
-
export const
|
|
769
|
+
export const DataEntry = new DataEntry$Type();
|
|
763
770
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
764
|
-
class
|
|
771
|
+
class ClosestPeersRequest$Type extends MessageType<ClosestPeersRequest> {
|
|
765
772
|
constructor() {
|
|
766
|
-
super("dht.
|
|
767
|
-
{ no: 1, name: "
|
|
773
|
+
super("dht.ClosestPeersRequest", [
|
|
774
|
+
{ no: 1, name: "nodeId", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
775
|
+
{ no: 2, name: "requestId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
768
776
|
]);
|
|
769
777
|
}
|
|
770
778
|
}
|
|
771
779
|
/**
|
|
772
|
-
* @generated MessageType for protobuf message dht.
|
|
780
|
+
* @generated MessageType for protobuf message dht.ClosestPeersRequest
|
|
773
781
|
*/
|
|
774
|
-
export const
|
|
782
|
+
export const ClosestPeersRequest = new ClosestPeersRequest$Type();
|
|
775
783
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
776
|
-
class
|
|
784
|
+
class ClosestPeersResponse$Type extends MessageType<ClosestPeersResponse> {
|
|
777
785
|
constructor() {
|
|
778
|
-
super("dht.
|
|
779
|
-
{ no: 1, name: "
|
|
780
|
-
{ no: 2, name: "
|
|
781
|
-
{ no: 3, name: "data", kind: "message", T: () => Any },
|
|
782
|
-
{ no: 4, name: "storedAt", kind: "message", T: () => Timestamp },
|
|
783
|
-
{ no: 5, name: "ttl", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
|
|
784
|
-
{ no: 6, name: "stale", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
785
|
-
{ no: 7, name: "deleted", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
786
|
-
{ no: 8, name: "storerTime", kind: "message", T: () => Timestamp }
|
|
786
|
+
super("dht.ClosestPeersResponse", [
|
|
787
|
+
{ no: 1, name: "peers", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => PeerDescriptor },
|
|
788
|
+
{ no: 2, name: "requestId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
787
789
|
]);
|
|
788
790
|
}
|
|
789
791
|
}
|
|
790
792
|
/**
|
|
791
|
-
* @generated MessageType for protobuf message dht.
|
|
793
|
+
* @generated MessageType for protobuf message dht.ClosestPeersResponse
|
|
792
794
|
*/
|
|
793
|
-
export const
|
|
795
|
+
export const ClosestPeersResponse = new ClosestPeersResponse$Type();
|
|
794
796
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
795
|
-
class
|
|
797
|
+
class ClosestRingPeersRequest$Type extends MessageType<ClosestRingPeersRequest> {
|
|
796
798
|
constructor() {
|
|
797
|
-
super("dht.
|
|
798
|
-
{ no: 1, name: "
|
|
799
|
+
super("dht.ClosestRingPeersRequest", [
|
|
800
|
+
{ no: 1, name: "ringId", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
799
801
|
{ no: 2, name: "requestId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
800
802
|
]);
|
|
801
803
|
}
|
|
802
804
|
}
|
|
803
805
|
/**
|
|
804
|
-
* @generated MessageType for protobuf message dht.
|
|
806
|
+
* @generated MessageType for protobuf message dht.ClosestRingPeersRequest
|
|
805
807
|
*/
|
|
806
|
-
export const
|
|
808
|
+
export const ClosestRingPeersRequest = new ClosestRingPeersRequest$Type();
|
|
807
809
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
808
|
-
class
|
|
810
|
+
class ClosestRingPeersResponse$Type extends MessageType<ClosestRingPeersResponse> {
|
|
809
811
|
constructor() {
|
|
810
|
-
super("dht.
|
|
811
|
-
{ no: 1, name: "
|
|
812
|
-
{ no: 2, name: "
|
|
812
|
+
super("dht.ClosestRingPeersResponse", [
|
|
813
|
+
{ no: 1, name: "leftPeers", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => PeerDescriptor },
|
|
814
|
+
{ no: 2, name: "rightPeers", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => PeerDescriptor },
|
|
815
|
+
{ no: 3, name: "requestId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
813
816
|
]);
|
|
814
817
|
}
|
|
815
818
|
}
|
|
816
819
|
/**
|
|
817
|
-
* @generated MessageType for protobuf message dht.
|
|
820
|
+
* @generated MessageType for protobuf message dht.ClosestRingPeersResponse
|
|
818
821
|
*/
|
|
819
|
-
export const
|
|
822
|
+
export const ClosestRingPeersResponse = new ClosestRingPeersResponse$Type();
|
|
820
823
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
821
|
-
class
|
|
824
|
+
class RecursiveOperationRequest$Type extends MessageType<RecursiveOperationRequest> {
|
|
822
825
|
constructor() {
|
|
823
|
-
super("dht.
|
|
826
|
+
super("dht.RecursiveOperationRequest", [
|
|
824
827
|
{ no: 1, name: "sessionId", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
825
|
-
{ no: 2, name: "
|
|
828
|
+
{ no: 2, name: "operation", kind: "enum", T: () => ["dht.RecursiveOperation", RecursiveOperation] }
|
|
826
829
|
]);
|
|
827
830
|
}
|
|
828
831
|
}
|
|
829
832
|
/**
|
|
830
|
-
* @generated MessageType for protobuf message dht.
|
|
833
|
+
* @generated MessageType for protobuf message dht.RecursiveOperationRequest
|
|
831
834
|
*/
|
|
832
|
-
export const
|
|
835
|
+
export const RecursiveOperationRequest = new RecursiveOperationRequest$Type();
|
|
833
836
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
834
|
-
class
|
|
837
|
+
class RecursiveOperationResponse$Type extends MessageType<RecursiveOperationResponse> {
|
|
835
838
|
constructor() {
|
|
836
|
-
super("dht.
|
|
839
|
+
super("dht.RecursiveOperationResponse", [
|
|
837
840
|
{ no: 1, name: "closestConnectedPeers", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => PeerDescriptor },
|
|
838
841
|
{ no: 2, name: "dataEntries", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => DataEntry },
|
|
839
|
-
{ no: 3, name: "noCloserNodesFound", kind: "scalar",
|
|
842
|
+
{ no: 3, name: "noCloserNodesFound", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
840
843
|
{ no: 4, name: "routingPath", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => PeerDescriptor }
|
|
841
844
|
]);
|
|
842
845
|
}
|
|
843
846
|
}
|
|
844
847
|
/**
|
|
845
|
-
* @generated MessageType for protobuf message dht.
|
|
848
|
+
* @generated MessageType for protobuf message dht.RecursiveOperationResponse
|
|
846
849
|
*/
|
|
847
|
-
export const
|
|
850
|
+
export const RecursiveOperationResponse = new RecursiveOperationResponse$Type();
|
|
848
851
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
849
|
-
class PingRequest$Type extends MessageType
|
|
852
|
+
class PingRequest$Type extends MessageType<PingRequest> {
|
|
850
853
|
constructor() {
|
|
851
854
|
super("dht.PingRequest", [
|
|
852
855
|
{ no: 1, name: "requestId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
@@ -858,7 +861,7 @@ class PingRequest$Type extends MessageType$<PingRequest> {
|
|
|
858
861
|
*/
|
|
859
862
|
export const PingRequest = new PingRequest$Type();
|
|
860
863
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
861
|
-
class PingResponse$Type extends MessageType
|
|
864
|
+
class PingResponse$Type extends MessageType<PingResponse> {
|
|
862
865
|
constructor() {
|
|
863
866
|
super("dht.PingResponse", [
|
|
864
867
|
{ no: 1, name: "requestId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
@@ -870,11 +873,9 @@ class PingResponse$Type extends MessageType$<PingResponse> {
|
|
|
870
873
|
*/
|
|
871
874
|
export const PingResponse = new PingResponse$Type();
|
|
872
875
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
873
|
-
class LeaveNotice$Type extends MessageType
|
|
876
|
+
class LeaveNotice$Type extends MessageType<LeaveNotice> {
|
|
874
877
|
constructor() {
|
|
875
|
-
super("dht.LeaveNotice", [
|
|
876
|
-
{ no: 1, name: "serviceId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
877
|
-
]);
|
|
878
|
+
super("dht.LeaveNotice", []);
|
|
878
879
|
}
|
|
879
880
|
}
|
|
880
881
|
/**
|
|
@@ -882,15 +883,18 @@ class LeaveNotice$Type extends MessageType$<LeaveNotice> {
|
|
|
882
883
|
*/
|
|
883
884
|
export const LeaveNotice = new LeaveNotice$Type();
|
|
884
885
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
885
|
-
class PeerDescriptor$Type extends MessageType
|
|
886
|
+
class PeerDescriptor$Type extends MessageType<PeerDescriptor> {
|
|
886
887
|
constructor() {
|
|
887
888
|
super("dht.PeerDescriptor", [
|
|
888
|
-
{ no: 1, name: "
|
|
889
|
+
{ no: 1, name: "nodeId", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
889
890
|
{ no: 2, name: "type", kind: "enum", T: () => ["dht.NodeType", NodeType] },
|
|
890
891
|
{ no: 3, name: "udp", kind: "message", T: () => ConnectivityMethod },
|
|
891
892
|
{ no: 4, name: "tcp", kind: "message", T: () => ConnectivityMethod },
|
|
892
893
|
{ no: 5, name: "websocket", kind: "message", T: () => ConnectivityMethod },
|
|
893
|
-
{ no: 6, name: "region", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }
|
|
894
|
+
{ no: 6, name: "region", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ },
|
|
895
|
+
{ no: 7, name: "ipAddress", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ },
|
|
896
|
+
{ no: 8, name: "publicKey", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ },
|
|
897
|
+
{ no: 9, name: "signature", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ }
|
|
894
898
|
]);
|
|
895
899
|
}
|
|
896
900
|
}
|
|
@@ -899,7 +903,7 @@ class PeerDescriptor$Type extends MessageType$<PeerDescriptor> {
|
|
|
899
903
|
*/
|
|
900
904
|
export const PeerDescriptor = new PeerDescriptor$Type();
|
|
901
905
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
902
|
-
class ConnectivityMethod$Type extends MessageType
|
|
906
|
+
class ConnectivityMethod$Type extends MessageType<ConnectivityMethod> {
|
|
903
907
|
constructor() {
|
|
904
908
|
super("dht.ConnectivityMethod", [
|
|
905
909
|
{ no: 1, name: "port", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
|
|
@@ -913,15 +917,16 @@ class ConnectivityMethod$Type extends MessageType$<ConnectivityMethod> {
|
|
|
913
917
|
*/
|
|
914
918
|
export const ConnectivityMethod = new ConnectivityMethod$Type();
|
|
915
919
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
916
|
-
class RouteMessageWrapper$Type extends MessageType
|
|
920
|
+
class RouteMessageWrapper$Type extends MessageType<RouteMessageWrapper> {
|
|
917
921
|
constructor() {
|
|
918
922
|
super("dht.RouteMessageWrapper", [
|
|
919
|
-
{ no: 1, name: "
|
|
920
|
-
{ no: 2, name: "
|
|
921
|
-
{ no: 3, name: "
|
|
923
|
+
{ no: 1, name: "requestId", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
924
|
+
{ no: 2, name: "sourcePeer", kind: "message", T: () => PeerDescriptor },
|
|
925
|
+
{ no: 3, name: "target", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
922
926
|
{ no: 4, name: "message", kind: "message", T: () => Message },
|
|
923
927
|
{ no: 5, name: "reachableThrough", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => PeerDescriptor },
|
|
924
|
-
{ no: 6, name: "routingPath", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => PeerDescriptor }
|
|
928
|
+
{ no: 6, name: "routingPath", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => PeerDescriptor },
|
|
929
|
+
{ no: 7, name: "parallelRootNodeIds", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
|
|
925
930
|
]);
|
|
926
931
|
}
|
|
927
932
|
}
|
|
@@ -930,11 +935,11 @@ class RouteMessageWrapper$Type extends MessageType$<RouteMessageWrapper> {
|
|
|
930
935
|
*/
|
|
931
936
|
export const RouteMessageWrapper = new RouteMessageWrapper$Type();
|
|
932
937
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
933
|
-
class RouteMessageAck$Type extends MessageType
|
|
938
|
+
class RouteMessageAck$Type extends MessageType<RouteMessageAck> {
|
|
934
939
|
constructor() {
|
|
935
940
|
super("dht.RouteMessageAck", [
|
|
936
941
|
{ no: 1, name: "requestId", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
937
|
-
{ no: 2, name: "error", kind: "
|
|
942
|
+
{ no: 2, name: "error", kind: "enum", opt: true, T: () => ["dht.RouteMessageError", RouteMessageError] }
|
|
938
943
|
]);
|
|
939
944
|
}
|
|
940
945
|
}
|
|
@@ -943,7 +948,7 @@ class RouteMessageAck$Type extends MessageType$<RouteMessageAck> {
|
|
|
943
948
|
*/
|
|
944
949
|
export const RouteMessageAck = new RouteMessageAck$Type();
|
|
945
950
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
946
|
-
class ConnectivityRequest$Type extends MessageType
|
|
951
|
+
class ConnectivityRequest$Type extends MessageType<ConnectivityRequest> {
|
|
947
952
|
constructor() {
|
|
948
953
|
super("dht.ConnectivityRequest", [
|
|
949
954
|
{ no: 1, name: "port", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
|
|
@@ -958,12 +963,14 @@ class ConnectivityRequest$Type extends MessageType$<ConnectivityRequest> {
|
|
|
958
963
|
*/
|
|
959
964
|
export const ConnectivityRequest = new ConnectivityRequest$Type();
|
|
960
965
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
961
|
-
class ConnectivityResponse$Type extends MessageType
|
|
966
|
+
class ConnectivityResponse$Type extends MessageType<ConnectivityResponse> {
|
|
962
967
|
constructor() {
|
|
963
968
|
super("dht.ConnectivityResponse", [
|
|
964
969
|
{ no: 1, name: "host", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
965
970
|
{ no: 2, name: "natType", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
966
|
-
{ no: 3, name: "websocket", kind: "message", T: () => ConnectivityMethod }
|
|
971
|
+
{ no: 3, name: "websocket", kind: "message", T: () => ConnectivityMethod },
|
|
972
|
+
{ no: 4, name: "ipAddress", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
|
|
973
|
+
{ no: 5, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
967
974
|
]);
|
|
968
975
|
}
|
|
969
976
|
}
|
|
@@ -972,11 +979,12 @@ class ConnectivityResponse$Type extends MessageType$<ConnectivityResponse> {
|
|
|
972
979
|
*/
|
|
973
980
|
export const ConnectivityResponse = new ConnectivityResponse$Type();
|
|
974
981
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
975
|
-
class HandshakeRequest$Type extends MessageType
|
|
982
|
+
class HandshakeRequest$Type extends MessageType<HandshakeRequest> {
|
|
976
983
|
constructor() {
|
|
977
984
|
super("dht.HandshakeRequest", [
|
|
978
985
|
{ no: 1, name: "sourcePeerDescriptor", kind: "message", T: () => PeerDescriptor },
|
|
979
|
-
{ no: 2, name: "targetPeerDescriptor", kind: "message", T: () => PeerDescriptor }
|
|
986
|
+
{ no: 2, name: "targetPeerDescriptor", kind: "message", T: () => PeerDescriptor },
|
|
987
|
+
{ no: 3, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
980
988
|
]);
|
|
981
989
|
}
|
|
982
990
|
}
|
|
@@ -985,11 +993,12 @@ class HandshakeRequest$Type extends MessageType$<HandshakeRequest> {
|
|
|
985
993
|
*/
|
|
986
994
|
export const HandshakeRequest = new HandshakeRequest$Type();
|
|
987
995
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
988
|
-
class HandshakeResponse$Type extends MessageType
|
|
996
|
+
class HandshakeResponse$Type extends MessageType<HandshakeResponse> {
|
|
989
997
|
constructor() {
|
|
990
998
|
super("dht.HandshakeResponse", [
|
|
991
999
|
{ no: 1, name: "sourcePeerDescriptor", kind: "message", T: () => PeerDescriptor },
|
|
992
|
-
{ no: 2, name: "error", kind: "enum", opt: true, T: () => ["dht.HandshakeError", HandshakeError] }
|
|
1000
|
+
{ no: 2, name: "error", kind: "enum", opt: true, T: () => ["dht.HandshakeError", HandshakeError] },
|
|
1001
|
+
{ no: 3, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
993
1002
|
]);
|
|
994
1003
|
}
|
|
995
1004
|
}
|
|
@@ -998,20 +1007,19 @@ class HandshakeResponse$Type extends MessageType$<HandshakeResponse> {
|
|
|
998
1007
|
*/
|
|
999
1008
|
export const HandshakeResponse = new HandshakeResponse$Type();
|
|
1000
1009
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
1001
|
-
class Message$Type extends MessageType
|
|
1010
|
+
class Message$Type extends MessageType<Message> {
|
|
1002
1011
|
constructor() {
|
|
1003
1012
|
super("dht.Message", [
|
|
1004
1013
|
{ no: 1, name: "messageId", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1005
|
-
{ no: 2, name: "
|
|
1006
|
-
{ no: 3, name: "
|
|
1007
|
-
{ no: 4, name: "
|
|
1008
|
-
{ no: 5, name: "
|
|
1014
|
+
{ no: 2, name: "sourceDescriptor", kind: "message", T: () => PeerDescriptor },
|
|
1015
|
+
{ no: 3, name: "targetDescriptor", kind: "message", T: () => PeerDescriptor },
|
|
1016
|
+
{ no: 4, name: "serviceId", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1017
|
+
{ no: 5, name: "rpcMessage", kind: "message", oneof: "body", T: () => RpcMessage },
|
|
1009
1018
|
{ no: 6, name: "connectivityRequest", kind: "message", oneof: "body", T: () => ConnectivityRequest },
|
|
1010
1019
|
{ no: 7, name: "connectivityResponse", kind: "message", oneof: "body", T: () => ConnectivityResponse },
|
|
1011
1020
|
{ no: 8, name: "handshakeRequest", kind: "message", oneof: "body", T: () => HandshakeRequest },
|
|
1012
1021
|
{ no: 9, name: "handshakeResponse", kind: "message", oneof: "body", T: () => HandshakeResponse },
|
|
1013
|
-
{ no: 10, name: "
|
|
1014
|
-
{ no: 11, name: "findRequest", kind: "message", oneof: "body", T: () => FindRequest }
|
|
1022
|
+
{ no: 10, name: "recursiveOperationRequest", kind: "message", oneof: "body", T: () => RecursiveOperationRequest }
|
|
1015
1023
|
]);
|
|
1016
1024
|
}
|
|
1017
1025
|
}
|
|
@@ -1020,7 +1028,7 @@ class Message$Type extends MessageType$<Message> {
|
|
|
1020
1028
|
*/
|
|
1021
1029
|
export const Message = new Message$Type();
|
|
1022
1030
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
1023
|
-
class WebsocketConnectionRequest$Type extends MessageType
|
|
1031
|
+
class WebsocketConnectionRequest$Type extends MessageType<WebsocketConnectionRequest> {
|
|
1024
1032
|
constructor() {
|
|
1025
1033
|
super("dht.WebsocketConnectionRequest", []);
|
|
1026
1034
|
}
|
|
@@ -1030,19 +1038,7 @@ class WebsocketConnectionRequest$Type extends MessageType$<WebsocketConnectionRe
|
|
|
1030
1038
|
*/
|
|
1031
1039
|
export const WebsocketConnectionRequest = new WebsocketConnectionRequest$Type();
|
|
1032
1040
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
1033
|
-
class
|
|
1034
|
-
constructor() {
|
|
1035
|
-
super("dht.WebsocketConnectionResponse", [
|
|
1036
|
-
{ no: 1, name: "accepted", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
1037
|
-
]);
|
|
1038
|
-
}
|
|
1039
|
-
}
|
|
1040
|
-
/**
|
|
1041
|
-
* @generated MessageType for protobuf message dht.WebsocketConnectionResponse
|
|
1042
|
-
*/
|
|
1043
|
-
export const WebsocketConnectionResponse = new WebsocketConnectionResponse$Type();
|
|
1044
|
-
// @generated message type with reflection information, may provide speed optimized methods
|
|
1045
|
-
class WebrtcConnectionRequest$Type extends MessageType$<WebrtcConnectionRequest> {
|
|
1041
|
+
class WebrtcConnectionRequest$Type extends MessageType<WebrtcConnectionRequest> {
|
|
1046
1042
|
constructor() {
|
|
1047
1043
|
super("dht.WebrtcConnectionRequest", []);
|
|
1048
1044
|
}
|
|
@@ -1052,7 +1048,7 @@ class WebrtcConnectionRequest$Type extends MessageType$<WebrtcConnectionRequest>
|
|
|
1052
1048
|
*/
|
|
1053
1049
|
export const WebrtcConnectionRequest = new WebrtcConnectionRequest$Type();
|
|
1054
1050
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
1055
|
-
class RtcOffer$Type extends MessageType
|
|
1051
|
+
class RtcOffer$Type extends MessageType<RtcOffer> {
|
|
1056
1052
|
constructor() {
|
|
1057
1053
|
super("dht.RtcOffer", [
|
|
1058
1054
|
{ no: 1, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
@@ -1065,7 +1061,7 @@ class RtcOffer$Type extends MessageType$<RtcOffer> {
|
|
|
1065
1061
|
*/
|
|
1066
1062
|
export const RtcOffer = new RtcOffer$Type();
|
|
1067
1063
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
1068
|
-
class RtcAnswer$Type extends MessageType
|
|
1064
|
+
class RtcAnswer$Type extends MessageType<RtcAnswer> {
|
|
1069
1065
|
constructor() {
|
|
1070
1066
|
super("dht.RtcAnswer", [
|
|
1071
1067
|
{ no: 1, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
@@ -1078,7 +1074,7 @@ class RtcAnswer$Type extends MessageType$<RtcAnswer> {
|
|
|
1078
1074
|
*/
|
|
1079
1075
|
export const RtcAnswer = new RtcAnswer$Type();
|
|
1080
1076
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
1081
|
-
class IceCandidate$Type extends MessageType
|
|
1077
|
+
class IceCandidate$Type extends MessageType<IceCandidate> {
|
|
1082
1078
|
constructor() {
|
|
1083
1079
|
super("dht.IceCandidate", [
|
|
1084
1080
|
{ no: 1, name: "candidate", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
@@ -1092,7 +1088,7 @@ class IceCandidate$Type extends MessageType$<IceCandidate> {
|
|
|
1092
1088
|
*/
|
|
1093
1089
|
export const IceCandidate = new IceCandidate$Type();
|
|
1094
1090
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
1095
|
-
class LockRequest$Type extends MessageType
|
|
1091
|
+
class LockRequest$Type extends MessageType<LockRequest> {
|
|
1096
1092
|
constructor() {
|
|
1097
1093
|
super("dht.LockRequest", [
|
|
1098
1094
|
{ no: 1, name: "lockId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
@@ -1104,7 +1100,7 @@ class LockRequest$Type extends MessageType$<LockRequest> {
|
|
|
1104
1100
|
*/
|
|
1105
1101
|
export const LockRequest = new LockRequest$Type();
|
|
1106
1102
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
1107
|
-
class UnlockRequest$Type extends MessageType
|
|
1103
|
+
class UnlockRequest$Type extends MessageType<UnlockRequest> {
|
|
1108
1104
|
constructor() {
|
|
1109
1105
|
super("dht.UnlockRequest", [
|
|
1110
1106
|
{ no: 1, name: "lockId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
@@ -1116,11 +1112,10 @@ class UnlockRequest$Type extends MessageType$<UnlockRequest> {
|
|
|
1116
1112
|
*/
|
|
1117
1113
|
export const UnlockRequest = new UnlockRequest$Type();
|
|
1118
1114
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
1119
|
-
class LockResponse$Type extends MessageType
|
|
1115
|
+
class LockResponse$Type extends MessageType<LockResponse> {
|
|
1120
1116
|
constructor() {
|
|
1121
1117
|
super("dht.LockResponse", [
|
|
1122
|
-
{ no: 1, name: "accepted", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
1123
|
-
{ no: 2, name: "reason", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
|
|
1118
|
+
{ no: 1, name: "accepted", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
1124
1119
|
]);
|
|
1125
1120
|
}
|
|
1126
1121
|
}
|
|
@@ -1129,7 +1124,7 @@ class LockResponse$Type extends MessageType$<LockResponse> {
|
|
|
1129
1124
|
*/
|
|
1130
1125
|
export const LockResponse = new LockResponse$Type();
|
|
1131
1126
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
1132
|
-
class DisconnectNotice$Type extends MessageType
|
|
1127
|
+
class DisconnectNotice$Type extends MessageType<DisconnectNotice> {
|
|
1133
1128
|
constructor() {
|
|
1134
1129
|
super("dht.DisconnectNotice", [
|
|
1135
1130
|
{ no: 1, name: "disconnectMode", kind: "enum", T: () => ["dht.DisconnectMode", DisconnectMode] }
|
|
@@ -1141,45 +1136,35 @@ class DisconnectNotice$Type extends MessageType$<DisconnectNotice> {
|
|
|
1141
1136
|
*/
|
|
1142
1137
|
export const DisconnectNotice = new DisconnectNotice$Type();
|
|
1143
1138
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
1144
|
-
class
|
|
1145
|
-
constructor() {
|
|
1146
|
-
super("dht.DisconnectNoticeResponse", []);
|
|
1147
|
-
}
|
|
1148
|
-
}
|
|
1149
|
-
/**
|
|
1150
|
-
* @generated MessageType for protobuf message dht.DisconnectNoticeResponse
|
|
1151
|
-
*/
|
|
1152
|
-
export const DisconnectNoticeResponse = new DisconnectNoticeResponse$Type();
|
|
1153
|
-
// @generated message type with reflection information, may provide speed optimized methods
|
|
1154
|
-
class ExternalFindDataRequest$Type extends MessageType$<ExternalFindDataRequest> {
|
|
1139
|
+
class ExternalFetchDataRequest$Type extends MessageType<ExternalFetchDataRequest> {
|
|
1155
1140
|
constructor() {
|
|
1156
|
-
super("dht.
|
|
1157
|
-
{ no: 1, name: "
|
|
1141
|
+
super("dht.ExternalFetchDataRequest", [
|
|
1142
|
+
{ no: 1, name: "key", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
|
|
1158
1143
|
]);
|
|
1159
1144
|
}
|
|
1160
1145
|
}
|
|
1161
1146
|
/**
|
|
1162
|
-
* @generated MessageType for protobuf message dht.
|
|
1147
|
+
* @generated MessageType for protobuf message dht.ExternalFetchDataRequest
|
|
1163
1148
|
*/
|
|
1164
|
-
export const
|
|
1149
|
+
export const ExternalFetchDataRequest = new ExternalFetchDataRequest$Type();
|
|
1165
1150
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
1166
|
-
class
|
|
1151
|
+
class ExternalFetchDataResponse$Type extends MessageType<ExternalFetchDataResponse> {
|
|
1167
1152
|
constructor() {
|
|
1168
|
-
super("dht.
|
|
1169
|
-
{ no: 1, name: "
|
|
1170
|
-
{ no: 2, name: "error", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
|
|
1153
|
+
super("dht.ExternalFetchDataResponse", [
|
|
1154
|
+
{ no: 1, name: "entries", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => DataEntry }
|
|
1171
1155
|
]);
|
|
1172
1156
|
}
|
|
1173
1157
|
}
|
|
1174
1158
|
/**
|
|
1175
|
-
* @generated MessageType for protobuf message dht.
|
|
1159
|
+
* @generated MessageType for protobuf message dht.ExternalFetchDataResponse
|
|
1176
1160
|
*/
|
|
1177
|
-
export const
|
|
1161
|
+
export const ExternalFetchDataResponse = new ExternalFetchDataResponse$Type();
|
|
1178
1162
|
/**
|
|
1179
1163
|
* @generated ServiceType for protobuf service dht.DhtNodeRpc
|
|
1180
1164
|
*/
|
|
1181
1165
|
export const DhtNodeRpc = new ServiceType("dht.DhtNodeRpc", [
|
|
1182
1166
|
{ name: "getClosestPeers", options: {}, I: ClosestPeersRequest, O: ClosestPeersResponse },
|
|
1167
|
+
{ name: "getClosestRingPeers", options: {}, I: ClosestRingPeersRequest, O: ClosestRingPeersResponse },
|
|
1183
1168
|
{ name: "ping", options: {}, I: PingRequest, O: PingResponse },
|
|
1184
1169
|
{ name: "leaveNotice", options: {}, I: LeaveNotice, O: Empty }
|
|
1185
1170
|
]);
|
|
@@ -1191,30 +1176,29 @@ export const RouterRpc = new ServiceType("dht.RouterRpc", [
|
|
|
1191
1176
|
{ name: "forwardMessage", options: {}, I: RouteMessageWrapper, O: RouteMessageAck }
|
|
1192
1177
|
]);
|
|
1193
1178
|
/**
|
|
1194
|
-
* @generated ServiceType for protobuf service dht.
|
|
1179
|
+
* @generated ServiceType for protobuf service dht.RecursiveOperationRpc
|
|
1195
1180
|
*/
|
|
1196
|
-
export const
|
|
1197
|
-
{ name: "
|
|
1181
|
+
export const RecursiveOperationRpc = new ServiceType("dht.RecursiveOperationRpc", [
|
|
1182
|
+
{ name: "routeRequest", options: {}, I: RouteMessageWrapper, O: RouteMessageAck }
|
|
1198
1183
|
]);
|
|
1199
1184
|
/**
|
|
1200
1185
|
* @generated ServiceType for protobuf service dht.StoreRpc
|
|
1201
1186
|
*/
|
|
1202
1187
|
export const StoreRpc = new ServiceType("dht.StoreRpc", [
|
|
1203
1188
|
{ name: "storeData", options: {}, I: StoreDataRequest, O: StoreDataResponse },
|
|
1204
|
-
{ name: "
|
|
1205
|
-
{ name: "deleteData", options: {}, I: DeleteDataRequest, O: DeleteDataResponse }
|
|
1189
|
+
{ name: "replicateData", options: {}, I: ReplicateDataRequest, O: Empty }
|
|
1206
1190
|
]);
|
|
1207
1191
|
/**
|
|
1208
|
-
* @generated ServiceType for protobuf service dht.
|
|
1192
|
+
* @generated ServiceType for protobuf service dht.RecursiveOperationSessionRpc
|
|
1209
1193
|
*/
|
|
1210
|
-
export const
|
|
1211
|
-
{ name: "
|
|
1194
|
+
export const RecursiveOperationSessionRpc = new ServiceType("dht.RecursiveOperationSessionRpc", [
|
|
1195
|
+
{ name: "sendResponse", options: {}, I: RecursiveOperationResponse, O: Empty }
|
|
1212
1196
|
]);
|
|
1213
1197
|
/**
|
|
1214
1198
|
* @generated ServiceType for protobuf service dht.WebsocketConnectorRpc
|
|
1215
1199
|
*/
|
|
1216
1200
|
export const WebsocketConnectorRpc = new ServiceType("dht.WebsocketConnectorRpc", [
|
|
1217
|
-
{ name: "requestConnection", options: {}, I: WebsocketConnectionRequest, O:
|
|
1201
|
+
{ name: "requestConnection", options: {}, I: WebsocketConnectionRequest, O: Empty }
|
|
1218
1202
|
]);
|
|
1219
1203
|
/**
|
|
1220
1204
|
* @generated ServiceType for protobuf service dht.WebrtcConnectorRpc
|
|
@@ -1231,12 +1215,12 @@ export const WebrtcConnectorRpc = new ServiceType("dht.WebrtcConnectorRpc", [
|
|
|
1231
1215
|
export const ConnectionLockRpc = new ServiceType("dht.ConnectionLockRpc", [
|
|
1232
1216
|
{ name: "lockRequest", options: {}, I: LockRequest, O: LockResponse },
|
|
1233
1217
|
{ name: "unlockRequest", options: {}, I: UnlockRequest, O: Empty },
|
|
1234
|
-
{ name: "gracefulDisconnect", options: {}, I: DisconnectNotice, O:
|
|
1218
|
+
{ name: "gracefulDisconnect", options: {}, I: DisconnectNotice, O: Empty }
|
|
1235
1219
|
]);
|
|
1236
1220
|
/**
|
|
1237
1221
|
* @generated ServiceType for protobuf service dht.ExternalApiRpc
|
|
1238
1222
|
*/
|
|
1239
1223
|
export const ExternalApiRpc = new ServiceType("dht.ExternalApiRpc", [
|
|
1240
|
-
{ name: "
|
|
1224
|
+
{ name: "externalFetchData", options: {}, I: ExternalFetchDataRequest, O: ExternalFetchDataResponse },
|
|
1241
1225
|
{ name: "externalStoreData", options: {}, I: ExternalStoreDataRequest, O: ExternalStoreDataResponse }
|
|
1242
1226
|
]);
|