update after removing dao, tests passing

This commit is contained in:
woodser 2021-10-15 13:17:52 -04:00
parent 43edb4d3fa
commit 50d8c3b119
10 changed files with 1442 additions and 24024 deletions

View File

@ -6,7 +6,7 @@ This application is a lightly modified [create-react-app](https://github.com/fac
## Run in a Browser
1. [Run a local Haveno test network](https://github.com/haveno-dex/haveno/blob/master/docs/installing.md) except replace `./haveno-desktop` with `./haveno-daemon` when starting Alice at port 9999.
1. [Run a local Haveno test network](https://github.com/haveno-dex/haveno/blob/master/docs/installing.md), running Alice as a daemon with `make alice-daemon`.
2. `git clone https://github.com/haveno-dex/haveno-ui-poc`
4. Start envoy with the config in ./config/envoy.yaml<br>
Example: `docker run --rm -it -v ~/git/haveno-ui-poc/config/envoy.yaml:/envoy.yaml -p 8080:8080 envoyproxy/envoy-dev:8a2143613d43d17d1eb35a24b4a4a4c432215606 -c /envoy.yaml`
@ -24,14 +24,13 @@ Running the [top-level API tests](./src/HavenoDaemon.test.tsx) is a great way to
[`HavenoDaemon`](./src/HavenoDaemon.tsx) provides the interface to the Haveno daemon's gRPC API.
1. [Run a local Haveno test network](https://github.com/haveno-dex/haveno/blob/master/docs/installing.md) except replace `./haveno-desktop` with `./haveno-daemon` when starting Alice at port 9999 and Bob at port 10000.
1. [Run a local Haveno test network](https://github.com/haveno-dex/haveno/blob/master/docs/installing.md), running Alice and Bob as daemons with `make alice-daemon` and `make bob-daemon`.
2. `git clone https://github.com/haveno-dex/haveno-ui-poc`
4. Start envoy with the test config in ./config/envoy.test.yaml.<br>
Example: `docker run --rm -it -v ~/git/haveno-ui-poc/config/envoy.test.yaml:/envoy.test.yaml -p 8080:8080 -p 8081:8081 envoyproxy/envoy-dev:8a2143613d43d17d1eb35a24b4a4a4c432215606 -c /envoy.test.yaml`
5. `npm install`
6. Modify test config as needed in [HavenoDaemon.test.tsx](./src/HavenoDaemon.test.tsx).
7. `npm test`
8. Run all tests: `a`
## How to Update the Protobuf Client

View File

@ -121,7 +121,6 @@ message CreateOfferRequest {
double buyer_security_deposit = 8;
uint64 trigger_price = 9 [jstype = JS_STRING];
string payment_account_id = 10;
string maker_fee_currency_code = 11;
}
message CreateOfferReply {
@ -147,18 +146,17 @@ message OfferInfo {
uint64 min_volume = 9;
uint64 buyer_security_deposit = 10;
uint64 trigger_price = 11;
bool is_currency_for_maker_fee_btc = 12;
string payment_account_id = 13;
string payment_method_id = 14;
string payment_method_short_name = 15;
string base_currency_code = 16;
string counter_currency_code = 17;
uint64 date = 18;
string state = 19;
uint64 seller_security_deposit = 20;
string offer_fee_payment_tx_id = 21;
uint64 tx_fee = 22;
uint64 maker_fee = 23;
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;
}
message AvailabilityResultWithDescription {
@ -303,7 +301,6 @@ service Trades {
message TakeOfferRequest {
string offer_id = 1;
string payment_account_id = 2;
string taker_fee_currency_code = 3;
}
message TakeOfferReply {
@ -435,14 +432,8 @@ service Wallets {
}
rpc GetAddressBalance (GetAddressBalanceRequest) returns (GetAddressBalanceReply) {
}
rpc GetUnusedBsqAddress (GetUnusedBsqAddressRequest) returns (GetUnusedBsqAddressReply) {
}
rpc SendBsq (SendBsqRequest) returns (SendBsqReply) {
}
rpc SendBtc (SendBtcRequest) returns (SendBtcReply) {
}
rpc VerifyBsqSentToAddress (VerifyBsqSentToAddressRequest) returns (VerifyBsqSentToAddressReply) {
}
rpc GetTxFeeRate (GetTxFeeRateRequest) returns (GetTxFeeRateReply) {
}
rpc SetTxFeeRatePreference (SetTxFeeRatePreferenceRequest) returns (SetTxFeeRatePreferenceReply) {
@ -486,23 +477,6 @@ message GetAddressBalanceReply {
AddressBalanceInfo address_balance_info = 1;
}
message GetUnusedBsqAddressRequest {
}
message GetUnusedBsqAddressReply {
string address = 1;
}
message SendBsqRequest {
string address = 1;
string amount = 2;
string tx_fee_rate = 3;
}
message SendBsqReply {
TxInfo tx_info = 1;
}
message SendBtcRequest {
string address = 1;
string amount = 2;
@ -514,15 +488,6 @@ message SendBtcReply {
TxInfo tx_info = 1;
}
message VerifyBsqSentToAddressRequest {
string address = 1;
string amount = 2;
}
message VerifyBsqSentToAddressReply {
bool is_amount_received = 1;
}
message GetTxFeeRateRequest {
}
@ -593,18 +558,8 @@ message BalancesInfo {
// Field names are shortened for readability's sake, i.e.,
// balancesInfo.getBtc().getAvailableBalance() is cleaner than
// balancesInfo.getBtcBalanceInfo().getAvailableBalance().
BsqBalanceInfo bsq = 1;
BtcBalanceInfo btc = 2;
XmrBalanceInfo xmr = 3;
}
message BsqBalanceInfo {
uint64 available_confirmed_balance = 1;
uint64 unverified_balance = 2;
uint64 unconfirmed_change_balance = 3;
uint64 locked_for_voting_balance = 4;
uint64 lockup_bonds_balance = 5;
uint64 unlocking_bonds_balance = 6;
BtcBalanceInfo btc = 1;
XmrBalanceInfo xmr = 2;
}
message BtcBalanceInfo {

View File

@ -50,37 +50,23 @@ message NetworkEnvelope {
PrivateNotificationMessage private_notification_message = 27;
GetBlocksRequest get_blocks_request = 28;
GetBlocksResponse get_blocks_response = 29;
NewBlockBroadcastMessage new_block_broadcast_message = 30;
AddPersistableNetworkPayloadMessage add_persistable_network_payload_message = 28;
AckMessage ack_message = 29;
AddPersistableNetworkPayloadMessage add_persistable_network_payload_message = 31;
AckMessage ack_message = 32;
RepublishGovernanceDataRequest republish_governance_data_request = 33;
NewDaoStateHashMessage new_dao_state_hash_message = 34;
GetDaoStateHashesRequest get_dao_state_hashes_request = 35;
GetDaoStateHashesResponse get_dao_state_hashes_response = 36;
NewProposalStateHashMessage new_proposal_state_hash_message = 37;
GetProposalStateHashesRequest get_proposal_state_hashes_request = 38;
GetProposalStateHashesResponse get_proposal_state_hashes_response = 39;
NewBlindVoteStateHashMessage new_blind_vote_state_hash_message = 40;
GetBlindVoteStateHashesRequest get_blind_vote_state_hashes_request = 41;
GetBlindVoteStateHashesResponse get_blind_vote_state_hashes_response = 42;
BundleOfEnvelopes bundle_of_envelopes = 30;
MediatedPayoutTxSignatureMessage mediated_payout_tx_signature_message = 31;
MediatedPayoutTxPublishedMessage mediated_payout_tx_published_message = 32;
BundleOfEnvelopes bundle_of_envelopes = 43;
MediatedPayoutTxSignatureMessage mediated_payout_tx_signature_message = 44;
MediatedPayoutTxPublishedMessage mediated_payout_tx_published_message = 45;
DelayedPayoutTxSignatureRequest delayed_payout_tx_signature_request = 33;
DelayedPayoutTxSignatureResponse delayed_payout_tx_signature_response = 34;
DepositTxAndDelayedPayoutTxMessage deposit_tx_and_delayed_payout_tx_message = 35;
PeerPublishedDelayedPayoutTxMessage peer_published_delayed_payout_tx_message = 36;
DelayedPayoutTxSignatureRequest delayed_payout_tx_signature_request = 46;
DelayedPayoutTxSignatureResponse delayed_payout_tx_signature_response = 47;
DepositTxAndDelayedPayoutTxMessage deposit_tx_and_delayed_payout_tx_message = 48;
PeerPublishedDelayedPayoutTxMessage peer_published_delayed_payout_tx_message = 49;
RefreshTradeStateRequest refresh_trade_state_request = 37 [deprecated = true];
TraderSignedWitnessMessage trader_signed_witness_message = 38 [deprecated = true];
RefreshTradeStateRequest refresh_trade_state_request = 50 [deprecated = true];
TraderSignedWitnessMessage trader_signed_witness_message = 51 [deprecated = true];
GetInventoryRequest get_inventory_request = 52;
GetInventoryResponse get_inventory_response = 53;
GetInventoryRequest get_inventory_request = 39;
GetInventoryResponse get_inventory_response = 40;
SignOfferRequest sign_offer_request = 1001;
SignOfferResponse sign_offer_response = 1002;
@ -264,25 +250,24 @@ message InputsForDepositTxRequest {
int64 trade_price = 4;
int64 tx_fee = 5;
int64 taker_fee = 6;
bool is_currency_for_taker_fee_btc = 7;
repeated RawTransactionInput raw_transaction_inputs = 8;
int64 change_output_value = 9;
string change_output_address = 10;
bytes taker_multi_sig_pub_key = 11;
string taker_payout_address_string = 12;
PubKeyRing taker_pub_key_ring = 13;
PaymentAccountPayload taker_payment_account_payload = 14;
string taker_account_id = 15;
string taker_fee_tx_id = 16;
repeated NodeAddress accepted_arbitrator_node_addresses = 17;
repeated NodeAddress accepted_mediator_node_addresses = 18;
NodeAddress arbitrator_node_address = 19;
NodeAddress mediator_node_address = 20;
string uid = 21;
bytes account_age_witness_signature_of_offer_id = 22;
int64 current_date = 23;
repeated NodeAddress accepted_refund_agent_node_addresses = 24;
NodeAddress refund_agent_node_address = 25;
repeated RawTransactionInput raw_transaction_inputs = 7;
int64 change_output_value = 8;
string change_output_address = 9;
bytes taker_multi_sig_pub_key = 10;
string taker_payout_address_string = 11;
PubKeyRing taker_pub_key_ring = 12;
PaymentAccountPayload taker_payment_account_payload = 13;
string taker_account_id = 14;
string taker_fee_tx_id = 15;
repeated NodeAddress accepted_arbitrator_node_addresses = 16;
repeated NodeAddress accepted_mediator_node_addresses = 17;
NodeAddress arbitrator_node_address = 18;
NodeAddress mediator_node_address = 29;
string uid = 20;
bytes account_age_witness_signature_of_offer_id = 21;
int64 current_date = 22;
repeated NodeAddress accepted_refund_agent_node_addresses = 23;
NodeAddress refund_agent_node_address = 24;
}
message InputsForDepositTxResponse {
@ -580,71 +565,6 @@ message PrivateNotificationMessage {
PrivateNotificationPayload private_notification_payload = 3;
}
// DAO
message GetBlocksRequest {
int32 from_block_height = 1;
int32 nonce = 2;
NodeAddress sender_node_address = 3;
repeated int32 supported_capabilities = 4;
}
message GetBlocksResponse {
// Because of the way how PB implements inheritance we need to use the super class as type
repeated BaseBlock raw_blocks = 1;
int32 request_nonce = 2;
}
message NewBlockBroadcastMessage {
// Because of the way how PB implements inheritance we need to use the super class as type
BaseBlock raw_block = 1;
}
message RepublishGovernanceDataRequest {
}
message NewDaoStateHashMessage {
DaoStateHash state_hash = 1;
}
message NewProposalStateHashMessage {
ProposalStateHash state_hash = 1;
}
message NewBlindVoteStateHashMessage {
BlindVoteStateHash state_hash = 1;
}
message GetDaoStateHashesRequest {
int32 height = 1;
int32 nonce = 2;
}
message GetProposalStateHashesRequest {
int32 height = 1;
int32 nonce = 2;
}
message GetBlindVoteStateHashesRequest {
int32 height = 1;
int32 nonce = 2;
}
message GetDaoStateHashesResponse {
repeated DaoStateHash state_hashes = 1;
int32 request_nonce = 2;
}
message GetProposalStateHashesResponse {
repeated ProposalStateHash state_hashes = 1;
int32 request_nonce = 2;
}
message GetBlindVoteStateHashesResponse {
repeated BlindVoteStateHash state_hashes = 1;
int32 request_nonce = 2;
}
///////////////////////////////////////////////////////////////////////////////////////////
// Payload
///////////////////////////////////////////////////////////////////////////////////////////
@ -688,8 +608,7 @@ message StoragePayload {
MailboxStoragePayload mailbox_storage_payload = 6;
OfferPayload offer_payload = 7;
TempProposalPayload temp_proposal_payload = 8;
RefundAgent refund_agent = 9;
RefundAgent refund_agent = 8;
}
}
@ -697,10 +616,8 @@ message PersistableNetworkPayload {
oneof message {
AccountAgeWitness account_age_witness = 1;
TradeStatistics2 trade_statistics2 = 2 [deprecated = true];
ProposalPayload proposal_payload = 3;
BlindVotePayload blind_vote_payload = 4;
SignedWitness signed_witness = 5;
TradeStatistics3 trade_statistics3 = 6;
SignedWitness signed_witness = 3;
TradeStatistics3 trade_statistics3 = 4;
}
}
@ -833,21 +750,19 @@ message Filter {
repeated string price_relay_nodes = 11;
bool prevent_public_btc_network = 12;
repeated string btc_nodes = 13;
bool disable_dao = 14;
string disable_dao_below_version = 15;
string disable_trade_below_version = 16;
repeated string mediators = 17;
repeated string refundAgents = 18;
repeated string bannedSignerPubKeys = 19;
repeated string btc_fee_receiver_addresses = 20;
int64 creation_date = 21;
string signer_pub_key_as_hex = 22;
repeated string bannedPrivilegedDevPubKeys = 23;
bool disable_auto_conf = 24;
repeated string banned_auto_conf_explorers = 25;
repeated string node_addresses_banned_from_network = 26;
bool disable_api = 27;
bool disable_mempool_validation = 28;
string disable_trade_below_version = 14;
repeated string mediators = 15;
repeated string refundAgents = 16;
repeated string bannedSignerPubKeys = 17;
repeated string btc_fee_receiver_addresses = 18;
int64 creation_date = 19;
string signer_pub_key_as_hex = 20;
repeated string bannedPrivilegedDevPubKeys = 21;
bool disable_auto_conf = 22;
repeated string banned_auto_conf_explorers = 23;
repeated string node_addresses_banned_from_network = 24;
bool disable_api = 25;
bool disable_mempool_validation = 26;
}
// Deprecated
@ -882,7 +797,7 @@ message TradeStatistics3 {
reserved 7; // was string refund_agent = 7;
bytes hash = 8;
map<string, string> extra_data = 9;
string arbitrator = 100;
string maker_deposit_tx_id = 101;
string taker_deposit_tx_id = 102;
@ -925,20 +840,19 @@ message OfferPayload {
int64 block_height_at_offer_creation = 21;
int64 tx_fee = 22;
int64 maker_fee = 23;
bool is_currency_for_maker_fee_btc = 24;
int64 buyer_security_deposit = 25;
int64 seller_security_deposit = 26;
int64 max_trade_limit = 27;
int64 max_trade_period = 28;
bool use_auto_close = 29;
bool use_re_open_after_auto_close = 30;
int64 lower_close_price = 31;
int64 upper_close_price = 32;
bool is_private_offer = 33;
string hash_of_challenge = 34;
map<string, string> extra_data = 35;
int32 protocol_version = 36;
int64 buyer_security_deposit = 24;
int64 seller_security_deposit = 25;
int64 max_trade_limit = 26;
int64 max_trade_period = 27;
bool use_auto_close = 28;
bool use_re_open_after_auto_close = 29;
int64 lower_close_price = 30;
int64 upper_close_price = 31;
bool is_private_offer = 32;
string hash_of_challenge = 33;
map<string, string> extra_data = 34;
int32 protocol_version = 35;
NodeAddress arbitrator_node_address = 1001;
string arbitrator_signature = 1002;
repeated string reserve_tx_key_images = 1003;
@ -1392,34 +1306,19 @@ message PersistableEnvelope {
UserPayload user_payload = 10;
PaymentAccountList payment_account_list = 11;
// deprecated
// BsqState bsq_state = 12; // not used but as other non-dao data have a higher index number we leave it to make clear that we cannot change following indexes
AccountAgeWitnessStore account_age_witness_store = 12;
TradeStatistics2Store trade_statistics2_store = 13 [deprecated = true];
AccountAgeWitnessStore account_age_witness_store = 13;
TradeStatistics2Store trade_statistics2_store = 14 [deprecated = true];
// PersistableNetworkPayloadList persistable_network_payload_list = 14; // long deprecated & migration away from it is already done
// PersistableNetworkPayloadList persistable_network_payload_list = 15; // long deprecated & migration away from it is already done
SignedWitnessStore signed_witness_store = 15;
MediationDisputeList mediation_dispute_list = 16;
RefundDisputeList refund_dispute_list = 17;
TradeStatistics3Store trade_statistics3_store = 18;
MailboxMessageList mailbox_message_list = 19;
IgnoredMailboxMap ignored_mailbox_map = 20;
RemovedPayloadsMap removed_payloads_map = 21;
ProposalStore proposal_store = 16;
TempProposalStore temp_proposal_store = 17;
BlindVoteStore blind_vote_store = 18;
MyProposalList my_proposal_list = 19;
BallotList ballot_list = 20;
MyVoteList my_vote_list = 21;
MyBlindVoteList my_blind_vote_list = 22;
// MeritList merit_list = 23; // was not used here, but its class used to implement PersistableEnvelope via its super
DaoStateStore dao_state_store = 24;
MyReputationList my_reputation_list = 25;
MyProofOfBurnList my_proof_of_burn_list = 26;
UnconfirmedBsqChangeOutputList unconfirmed_bsq_change_output_list = 27;
SignedWitnessStore signed_witness_store = 28;
MediationDisputeList mediation_dispute_list = 29;
RefundDisputeList refund_dispute_list = 30;
TradeStatistics3Store trade_statistics3_store = 31;
MailboxMessageList mailbox_message_list = 32;
IgnoredMailboxMap ignored_mailbox_map = 33;
RemovedPayloadsMap removed_payloads_map = 34;
XmrAddressEntryList xmr_address_entry_list = 1001;
SignedOfferList signed_offer_list = 1002;
}
@ -1586,7 +1485,7 @@ message Tradable {
SellerAsMakerTrade seller_as_maker_trade = 4;
SellerAsTakerTrade seller_as_taker_trade = 5;
ArbitratorTrade arbitrator_trade = 6;
SignedOffer signed_offer = 1001;
}
}
@ -1669,34 +1568,33 @@ message Trade {
int64 tx_fee_as_long = 7;
int64 taker_fee_as_long = 8;
int64 take_offer_date = 9;
bool is_currency_for_taker_fee_btc = 10;
int64 trade_price = 11;
State state = 13;
DisputeState dispute_state = 14;
TradePeriodState trade_period_state = 15;
Contract contract = 16;
string contract_as_json = 17;
bytes contract_hash = 18;
NodeAddress arbitrator_node_address = 19;
NodeAddress mediator_node_address = 20;
bytes arbitrator_btc_pub_key = 21;
string taker_payment_account_id = 22;
string error_message = 23;
PubKeyRing arbitrator_pub_key_ring = 24;
PubKeyRing mediator_pub_key_ring = 25;
string counter_currency_tx_id = 26;
repeated ChatMessage chat_message = 27;
MediationResultState mediation_result_state = 28;
int64 lock_time = 29;
bytes delayed_payout_tx_bytes = 30;
NodeAddress refund_agent_node_address = 31;
PubKeyRing refund_agent_pub_key_ring = 32;
RefundResultState refund_result_state = 33;
int64 last_refresh_request_date = 34 [deprecated = true];
string counter_currency_extra_data = 35;
string asset_tx_proof_result = 36; // name of AssetTxProofResult enum
string uid = 37;
int64 trade_price = 10;
State state = 11;
DisputeState dispute_state = 12;
TradePeriodState trade_period_state = 13;
Contract contract = 14;
string contract_as_json = 15;
bytes contract_hash = 16;
NodeAddress arbitrator_node_address = 17;
NodeAddress mediator_node_address = 18;
bytes arbitrator_btc_pub_key = 19;
string taker_payment_account_id = 20;
string error_message = 21;
PubKeyRing arbitrator_pub_key_ring = 22;
PubKeyRing mediator_pub_key_ring = 23;
string counter_currency_tx_id = 24;
repeated ChatMessage chat_message = 25;
MediationResultState mediation_result_state = 26;
int64 lock_time = 27;
bytes delayed_payout_tx_bytes = 28;
NodeAddress refund_agent_node_address = 29;
PubKeyRing refund_agent_pub_key_ring = 30;
RefundResultState refund_result_state = 31;
int64 last_refresh_request_date = 32 [deprecated = true];
string counter_currency_extra_data = 33;
string asset_tx_proof_result = 34; // name of AssetTxProofResult enum
string uid = 35;
NodeAddress maker_node_address = 100; // TODO (woodser): move these into TradingPeer
NodeAddress taker_node_address = 101;
PubKeyRing taker_pub_key_ring = 102;
@ -1744,7 +1642,7 @@ message ProcessModel {
bytes mediated_payout_tx_signature = 18;
int64 buyer_payout_amount_from_mediation = 19;
int64 seller_payout_amount_from_mediation = 20;
string maker_signature = 1001;
NodeAddress arbitrator_node_address = 1002;
TradingPeer maker = 1003;
@ -1779,7 +1677,7 @@ message TradingPeer {
bytes account_age_witness_signature = 16;
int64 current_date = 17;
bytes mediated_payout_tx_signature = 18;
string reserve_tx_hash = 1001;
string reserve_tx_hex = 1002;
string reserve_tx_key = 1003;
@ -1843,61 +1741,57 @@ message PreferencesPayload {
repeated TradeCurrency crypto_currencies = 4;
BlockChainExplorer block_chain_explorer_main_net = 5;
BlockChainExplorer block_chain_explorer_test_net = 6;
BlockChainExplorer bsq_block_chain_explorer = 7;
string backup_directory = 8;
bool auto_select_arbitrators = 9;
map<string, bool> dont_show_again_map = 10;
bool tac_accepted = 11;
bool use_tor_for_bitcoin_j = 12;
bool show_own_offers_in_offer_book = 13;
TradeCurrency preferred_trade_currency = 14;
int64 withdrawal_tx_fee_in_vbytes = 15;
bool use_custom_withdrawal_tx_fee = 16;
double max_price_distance_in_percent = 17;
string offer_book_chart_screen_currency_code = 18;
string trade_charts_screen_currency_code = 19;
string buy_screen_currency_code = 20;
string sell_screen_currency_code = 21;
int32 trade_statistics_tick_unit_index = 22;
bool resync_Spv_requested = 23;
bool sort_market_currencies_numerically = 24;
bool use_percentage_based_price = 25;
map<string, string> peer_tag_map = 26;
string bitcoin_nodes = 27;
repeated string ignore_traders_list = 28;
string directory_chooser_path = 29;
int64 buyer_security_deposit_as_long = 30 [deprecated = true]; // Superseded by buyerSecurityDepositAsPercent
bool use_animations = 31;
PaymentAccount selectedPayment_account_for_createOffer = 32;
bool pay_fee_in_Btc = 33;
repeated string bridge_addresses = 34;
int32 bridge_option_ordinal = 35;
int32 tor_transport_ordinal = 36;
string custom_bridges = 37;
int32 bitcoin_nodes_option_ordinal = 38;
string referral_id = 39;
string phone_key_and_token = 40;
bool use_sound_for_mobile_notifications = 41;
bool use_trade_notifications = 42;
bool use_market_notifications = 43;
bool use_price_notifications = 44;
bool use_standby_mode = 45;
bool is_dao_full_node = 46;
string rpc_user = 47;
string rpc_pw = 48;
string take_offer_selected_payment_account_id = 49;
double buyer_security_deposit_as_percent = 50;
int32 ignore_dust_threshold = 51;
double buyer_security_deposit_as_percent_for_crypto = 52;
int32 block_notify_port = 53;
int32 css_theme = 54;
bool tac_accepted_v120 = 55;
repeated AutoConfirmSettings auto_confirm_settings = 56;
double bsq_average_trim_threshold = 57;
bool hide_non_account_payment_methods = 58;
bool show_offers_matching_my_accounts = 59;
bool deny_api_taker = 60;
bool notify_on_pre_release = 61;
string backup_directory = 7;
bool auto_select_arbitrators = 8;
map<string, bool> dont_show_again_map = 9;
bool tac_accepted = 10;
bool use_tor_for_bitcoin_j = 11;
bool show_own_offers_in_offer_book = 12;
TradeCurrency preferred_trade_currency = 13;
int64 withdrawal_tx_fee_in_vbytes = 14;
bool use_custom_withdrawal_tx_fee = 15;
double max_price_distance_in_percent = 16;
string offer_book_chart_screen_currency_code = 17;
string trade_charts_screen_currency_code = 18;
string buy_screen_currency_code = 19;
string sell_screen_currency_code = 20;
int32 trade_statistics_tick_unit_index = 21;
bool resync_Spv_requested = 22;
bool sort_market_currencies_numerically = 23;
bool use_percentage_based_price = 24;
map<string, string> peer_tag_map = 25;
string bitcoin_nodes = 26;
repeated string ignore_traders_list = 27;
string directory_chooser_path = 28;
int64 buyer_security_deposit_as_long = 29 [deprecated = true]; // Superseded by buyerSecurityDepositAsPercent
bool use_animations = 30;
PaymentAccount selectedPayment_account_for_createOffer = 31;
repeated string bridge_addresses = 32;
int32 bridge_option_ordinal = 33;
int32 tor_transport_ordinal = 34;
string custom_bridges = 35;
int32 bitcoin_nodes_option_ordinal = 36;
string referral_id = 37;
string phone_key_and_token = 38;
bool use_sound_for_mobile_notifications = 39;
bool use_trade_notifications = 40;
bool use_market_notifications = 41;
bool use_price_notifications = 42;
bool use_standby_mode = 43;
string rpc_user = 44;
string rpc_pw = 45;
string take_offer_selected_payment_account_id = 46;
double buyer_security_deposit_as_percent = 47;
int32 ignore_dust_threshold = 48;
double buyer_security_deposit_as_percent_for_crypto = 49;
int32 block_notify_port = 50;
int32 css_theme = 51;
bool tac_accepted_v120 = 52;
repeated AutoConfirmSettings auto_confirm_settings = 53;
bool hide_non_account_payment_methods = 54;
bool show_offers_matching_my_accounts = 55;
bool deny_api_taker = 56;
bool notify_on_pre_release = 57;
}
message AutoConfirmSettings {
@ -1931,426 +1825,6 @@ message UserPayload {
map<string, string> cookie = 16;
}
///////////////////////////////////////////////////////////////////////////////////////////
// DAO
///////////////////////////////////////////////////////////////////////////////////////////
// blockchain
message BaseBlock {
int32 height = 1;
int64 time = 2;
string hash = 3;
string previous_block_hash = 4;
oneof message {
RawBlock raw_block = 5;
Block block = 6;
}
}
message RawBlock {
// Because of the way how PB implements inheritance we need to use the super class as type
repeated BaseTx raw_txs = 1;
}
message Block {
// Because of the way how PB implements inheritance we need to use the super class as type
repeated BaseTx txs = 1;
}
message BaseTx {
string tx_version = 1;
string id = 2;
int32 block_height = 3;
string block_hash = 4;
int64 time = 5;
repeated TxInput tx_inputs = 6;
oneof message {
RawTx raw_tx = 7;
Tx tx = 8;
}
}
message RawTx {
// Because of the way how PB implements inheritance we need to use the super class as type
repeated BaseTxOutput raw_tx_outputs = 1;
}
message Tx {
// Because of the way how PB implements inheritance we need to use the super class as type
repeated BaseTxOutput tx_outputs = 1;
TxType txType = 2;
int64 burnt_bsq = 3;
}
enum TxType {
PB_ERROR_TX_TYPE = 0;
UNDEFINED_TX_TYPE = 1;
UNVERIFIED = 2;
INVALID = 3;
GENESIS = 4;
TRANSFER_BSQ = 5;
PAY_TRADE_FEE = 6;
PROPOSAL = 7;
COMPENSATION_REQUEST = 8;
REIMBURSEMENT_REQUEST = 9;
BLIND_VOTE = 10;
VOTE_REVEAL = 11;
LOCKUP = 12;
UNLOCK = 13;
ASSET_LISTING_FEE = 14;
PROOF_OF_BURN = 15;
IRREGULAR = 16;
}
message TxInput {
string connected_tx_output_tx_id = 1;
int32 connected_tx_output_index = 2;
string pub_key = 3;
}
message BaseTxOutput {
int32 index = 1;
int64 value = 2;
string tx_id = 3;
PubKeyScript pub_key_script = 4;
string address = 5;
bytes op_return_data = 6;
int32 block_height = 7;
oneof message {
RawTxOutput raw_tx_output = 8;
TxOutput tx_output = 9;
}
}
message UnconfirmedTxOutput {
int32 index = 1;
int64 value = 2;
string tx_id = 3;
}
message RawTxOutput {
}
message TxOutput {
TxOutputType tx_output_type = 1;
int32 lock_time = 2;
int32 unlock_block_height = 3;
}
enum TxOutputType {
PB_ERROR_TX_OUTPUT_TYPE = 0;
UNDEFINED_OUTPUT = 1;
GENESIS_OUTPUT = 2;
BSQ_OUTPUT = 3;
BTC_OUTPUT = 4;
PROPOSAL_OP_RETURN_OUTPUT = 5;
COMP_REQ_OP_RETURN_OUTPUT = 6;
REIMBURSEMENT_OP_RETURN_OUTPUT = 7;
CONFISCATE_BOND_OP_RETURN_OUTPUT = 8;
ISSUANCE_CANDIDATE_OUTPUT = 9;
BLIND_VOTE_LOCK_STAKE_OUTPUT = 10;
BLIND_VOTE_OP_RETURN_OUTPUT = 11;
VOTE_REVEAL_UNLOCK_STAKE_OUTPUT = 12;
VOTE_REVEAL_OP_RETURN_OUTPUT = 13;
ASSET_LISTING_FEE_OP_RETURN_OUTPUT = 14;
PROOF_OF_BURN_OP_RETURN_OUTPUT = 15;
LOCKUP_OUTPUT = 16;
LOCKUP_OP_RETURN_OUTPUT = 17;
UNLOCK_OUTPUT = 18;
INVALID_OUTPUT = 19;
}
message SpentInfo {
int64 block_height = 1;
string tx_id = 2;
int32 input_index = 3;
}
enum ScriptType {
PB_ERROR_SCRIPT_TYPES = 0;
PUB_KEY = 1;
PUB_KEY_HASH = 2;
SCRIPT_HASH = 3;
MULTISIG = 4;
NULL_DATA = 5;
WITNESS_V0_KEYHASH = 6;
WITNESS_V0_SCRIPTHASH = 7;
NONSTANDARD = 8;
WITNESS_UNKNOWN = 9;
WITNESS_V1_TAPROOT = 10;
}
message PubKeyScript {
int32 req_sigs = 1;
ScriptType script_type = 2;
repeated string addresses = 3;
string asm = 4;
string hex = 5;
}
// dao data
message DaoPhase {
int32 phase_ordinal = 1;
int32 duration = 2;
}
message Cycle {
int32 height_of_first_lock = 1;
repeated DaoPhase dao_phase = 2;
}
message DaoState {
int32 chain_height = 1;
// Because of the way how PB implements inheritance we need to use the super class as type
repeated BaseBlock blocks = 2;
repeated Cycle cycles = 3;
// Because of the way how PB implements inheritance we need to use the super class as type
map<string, BaseTxOutput> unspent_tx_output_map = 4;
map<string, Issuance> issuance_map = 5;
repeated string confiscated_lockup_tx_list = 6;
map<string, SpentInfo> spent_info_map = 7;
repeated ParamChange param_change_list = 8;
repeated EvaluatedProposal evaluated_proposal_list = 9;
repeated DecryptedBallotsWithMerits decrypted_ballots_with_merits_list = 10;
}
message Issuance {
string tx_id = 1;
int32 chain_height = 2;
int64 amount = 3;
string pub_key = 4;
string issuance_type = 5;
}
message Proposal {
string name = 1;
string link = 2;
uint32 version = 3;
int64 creation_date = 4;
string tx_id = 5;
oneof message {
CompensationProposal compensation_proposal = 6;
ReimbursementProposal reimbursement_proposal = 7;
ChangeParamProposal change_param_proposal = 8;
RoleProposal role_proposal = 9;
ConfiscateBondProposal confiscate_bond_proposal = 10;
GenericProposal generic_proposal = 11;
RemoveAssetProposal remove_asset_proposal = 12;
}
// We leave some index space here in case we add more subclasses
map<string, string> extra_data = 20;
}
message CompensationProposal {
int64 requested_bsq = 1;
string bsq_address = 2;
}
message ReimbursementProposal {
int64 requested_bsq = 1;
string bsq_address = 2;
}
message ChangeParamProposal {
string param = 1; // name of enum
string param_value = 2;
}
message RoleProposal {
Role role = 1;
int64 required_bond_unit = 2;
int32 unlock_time = 3;
}
message ConfiscateBondProposal {
string lockup_tx_id = 1;
}
message GenericProposal {
}
message RemoveAssetProposal {
string ticker_symbol = 1;
}
message Role {
string uid = 1;
string name = 2;
string link = 3;
string bonded_role_type = 4; // name of BondedRoleType enum
}
message MyReputation {
string uid = 1;
bytes salt = 2;
}
message MyReputationList {
repeated MyReputation my_reputation = 1;
}
message MyProofOfBurn {
string tx_id = 1;
string pre_image = 2;
}
message MyProofOfBurnList {
repeated MyProofOfBurn my_proof_of_burn = 1;
}
message UnconfirmedBsqChangeOutputList {
repeated UnconfirmedTxOutput unconfirmed_tx_output = 1;
}
message TempProposalPayload {
Proposal proposal = 1;
bytes owner_pub_key_encoded = 2;
map<string, string> extra_data = 3;
}
message ProposalPayload {
Proposal proposal = 1;
bytes hash = 2;
}
message ProposalStore {
repeated ProposalPayload items = 1;
}
message TempProposalStore {
repeated ProtectedStorageEntry items = 1;
}
message Ballot {
Proposal proposal = 1;
Vote vote = 2;
}
message MyProposalList {
repeated Proposal proposal = 1;
}
message BallotList {
repeated Ballot ballot = 1;
}
message ParamChange {
string param_name = 1;
string param_value = 2;
int32 activation_height = 3;
}
message ConfiscateBond {
string lockup_tx_id = 1;
}
message MyVote {
int32 height = 1;
BallotList ballot_list = 2;
bytes secret_key_encoded = 3;
BlindVote blind_vote = 4;
int64 date = 5;
string reveal_tx_id = 6;
}
message MyVoteList {
repeated MyVote my_vote = 1;
}
message VoteWithProposalTxId {
string proposal_tx_id = 1;
Vote vote = 2;
}
message VoteWithProposalTxIdList {
repeated VoteWithProposalTxId item = 1;
}
message BlindVote {
bytes encrypted_votes = 1;
string tx_id = 2;
int64 stake = 3;
bytes encrypted_merit_list = 4;
int64 date = 5;
map<string, string> extra_data = 6;
}
message MyBlindVoteList {
repeated BlindVote blind_vote = 1;
}
message BlindVoteStore {
repeated BlindVotePayload items = 1;
}
message BlindVotePayload {
BlindVote blind_vote = 1;
bytes hash = 2;
}
message Vote {
bool accepted = 1;
}
message Merit {
Issuance issuance = 1;
bytes signature = 2;
}
message MeritList {
repeated Merit merit = 1;
}
message ProposalVoteResult {
Proposal proposal = 1;
int64 stake_of_Accepted_votes = 2;
int64 stake_of_Rejected_votes = 3;
int32 num_accepted_votes = 4;
int32 num_rejected_votes = 5;
int32 num_ignored_votes = 6;
}
message EvaluatedProposal {
bool is_accepted = 1;
ProposalVoteResult proposal_vote_result = 2;
}
message DecryptedBallotsWithMerits {
bytes hash_of_blind_vote_list = 1;
string blind_vote_tx_id = 2;
string vote_reveal_tx_id = 3;
int64 stake = 4;
BallotList ballot_list = 5;
MeritList merit_list = 6;
}
message DaoStateStore {
DaoState dao_state = 1;
repeated DaoStateHash dao_state_hash = 2;
}
message DaoStateHash {
int32 height = 1;
bytes hash = 2;
bytes prev_hash = 3;
}
message ProposalStateHash {
int32 height = 1;
bytes hash = 2;
bytes prev_hash = 3;
int32 num_proposals = 4;
}
message BlindVoteStateHash {
int32 height = 1;
bytes hash = 2;
bytes prev_hash = 3;
int32 num_blind_votes = 4;
}
///////////////////////////////////////////////////////////////////////////////////////////
// Misc
///////////////////////////////////////////////////////////////////////////////////////////

View File

@ -16,10 +16,9 @@ const havenoVersion = "1.6.2";
const aliceDaemonUrl = "http://localhost:8080";
const aliceDaemonPassword = "apitest";
const alice: HavenoDaemon = new HavenoDaemon(aliceDaemonUrl, aliceDaemonPassword);
const aliceWalletUrl = "http://127.0.0.1:57983"; // alice's internal haveno wallet for direct testing // TODO (woodser): make configurable rather than randomly generated
const aliceWalletUrl = "http://127.0.0.1:56627"; // alice's internal haveno wallet for direct testing // TODO (woodser): make configurable rather than randomly generated
const aliceWalletUsername = "rpc_user";
const aliceWalletPassword = "abc123";
const aliceWalletSyncPeriod = 5000;
let aliceWallet: any;
// bob config
@ -31,7 +30,6 @@ const bob: HavenoDaemon = new HavenoDaemon(bobDaemonUrl, bobDaemonPassword);
const moneroDaemonUrl = "http://localhost:38081"
const moneroDaemonUsername = "superuser";
const moneroDaemonPassword = "abctesting123";
const miningAddress = "59M2dSSmrKiimFavjWQ8zFGWe6ziHr9XUjhHcMVEj9ut4EdkcmcqawfgMrtEERipUJA8iNzU65eaELoFYcor1c4jK4FRj1N";
let monerod: any;
// source funding wallet
@ -41,14 +39,16 @@ const fundingWalletPassword = "abc123";
let fundingWallet: any;
// other test config
const WALLET_SYNC_PERIOD = 5000;
const MAX_TIME_PEER_NOTICE = 3000;
beforeAll(async () => {
// initialize clients of wallet and daemon rpc
aliceWallet = await monerojs.connectToWalletRpc(aliceWalletUrl, aliceWalletUsername, aliceWalletPassword);
fundingWallet = await monerojs.connectToWalletRpc(fundingWalletUrl, fundingWalletUsername, fundingWalletPassword);
// initialize clients of daemon and wallet rpc
monerod = await monerojs.connectToDaemonRpc(moneroDaemonUrl, moneroDaemonUsername, moneroDaemonPassword);
fundingWallet = await monerojs.connectToWalletRpc(fundingWalletUrl, fundingWalletUsername, fundingWalletPassword);
aliceWallet = await monerojs.connectToWalletRpc(aliceWalletUrl, aliceWalletUsername, aliceWalletPassword);
await aliceWallet.startSyncing(WALLET_SYNC_PERIOD);
// debug tools
//for (let offer of await alice.getMyOffers("BUY")) await alice.removeOffer(offer.getId());
@ -93,15 +93,32 @@ test("Can get payment accounts", async () => {
});
test("Can create a crypto payment account", async () => {
const ethAddress = "0xdBdAb835Acd6fC84cF5F9aDD3c0B5a1E25fbd99f";
let ethPaymentAccount: PaymentAccount = await alice.createCryptoPaymentAccount(
"my eth account",
"eth",
"0xdBdAb835Acd6fC84cF5F9aDD3c0B5a1E25fbd99f",
true);
testPaymentAccount(ethPaymentAccount);
expect(ethPaymentAccount.getPaymentAccountPayload()!.getInstantCryptoCurrencyAccountPayload()!.getAddress()).toEqual(ethAddress);
let found = false;
for (let paymentAccount of await alice.getPaymentAccounts()) {
if (paymentAccount.getId() === ethPaymentAccount.getId()) {
found = true;
ethPaymentAccount = paymentAccount;
break;
}
}
if (!found) throw new Error("Payment account not found after being added");
expect(ethPaymentAccount.getAccountName()).toEqual("my eth account");
expect(ethPaymentAccount.getPaymentAccountPayload()!.getInstantCryptoCurrencyAccountPayload()!.getAddress()).toEqual("0xdBdAb835Acd6fC84cF5F9aDD3c0B5a1E25fbd99f");
//expect(ethPaymentAccount.getSelectedTradeCurrency()!.getCode()).toEqual("ETH"); // TODO: selected trade currency missing or interferes with other tests
});
test("Can post and remove an offer", async () => {
// wait for alice and bob to have unlocked balance for trade
let tradeAmount: bigint = BigInt("250000000000");
await waitForUnlockedBalance(tradeAmount, alice, bob);
// get unlocked balance before reserving funds for offer
let unlockedBalanceBefore: bigint = BigInt((await alice.getBalances()).getUnlockedBalance());
@ -121,6 +138,10 @@ test("Can post and remove an offer", async () => {
jest.setTimeout(15000);
test("Invalidates offers when reserved funds are spent", async () => {
// wait for alice and bob to have unlocked balance for trade
let tradeAmount: bigint = BigInt("250000000000");
await waitForUnlockedBalance(tradeAmount, alice, bob);
// get frozen key images before posting offer
let frozenKeyImagesBefore = [];
@ -139,7 +160,7 @@ test("Invalidates offers when reserved funds are spent", async () => {
}
// offer is available to peers
await wait(MAX_TIME_PEER_NOTICE);
await wait(WALLET_SYNC_PERIOD * 2);
if (!getOffer(await bob.getOffers("buy"), offer.getId())) throw new Error("Offer " + offer.getId() + " was not found in peer's offers after posting");
// spend one of offer's reserved outputs
@ -149,7 +170,7 @@ test("Invalidates offers when reserved funds are spent", async () => {
await monerod.submitTxHex(tx.getFullHex(), true);
// wait for spend to be seen
await wait(aliceWalletSyncPeriod * 2); // TODO (woodser): need place for common test utilities
await wait(WALLET_SYNC_PERIOD * 2); // TODO (woodser): need place for common test utilities
// offer is removed from peer offers
if (getOffer(await bob.getOffers("buy"), offer.getId())) throw new Error("Offer " + offer.getId() + " was found in peer's offers after reserved funds spent");
@ -172,22 +193,13 @@ test("Invalidates offers when reserved funds are spent", async () => {
jest.setTimeout(120000);
test("Can complete a trade", async () => {
console.log("Alice balances: " + getBalancesStr(await alice.getBalances()));
// wait for alice and bob to have unlocked balance for trade
let tradeAmount: bigint = BigInt("250000000000");
await waitForUnlockedBalance(tradeAmount, alice, bob);
// alice posts offer to buy xmr
console.log("Alice posting offer");
let offer: OfferInfo = await postOffer();
console.log("Alice done posting offer");
// bob sees offer
await wait(MAX_TIME_PEER_NOTICE);
// get bob's ethereum payment account
let ethPaymentAccount: PaymentAccount | undefined;
console.log("Getting bob's payment accounts");
for (let paymentAccount of await bob.getPaymentAccounts()) {
if (paymentAccount.getSelectedTradeCurrency()?.getCode() === "ETH") {
ethPaymentAccount = paymentAccount;
@ -196,11 +208,20 @@ test("Can complete a trade", async () => {
}
if (!ethPaymentAccount) throw new Error("Bob must have ethereum payment account to take offer");
// alice posts offer to buy xmr
console.log("Alice posting offer");
let offer: OfferInfo = await postOffer();
console.log("Alice done posting offer");
// bob sees offer
await wait(WALLET_SYNC_PERIOD * 2);
if (!getOffer(await bob.getOffers("buy"), offer.getId())) throw new Error("Offer " + offer.getId() + " was not found in peer's offers after posting");
// bob takes offer
let startTime = Date.now();
let bobBalancesBefore: XmrBalanceInfo = await bob.getBalances();
console.log("Bob taking offer");
let trade: TradeInfo = await bob.takeOffer(offer.getId(), ethPaymentAccount.getId()); // TODO (woodser): this returns before trade is fully initialized
let trade: TradeInfo = await bob.takeOffer(offer.getId(), ethPaymentAccount.getId()); // TODO (woodser): this returns before trade is fully initialized. this fails with bad error message if trade is not yet seen by peer
console.log("Bob done taking offer in " + (Date.now() - startTime) + " ms");
// bob can get trade
@ -226,7 +247,7 @@ test("Can complete a trade", async () => {
console.log("Done mining to unlock deposit txs");
// alice notified to send payment
await wait(5000);
await wait(WALLET_SYNC_PERIOD);
// alice indicates payment is sent
await alice.confirmPaymentStarted(trade.getTradeId());
@ -287,7 +308,7 @@ async function postOffer() { // TODO (woodser): postOffer(maker, peer)
// unlocked balance has decreased
let unlockedBalanceAfter: bigint = BigInt((await alice.getBalances()).getUnlockedBalance());
expect(unlockedBalanceAfter).toBeLessThan(unlockedBalanceBefore);
if (unlockedBalanceAfter === unlockedBalanceBefore) throw new Error("unlocked balance did not change after posting offer");
// offer is included in my offers only
if (!getOffer(await alice.getMyOffers("buy"), offer.getId())) throw new Error("Offer " + offer.getId() + " was not found in my offers");
@ -320,7 +341,7 @@ async function wait(durationMs: number) {
async function startMining() {
try {
await monerod.startMining(miningAddress, 1);
await monerod.startMining(await fundingWallet.getPrimaryAddress(), 1);
} catch (err) {
if (err.message !== "Already mining") throw err;
}
@ -346,7 +367,7 @@ async function waitForUnlockedBalance(amount: bigint, ...clients: HavenoDaemon[]
if (!miningNeeded) return;
// wait for funds to unlock
console.log("Mining for unlocked trader balances")
console.log("Mining for unlocked trader balances of " + amount);
await startMining();
let promises: Promise<void>[] = []
for (let client of clients) {

View File

@ -189,8 +189,7 @@ class HavenoDaemon {
.setAmount(amount.toString())
.setMinAmount(minAmount.toString())
.setBuyerSecurityDeposit(buyerSecurityDeposit)
.setPaymentAccountId(paymentAccountId)
.setMakerFeeCurrencyCode("XMR");
.setPaymentAccountId(paymentAccountId);
if (triggerPrice) request.setTriggerPrice(BigInt(triggerPrice.toString()).toString());
return new Promise(function(resolve, reject) {
that._offersClient.createOffer(request, {password: that._password}, function(err: grpcWeb.Error, response: CreateOfferReply) {
@ -226,8 +225,7 @@ class HavenoDaemon {
let that = this;
let request = new TakeOfferRequest()
.setOfferId(offerId)
.setPaymentAccountId(paymentAccountId)
.setTakerFeeCurrencyCode("XMR");
.setPaymentAccountId(paymentAccountId);
return new Promise(function(resolve, reject) {
that._tradesClient.takeOffer(request, {password: that._password}, function(err: grpcWeb.Error, response: TakeOfferReply) {
if (err) reject(err);

File diff suppressed because it is too large Load Diff

View File

@ -266,9 +266,6 @@ export class CreateOfferRequest extends jspb.Message {
getPaymentAccountId(): string;
setPaymentAccountId(value: string): CreateOfferRequest;
getMakerFeeCurrencyCode(): string;
setMakerFeeCurrencyCode(value: string): CreateOfferRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): CreateOfferRequest.AsObject;
static toObject(includeInstance: boolean, msg: CreateOfferRequest): CreateOfferRequest.AsObject;
@ -289,7 +286,6 @@ export namespace CreateOfferRequest {
buyerSecurityDeposit: number,
triggerPrice: string,
paymentAccountId: string,
makerFeeCurrencyCode: string,
}
}
@ -379,9 +375,6 @@ export class OfferInfo extends jspb.Message {
getTriggerPrice(): number;
setTriggerPrice(value: number): OfferInfo;
getIsCurrencyForMakerFeeBtc(): boolean;
setIsCurrencyForMakerFeeBtc(value: boolean): OfferInfo;
getPaymentAccountId(): string;
setPaymentAccountId(value: string): OfferInfo;
@ -436,7 +429,6 @@ export namespace OfferInfo {
minVolume: number,
buyerSecurityDeposit: number,
triggerPrice: number,
isCurrencyForMakerFeeBtc: boolean,
paymentAccountId: string,
paymentMethodId: string,
paymentMethodShortName: string,
@ -804,9 +796,6 @@ export class TakeOfferRequest extends jspb.Message {
getPaymentAccountId(): string;
setPaymentAccountId(value: string): TakeOfferRequest;
getTakerFeeCurrencyCode(): string;
setTakerFeeCurrencyCode(value: string): TakeOfferRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): TakeOfferRequest.AsObject;
static toObject(includeInstance: boolean, msg: TakeOfferRequest): TakeOfferRequest.AsObject;
@ -819,7 +808,6 @@ export namespace TakeOfferRequest {
export type AsObject = {
offerId: string,
paymentAccountId: string,
takerFeeCurrencyCode: string,
}
}
@ -1413,84 +1401,6 @@ export namespace GetAddressBalanceReply {
}
}
export class GetUnusedBsqAddressRequest extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GetUnusedBsqAddressRequest.AsObject;
static toObject(includeInstance: boolean, msg: GetUnusedBsqAddressRequest): GetUnusedBsqAddressRequest.AsObject;
static serializeBinaryToWriter(message: GetUnusedBsqAddressRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetUnusedBsqAddressRequest;
static deserializeBinaryFromReader(message: GetUnusedBsqAddressRequest, reader: jspb.BinaryReader): GetUnusedBsqAddressRequest;
}
export namespace GetUnusedBsqAddressRequest {
export type AsObject = {
}
}
export class GetUnusedBsqAddressReply extends jspb.Message {
getAddress(): string;
setAddress(value: string): GetUnusedBsqAddressReply;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GetUnusedBsqAddressReply.AsObject;
static toObject(includeInstance: boolean, msg: GetUnusedBsqAddressReply): GetUnusedBsqAddressReply.AsObject;
static serializeBinaryToWriter(message: GetUnusedBsqAddressReply, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetUnusedBsqAddressReply;
static deserializeBinaryFromReader(message: GetUnusedBsqAddressReply, reader: jspb.BinaryReader): GetUnusedBsqAddressReply;
}
export namespace GetUnusedBsqAddressReply {
export type AsObject = {
address: string,
}
}
export class SendBsqRequest extends jspb.Message {
getAddress(): string;
setAddress(value: string): SendBsqRequest;
getAmount(): string;
setAmount(value: string): SendBsqRequest;
getTxFeeRate(): string;
setTxFeeRate(value: string): SendBsqRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SendBsqRequest.AsObject;
static toObject(includeInstance: boolean, msg: SendBsqRequest): SendBsqRequest.AsObject;
static serializeBinaryToWriter(message: SendBsqRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SendBsqRequest;
static deserializeBinaryFromReader(message: SendBsqRequest, reader: jspb.BinaryReader): SendBsqRequest;
}
export namespace SendBsqRequest {
export type AsObject = {
address: string,
amount: string,
txFeeRate: string,
}
}
export class SendBsqReply extends jspb.Message {
getTxInfo(): TxInfo | undefined;
setTxInfo(value?: TxInfo): SendBsqReply;
hasTxInfo(): boolean;
clearTxInfo(): SendBsqReply;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SendBsqReply.AsObject;
static toObject(includeInstance: boolean, msg: SendBsqReply): SendBsqReply.AsObject;
static serializeBinaryToWriter(message: SendBsqReply, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SendBsqReply;
static deserializeBinaryFromReader(message: SendBsqReply, reader: jspb.BinaryReader): SendBsqReply;
}
export namespace SendBsqReply {
export type AsObject = {
txInfo?: TxInfo.AsObject,
}
}
export class SendBtcRequest extends jspb.Message {
getAddress(): string;
setAddress(value: string): SendBtcRequest;
@ -1541,46 +1451,6 @@ export namespace SendBtcReply {
}
}
export class VerifyBsqSentToAddressRequest extends jspb.Message {
getAddress(): string;
setAddress(value: string): VerifyBsqSentToAddressRequest;
getAmount(): string;
setAmount(value: string): VerifyBsqSentToAddressRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): VerifyBsqSentToAddressRequest.AsObject;
static toObject(includeInstance: boolean, msg: VerifyBsqSentToAddressRequest): VerifyBsqSentToAddressRequest.AsObject;
static serializeBinaryToWriter(message: VerifyBsqSentToAddressRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): VerifyBsqSentToAddressRequest;
static deserializeBinaryFromReader(message: VerifyBsqSentToAddressRequest, reader: jspb.BinaryReader): VerifyBsqSentToAddressRequest;
}
export namespace VerifyBsqSentToAddressRequest {
export type AsObject = {
address: string,
amount: string,
}
}
export class VerifyBsqSentToAddressReply extends jspb.Message {
getIsAmountReceived(): boolean;
setIsAmountReceived(value: boolean): VerifyBsqSentToAddressReply;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): VerifyBsqSentToAddressReply.AsObject;
static toObject(includeInstance: boolean, msg: VerifyBsqSentToAddressReply): VerifyBsqSentToAddressReply.AsObject;
static serializeBinaryToWriter(message: VerifyBsqSentToAddressReply, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): VerifyBsqSentToAddressReply;
static deserializeBinaryFromReader(message: VerifyBsqSentToAddressReply, reader: jspb.BinaryReader): VerifyBsqSentToAddressReply;
}
export namespace VerifyBsqSentToAddressReply {
export type AsObject = {
isAmountReceived: boolean,
}
}
export class GetTxFeeRateRequest extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GetTxFeeRateRequest.AsObject;
@ -1892,11 +1762,6 @@ export namespace UnlockWalletReply {
}
export class BalancesInfo extends jspb.Message {
getBsq(): BsqBalanceInfo | undefined;
setBsq(value?: BsqBalanceInfo): BalancesInfo;
hasBsq(): boolean;
clearBsq(): BalancesInfo;
getBtc(): BtcBalanceInfo | undefined;
setBtc(value?: BtcBalanceInfo): BalancesInfo;
hasBtc(): boolean;
@ -1917,50 +1782,11 @@ export class BalancesInfo extends jspb.Message {
export namespace BalancesInfo {
export type AsObject = {
bsq?: BsqBalanceInfo.AsObject,
btc?: BtcBalanceInfo.AsObject,
xmr?: XmrBalanceInfo.AsObject,
}
}
export class BsqBalanceInfo extends jspb.Message {
getAvailableConfirmedBalance(): number;
setAvailableConfirmedBalance(value: number): BsqBalanceInfo;
getUnverifiedBalance(): number;
setUnverifiedBalance(value: number): BsqBalanceInfo;
getUnconfirmedChangeBalance(): number;
setUnconfirmedChangeBalance(value: number): BsqBalanceInfo;
getLockedForVotingBalance(): number;
setLockedForVotingBalance(value: number): BsqBalanceInfo;
getLockupBondsBalance(): number;
setLockupBondsBalance(value: number): BsqBalanceInfo;
getUnlockingBondsBalance(): number;
setUnlockingBondsBalance(value: number): BsqBalanceInfo;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): BsqBalanceInfo.AsObject;
static toObject(includeInstance: boolean, msg: BsqBalanceInfo): BsqBalanceInfo.AsObject;
static serializeBinaryToWriter(message: BsqBalanceInfo, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): BsqBalanceInfo;
static deserializeBinaryFromReader(message: BsqBalanceInfo, reader: jspb.BinaryReader): BsqBalanceInfo;
}
export namespace BsqBalanceInfo {
export type AsObject = {
availableConfirmedBalance: number,
unverifiedBalance: number,
unconfirmedChangeBalance: number,
lockedForVotingBalance: number,
lockupBondsBalance: number,
unlockingBondsBalance: number,
}
}
export class BtcBalanceInfo extends jspb.Message {
getAvailableBalance(): number;
setAvailableBalance(value: number): BtcBalanceInfo;

File diff suppressed because it is too large Load Diff

2276
src/protobuf/pb_pb.d.ts vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff