"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.WebsocketClientConnectorRpc = exports.RecursiveOperationSessionRpc = exports.StoreRpc = exports.RecursiveOperationRpc = exports.RouterRpc = exports.DhtNodeRpc = exports.ExternalFindClosestNodesResponse = exports.ExternalFindClosestNodesRequest = exports.ExternalFetchDataResponse = exports.ExternalFetchDataRequest = exports.SetPrivateRequest = exports.DisconnectNotice = exports.LockResponse = exports.UnlockRequest = exports.LockRequest = exports.IceCandidate = exports.RtcAnswer = exports.RtcOffer = exports.WebrtcConnectionRequest = exports.WebsocketConnectionRequest = exports.Message = exports.HandshakeResponse = exports.HandshakeRequest = exports.ConnectivityResponse = exports.ConnectivityRequest = exports.RouteMessageAck = exports.RouteMessageWrapper = exports.ConnectivityMethod = exports.PeerDescriptor = exports.LeaveNotice = exports.PingResponse = exports.PingRequest = exports.RecursiveOperationResponse = exports.RecursiveOperationRequest = exports.ClosestRingPeersResponse = exports.ClosestRingPeersRequest = exports.ClosestPeersResponse = exports.ClosestPeersRequest = exports.DataEntry = exports.ReplicateDataRequest = exports.ExternalStoreDataResponse = exports.ExternalStoreDataRequest = exports.StoreDataResponse = exports.StoreDataRequest = exports.DisconnectMode = exports.HandshakeError = exports.RouteMessageError = exports.RpcResponseError = exports.NodeType = exports.RecursiveOperation = void 0;
exports.ExternalApiRpc = exports.ConnectionLockRpc = exports.WebrtcConnectorRpc = void 0;
// @generated by protobuf-ts 2.9.6 with parameter server_generic,generate_dependencies,long_type_number
// @generated from protobuf file "packages/dht/protos/DhtRpc.proto" (package "dht", syntax proto3)
// tslint:disable
const empty_1 = require("../../../google/protobuf/empty");
const runtime_rpc_1 = require("@protobuf-ts/runtime-rpc");
const runtime_1 = require("@protobuf-ts/runtime");
const ProtoRpc_1 = require("../../proto-rpc/protos/ProtoRpc");
const timestamp_1 = require("../../../google/protobuf/timestamp");
const any_1 = require("../../../google/protobuf/any");
/**
 * @generated from protobuf enum dht.RecursiveOperation
 */
var RecursiveOperation;
(function (RecursiveOperation) {
    /**
     * @generated from protobuf enum value: FIND_CLOSEST_NODES = 0;
     */
    RecursiveOperation[RecursiveOperation["FIND_CLOSEST_NODES"] = 0] = "FIND_CLOSEST_NODES";
    /**
     * @generated from protobuf enum value: FETCH_DATA = 1;
     */
    RecursiveOperation[RecursiveOperation["FETCH_DATA"] = 1] = "FETCH_DATA";
    /**
     * @generated from protobuf enum value: DELETE_DATA = 2;
     */
    RecursiveOperation[RecursiveOperation["DELETE_DATA"] = 2] = "DELETE_DATA";
})(RecursiveOperation || (exports.RecursiveOperation = RecursiveOperation = {}));
/**
 * @generated from protobuf enum dht.NodeType
 */
var NodeType;
(function (NodeType) {
    /**
     * @generated from protobuf enum value: NODEJS = 0;
     */
    NodeType[NodeType["NODEJS"] = 0] = "NODEJS";
    /**
     * @generated from protobuf enum value: BROWSER = 1;
     */
    NodeType[NodeType["BROWSER"] = 1] = "BROWSER";
})(NodeType || (exports.NodeType = NodeType = {}));
/**
 * @generated from protobuf enum dht.RpcResponseError
 */
var RpcResponseError;
(function (RpcResponseError) {
    /**
     * @generated from protobuf enum value: SERVER_TIMOUT = 0;
     */
    RpcResponseError[RpcResponseError["SERVER_TIMOUT"] = 0] = "SERVER_TIMOUT";
    /**
     * @generated from protobuf enum value: CLIENT_TIMEOUT = 1;
     */
    RpcResponseError[RpcResponseError["CLIENT_TIMEOUT"] = 1] = "CLIENT_TIMEOUT";
    /**
     * @generated from protobuf enum value: SERVER_ERROR = 2;
     */
    RpcResponseError[RpcResponseError["SERVER_ERROR"] = 2] = "SERVER_ERROR";
    /**
     * @generated from protobuf enum value: UNKNOWN_RPC_METHOD = 3;
     */
    RpcResponseError[RpcResponseError["UNKNOWN_RPC_METHOD"] = 3] = "UNKNOWN_RPC_METHOD";
})(RpcResponseError || (exports.RpcResponseError = RpcResponseError = {}));
/**
 * @generated from protobuf enum dht.RouteMessageError
 */
var RouteMessageError;
(function (RouteMessageError) {
    /**
     * @generated from protobuf enum value: NO_TARGETS = 0;
     */
    RouteMessageError[RouteMessageError["NO_TARGETS"] = 0] = "NO_TARGETS";
    /**
     * @generated from protobuf enum value: DUPLICATE = 1;
     */
    RouteMessageError[RouteMessageError["DUPLICATE"] = 1] = "DUPLICATE";
    /**
     * TODO: can this be removed? If DhtNode is already stopped the server side requests
     * should not be processed
     *
     * @generated from protobuf enum value: STOPPED = 2;
     */
    RouteMessageError[RouteMessageError["STOPPED"] = 2] = "STOPPED";
})(RouteMessageError || (exports.RouteMessageError = RouteMessageError = {}));
/**
 * @generated from protobuf enum dht.HandshakeError
 */
var HandshakeError;
(function (HandshakeError) {
    /**
     * @generated from protobuf enum value: DUPLICATE_CONNECTION = 0;
     */
    HandshakeError[HandshakeError["DUPLICATE_CONNECTION"] = 0] = "DUPLICATE_CONNECTION";
    /**
     * @generated from protobuf enum value: INVALID_TARGET_PEER_DESCRIPTOR = 1;
     */
    HandshakeError[HandshakeError["INVALID_TARGET_PEER_DESCRIPTOR"] = 1] = "INVALID_TARGET_PEER_DESCRIPTOR";
    /**
     * @generated from protobuf enum value: UNSUPPORTED_PROTOCOL_VERSION = 2;
     */
    HandshakeError[HandshakeError["UNSUPPORTED_PROTOCOL_VERSION"] = 2] = "UNSUPPORTED_PROTOCOL_VERSION";
})(HandshakeError || (exports.HandshakeError = HandshakeError = {}));
/**
 * @generated from protobuf enum dht.DisconnectMode
 */
var DisconnectMode;
(function (DisconnectMode) {
    /**
     * @generated from protobuf enum value: NORMAL = 0;
     */
    DisconnectMode[DisconnectMode["NORMAL"] = 0] = "NORMAL";
    /**
     * @generated from protobuf enum value: LEAVING = 1;
     */
    DisconnectMode[DisconnectMode["LEAVING"] = 1] = "LEAVING";
})(DisconnectMode || (exports.DisconnectMode = DisconnectMode = {}));
// @generated message type with reflection information, may provide speed optimized methods
class StoreDataRequest$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.StoreDataRequest", [
            { no: 1, name: "key", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
            { no: 2, name: "data", kind: "message", T: () => any_1.Any },
            { no: 3, name: "creator", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
            { no: 4, name: "createdAt", kind: "message", T: () => timestamp_1.Timestamp },
            { no: 5, name: "ttl", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.StoreDataRequest
 */
exports.StoreDataRequest = new StoreDataRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class StoreDataResponse$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.StoreDataResponse", []);
    }
}
/**
 * @generated MessageType for protobuf message dht.StoreDataResponse
 */
exports.StoreDataResponse = new StoreDataResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExternalStoreDataRequest$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.ExternalStoreDataRequest", [
            { no: 1, name: "key", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
            { no: 2, name: "data", kind: "message", T: () => any_1.Any }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.ExternalStoreDataRequest
 */
exports.ExternalStoreDataRequest = new ExternalStoreDataRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExternalStoreDataResponse$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.ExternalStoreDataResponse", [
            { no: 1, name: "storers", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.PeerDescriptor }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.ExternalStoreDataResponse
 */
exports.ExternalStoreDataResponse = new ExternalStoreDataResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ReplicateDataRequest$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.ReplicateDataRequest", [
            { no: 1, name: "entry", kind: "message", T: () => exports.DataEntry }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.ReplicateDataRequest
 */
exports.ReplicateDataRequest = new ReplicateDataRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DataEntry$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.DataEntry", [
            { no: 1, name: "key", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
            { no: 2, name: "data", kind: "message", T: () => any_1.Any },
            { no: 3, name: "creator", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
            { no: 4, name: "createdAt", kind: "message", T: () => timestamp_1.Timestamp },
            { no: 5, name: "storedAt", kind: "message", T: () => timestamp_1.Timestamp },
            { no: 6, name: "ttl", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
            { no: 7, name: "stale", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
            { no: 8, name: "deleted", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.DataEntry
 */
exports.DataEntry = new DataEntry$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClosestPeersRequest$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.ClosestPeersRequest", [
            { no: 1, name: "nodeId", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
            { no: 2, name: "requestId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.ClosestPeersRequest
 */
exports.ClosestPeersRequest = new ClosestPeersRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClosestPeersResponse$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.ClosestPeersResponse", [
            { no: 1, name: "peers", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.PeerDescriptor },
            { no: 2, name: "requestId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.ClosestPeersResponse
 */
exports.ClosestPeersResponse = new ClosestPeersResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClosestRingPeersRequest$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.ClosestRingPeersRequest", [
            { no: 1, name: "ringId", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
            { no: 2, name: "requestId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.ClosestRingPeersRequest
 */
exports.ClosestRingPeersRequest = new ClosestRingPeersRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClosestRingPeersResponse$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.ClosestRingPeersResponse", [
            { no: 1, name: "leftPeers", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.PeerDescriptor },
            { no: 2, name: "rightPeers", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.PeerDescriptor },
            { no: 3, name: "requestId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.ClosestRingPeersResponse
 */
exports.ClosestRingPeersResponse = new ClosestRingPeersResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class RecursiveOperationRequest$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.RecursiveOperationRequest", [
            { no: 1, name: "sessionId", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "operation", kind: "enum", T: () => ["dht.RecursiveOperation", RecursiveOperation] }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.RecursiveOperationRequest
 */
exports.RecursiveOperationRequest = new RecursiveOperationRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class RecursiveOperationResponse$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.RecursiveOperationResponse", [
            { no: 1, name: "closestConnectedNodes", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.PeerDescriptor },
            { no: 2, name: "dataEntries", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.DataEntry },
            { no: 3, name: "noCloserNodesFound", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
            { no: 4, name: "routingPath", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.PeerDescriptor }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.RecursiveOperationResponse
 */
exports.RecursiveOperationResponse = new RecursiveOperationResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class PingRequest$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.PingRequest", [
            { no: 1, name: "requestId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.PingRequest
 */
exports.PingRequest = new PingRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class PingResponse$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.PingResponse", [
            { no: 1, name: "requestId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.PingResponse
 */
exports.PingResponse = new PingResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class LeaveNotice$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.LeaveNotice", []);
    }
}
/**
 * @generated MessageType for protobuf message dht.LeaveNotice
 */
exports.LeaveNotice = new LeaveNotice$Type();
// @generated message type with reflection information, may provide speed optimized methods
class PeerDescriptor$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.PeerDescriptor", [
            { no: 1, name: "nodeId", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
            { no: 2, name: "type", kind: "enum", T: () => ["dht.NodeType", NodeType] },
            { no: 3, name: "udp", kind: "message", T: () => exports.ConnectivityMethod },
            { no: 4, name: "tcp", kind: "message", T: () => exports.ConnectivityMethod },
            { no: 5, name: "websocket", kind: "message", T: () => exports.ConnectivityMethod },
            { no: 6, name: "region", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ },
            { no: 7, name: "ipAddress", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ },
            { no: 8, name: "publicKey", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ },
            { no: 9, name: "signature", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.PeerDescriptor
 */
exports.PeerDescriptor = new PeerDescriptor$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ConnectivityMethod$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.ConnectivityMethod", [
            { no: 1, name: "port", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
            { no: 2, name: "host", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 3, name: "tls", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.ConnectivityMethod
 */
exports.ConnectivityMethod = new ConnectivityMethod$Type();
// @generated message type with reflection information, may provide speed optimized methods
class RouteMessageWrapper$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.RouteMessageWrapper", [
            { no: 1, name: "requestId", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "sourcePeer", kind: "message", T: () => exports.PeerDescriptor },
            { no: 3, name: "target", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
            { no: 4, name: "message", kind: "message", T: () => exports.Message },
            { no: 5, name: "reachableThrough", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.PeerDescriptor },
            { no: 6, name: "routingPath", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.PeerDescriptor },
            { no: 7, name: "parallelRootNodeIds", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.RouteMessageWrapper
 */
exports.RouteMessageWrapper = new RouteMessageWrapper$Type();
// @generated message type with reflection information, may provide speed optimized methods
class RouteMessageAck$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.RouteMessageAck", [
            { no: 1, name: "requestId", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "error", kind: "enum", opt: true, T: () => ["dht.RouteMessageError", RouteMessageError] }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.RouteMessageAck
 */
exports.RouteMessageAck = new RouteMessageAck$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ConnectivityRequest$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.ConnectivityRequest", [
            { no: 1, name: "port", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
            { no: 2, name: "tls", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
            { no: 3, name: "host", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
            { no: 4, name: "allowSelfSignedCertificate", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.ConnectivityRequest
 */
exports.ConnectivityRequest = new ConnectivityRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ConnectivityResponse$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.ConnectivityResponse", [
            { no: 1, name: "host", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "natType", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 3, name: "websocket", kind: "message", T: () => exports.ConnectivityMethod },
            { no: 4, name: "ipAddress", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
            { no: 5, name: "protocolVersion", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 6, name: "latitude", kind: "scalar", opt: true, T: 1 /*ScalarType.DOUBLE*/ },
            { no: 7, name: "longitude", kind: "scalar", opt: true, T: 1 /*ScalarType.DOUBLE*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.ConnectivityResponse
 */
exports.ConnectivityResponse = new ConnectivityResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class HandshakeRequest$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.HandshakeRequest", [
            { no: 1, name: "sourcePeerDescriptor", kind: "message", T: () => exports.PeerDescriptor },
            { no: 2, name: "targetPeerDescriptor", kind: "message", T: () => exports.PeerDescriptor },
            { no: 3, name: "protocolVersion", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 4, name: "applicationVersion", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.HandshakeRequest
 */
exports.HandshakeRequest = new HandshakeRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class HandshakeResponse$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.HandshakeResponse", [
            { no: 1, name: "sourcePeerDescriptor", kind: "message", T: () => exports.PeerDescriptor },
            { no: 2, name: "error", kind: "enum", opt: true, T: () => ["dht.HandshakeError", HandshakeError] },
            { no: 3, name: "protocolVersion", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 4, name: "applicationVersion", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.HandshakeResponse
 */
exports.HandshakeResponse = new HandshakeResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class Message$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.Message", [
            { no: 1, name: "messageId", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "sourceDescriptor", kind: "message", T: () => exports.PeerDescriptor },
            { no: 3, name: "targetDescriptor", kind: "message", T: () => exports.PeerDescriptor },
            { no: 4, name: "serviceId", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 5, name: "rpcMessage", kind: "message", oneof: "body", T: () => ProtoRpc_1.RpcMessage },
            { no: 6, name: "connectivityRequest", kind: "message", oneof: "body", T: () => exports.ConnectivityRequest },
            { no: 7, name: "connectivityResponse", kind: "message", oneof: "body", T: () => exports.ConnectivityResponse },
            { no: 8, name: "handshakeRequest", kind: "message", oneof: "body", T: () => exports.HandshakeRequest },
            { no: 9, name: "handshakeResponse", kind: "message", oneof: "body", T: () => exports.HandshakeResponse },
            { no: 10, name: "recursiveOperationRequest", kind: "message", oneof: "body", T: () => exports.RecursiveOperationRequest }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.Message
 */
exports.Message = new Message$Type();
// @generated message type with reflection information, may provide speed optimized methods
class WebsocketConnectionRequest$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.WebsocketConnectionRequest", []);
    }
}
/**
 * @generated MessageType for protobuf message dht.WebsocketConnectionRequest
 */
exports.WebsocketConnectionRequest = new WebsocketConnectionRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class WebrtcConnectionRequest$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.WebrtcConnectionRequest", []);
    }
}
/**
 * @generated MessageType for protobuf message dht.WebrtcConnectionRequest
 */
exports.WebrtcConnectionRequest = new WebrtcConnectionRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class RtcOffer$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.RtcOffer", [
            { no: 1, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "connectionId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.RtcOffer
 */
exports.RtcOffer = new RtcOffer$Type();
// @generated message type with reflection information, may provide speed optimized methods
class RtcAnswer$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.RtcAnswer", [
            { no: 1, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "connectionId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.RtcAnswer
 */
exports.RtcAnswer = new RtcAnswer$Type();
// @generated message type with reflection information, may provide speed optimized methods
class IceCandidate$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.IceCandidate", [
            { no: 1, name: "candidate", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "mid", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 3, name: "connectionId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.IceCandidate
 */
exports.IceCandidate = new IceCandidate$Type();
// @generated message type with reflection information, may provide speed optimized methods
class LockRequest$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.LockRequest", [
            { no: 1, name: "lockId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.LockRequest
 */
exports.LockRequest = new LockRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class UnlockRequest$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.UnlockRequest", [
            { no: 1, name: "lockId", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.UnlockRequest
 */
exports.UnlockRequest = new UnlockRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class LockResponse$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.LockResponse", [
            { no: 1, name: "accepted", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.LockResponse
 */
exports.LockResponse = new LockResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DisconnectNotice$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.DisconnectNotice", [
            { no: 1, name: "disconnectMode", kind: "enum", T: () => ["dht.DisconnectMode", DisconnectMode] }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.DisconnectNotice
 */
exports.DisconnectNotice = new DisconnectNotice$Type();
// @generated message type with reflection information, may provide speed optimized methods
class SetPrivateRequest$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.SetPrivateRequest", [
            { no: 1, name: "isPrivate", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.SetPrivateRequest
 */
exports.SetPrivateRequest = new SetPrivateRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExternalFetchDataRequest$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.ExternalFetchDataRequest", [
            { no: 1, name: "key", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.ExternalFetchDataRequest
 */
exports.ExternalFetchDataRequest = new ExternalFetchDataRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExternalFetchDataResponse$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.ExternalFetchDataResponse", [
            { no: 1, name: "entries", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.DataEntry }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.ExternalFetchDataResponse
 */
exports.ExternalFetchDataResponse = new ExternalFetchDataResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExternalFindClosestNodesRequest$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.ExternalFindClosestNodesRequest", [
            { no: 1, name: "nodeId", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.ExternalFindClosestNodesRequest
 */
exports.ExternalFindClosestNodesRequest = new ExternalFindClosestNodesRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExternalFindClosestNodesResponse$Type extends runtime_1.MessageType {
    constructor() {
        super("dht.ExternalFindClosestNodesResponse", [
            { no: 1, name: "closestNodes", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.PeerDescriptor }
        ]);
    }
}
/**
 * @generated MessageType for protobuf message dht.ExternalFindClosestNodesResponse
 */
exports.ExternalFindClosestNodesResponse = new ExternalFindClosestNodesResponse$Type();
/**
 * @generated ServiceType for protobuf service dht.DhtNodeRpc
 */
exports.DhtNodeRpc = new runtime_rpc_1.ServiceType("dht.DhtNodeRpc", [
    { name: "getClosestPeers", options: {}, I: exports.ClosestPeersRequest, O: exports.ClosestPeersResponse },
    { name: "getClosestRingPeers", options: {}, I: exports.ClosestRingPeersRequest, O: exports.ClosestRingPeersResponse },
    { name: "ping", options: {}, I: exports.PingRequest, O: exports.PingResponse },
    { name: "leaveNotice", options: {}, I: exports.LeaveNotice, O: empty_1.Empty }
]);
/**
 * @generated ServiceType for protobuf service dht.RouterRpc
 */
exports.RouterRpc = new runtime_rpc_1.ServiceType("dht.RouterRpc", [
    { name: "routeMessage", options: {}, I: exports.RouteMessageWrapper, O: exports.RouteMessageAck },
    { name: "forwardMessage", options: {}, I: exports.RouteMessageWrapper, O: exports.RouteMessageAck }
]);
/**
 * @generated ServiceType for protobuf service dht.RecursiveOperationRpc
 */
exports.RecursiveOperationRpc = new runtime_rpc_1.ServiceType("dht.RecursiveOperationRpc", [
    { name: "routeRequest", options: {}, I: exports.RouteMessageWrapper, O: exports.RouteMessageAck }
]);
/**
 * @generated ServiceType for protobuf service dht.StoreRpc
 */
exports.StoreRpc = new runtime_rpc_1.ServiceType("dht.StoreRpc", [
    { name: "storeData", options: {}, I: exports.StoreDataRequest, O: exports.StoreDataResponse },
    { name: "replicateData", options: {}, I: exports.ReplicateDataRequest, O: empty_1.Empty }
]);
/**
 * @generated ServiceType for protobuf service dht.RecursiveOperationSessionRpc
 */
exports.RecursiveOperationSessionRpc = new runtime_rpc_1.ServiceType("dht.RecursiveOperationSessionRpc", [
    { name: "sendResponse", options: {}, I: exports.RecursiveOperationResponse, O: empty_1.Empty }
]);
/**
 * @generated ServiceType for protobuf service dht.WebsocketClientConnectorRpc
 */
exports.WebsocketClientConnectorRpc = new runtime_rpc_1.ServiceType("dht.WebsocketClientConnectorRpc", [
    { name: "requestConnection", options: {}, I: exports.WebsocketConnectionRequest, O: empty_1.Empty }
]);
/**
 * @generated ServiceType for protobuf service dht.WebrtcConnectorRpc
 */
exports.WebrtcConnectorRpc = new runtime_rpc_1.ServiceType("dht.WebrtcConnectorRpc", [
    { name: "requestConnection", options: {}, I: exports.WebrtcConnectionRequest, O: empty_1.Empty },
    { name: "rtcOffer", options: {}, I: exports.RtcOffer, O: empty_1.Empty },
    { name: "rtcAnswer", options: {}, I: exports.RtcAnswer, O: empty_1.Empty },
    { name: "iceCandidate", options: {}, I: exports.IceCandidate, O: empty_1.Empty }
]);
/**
 * @generated ServiceType for protobuf service dht.ConnectionLockRpc
 */
exports.ConnectionLockRpc = new runtime_rpc_1.ServiceType("dht.ConnectionLockRpc", [
    { name: "lockRequest", options: {}, I: exports.LockRequest, O: exports.LockResponse },
    { name: "unlockRequest", options: {}, I: exports.UnlockRequest, O: empty_1.Empty },
    { name: "gracefulDisconnect", options: {}, I: exports.DisconnectNotice, O: empty_1.Empty },
    { name: "setPrivate", options: {}, I: exports.SetPrivateRequest, O: empty_1.Empty }
]);
/**
 * @generated ServiceType for protobuf service dht.ExternalApiRpc
 */
exports.ExternalApiRpc = new runtime_rpc_1.ServiceType("dht.ExternalApiRpc", [
    { name: "externalFetchData", options: {}, I: exports.ExternalFetchDataRequest, O: exports.ExternalFetchDataResponse },
    { name: "externalStoreData", options: {}, I: exports.ExternalStoreDataRequest, O: exports.ExternalStoreDataResponse },
    { name: "externalFindClosestNodes", options: {}, I: exports.ExternalFindClosestNodesRequest, O: exports.ExternalFindClosestNodesResponse }
]);
//# sourceMappingURL=DhtRpc.js.map