2021-04-25 19:58:26 -04:00
|
|
|
/*
|
|
|
|
* This file is part of Bisq.
|
|
|
|
*
|
|
|
|
* Bisq is free software: you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU Affero General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or (at
|
|
|
|
* your option) any later version.
|
|
|
|
*
|
|
|
|
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
|
|
|
* License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
syntax = "proto3";
|
|
|
|
package io.bisq.protobuffer;
|
|
|
|
|
|
|
|
import "pb.proto";
|
|
|
|
|
|
|
|
option java_package = "bisq.proto.grpc";
|
|
|
|
option java_multiple_files = true;
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// DisputeAgents
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
service DisputeAgents {
|
|
|
|
rpc RegisterDisputeAgent (RegisterDisputeAgentRequest) returns (RegisterDisputeAgentReply) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message RegisterDisputeAgentRequest {
|
2021-09-15 08:06:50 -04:00
|
|
|
string dispute_agent_type = 1;
|
|
|
|
string registration_key = 2;
|
2021-04-25 19:58:26 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message RegisterDisputeAgentReply {
|
|
|
|
}
|
|
|
|
|
2021-05-05 14:03:43 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Help
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
service Help {
|
|
|
|
rpc GetMethodHelp (GetMethodHelpRequest) returns (GetMethodHelpReply) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetMethodHelpRequest {
|
2021-09-15 08:06:50 -04:00
|
|
|
string method_name = 1;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetMethodHelpReply {
|
2021-09-15 08:06:50 -04:00
|
|
|
string method_help = 1;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
2021-04-25 19:58:26 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Offers
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
service Offers {
|
2021-05-05 14:03:43 -04:00
|
|
|
rpc GetOffer (GetOfferRequest) returns (GetOfferReply) {
|
|
|
|
}
|
|
|
|
rpc GetMyOffer (GetMyOfferRequest) returns (GetMyOfferReply) {
|
|
|
|
}
|
2021-04-25 19:58:26 -04:00
|
|
|
rpc GetOffers (GetOffersRequest) returns (GetOffersReply) {
|
|
|
|
}
|
2021-05-05 14:03:43 -04:00
|
|
|
rpc GetMyOffers (GetMyOffersRequest) returns (GetMyOffersReply) {
|
|
|
|
}
|
2021-04-25 19:58:26 -04:00
|
|
|
rpc CreateOffer (CreateOfferRequest) returns (CreateOfferReply) {
|
|
|
|
}
|
2021-05-05 14:03:43 -04:00
|
|
|
rpc CancelOffer (CancelOfferRequest) returns (CancelOfferReply) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetOfferRequest {
|
|
|
|
string id = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetOfferReply {
|
|
|
|
OfferInfo offer = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetMyOfferRequest {
|
|
|
|
string id = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetMyOfferReply {
|
|
|
|
OfferInfo offer = 1;
|
2021-04-25 19:58:26 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetOffersRequest {
|
|
|
|
string direction = 1;
|
2021-09-15 08:06:50 -04:00
|
|
|
string currency_code = 2;
|
2021-04-25 19:58:26 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetOffersReply {
|
|
|
|
repeated OfferInfo offers = 1;
|
|
|
|
}
|
|
|
|
|
2021-05-05 14:03:43 -04:00
|
|
|
message GetMyOffersRequest {
|
|
|
|
string direction = 1;
|
2021-09-15 08:06:50 -04:00
|
|
|
string currency_code = 2;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetMyOffersReply {
|
|
|
|
repeated OfferInfo offers = 1;
|
|
|
|
}
|
|
|
|
|
2021-04-25 19:58:26 -04:00
|
|
|
message CreateOfferRequest {
|
2021-09-15 08:06:50 -04:00
|
|
|
string currency_code = 1;
|
2021-04-25 19:58:26 -04:00
|
|
|
string direction = 2;
|
|
|
|
string price = 3;
|
2021-09-15 08:06:50 -04:00
|
|
|
bool use_market_based_price = 4;
|
|
|
|
double market_price_margin = 5;
|
2021-09-14 08:27:45 -04:00
|
|
|
uint64 amount = 6 [jstype = JS_STRING];
|
2021-09-15 08:06:50 -04:00
|
|
|
uint64 min_amount = 7 [jstype = JS_STRING];
|
|
|
|
double buyer_security_deposit = 8;
|
|
|
|
uint64 trigger_price = 9 [jstype = JS_STRING];
|
|
|
|
string payment_account_id = 10;
|
2021-04-25 19:58:26 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message CreateOfferReply {
|
|
|
|
OfferInfo offer = 1;
|
|
|
|
}
|
|
|
|
|
2021-05-05 14:03:43 -04:00
|
|
|
message CancelOfferRequest {
|
|
|
|
string id = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CancelOfferReply {
|
|
|
|
}
|
|
|
|
|
2021-04-25 19:58:26 -04:00
|
|
|
message OfferInfo {
|
|
|
|
string id = 1;
|
|
|
|
string direction = 2;
|
|
|
|
uint64 price = 3;
|
2021-09-15 08:06:50 -04:00
|
|
|
bool use_market_based_price = 4;
|
|
|
|
double market_price_margin = 5;
|
2021-04-25 19:58:26 -04:00
|
|
|
uint64 amount = 6;
|
2021-09-15 08:06:50 -04:00
|
|
|
uint64 min_amount = 7;
|
2021-04-25 19:58:26 -04:00
|
|
|
uint64 volume = 8;
|
2021-09-15 08:06:50 -04:00
|
|
|
uint64 min_volume = 9;
|
|
|
|
uint64 buyer_security_deposit = 10;
|
|
|
|
uint64 trigger_price = 11;
|
2021-10-15 13:17:52 -04:00
|
|
|
string payment_account_id = 12;
|
|
|
|
string payment_method_id = 13;
|
|
|
|
string payment_method_short_name = 14;
|
|
|
|
string base_currency_code = 15;
|
|
|
|
string counter_currency_code = 16;
|
|
|
|
uint64 date = 17;
|
|
|
|
string state = 18;
|
|
|
|
uint64 seller_security_deposit = 19;
|
|
|
|
string offer_fee_payment_tx_id = 20;
|
|
|
|
uint64 tx_fee = 21;
|
|
|
|
uint64 maker_fee = 22;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message AvailabilityResultWithDescription {
|
2021-09-15 08:06:50 -04:00
|
|
|
AvailabilityResult availability_result = 1;
|
2021-05-05 14:03:43 -04:00
|
|
|
string description = 2;
|
2021-04-25 19:58:26 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// PaymentAccounts
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
service PaymentAccounts {
|
|
|
|
rpc CreatePaymentAccount (CreatePaymentAccountRequest) returns (CreatePaymentAccountReply) {
|
|
|
|
}
|
|
|
|
rpc GetPaymentAccounts (GetPaymentAccountsRequest) returns (GetPaymentAccountsReply) {
|
|
|
|
}
|
2021-05-05 14:03:43 -04:00
|
|
|
rpc GetPaymentMethods (GetPaymentMethodsRequest) returns (GetPaymentMethodsReply) {
|
|
|
|
}
|
|
|
|
rpc GetPaymentAccountForm (GetPaymentAccountFormRequest) returns (GetPaymentAccountFormReply) {
|
|
|
|
}
|
|
|
|
rpc CreateCryptoCurrencyPaymentAccount (CreateCryptoCurrencyPaymentAccountRequest) returns (CreateCryptoCurrencyPaymentAccountReply) {
|
|
|
|
}
|
|
|
|
rpc GetCryptoCurrencyPaymentMethods (GetCryptoCurrencyPaymentMethodsRequest) returns (GetCryptoCurrencyPaymentMethodsReply) {
|
|
|
|
}
|
2021-04-25 19:58:26 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message CreatePaymentAccountRequest {
|
2021-09-15 08:06:50 -04:00
|
|
|
string payment_account_form = 1;
|
2021-04-25 19:58:26 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message CreatePaymentAccountReply {
|
2021-09-15 08:06:50 -04:00
|
|
|
PaymentAccount payment_account = 1;
|
2021-04-25 19:58:26 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetPaymentAccountsRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetPaymentAccountsReply {
|
2021-09-15 08:06:50 -04:00
|
|
|
repeated PaymentAccount payment_accounts = 1;
|
2021-04-25 19:58:26 -04:00
|
|
|
}
|
|
|
|
|
2021-05-05 14:03:43 -04:00
|
|
|
message GetPaymentMethodsRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetPaymentMethodsReply {
|
2021-09-15 08:06:50 -04:00
|
|
|
repeated PaymentMethod payment_methods = 1;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetPaymentAccountFormRequest {
|
2021-09-15 08:06:50 -04:00
|
|
|
string payment_method_id = 1;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetPaymentAccountFormReply {
|
2021-09-15 08:06:50 -04:00
|
|
|
string payment_account_form_json = 1;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message CreateCryptoCurrencyPaymentAccountRequest {
|
2021-09-15 08:06:50 -04:00
|
|
|
string account_name = 1;
|
|
|
|
string currency_code = 2;
|
2021-05-05 14:03:43 -04:00
|
|
|
string address = 3;
|
2021-09-15 08:06:50 -04:00
|
|
|
bool trade_instant = 4;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message CreateCryptoCurrencyPaymentAccountReply {
|
2021-09-15 08:06:50 -04:00
|
|
|
PaymentAccount payment_account = 1;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetCryptoCurrencyPaymentMethodsRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetCryptoCurrencyPaymentMethodsReply {
|
2021-09-15 08:06:50 -04:00
|
|
|
repeated PaymentMethod payment_methods = 1;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
2021-04-25 19:58:26 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Price
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
service Price {
|
|
|
|
rpc GetMarketPrice (MarketPriceRequest) returns (MarketPriceReply) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message MarketPriceRequest {
|
2021-09-15 08:06:50 -04:00
|
|
|
string currency_code = 1;
|
2021-04-25 19:58:26 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message MarketPriceReply {
|
|
|
|
double price = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// GetTradeStatistics
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
service GetTradeStatistics {
|
|
|
|
rpc GetTradeStatistics (GetTradeStatisticsRequest) returns (GetTradeStatisticsReply) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetTradeStatisticsRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetTradeStatisticsReply {
|
2021-09-15 08:06:50 -04:00
|
|
|
repeated TradeStatistics3 trade_statistics = 1;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Shutdown
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
service ShutdownServer {
|
|
|
|
rpc Stop (StopRequest) returns (StopReply) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message StopRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message StopReply {
|
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Trades
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
service Trades {
|
|
|
|
rpc GetTrade (GetTradeRequest) returns (GetTradeReply) {
|
|
|
|
}
|
|
|
|
rpc TakeOffer (TakeOfferRequest) returns (TakeOfferReply) {
|
|
|
|
}
|
|
|
|
rpc ConfirmPaymentStarted (ConfirmPaymentStartedRequest) returns (ConfirmPaymentStartedReply) {
|
|
|
|
}
|
|
|
|
rpc ConfirmPaymentReceived (ConfirmPaymentReceivedRequest) returns (ConfirmPaymentReceivedReply) {
|
|
|
|
}
|
|
|
|
rpc KeepFunds (KeepFundsRequest) returns (KeepFundsReply) {
|
|
|
|
}
|
|
|
|
rpc WithdrawFunds (WithdrawFundsRequest) returns (WithdrawFundsReply) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message TakeOfferRequest {
|
2021-09-15 08:06:50 -04:00
|
|
|
string offer_id = 1;
|
|
|
|
string payment_account_id = 2;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message TakeOfferReply {
|
|
|
|
TradeInfo trade = 1;
|
2021-09-15 08:06:50 -04:00
|
|
|
AvailabilityResultWithDescription failure_reason = 2;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message ConfirmPaymentStartedRequest {
|
2021-09-15 08:06:50 -04:00
|
|
|
string trade_id = 1;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message ConfirmPaymentStartedReply {
|
|
|
|
}
|
|
|
|
|
|
|
|
message ConfirmPaymentReceivedRequest {
|
2021-09-15 08:06:50 -04:00
|
|
|
string trade_id = 1;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message ConfirmPaymentReceivedReply {
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetTradeRequest {
|
2021-09-15 08:06:50 -04:00
|
|
|
string trade_id = 1;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetTradeReply {
|
|
|
|
TradeInfo trade = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message KeepFundsRequest {
|
2021-09-15 08:06:50 -04:00
|
|
|
string trade_id = 1;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message KeepFundsReply {
|
|
|
|
}
|
|
|
|
|
|
|
|
message WithdrawFundsRequest {
|
2021-09-15 08:06:50 -04:00
|
|
|
string trade_id = 1;
|
2021-05-05 14:03:43 -04:00
|
|
|
string address = 2;
|
|
|
|
string memo = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message WithdrawFundsReply {
|
|
|
|
}
|
|
|
|
|
|
|
|
message TradeInfo {
|
|
|
|
OfferInfo offer = 1;
|
2021-09-15 08:06:50 -04:00
|
|
|
string trade_id = 2;
|
|
|
|
string short_id = 3;
|
2021-05-05 14:03:43 -04:00
|
|
|
uint64 date = 4;
|
|
|
|
string role = 5;
|
2021-09-15 08:06:50 -04:00
|
|
|
uint64 tx_fee_as_long = 7;
|
|
|
|
uint64 taker_fee_as_long = 8;
|
|
|
|
string taker_fee_tx_id = 9;
|
2021-05-05 14:03:43 -04:00
|
|
|
reserved 10; // was depositTxId
|
2021-09-15 08:06:50 -04:00
|
|
|
string payout_tx_id = 11;
|
|
|
|
uint64 trade_amount_as_long = 12;
|
|
|
|
uint64 trade_price = 13;
|
|
|
|
string trading_peer_node_address = 14;
|
2021-05-05 14:03:43 -04:00
|
|
|
string state = 15;
|
|
|
|
string phase = 16;
|
2021-09-15 08:06:50 -04:00
|
|
|
string trade_period_state = 17;
|
|
|
|
bool is_deposit_published = 18;
|
|
|
|
bool is_deposit_confirmed = 19;
|
|
|
|
bool is_fiat_sent = 20;
|
|
|
|
bool is_fiat_received = 21;
|
|
|
|
bool is_payout_published = 22;
|
|
|
|
bool is_withdrawn = 23;
|
|
|
|
string contract_as_json = 24;
|
2021-05-05 14:03:43 -04:00
|
|
|
ContractInfo contract = 25;
|
|
|
|
|
2021-09-15 08:06:50 -04:00
|
|
|
string maker_deposit_tx_id = 100;
|
|
|
|
string taker_deposit_tx_id = 101;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message ContractInfo {
|
2021-09-15 08:06:50 -04:00
|
|
|
string buyer_node_address = 1;
|
|
|
|
string seller_node_address = 2;
|
|
|
|
reserved 3; // was mediator_node_address
|
|
|
|
reserved 4; // was refund_agent_node_address
|
|
|
|
bool is_buyer_maker_and_seller_taker = 5;
|
|
|
|
string maker_account_id = 6;
|
|
|
|
string taker_account_id = 7;
|
|
|
|
PaymentAccountPayloadInfo maker_payment_account_payload = 8;
|
|
|
|
PaymentAccountPayloadInfo taker_payment_account_payload = 9;
|
|
|
|
string maker_payout_address_string = 10;
|
|
|
|
string taker_payout_address_string = 11;
|
|
|
|
uint64 lock_time = 12;
|
2021-05-05 14:03:43 -04:00
|
|
|
|
2021-09-15 08:06:50 -04:00
|
|
|
string arbitrator_node_address = 100;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message PaymentAccountPayloadInfo {
|
|
|
|
string id = 1;
|
2021-09-15 08:06:50 -04:00
|
|
|
string payment_method_id = 2;
|
2021-05-05 14:03:43 -04:00
|
|
|
string address = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Transactions
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
message TxFeeRateInfo {
|
2021-09-15 08:06:50 -04:00
|
|
|
bool use_custom_tx_fee_rate = 1;
|
|
|
|
uint64 custom_tx_fee_rate = 2;
|
|
|
|
uint64 fee_service_rate = 3;
|
|
|
|
uint64 last_fee_service_request_ts = 4;
|
|
|
|
uint64 min_fee_service_rate = 5;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message TxInfo {
|
2021-09-15 08:06:50 -04:00
|
|
|
string tx_id = 1;
|
|
|
|
uint64 input_sum = 2;
|
|
|
|
uint64 output_sum = 3;
|
2021-05-05 14:03:43 -04:00
|
|
|
uint64 fee = 4;
|
|
|
|
int32 size = 5;
|
2021-09-15 08:06:50 -04:00
|
|
|
bool is_pending = 6;
|
2021-05-05 14:03:43 -04:00
|
|
|
string memo = 7;
|
2021-04-25 19:58:26 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Wallets
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
service Wallets {
|
2021-05-05 14:03:43 -04:00
|
|
|
rpc GetBalances (GetBalancesRequest) returns (GetBalancesReply) {
|
2021-04-25 19:58:26 -04:00
|
|
|
}
|
2021-09-19 14:00:22 -04:00
|
|
|
rpc GetNewDepositSubaddress (GetNewDepositSubaddressRequest) returns (GetNewDepositSubaddressReply) {
|
|
|
|
}
|
2021-04-25 19:58:26 -04:00
|
|
|
rpc GetAddressBalance (GetAddressBalanceRequest) returns (GetAddressBalanceReply) {
|
|
|
|
}
|
2021-05-05 14:03:43 -04:00
|
|
|
rpc SendBtc (SendBtcRequest) returns (SendBtcReply) {
|
|
|
|
}
|
|
|
|
rpc GetTxFeeRate (GetTxFeeRateRequest) returns (GetTxFeeRateReply) {
|
|
|
|
}
|
|
|
|
rpc SetTxFeeRatePreference (SetTxFeeRatePreferenceRequest) returns (SetTxFeeRatePreferenceReply) {
|
|
|
|
}
|
|
|
|
rpc UnsetTxFeeRatePreference (UnsetTxFeeRatePreferenceRequest) returns (UnsetTxFeeRatePreferenceReply) {
|
|
|
|
}
|
|
|
|
rpc GetTransaction (GetTransactionRequest) returns (GetTransactionReply) {
|
|
|
|
}
|
2021-04-25 19:58:26 -04:00
|
|
|
rpc GetFundingAddresses (GetFundingAddressesRequest) returns (GetFundingAddressesReply) {
|
|
|
|
}
|
|
|
|
rpc SetWalletPassword (SetWalletPasswordRequest) returns (SetWalletPasswordReply) {
|
|
|
|
}
|
|
|
|
rpc RemoveWalletPassword (RemoveWalletPasswordRequest) returns (RemoveWalletPasswordReply) {
|
|
|
|
}
|
|
|
|
rpc LockWallet (LockWalletRequest) returns (LockWalletReply) {
|
|
|
|
}
|
|
|
|
rpc UnlockWallet (UnlockWalletRequest) returns (UnlockWalletReply) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-05 14:03:43 -04:00
|
|
|
message GetBalancesRequest {
|
2021-09-15 08:06:50 -04:00
|
|
|
string currency_code = 1;
|
2021-04-25 19:58:26 -04:00
|
|
|
}
|
|
|
|
|
2021-05-05 14:03:43 -04:00
|
|
|
message GetBalancesReply {
|
|
|
|
BalancesInfo balances = 1;
|
2021-04-25 19:58:26 -04:00
|
|
|
}
|
|
|
|
|
2021-09-19 14:00:22 -04:00
|
|
|
message GetNewDepositSubaddressRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetNewDepositSubaddressReply {
|
|
|
|
string subaddress = 1;
|
|
|
|
}
|
|
|
|
|
2021-04-25 19:58:26 -04:00
|
|
|
message GetAddressBalanceRequest {
|
|
|
|
string address = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetAddressBalanceReply {
|
2021-09-15 08:06:50 -04:00
|
|
|
AddressBalanceInfo address_balance_info = 1;
|
2021-04-25 19:58:26 -04:00
|
|
|
}
|
|
|
|
|
2021-05-05 14:03:43 -04:00
|
|
|
message SendBtcRequest {
|
|
|
|
string address = 1;
|
|
|
|
string amount = 2;
|
2021-09-15 08:06:50 -04:00
|
|
|
string tx_fee_rate = 3;
|
2021-05-05 14:03:43 -04:00
|
|
|
string memo = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SendBtcReply {
|
2021-09-15 08:06:50 -04:00
|
|
|
TxInfo tx_info = 1;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetTxFeeRateRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetTxFeeRateReply {
|
2021-09-15 08:06:50 -04:00
|
|
|
TxFeeRateInfo tx_fee_rate_info = 1;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message SetTxFeeRatePreferenceRequest {
|
2021-09-15 08:06:50 -04:00
|
|
|
uint64 tx_fee_rate_preference = 1;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message SetTxFeeRatePreferenceReply {
|
2021-09-15 08:06:50 -04:00
|
|
|
TxFeeRateInfo tx_fee_rate_info = 1;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message UnsetTxFeeRatePreferenceRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message UnsetTxFeeRatePreferenceReply {
|
2021-09-15 08:06:50 -04:00
|
|
|
TxFeeRateInfo tx_fee_rate_info = 1;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetTransactionRequest {
|
2021-09-15 08:06:50 -04:00
|
|
|
string tx_id = 1;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetTransactionReply {
|
2021-09-15 08:06:50 -04:00
|
|
|
TxInfo tx_info = 1;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
2021-04-25 19:58:26 -04:00
|
|
|
message GetFundingAddressesRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetFundingAddressesReply {
|
2021-09-15 08:06:50 -04:00
|
|
|
repeated AddressBalanceInfo address_balance_info = 1;
|
2021-04-25 19:58:26 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message SetWalletPasswordRequest {
|
|
|
|
string password = 1;
|
2021-09-15 08:06:50 -04:00
|
|
|
string new_password = 2;
|
2021-04-25 19:58:26 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message SetWalletPasswordReply {
|
|
|
|
}
|
|
|
|
|
|
|
|
message RemoveWalletPasswordRequest {
|
|
|
|
string password = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message RemoveWalletPasswordReply {
|
|
|
|
}
|
|
|
|
|
|
|
|
message LockWalletRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message LockWalletReply {
|
|
|
|
}
|
|
|
|
|
|
|
|
message UnlockWalletRequest {
|
|
|
|
string password = 1;
|
|
|
|
uint64 timeout = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UnlockWalletReply {
|
|
|
|
}
|
|
|
|
|
2021-05-05 14:03:43 -04:00
|
|
|
message BalancesInfo {
|
|
|
|
// Field names are shortened for readability's sake, i.e.,
|
|
|
|
// balancesInfo.getBtc().getAvailableBalance() is cleaner than
|
|
|
|
// balancesInfo.getBtcBalanceInfo().getAvailableBalance().
|
2021-10-15 13:17:52 -04:00
|
|
|
BtcBalanceInfo btc = 1;
|
|
|
|
XmrBalanceInfo xmr = 2;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message BtcBalanceInfo {
|
2021-09-15 08:06:50 -04:00
|
|
|
uint64 available_balance = 1;
|
|
|
|
uint64 reserved_balance = 2;
|
|
|
|
uint64 total_available_balance = 3;
|
|
|
|
uint64 locked_balance = 4;
|
2021-05-05 14:03:43 -04:00
|
|
|
}
|
|
|
|
|
2021-05-09 08:14:25 -04:00
|
|
|
message XmrBalanceInfo {
|
2021-11-19 17:25:49 -05:00
|
|
|
uint64 balance = 1 [jstype = JS_STRING];
|
|
|
|
uint64 unlocked_balance = 2 [jstype = JS_STRING];
|
|
|
|
uint64 locked_balance = 3 [jstype = JS_STRING];
|
|
|
|
uint64 reserved_offer_balance = 4 [jstype = JS_STRING];
|
|
|
|
uint64 reserved_trade_balance = 5 [jstype = JS_STRING];
|
2021-05-09 08:14:25 -04:00
|
|
|
}
|
|
|
|
|
2021-04-25 19:58:26 -04:00
|
|
|
message AddressBalanceInfo {
|
|
|
|
string address = 1;
|
|
|
|
int64 balance = 2;
|
2021-09-15 08:06:50 -04:00
|
|
|
int64 num_confirmations = 3;
|
|
|
|
bool is_address_unused = 4;
|
2021-04-25 19:58:26 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Version
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
service GetVersion {
|
|
|
|
rpc GetVersion (GetVersionRequest) returns (GetVersionReply) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetVersionRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetVersionReply {
|
|
|
|
string version = 1;
|
|
|
|
}
|