@streamr/dht 100.0.0-pretestnet.2 → 100.0.0-pretestnet.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/connection/ConnectionLockHandler.d.ts +7 -8
- package/dist/src/connection/ConnectionLockHandler.js +16 -14
- package/dist/src/connection/ConnectionLockHandler.js.map +1 -1
- package/dist/src/connection/ConnectionLockRpcLocal.d.ts +20 -0
- package/dist/src/connection/ConnectionLockRpcLocal.js +47 -0
- package/dist/src/connection/ConnectionLockRpcLocal.js.map +1 -0
- package/dist/src/connection/ConnectionLockRpcRemote.d.ts +4 -3
- package/dist/src/connection/ConnectionLockRpcRemote.js +9 -9
- package/dist/src/connection/ConnectionLockRpcRemote.js.map +1 -1
- package/dist/src/connection/ConnectionManager.d.ts +9 -16
- package/dist/src/connection/ConnectionManager.js +101 -132
- package/dist/src/connection/ConnectionManager.js.map +1 -1
- package/dist/src/connection/ConnectivityChecker.d.ts +7 -10
- package/dist/src/connection/ConnectivityChecker.js +30 -32
- package/dist/src/connection/ConnectivityChecker.js.map +1 -1
- package/dist/src/connection/ConnectorFacade.d.ts +19 -13
- package/dist/src/connection/ConnectorFacade.js +74 -29
- package/dist/src/connection/ConnectorFacade.js.map +1 -1
- package/dist/src/connection/Handshaker.d.ts +8 -8
- package/dist/src/connection/Handshaker.js +30 -33
- package/dist/src/connection/Handshaker.js.map +1 -1
- package/dist/src/connection/IConnection.d.ts +5 -6
- package/dist/src/connection/IConnection.js.map +1 -1
- package/dist/src/connection/ManagedConnection.d.ts +9 -13
- package/dist/src/connection/ManagedConnection.js +63 -99
- package/dist/src/connection/ManagedConnection.js.map +1 -1
- package/dist/src/connection/ManagedWebrtcConnection.d.ts +7 -0
- package/dist/src/connection/ManagedWebrtcConnection.js +20 -0
- package/dist/src/connection/ManagedWebrtcConnection.js.map +1 -0
- package/dist/src/connection/{Simulator → simulator}/Simulator.js +3 -3
- package/dist/src/connection/{Simulator → simulator}/Simulator.js.map +1 -1
- package/dist/src/connection/{Simulator → simulator}/SimulatorConnection.d.ts +3 -4
- package/dist/src/connection/{Simulator → simulator}/SimulatorConnection.js +25 -24
- package/dist/src/connection/simulator/SimulatorConnection.js.map +1 -0
- package/dist/src/connection/{Simulator → simulator}/SimulatorConnector.d.ts +3 -3
- package/dist/src/connection/{Simulator → simulator}/SimulatorConnector.js +17 -18
- package/dist/src/connection/simulator/SimulatorConnector.js.map +1 -0
- package/dist/src/connection/{Simulator → simulator}/SimulatorTransport.d.ts +1 -1
- package/dist/src/connection/{Simulator → simulator}/SimulatorTransport.js +2 -2
- package/dist/src/connection/simulator/SimulatorTransport.js.map +1 -0
- package/dist/src/connection/{Simulator → simulator}/pings.js.map +1 -1
- package/dist/src/connection/{WebRTC/IWebRtcConnection.d.ts → webrtc/IWebrtcConnection.d.ts} +2 -2
- package/dist/src/connection/{WebRTC/IWebRtcConnection.js → webrtc/IWebrtcConnection.js} +1 -1
- package/dist/src/connection/webrtc/IWebrtcConnection.js.map +1 -0
- package/dist/src/connection/{WebRTC/NodeWebRtcConnection.d.ts → webrtc/NodeWebrtcConnection.d.ts} +6 -7
- package/dist/src/connection/{WebRTC/NodeWebRtcConnection.js → webrtc/NodeWebrtcConnection.js} +41 -42
- package/dist/src/connection/webrtc/NodeWebrtcConnection.js.map +1 -0
- package/dist/src/connection/webrtc/WebrtcConnector.d.ts +38 -0
- package/dist/src/connection/webrtc/WebrtcConnector.js +178 -0
- package/dist/src/connection/webrtc/WebrtcConnector.js.map +1 -0
- package/dist/src/connection/webrtc/WebrtcConnectorRpcLocal.d.ts +26 -0
- package/dist/src/connection/webrtc/WebrtcConnectorRpcLocal.js +99 -0
- package/dist/src/connection/webrtc/WebrtcConnectorRpcLocal.js.map +1 -0
- package/dist/src/connection/{WebRTC/WebRtcConnectorRpcRemote.d.ts → webrtc/WebrtcConnectorRpcRemote.d.ts} +4 -4
- package/dist/src/connection/{WebRTC/WebRtcConnectorRpcRemote.js → webrtc/WebrtcConnectorRpcRemote.js} +6 -8
- package/dist/src/connection/webrtc/WebrtcConnectorRpcRemote.js.map +1 -0
- package/dist/src/connection/{WebRTC → webrtc}/iceServerAsString.d.ts +1 -1
- package/dist/src/connection/{WebRTC → webrtc}/iceServerAsString.js.map +1 -1
- package/dist/src/connection/websocket/AutoCertifierClientFacade.d.ts +26 -0
- package/dist/src/connection/websocket/AutoCertifierClientFacade.js +37 -0
- package/dist/src/connection/websocket/AutoCertifierClientFacade.js.map +1 -0
- package/dist/src/connection/{WebSocket/ClientWebSocket.d.ts → websocket/ClientWebsocket.d.ts} +5 -4
- package/dist/src/connection/{WebSocket/ClientWebSocket.js → websocket/ClientWebsocket.js} +23 -16
- package/dist/src/connection/websocket/ClientWebsocket.js.map +1 -0
- package/dist/src/connection/{WebSocket/ServerWebSocket.d.ts → websocket/ServerWebsocket.d.ts} +2 -2
- package/dist/src/connection/{WebSocket/ServerWebSocket.js → websocket/ServerWebsocket.js} +25 -27
- package/dist/src/connection/websocket/ServerWebsocket.js.map +1 -0
- package/dist/src/connection/websocket/WebsocketConnector.d.ts +53 -0
- package/dist/src/connection/websocket/WebsocketConnector.js +242 -0
- package/dist/src/connection/websocket/WebsocketConnector.js.map +1 -0
- package/dist/src/connection/websocket/WebsocketConnectorRpcLocal.d.ts +17 -0
- package/dist/src/connection/websocket/WebsocketConnectorRpcLocal.js +26 -0
- package/dist/src/connection/websocket/WebsocketConnectorRpcLocal.js.map +1 -0
- package/dist/src/connection/{WebSocket/WebSocketConnectorRpcRemote.d.ts → websocket/WebsocketConnectorRpcRemote.d.ts} +3 -3
- package/dist/src/connection/{WebSocket/WebSocketConnectorRpcRemote.js → websocket/WebsocketConnectorRpcRemote.js} +6 -11
- package/dist/src/connection/websocket/WebsocketConnectorRpcRemote.js.map +1 -0
- package/dist/src/connection/{WebSocket/WebSocketServer.d.ts → websocket/WebsocketServer.d.ts} +6 -3
- package/dist/src/connection/{WebSocket/WebSocketServer.js → websocket/WebsocketServer.js} +39 -19
- package/dist/src/connection/websocket/WebsocketServer.js.map +1 -0
- package/dist/src/dht/DhtNode.d.ts +11 -19
- package/dist/src/dht/DhtNode.js +135 -163
- package/dist/src/dht/DhtNode.js.map +1 -1
- package/dist/src/dht/DhtNodeRpcLocal.d.ts +22 -0
- package/dist/src/dht/DhtNodeRpcLocal.js +42 -0
- package/dist/src/dht/DhtNodeRpcLocal.js.map +1 -0
- package/dist/src/dht/{RemoteDhtNode.d.ts → DhtNodeRpcRemote.d.ts} +5 -3
- package/dist/src/dht/{RemoteDhtNode.js → DhtNodeRpcRemote.js} +20 -24
- package/dist/src/dht/DhtNodeRpcRemote.js.map +1 -0
- package/dist/src/dht/ExternalApiRpcLocal.d.ts +16 -0
- package/dist/src/dht/ExternalApiRpcLocal.js +30 -0
- package/dist/src/dht/ExternalApiRpcLocal.js.map +1 -0
- package/dist/src/dht/ExternalApiRpcRemote.d.ts +1 -1
- package/dist/src/dht/ExternalApiRpcRemote.js +2 -2
- package/dist/src/dht/ExternalApiRpcRemote.js.map +1 -1
- package/dist/src/dht/contact/Remote.d.ts +4 -1
- package/dist/src/dht/contact/Remote.js +28 -2
- package/dist/src/dht/contact/Remote.js.map +1 -1
- package/dist/src/dht/contact/SortedContactList.d.ts +2 -2
- package/dist/src/dht/contact/SortedContactList.js +3 -3
- package/dist/src/dht/contact/SortedContactList.js.map +1 -1
- package/dist/src/dht/discovery/DiscoverySession.d.ts +9 -7
- package/dist/src/dht/discovery/DiscoverySession.js +9 -9
- package/dist/src/dht/discovery/DiscoverySession.js.map +1 -1
- package/dist/src/dht/discovery/PeerDiscovery.d.ts +7 -10
- package/dist/src/dht/discovery/PeerDiscovery.js +6 -6
- package/dist/src/dht/discovery/PeerDiscovery.js.map +1 -1
- package/dist/src/dht/find/FindRpcLocal.d.ts +14 -0
- package/dist/src/dht/find/FindRpcLocal.js +25 -0
- package/dist/src/dht/find/FindRpcLocal.js.map +1 -0
- package/dist/src/dht/find/{RecursiveFindSession.d.ts → FindSession.d.ts} +12 -13
- package/dist/src/dht/find/{RecursiveFindSession.js → FindSession.js} +17 -15
- package/dist/src/dht/find/FindSession.js.map +1 -0
- package/dist/src/dht/find/FindSessionRpcLocal.d.ts +12 -0
- package/dist/src/dht/find/FindSessionRpcLocal.js +17 -0
- package/dist/src/dht/find/FindSessionRpcLocal.js.map +1 -0
- package/dist/src/dht/find/{RemoteRecursiveFindSession.d.ts → FindSessionRpcRemote.d.ts} +2 -2
- package/dist/src/dht/find/{RemoteRecursiveFindSession.js → FindSessionRpcRemote.js} +5 -5
- package/dist/src/dht/find/FindSessionRpcRemote.js.map +1 -0
- package/dist/src/dht/find/{RecursiveFinder.d.ts → Finder.d.ts} +16 -19
- package/dist/src/dht/find/{RecursiveFinder.js → Finder.js} +50 -46
- package/dist/src/dht/find/Finder.js.map +1 -0
- package/dist/src/dht/routing/FindRpcRemote.d.ts +6 -0
- package/dist/src/dht/routing/FindRpcRemote.js +41 -0
- package/dist/src/dht/routing/FindRpcRemote.js.map +1 -0
- package/dist/src/dht/routing/Router.d.ts +10 -17
- package/dist/src/dht/routing/Router.js +50 -93
- package/dist/src/dht/routing/Router.js.map +1 -1
- package/dist/src/dht/routing/RouterRpcLocal.d.ts +22 -0
- package/dist/src/dht/routing/RouterRpcLocal.js +66 -0
- package/dist/src/dht/routing/RouterRpcLocal.js.map +1 -0
- package/dist/src/dht/routing/RouterRpcRemote.d.ts +0 -1
- package/dist/src/dht/routing/RouterRpcRemote.js +17 -45
- package/dist/src/dht/routing/RouterRpcRemote.js.map +1 -1
- package/dist/src/dht/routing/RoutingSession.d.ts +17 -8
- package/dist/src/dht/routing/RoutingSession.js +124 -131
- package/dist/src/dht/routing/RoutingSession.js.map +1 -1
- package/dist/src/dht/routing/getPreviousPeer.d.ts +2 -0
- package/dist/src/dht/routing/getPreviousPeer.js +9 -0
- package/dist/src/dht/routing/getPreviousPeer.js.map +1 -0
- package/dist/src/dht/store/StoreRpcLocal.d.ts +11 -8
- package/dist/src/dht/store/StoreRpcLocal.js +26 -25
- package/dist/src/dht/store/StoreRpcLocal.js.map +1 -1
- package/dist/src/dht/store/StoreRpcRemote.js +6 -10
- package/dist/src/dht/store/StoreRpcRemote.js.map +1 -1
- package/dist/src/exports.d.ts +11 -5
- package/dist/src/exports.js +17 -4
- package/dist/src/exports.js.map +1 -1
- package/dist/src/helpers/Connectivity.d.ts +4 -0
- package/dist/src/helpers/Connectivity.js +24 -0
- package/dist/src/helpers/Connectivity.js.map +1 -0
- package/dist/src/helpers/errors.d.ts +3 -3
- package/dist/src/helpers/errors.js +7 -7
- package/dist/src/helpers/peerIdFromPeerDescriptor.d.ts +1 -0
- package/dist/src/helpers/peerIdFromPeerDescriptor.js +7 -1
- package/dist/src/helpers/peerIdFromPeerDescriptor.js.map +1 -1
- package/dist/src/helpers/protoClasses.js +3 -3
- package/dist/src/proto/packages/dht/protos/DhtRpc.client.d.ts +56 -39
- package/dist/src/proto/packages/dht/protos/DhtRpc.client.js +49 -36
- package/dist/src/proto/packages/dht/protos/DhtRpc.client.js.map +1 -1
- package/dist/src/proto/packages/dht/protos/DhtRpc.d.ts +85 -96
- package/dist/src/proto/packages/dht/protos/DhtRpc.js +82 -71
- package/dist/src/proto/packages/dht/protos/DhtRpc.js.map +1 -1
- package/dist/src/proto/packages/dht/protos/DhtRpc.server.d.ts +26 -21
- package/dist/src/rpc-protocol/DhtCallContext.d.ts +0 -1
- package/dist/src/rpc-protocol/DhtCallContext.js.map +1 -1
- package/dist/src/transport/ITransport.d.ts +5 -6
- package/dist/src/transport/ListeningRpcCommunicator.d.ts +2 -1
- package/dist/src/transport/ListeningRpcCommunicator.js.map +1 -1
- package/dist/src/transport/RoutingRpcCommunicator.d.ts +2 -1
- package/dist/src/transport/RoutingRpcCommunicator.js +0 -1
- package/dist/src/transport/RoutingRpcCommunicator.js.map +1 -1
- package/dist/src/types/ServiceID.d.ts +1 -0
- package/dist/src/types/ServiceID.js +3 -0
- package/dist/src/types/ServiceID.js.map +1 -0
- package/karma.config.js +4 -4
- package/package.json +10 -8
- package/protos/DhtRpc.proto +41 -40
- package/src/connection/ConnectionLockHandler.ts +19 -17
- package/src/connection/ConnectionLockRpcLocal.ts +74 -0
- package/src/connection/ConnectionLockRpcRemote.ts +11 -11
- package/src/connection/ConnectionManager.ts +88 -130
- package/src/connection/ConnectivityChecker.ts +36 -34
- package/src/connection/ConnectorFacade.ts +91 -40
- package/src/connection/Handshaker.ts +20 -23
- package/src/connection/IConnection.ts +5 -6
- package/src/connection/ManagedConnection.ts +76 -101
- package/src/connection/{ManagedWebRtcConnection.ts → ManagedWebrtcConnection.ts} +12 -10
- package/src/connection/{Simulator → simulator}/Simulator.ts +4 -4
- package/src/connection/{Simulator → simulator}/SimulatorConnection.ts +27 -27
- package/src/connection/{Simulator → simulator}/SimulatorConnector.ts +22 -23
- package/src/connection/{Simulator → simulator}/SimulatorTransport.ts +2 -2
- package/src/connection/{WebRTC/BrowserWebRtcConnection.ts → webrtc/BrowserWebrtcConnection.ts} +13 -14
- package/src/connection/{WebRTC/IWebRtcConnection.ts → webrtc/IWebrtcConnection.ts} +2 -2
- package/src/connection/{WebRTC/NodeWebRtcConnection.ts → webrtc/NodeWebrtcConnection.ts} +38 -40
- package/src/connection/webrtc/WebrtcConnector.ts +226 -0
- package/src/connection/webrtc/WebrtcConnectorRpcLocal.ts +132 -0
- package/src/connection/{WebRTC/WebRtcConnectorRpcRemote.ts → webrtc/WebrtcConnectorRpcRemote.ts} +6 -7
- package/src/connection/{WebRTC → webrtc}/iceServerAsString.ts +1 -1
- package/src/connection/websocket/AutoCertifierClientFacade.ts +91 -0
- package/src/connection/{WebSocket/ClientWebSocket.ts → websocket/ClientWebsocket.ts} +22 -17
- package/src/connection/{WebSocket/ServerWebSocket.ts → websocket/ServerWebsocket.ts} +23 -27
- package/src/connection/websocket/WebsocketConnector.ts +328 -0
- package/src/connection/websocket/WebsocketConnectorRpcLocal.ts +41 -0
- package/src/connection/{WebSocket/WebSocketConnectorRpcRemote.ts → websocket/WebsocketConnectorRpcRemote.ts} +8 -14
- package/src/connection/{WebSocket/WebSocketServer.ts → websocket/WebsocketServer.ts} +40 -22
- package/src/dht/DhtNode.ts +166 -193
- package/src/dht/DhtNodeRpcLocal.ts +68 -0
- package/src/dht/{RemoteDhtNode.ts → DhtNodeRpcRemote.ts} +17 -18
- package/src/dht/ExternalApiRpcLocal.ts +46 -0
- package/src/dht/ExternalApiRpcRemote.ts +4 -4
- package/src/dht/contact/Remote.ts +32 -4
- package/src/dht/contact/SortedContactList.ts +4 -4
- package/src/dht/discovery/DiscoverySession.ts +25 -22
- package/src/dht/discovery/PeerDiscovery.ts +16 -19
- package/src/dht/find/FindRpcLocal.ts +35 -0
- package/src/dht/find/{RecursiveFindSession.ts → FindSession.ts} +25 -25
- package/src/dht/find/FindSessionRpcLocal.ts +25 -0
- package/src/dht/find/{RemoteRecursiveFindSession.ts → FindSessionRpcRemote.ts} +9 -5
- package/src/dht/find/{RecursiveFinder.ts → Finder.ts} +77 -71
- package/src/dht/routing/FindRpcRemote.ts +40 -0
- package/src/dht/routing/Router.ts +78 -109
- package/src/dht/routing/RouterRpcLocal.ts +81 -0
- package/src/dht/routing/RouterRpcRemote.ts +18 -49
- package/src/dht/routing/RoutingSession.ts +58 -63
- package/src/dht/routing/getPreviousPeer.ts +6 -0
- package/src/dht/store/StoreRpcLocal.ts +46 -39
- package/src/dht/store/StoreRpcRemote.ts +8 -12
- package/src/exports.ts +11 -5
- package/src/helpers/Connectivity.ts +19 -0
- package/src/helpers/errors.ts +3 -3
- package/src/helpers/peerIdFromPeerDescriptor.ts +6 -0
- package/src/helpers/protoClasses.ts +6 -6
- package/src/proto/packages/dht/protos/DhtRpc.client.ts +75 -59
- package/src/proto/packages/dht/protos/DhtRpc.server.ts +26 -21
- package/src/proto/packages/dht/protos/DhtRpc.ts +112 -131
- package/src/rpc-protocol/DhtCallContext.ts +0 -1
- package/src/transport/ITransport.ts +5 -8
- package/src/transport/ListeningRpcCommunicator.ts +2 -1
- package/src/transport/RoutingRpcCommunicator.ts +3 -4
- package/src/types/ServiceID.ts +1 -0
- package/test/benchmark/{RecursiveFind.test.ts → Find.test.ts} +7 -7
- package/test/benchmark/KademliaCorrectness.test.ts +3 -3
- package/test/benchmark/kademlia-simulation/SimulationNode.ts +3 -3
- package/test/end-to-end/Layer0-Layer1.test.ts +13 -5
- package/test/end-to-end/Layer0.test.ts +35 -17
- package/test/end-to-end/Layer0MixedConnectionTypes.test.ts +28 -9
- package/test/end-to-end/{Layer0WebRTC-Layer1.test.ts → Layer0Webrtc-Layer1.test.ts} +1 -1
- package/test/end-to-end/{Layer0WebRTC.test.ts → Layer0Webrtc.test.ts} +14 -10
- package/test/end-to-end/Layer1-Scale-WebSocket.test.ts +8 -4
- package/test/end-to-end/{Layer1-Scale-WebRTC.test.ts → Layer1-Scale-Webrtc.test.ts} +2 -2
- package/test/end-to-end/RecoveryFromFailedAutoCertification.test.ts +52 -0
- package/test/end-to-end/{WebSocketConnectionRequest.test.ts → WebsocketConnectionRequest.test.ts} +16 -8
- package/test/end-to-end/memory-leak.test.ts +85 -0
- package/test/integration/ConnectionLocking.test.ts +10 -7
- package/test/integration/ConnectionManager.test.ts +107 -30
- package/test/integration/DhtJoinPeerDiscovery.test.ts +2 -2
- package/test/integration/DhtNodeExternalAPI.test.ts +10 -10
- package/test/integration/{RemoteDhtNode.test.ts → DhtNodeRpcRemote.test.ts} +10 -10
- package/test/integration/DhtRpc.test.ts +5 -5
- package/test/integration/{RecursiveFind.test.ts → Find.test.ts} +6 -9
- package/test/integration/Layer1-scale.test.ts +1 -1
- package/test/integration/MigrateData.test.ts +8 -7
- package/test/integration/Mock-Layer1-Layer0.test.ts +1 -1
- package/test/integration/MultipleEntryPointJoining.test.ts +8 -8
- package/test/integration/RouteMessage.test.ts +26 -26
- package/test/integration/RpcErrors.test.ts +10 -10
- package/test/integration/ScaleDownDht.test.ts +6 -6
- package/test/integration/SimultaneousConnections.test.ts +10 -7
- package/test/integration/Store.test.ts +4 -7
- package/test/integration/StoreAndDelete.test.ts +4 -7
- package/test/integration/StoreOnDhtWithTwoNodes.test.ts +12 -12
- package/test/integration/{WebRtcConnectionManagement.test.ts → WebrtcConnectionManagement.test.ts} +5 -5
- package/test/integration/{WebRtcConnectorRpc.test.ts → WebrtcConnectorRpc.test.ts} +7 -8
- package/test/integration/{WebSocket.test.ts → Websocket.test.ts} +14 -13
- package/test/integration/{WebSocketConnectionManagement.test.ts → WebsocketConnectionManagement.test.ts} +4 -4
- package/test/integration/{WebSocketConnectorRpc.test.ts → WebsocketConnectorRpc.test.ts} +15 -15
- package/test/unit/AutoCertifierClientFacade.test.ts +58 -0
- package/test/unit/ConnectivityHelpers.test.ts +69 -0
- package/test/unit/{RecursiveFinder.test.ts → Finder.test.ts} +19 -17
- package/test/unit/Router.test.ts +26 -26
- package/test/unit/UUID.test.ts +1 -1
- package/test/unit/{WebSocketConnectorRpcLocal.test.ts → WebsocketConnector.test.ts} +8 -8
- package/test/unit/{WebSocketServer.test.ts → WebsocketServer.test.ts} +20 -14
- package/test/unit/webrtcReplaceInternalIpWithExternalIp.test.ts +1 -1
- package/test/utils/FakeRpcCommunicator.ts +23 -0
- package/test/utils/mock/Transport.ts +1 -1
- package/test/utils/utils.ts +22 -26
- package/tsconfig.browser.json +1 -1
- package/tsconfig.jest.json +3 -2
- package/tsconfig.node.json +3 -2
- package/dist/src/connection/ManagedWebRtcConnection.d.ts +0 -7
- package/dist/src/connection/ManagedWebRtcConnection.js +0 -20
- package/dist/src/connection/ManagedWebRtcConnection.js.map +0 -1
- package/dist/src/connection/Simulator/SimulatorConnection.js.map +0 -1
- package/dist/src/connection/Simulator/SimulatorConnector.js.map +0 -1
- package/dist/src/connection/Simulator/SimulatorTransport.js.map +0 -1
- package/dist/src/connection/WebRTC/IWebRtcConnection.js.map +0 -1
- package/dist/src/connection/WebRTC/NodeWebRtcConnection.js.map +0 -1
- package/dist/src/connection/WebRTC/WebRtcConnectorRpcLocal.d.ts +0 -51
- package/dist/src/connection/WebRTC/WebRtcConnectorRpcLocal.js +0 -249
- package/dist/src/connection/WebRTC/WebRtcConnectorRpcLocal.js.map +0 -1
- package/dist/src/connection/WebRTC/WebRtcConnectorRpcRemote.js.map +0 -1
- package/dist/src/connection/WebSocket/ClientWebSocket.js.map +0 -1
- package/dist/src/connection/WebSocket/ServerWebSocket.js.map +0 -1
- package/dist/src/connection/WebSocket/WebSocketConnectorRpcLocal.d.ts +0 -45
- package/dist/src/connection/WebSocket/WebSocketConnectorRpcLocal.js +0 -234
- package/dist/src/connection/WebSocket/WebSocketConnectorRpcLocal.js.map +0 -1
- package/dist/src/connection/WebSocket/WebSocketConnectorRpcRemote.js.map +0 -1
- package/dist/src/connection/WebSocket/WebSocketServer.js.map +0 -1
- package/dist/src/dht/RemoteDhtNode.js.map +0 -1
- package/dist/src/dht/find/RecursiveFindSession.js.map +0 -1
- package/dist/src/dht/find/RecursiveFinder.js.map +0 -1
- package/dist/src/dht/find/RemoteRecursiveFindSession.js.map +0 -1
- package/dist/src/dht/registerExternalApiRpcMethods.d.ts +0 -2
- package/dist/src/dht/registerExternalApiRpcMethods.js +0 -32
- package/dist/src/dht/registerExternalApiRpcMethods.js.map +0 -1
- package/src/connection/WebRTC/WebRtcConnectorRpcLocal.ts +0 -335
- package/src/connection/WebSocket/WebSocketConnectorRpcLocal.ts +0 -295
- package/src/dht/registerExternalApiRpcMethods.ts +0 -44
- package/test/utils/mock/RecursiveFinder.ts +0 -19
- /package/dist/src/connection/{Simulator → simulator}/Simulator.d.ts +0 -0
- /package/dist/src/connection/{Simulator → simulator}/pings.d.ts +0 -0
- /package/dist/src/connection/{Simulator → simulator}/pings.js +0 -0
- /package/dist/src/connection/{WebRTC → webrtc}/iceServerAsString.js +0 -0
- /package/src/connection/{Simulator → simulator}/pings.ts +0 -0
|
@@ -240,11 +240,7 @@ export interface PeerDescriptor {
|
|
|
240
240
|
*/
|
|
241
241
|
websocket?: ConnectivityMethod;
|
|
242
242
|
/**
|
|
243
|
-
* @generated from protobuf field: optional
|
|
244
|
-
*/
|
|
245
|
-
openInternet?: boolean;
|
|
246
|
-
/**
|
|
247
|
-
* @generated from protobuf field: optional uint32 region = 7;
|
|
243
|
+
* @generated from protobuf field: optional uint32 region = 6;
|
|
248
244
|
*/
|
|
249
245
|
region?: number;
|
|
250
246
|
}
|
|
@@ -282,19 +278,15 @@ export interface RouteMessageWrapper {
|
|
|
282
278
|
*/
|
|
283
279
|
destinationPeer?: PeerDescriptor;
|
|
284
280
|
/**
|
|
285
|
-
* @generated from protobuf field: dht.
|
|
286
|
-
*/
|
|
287
|
-
previousPeer?: PeerDescriptor;
|
|
288
|
-
/**
|
|
289
|
-
* @generated from protobuf field: dht.Message message = 5;
|
|
281
|
+
* @generated from protobuf field: dht.Message message = 4;
|
|
290
282
|
*/
|
|
291
283
|
message?: Message;
|
|
292
284
|
/**
|
|
293
|
-
* @generated from protobuf field: repeated dht.PeerDescriptor reachableThrough =
|
|
285
|
+
* @generated from protobuf field: repeated dht.PeerDescriptor reachableThrough = 5;
|
|
294
286
|
*/
|
|
295
287
|
reachableThrough: PeerDescriptor[];
|
|
296
288
|
/**
|
|
297
|
-
* @generated from protobuf field: repeated dht.PeerDescriptor routingPath =
|
|
289
|
+
* @generated from protobuf field: repeated dht.PeerDescriptor routingPath = 6;
|
|
298
290
|
*/
|
|
299
291
|
routingPath: PeerDescriptor[];
|
|
300
292
|
}
|
|
@@ -327,25 +319,25 @@ export interface ConnectivityRequest {
|
|
|
327
319
|
* @generated from protobuf field: optional string host = 3;
|
|
328
320
|
*/
|
|
329
321
|
host?: string;
|
|
322
|
+
/**
|
|
323
|
+
* @generated from protobuf field: bool selfSigned = 4;
|
|
324
|
+
*/
|
|
325
|
+
selfSigned: boolean;
|
|
330
326
|
}
|
|
331
327
|
/**
|
|
332
328
|
* @generated from protobuf message dht.ConnectivityResponse
|
|
333
329
|
*/
|
|
334
330
|
export interface ConnectivityResponse {
|
|
335
331
|
/**
|
|
336
|
-
* @generated from protobuf field:
|
|
337
|
-
*/
|
|
338
|
-
openInternet: boolean;
|
|
339
|
-
/**
|
|
340
|
-
* @generated from protobuf field: string host = 2;
|
|
332
|
+
* @generated from protobuf field: string host = 1;
|
|
341
333
|
*/
|
|
342
334
|
host: string;
|
|
343
335
|
/**
|
|
344
|
-
* @generated from protobuf field: string natType =
|
|
336
|
+
* @generated from protobuf field: string natType = 2;
|
|
345
337
|
*/
|
|
346
338
|
natType: string;
|
|
347
339
|
/**
|
|
348
|
-
* @generated from protobuf field: dht.ConnectivityMethod websocket =
|
|
340
|
+
* @generated from protobuf field: dht.ConnectivityMethod websocket = 3;
|
|
349
341
|
*/
|
|
350
342
|
websocket?: ConnectivityMethod;
|
|
351
343
|
}
|
|
@@ -354,30 +346,26 @@ export interface ConnectivityResponse {
|
|
|
354
346
|
*/
|
|
355
347
|
export interface HandshakeRequest {
|
|
356
348
|
/**
|
|
357
|
-
* @generated from protobuf field:
|
|
349
|
+
* @generated from protobuf field: dht.PeerDescriptor sourcePeerDescriptor = 1;
|
|
358
350
|
*/
|
|
359
|
-
|
|
351
|
+
sourcePeerDescriptor?: PeerDescriptor;
|
|
360
352
|
/**
|
|
361
|
-
* @generated from protobuf field: dht.PeerDescriptor
|
|
353
|
+
* @generated from protobuf field: optional dht.PeerDescriptor targetPeerDescriptor = 2;
|
|
362
354
|
*/
|
|
363
|
-
|
|
355
|
+
targetPeerDescriptor?: PeerDescriptor;
|
|
364
356
|
}
|
|
365
357
|
/**
|
|
366
358
|
* @generated from protobuf message dht.HandshakeResponse
|
|
367
359
|
*/
|
|
368
360
|
export interface HandshakeResponse {
|
|
369
361
|
/**
|
|
370
|
-
* @generated from protobuf field:
|
|
362
|
+
* @generated from protobuf field: dht.PeerDescriptor sourcePeerDescriptor = 1;
|
|
371
363
|
*/
|
|
372
|
-
|
|
364
|
+
sourcePeerDescriptor?: PeerDescriptor;
|
|
373
365
|
/**
|
|
374
|
-
* @generated from protobuf field: dht.
|
|
366
|
+
* @generated from protobuf field: optional dht.HandshakeError error = 2;
|
|
375
367
|
*/
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* @generated from protobuf field: optional string responseError = 3;
|
|
379
|
-
*/
|
|
380
|
-
responseError?: string;
|
|
368
|
+
error?: HandshakeError;
|
|
381
369
|
}
|
|
382
370
|
/**
|
|
383
371
|
* @generated from protobuf message dht.Message
|
|
@@ -449,41 +437,25 @@ export interface Message {
|
|
|
449
437
|
/**
|
|
450
438
|
* WebSocket
|
|
451
439
|
*
|
|
452
|
-
* @generated from protobuf message dht.
|
|
440
|
+
* @generated from protobuf message dht.WebsocketConnectionRequest
|
|
453
441
|
*/
|
|
454
|
-
export interface
|
|
455
|
-
/**
|
|
456
|
-
* @generated from protobuf field: string ip = 1;
|
|
457
|
-
*/
|
|
458
|
-
ip: string;
|
|
459
|
-
/**
|
|
460
|
-
* @generated from protobuf field: uint32 port = 2;
|
|
461
|
-
*/
|
|
462
|
-
port: number;
|
|
442
|
+
export interface WebsocketConnectionRequest {
|
|
463
443
|
}
|
|
464
444
|
/**
|
|
465
|
-
* @generated from protobuf message dht.
|
|
445
|
+
* @generated from protobuf message dht.WebsocketConnectionResponse
|
|
466
446
|
*/
|
|
467
|
-
export interface
|
|
447
|
+
export interface WebsocketConnectionResponse {
|
|
468
448
|
/**
|
|
469
449
|
* @generated from protobuf field: bool accepted = 1;
|
|
470
450
|
*/
|
|
471
451
|
accepted: boolean;
|
|
472
|
-
/**
|
|
473
|
-
* @generated from protobuf field: optional string reason = 2;
|
|
474
|
-
*/
|
|
475
|
-
reason?: string;
|
|
476
452
|
}
|
|
477
453
|
/**
|
|
478
454
|
* WebRTC
|
|
479
455
|
*
|
|
480
|
-
* @generated from protobuf message dht.
|
|
456
|
+
* @generated from protobuf message dht.WebrtcConnectionRequest
|
|
481
457
|
*/
|
|
482
|
-
export interface
|
|
483
|
-
/**
|
|
484
|
-
* @generated from protobuf field: string connectionId = 1;
|
|
485
|
-
*/
|
|
486
|
-
connectionId: string;
|
|
458
|
+
export interface WebrtcConnectionRequest {
|
|
487
459
|
}
|
|
488
460
|
/**
|
|
489
461
|
* @generated from protobuf message dht.RtcOffer
|
|
@@ -533,18 +505,18 @@ export interface IceCandidate {
|
|
|
533
505
|
*/
|
|
534
506
|
export interface LockRequest {
|
|
535
507
|
/**
|
|
536
|
-
* @generated from protobuf field: string
|
|
508
|
+
* @generated from protobuf field: string lockId = 1;
|
|
537
509
|
*/
|
|
538
|
-
|
|
510
|
+
lockId: string;
|
|
539
511
|
}
|
|
540
512
|
/**
|
|
541
513
|
* @generated from protobuf message dht.UnlockRequest
|
|
542
514
|
*/
|
|
543
515
|
export interface UnlockRequest {
|
|
544
516
|
/**
|
|
545
|
-
* @generated from protobuf field: string
|
|
517
|
+
* @generated from protobuf field: string lockId = 1;
|
|
546
518
|
*/
|
|
547
|
-
|
|
519
|
+
lockId: string;
|
|
548
520
|
}
|
|
549
521
|
/**
|
|
550
522
|
* @generated from protobuf message dht.LockResponse
|
|
@@ -574,18 +546,18 @@ export interface DisconnectNotice {
|
|
|
574
546
|
export interface DisconnectNoticeResponse {
|
|
575
547
|
}
|
|
576
548
|
/**
|
|
577
|
-
* @generated from protobuf message dht.
|
|
549
|
+
* @generated from protobuf message dht.ExternalFindDataRequest
|
|
578
550
|
*/
|
|
579
|
-
export interface
|
|
551
|
+
export interface ExternalFindDataRequest {
|
|
580
552
|
/**
|
|
581
553
|
* @generated from protobuf field: bytes kademliaId = 1;
|
|
582
554
|
*/
|
|
583
555
|
kademliaId: Uint8Array;
|
|
584
556
|
}
|
|
585
557
|
/**
|
|
586
|
-
* @generated from protobuf message dht.
|
|
558
|
+
* @generated from protobuf message dht.ExternalFindDataResponse
|
|
587
559
|
*/
|
|
588
|
-
export interface
|
|
560
|
+
export interface ExternalFindDataResponse {
|
|
589
561
|
/**
|
|
590
562
|
* @generated from protobuf field: repeated dht.DataEntry dataEntries = 1;
|
|
591
563
|
*/
|
|
@@ -633,34 +605,47 @@ export declare enum RpcResponseError {
|
|
|
633
605
|
*/
|
|
634
606
|
UNKNOWN_RPC_METHOD = 3
|
|
635
607
|
}
|
|
608
|
+
/**
|
|
609
|
+
* @generated from protobuf enum dht.HandshakeError
|
|
610
|
+
*/
|
|
611
|
+
export declare enum HandshakeError {
|
|
612
|
+
/**
|
|
613
|
+
* @generated from protobuf enum value: DUPLICATE_CONNECTION = 0;
|
|
614
|
+
*/
|
|
615
|
+
DUPLICATE_CONNECTION = 0,
|
|
616
|
+
/**
|
|
617
|
+
* @generated from protobuf enum value: INVALID_TARGET_PEER_DESCRIPTOR = 1;
|
|
618
|
+
*/
|
|
619
|
+
INVALID_TARGET_PEER_DESCRIPTOR = 1
|
|
620
|
+
}
|
|
636
621
|
/**
|
|
637
622
|
* @generated from protobuf enum dht.MessageType
|
|
638
623
|
*/
|
|
639
624
|
export declare enum MessageType {
|
|
640
625
|
/**
|
|
641
|
-
* @generated from protobuf enum value:
|
|
626
|
+
* @generated from protobuf enum value: RPC = 0;
|
|
642
627
|
*/
|
|
643
|
-
|
|
628
|
+
RPC = 0,
|
|
644
629
|
/**
|
|
645
|
-
* @generated from protobuf enum value:
|
|
630
|
+
* @generated from protobuf enum value: CONNECTIVITY_REQUEST = 1;
|
|
646
631
|
*/
|
|
647
|
-
|
|
632
|
+
CONNECTIVITY_REQUEST = 1,
|
|
648
633
|
/**
|
|
649
|
-
* @generated from protobuf enum value:
|
|
634
|
+
* @generated from protobuf enum value: CONNECTIVITY_RESPONSE = 2;
|
|
650
635
|
*/
|
|
651
|
-
|
|
636
|
+
CONNECTIVITY_RESPONSE = 2,
|
|
652
637
|
/**
|
|
653
|
-
* @generated from protobuf enum value:
|
|
638
|
+
* @generated from protobuf enum value: HANDSHAKE_REQUEST = 3;
|
|
654
639
|
*/
|
|
655
|
-
|
|
640
|
+
HANDSHAKE_REQUEST = 3,
|
|
656
641
|
/**
|
|
657
|
-
* @generated from protobuf enum value:
|
|
642
|
+
* @generated from protobuf enum value: HANDSHAKE_RESPONSE = 4;
|
|
658
643
|
*/
|
|
659
|
-
|
|
644
|
+
HANDSHAKE_RESPONSE = 4,
|
|
660
645
|
/**
|
|
661
|
-
* @generated from protobuf enum value:
|
|
646
|
+
* @generated from protobuf enum value: FIND_REQUEST = 5;
|
|
662
647
|
*/
|
|
663
|
-
|
|
648
|
+
FIND_REQUEST = 5
|
|
664
649
|
}
|
|
665
650
|
/**
|
|
666
651
|
* @generated from protobuf enum dht.DisconnectMode
|
|
@@ -850,27 +835,27 @@ declare class Message$Type extends MessageType$<Message> {
|
|
|
850
835
|
* @generated MessageType for protobuf message dht.Message
|
|
851
836
|
*/
|
|
852
837
|
export declare const Message: Message$Type;
|
|
853
|
-
declare class
|
|
838
|
+
declare class WebsocketConnectionRequest$Type extends MessageType$<WebsocketConnectionRequest> {
|
|
854
839
|
constructor();
|
|
855
840
|
}
|
|
856
841
|
/**
|
|
857
|
-
* @generated MessageType for protobuf message dht.
|
|
842
|
+
* @generated MessageType for protobuf message dht.WebsocketConnectionRequest
|
|
858
843
|
*/
|
|
859
|
-
export declare const
|
|
860
|
-
declare class
|
|
844
|
+
export declare const WebsocketConnectionRequest: WebsocketConnectionRequest$Type;
|
|
845
|
+
declare class WebsocketConnectionResponse$Type extends MessageType$<WebsocketConnectionResponse> {
|
|
861
846
|
constructor();
|
|
862
847
|
}
|
|
863
848
|
/**
|
|
864
|
-
* @generated MessageType for protobuf message dht.
|
|
849
|
+
* @generated MessageType for protobuf message dht.WebsocketConnectionResponse
|
|
865
850
|
*/
|
|
866
|
-
export declare const
|
|
867
|
-
declare class
|
|
851
|
+
export declare const WebsocketConnectionResponse: WebsocketConnectionResponse$Type;
|
|
852
|
+
declare class WebrtcConnectionRequest$Type extends MessageType$<WebrtcConnectionRequest> {
|
|
868
853
|
constructor();
|
|
869
854
|
}
|
|
870
855
|
/**
|
|
871
|
-
* @generated MessageType for protobuf message dht.
|
|
856
|
+
* @generated MessageType for protobuf message dht.WebrtcConnectionRequest
|
|
872
857
|
*/
|
|
873
|
-
export declare const
|
|
858
|
+
export declare const WebrtcConnectionRequest: WebrtcConnectionRequest$Type;
|
|
874
859
|
declare class RtcOffer$Type extends MessageType$<RtcOffer> {
|
|
875
860
|
constructor();
|
|
876
861
|
}
|
|
@@ -927,44 +912,48 @@ declare class DisconnectNoticeResponse$Type extends MessageType$<DisconnectNotic
|
|
|
927
912
|
* @generated MessageType for protobuf message dht.DisconnectNoticeResponse
|
|
928
913
|
*/
|
|
929
914
|
export declare const DisconnectNoticeResponse: DisconnectNoticeResponse$Type;
|
|
930
|
-
declare class
|
|
915
|
+
declare class ExternalFindDataRequest$Type extends MessageType$<ExternalFindDataRequest> {
|
|
931
916
|
constructor();
|
|
932
917
|
}
|
|
933
918
|
/**
|
|
934
|
-
* @generated MessageType for protobuf message dht.
|
|
919
|
+
* @generated MessageType for protobuf message dht.ExternalFindDataRequest
|
|
935
920
|
*/
|
|
936
|
-
export declare const
|
|
937
|
-
declare class
|
|
921
|
+
export declare const ExternalFindDataRequest: ExternalFindDataRequest$Type;
|
|
922
|
+
declare class ExternalFindDataResponse$Type extends MessageType$<ExternalFindDataResponse> {
|
|
938
923
|
constructor();
|
|
939
924
|
}
|
|
940
925
|
/**
|
|
941
|
-
* @generated MessageType for protobuf message dht.
|
|
926
|
+
* @generated MessageType for protobuf message dht.ExternalFindDataResponse
|
|
942
927
|
*/
|
|
943
|
-
export declare const
|
|
928
|
+
export declare const ExternalFindDataResponse: ExternalFindDataResponse$Type;
|
|
944
929
|
/**
|
|
945
|
-
* @generated ServiceType for protobuf service dht.
|
|
930
|
+
* @generated ServiceType for protobuf service dht.DhtNodeRpc
|
|
946
931
|
*/
|
|
947
|
-
export declare const
|
|
932
|
+
export declare const DhtNodeRpc: ServiceType;
|
|
948
933
|
/**
|
|
949
934
|
* @generated ServiceType for protobuf service dht.RouterRpc
|
|
950
935
|
*/
|
|
951
936
|
export declare const RouterRpc: ServiceType;
|
|
937
|
+
/**
|
|
938
|
+
* @generated ServiceType for protobuf service dht.FindRpc
|
|
939
|
+
*/
|
|
940
|
+
export declare const FindRpc: ServiceType;
|
|
952
941
|
/**
|
|
953
942
|
* @generated ServiceType for protobuf service dht.StoreRpc
|
|
954
943
|
*/
|
|
955
944
|
export declare const StoreRpc: ServiceType;
|
|
956
945
|
/**
|
|
957
|
-
* @generated ServiceType for protobuf service dht.
|
|
946
|
+
* @generated ServiceType for protobuf service dht.FindSessionRpc
|
|
958
947
|
*/
|
|
959
|
-
export declare const
|
|
948
|
+
export declare const FindSessionRpc: ServiceType;
|
|
960
949
|
/**
|
|
961
|
-
* @generated ServiceType for protobuf service dht.
|
|
950
|
+
* @generated ServiceType for protobuf service dht.WebsocketConnectorRpc
|
|
962
951
|
*/
|
|
963
|
-
export declare const
|
|
952
|
+
export declare const WebsocketConnectorRpc: ServiceType;
|
|
964
953
|
/**
|
|
965
|
-
* @generated ServiceType for protobuf service dht.
|
|
954
|
+
* @generated ServiceType for protobuf service dht.WebrtcConnectorRpc
|
|
966
955
|
*/
|
|
967
|
-
export declare const
|
|
956
|
+
export declare const WebrtcConnectorRpc: ServiceType;
|
|
968
957
|
/**
|
|
969
958
|
* @generated ServiceType for protobuf service dht.ConnectionLockRpc
|
|
970
959
|
*/
|