syntax = "proto3"; package libp2p; message Libp2pRequest { oneof msg { GeneralRequest GeneralRequest = 1; PubMessage PubMessage = 2; StartUseIpAddressRequest StartUseIpAddressRequest = 3; StopUseIpAddressRequest StopUseIpAddressRequest = 4; CloseRequest CloseRequest = 5; PeersChangedRequest PeersChangedRequest = 6; SubscribeGossipTopicRequest SubscribeGossipTopicRequest = 7; UnsubscribeGossipTopicRequest UnsubscribeGossipTopicRequest = 8; GeneralRequest ReplyRequest = 9; Libp2pInitedRequest Libp2pInitedRequest = 10; ListConnectedPeers ListConnectedPeers = 12; AskForHandshakeRequest AskForHandshakeRequest = 13; HandshakeRequest HandshakeRequest = 14; HandshakeReply HandshakeReply = 15; } } message AskForHandshakeRequest { string sourceConnId = 1; string targetConnId = 2; } message HandshakeRequest { string sourceConnId = 1; string targetConnId = 2; string ciphertext = 3; } message HandshakeReply { string sourceConnId = 1; string targetConnId = 2; bool success = 3; } message GeneralRequest { string sourceConnId = 1; string targetConnId = 2; RuntimeMessage runtimeMessage = 3; uint64 seqNumber = 4; } message PubMessage { string sourceConnId = 1; RuntimeMessage runtimeMessage = 2; Topic topic = 3; } message Topic { string topicName = 1; } message StartUseIpAddressRequest { } message StopUseIpAddressRequest { } message CloseRequest { } message Libp2pInitedRequest {} message ListConnectedPeers {} message PeersChangedRequest { repeated string peers = 1; } message ListPeersRequest {} message ListPeersResponse { repeated string peers = 1; } message RandomPeersRequest { uint32 count = 1; } message RandomoPeersResponse { repeated string peers = 1; bool insufficientPeers = 2; } message RuntimeMessage { RuntimeAddress sourceAddress = 1; RuntimeAddress targetAddress = 2; bytes content = 3; } message RuntimeAddress { bytes targetKey = 1; // if type is actor key is actor id, if type is provider key is provider cap id // if type is actor action is message subject in OP_DELIVER_MESSAGE, if type is provider action is custom // action string about domain soket string targetAction = 3; } message MyConnIdRequest { } message RegisterChannelRequest { string name = 1; } message RegisterChannelResponse { string toLibp2pFile = 1; string fromLibp2pFile = 2; } message ConnectionStateRequest { } message StateMessageRequest { string action = 1; string msgB64 = 2; string uuid = 3; } message SubscribeGossipTopicRequest { string topicName = 1; } message UnsubscribeGossipTopicRequest { string topicName = 2; }