mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-15 09:55:56 -04:00
Add monero connections manager
This commit is contained in:
parent
ed13047bf6
commit
a3586fdef8
18 changed files with 1230 additions and 33 deletions
|
@ -532,7 +532,7 @@ message GetNewDepositSubaddressRequest {
|
|||
}
|
||||
|
||||
message GetNewDepositSubaddressReply {
|
||||
string subaddress = 1;
|
||||
string subaddress = 1;
|
||||
}
|
||||
|
||||
message GetXmrTxsRequest {
|
||||
|
@ -705,6 +705,120 @@ message AddressBalanceInfo {
|
|||
bool is_address_unused = 4;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// MoneroConnections
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
service MoneroConnections {
|
||||
rpc AddConnection (AddConnectionRequest) returns (AddConnectionReply) {
|
||||
}
|
||||
rpc RemoveConnection(RemoveConnectionRequest) returns (RemoveConnectionReply) {
|
||||
}
|
||||
rpc GetConnection(GetConnectionRequest) returns (GetConnectionReply) {
|
||||
}
|
||||
rpc GetConnections(GetConnectionsRequest) returns (GetConnectionsReply) {
|
||||
}
|
||||
rpc SetConnection(SetConnectionRequest) returns (SetConnectionReply) {
|
||||
}
|
||||
rpc CheckConnection(CheckConnectionRequest) returns (CheckConnectionReply) {
|
||||
}
|
||||
rpc CheckConnections(CheckConnectionsRequest) returns (CheckConnectionsReply) {
|
||||
}
|
||||
rpc StartCheckingConnections(StartCheckingConnectionsRequest) returns (StartCheckingConnectionsReply) {
|
||||
}
|
||||
rpc StopCheckingConnections(StopCheckingConnectionsRequest) returns (StopCheckingConnectionsReply) {
|
||||
}
|
||||
rpc GetBestAvailableConnection(GetBestAvailableConnectionRequest) returns (GetBestAvailableConnectionReply) {
|
||||
}
|
||||
rpc SetAutoSwitch(SetAutoSwitchRequest) returns (SetAutoSwitchReply) {
|
||||
}
|
||||
}
|
||||
|
||||
message UriConnection {
|
||||
enum OnlineStatus {
|
||||
UNKNOWN = 0;
|
||||
ONLINE = 1;
|
||||
OFFLINE = 2;
|
||||
}
|
||||
enum AuthenticationStatus {
|
||||
NO_AUTHENTICATION = 0;
|
||||
AUTHENTICATED = 1;
|
||||
NOT_AUTHENTICATED = 2;
|
||||
}
|
||||
|
||||
string uri = 1;
|
||||
string username = 2; // request only
|
||||
string password = 3; // request only
|
||||
int32 priority = 4;
|
||||
OnlineStatus online_status = 5; // reply only
|
||||
AuthenticationStatus authentication_status = 6; // reply only
|
||||
}
|
||||
|
||||
message AddConnectionRequest {
|
||||
UriConnection connection = 1;
|
||||
}
|
||||
|
||||
message AddConnectionReply {}
|
||||
|
||||
message RemoveConnectionRequest {
|
||||
string uri = 1;
|
||||
}
|
||||
|
||||
message RemoveConnectionReply {}
|
||||
|
||||
message GetConnectionRequest {}
|
||||
|
||||
message GetConnectionReply {
|
||||
UriConnection connection = 1;
|
||||
}
|
||||
|
||||
message GetConnectionsRequest {}
|
||||
|
||||
message GetConnectionsReply {
|
||||
repeated UriConnection connections = 1;
|
||||
}
|
||||
|
||||
message SetConnectionRequest {
|
||||
string uri = 1;
|
||||
UriConnection connection = 2;
|
||||
}
|
||||
|
||||
message SetConnectionReply {}
|
||||
|
||||
message CheckConnectionRequest {}
|
||||
|
||||
message CheckConnectionReply {
|
||||
UriConnection connection = 1;
|
||||
}
|
||||
|
||||
message CheckConnectionsRequest {}
|
||||
|
||||
message CheckConnectionsReply {
|
||||
repeated UriConnection connections = 1;
|
||||
}
|
||||
|
||||
message StartCheckingConnectionsRequest {
|
||||
int32 refresh_period = 1; // milliseconds
|
||||
}
|
||||
|
||||
message StartCheckingConnectionsReply {}
|
||||
|
||||
message StopCheckingConnectionsRequest {}
|
||||
|
||||
message StopCheckingConnectionsReply {}
|
||||
|
||||
message GetBestAvailableConnectionRequest {}
|
||||
|
||||
message GetBestAvailableConnectionReply {
|
||||
UriConnection connection = 1;
|
||||
}
|
||||
|
||||
message SetAutoSwitchRequest {
|
||||
bool auto_switch = 1;
|
||||
}
|
||||
|
||||
message SetAutoSwitchReply {}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Version
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -1321,6 +1321,7 @@ message PersistableEnvelope {
|
|||
|
||||
XmrAddressEntryList xmr_address_entry_list = 1001;
|
||||
SignedOfferList signed_offer_list = 1002;
|
||||
EncryptedConnectionList encrypted_connection_list = 1003;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1690,6 +1691,26 @@ message TradingPeer {
|
|||
string deposit_tx_key = 1010;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Connections
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
message EncryptedConnection {
|
||||
string uri = 1;
|
||||
string username = 2;
|
||||
bytes encrypted_password = 3;
|
||||
bytes encryption_salt = 4;
|
||||
int32 priority = 5;
|
||||
}
|
||||
|
||||
message EncryptedConnectionList {
|
||||
bytes salt = 1;
|
||||
repeated EncryptedConnection items = 2;
|
||||
string current_connection_uri = 3;
|
||||
int64 refresh_period = 4; // negative: no automated refresh is activated, zero: automated refresh with default period, positive: automated refresh with configured period (value)
|
||||
bool auto_switch = 5;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Dispute
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue