add HavenoDaemon api class and jest tests supporting version and balances (#8)

This commit is contained in:
woodser 2021-09-12 09:39:21 -04:00 committed by GitHub
parent 56975a6022
commit bea11ab1f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 6316 additions and 2834 deletions

View File

@ -21,4 +21,5 @@ This application is a basic [create-react-app](https://github.com/facebook/creat
## How to Update the Protobuf Client
1. Copy grpc.proto and pb.proto from Haveno's [protobuf definitions](https://github.com/haveno-dex/haveno/tree/master/proto/src/main/proto) to ./config.
2. Install protobuf for your system, e.g. on mac: `brew install protobuf`
2. `./bin/build_protobuf.sh`

View File

@ -606,11 +606,10 @@ message BtcBalanceInfo {
}
message XmrBalanceInfo {
uint64 balance = 1;
uint64 availableBalance = 2;
uint64 lockedBalance = 3;
uint64 reservedBalance = 4;
uint64 totalBalance = 5; // balance + reserved
uint64 unlockedBalance = 1;
uint64 lockedBalance = 2;
uint64 reservedOfferBalance = 3;
uint64 reservedTradeBalance = 4;
}
message AddressBalanceInfo {

View File

@ -82,14 +82,19 @@ message NetworkEnvelope {
GetInventoryRequest get_inventory_request = 52;
GetInventoryResponse get_inventory_response = 53;
InitTradeRequest init_trade_request = 1001;
MakerReadyToFundMultisigRequest maker_ready_to_fund_multisig_request = 1002;
MakerReadyToFundMultisigResponse maker_ready_to_fund_multisig_response = 1003;
InitMultisigMessage init_multisig_message = 1004;
UpdateMultisigRequest update_multisig_request = 1005;
UpdateMultisigResponse update_multisig_response = 1006;
ArbitratorPayoutTxRequest arbitrator_payout_tx_request = 1007;
ArbitratorPayoutTxResponse arbitrator_payout_tx_response = 1008;
SignOfferRequest sign_offer_request = 1001;
SignOfferResponse sign_offer_response = 1002;
InitTradeRequest init_trade_request = 1003;
InitMultisigRequest init_multisig_request = 1004;
SignContractRequest sign_contract_request = 1005;
SignContractResponse sign_contract_response = 1006;
DepositRequest deposit_request = 1007;
DepositResponse deposit_response = 1008;
PaymentAccountPayloadRequest payment_account_payload_request = 1009;
UpdateMultisigRequest update_multisig_request = 1010;
UpdateMultisigResponse update_multisig_response = 1011;
ArbitratorPayoutTxRequest arbitrator_payout_tx_request = 1012;
ArbitratorPayoutTxResponse arbitrator_payout_tx_response = 1013;
}
}
@ -161,6 +166,26 @@ message GetInventoryResponse {
// offer
message SignOfferRequest {
string offer_id = 1;
NodeAddress sender_node_address = 2;
PubKeyRing pub_key_ring = 3;
string sender_account_id = 4;
OfferPayload offer_payload = 5;
string uid = 6;
int64 current_date = 7;
string reserve_tx_hash = 8;
string reserve_tx_hex = 9;
string reserve_tx_key = 10;
string payout_address = 11;
}
message SignOfferResponse {
string offer_id = 1;
string uid = 2;
OfferPayload signed_offer_payload = 3;
}
message OfferAvailabilityRequest {
string offer_id = 1;
PubKeyRing pub_key_ring = 2;
@ -168,6 +193,7 @@ message OfferAvailabilityRequest {
repeated int32 supported_capabilities = 4;
string uid = 5;
bool is_taker_api_user = 6;
InitTradeRequest trade_request = 7;
}
message OfferAvailabilityResponse {
@ -175,9 +201,8 @@ message OfferAvailabilityResponse {
AvailabilityResult availability_result = 2;
repeated int32 supported_capabilities = 3;
string uid = 4;
NodeAddress arbitrator = 5;
NodeAddress mediator = 6;
NodeAddress refund_agent = 7;
string maker_signature = 5;
NodeAddress arbitrator_node_address = 6;
}
message RefreshOfferMessage {
@ -282,40 +307,24 @@ message InitTradeRequest {
PubKeyRing pub_key_ring = 3;
int64 trade_amount = 4;
int64 trade_price = 5;
int64 tx_fee = 6;
int64 trade_fee = 7;
string payout_address_string = 8;
PaymentAccountPayload payment_account_payload = 9;
string account_id = 10;
string trade_fee_tx_id = 11;
string uid = 12;
bytes account_age_witness_signature_of_offer_id = 13;
int64 current_date = 14;
NodeAddress maker_node_address = 15;
NodeAddress taker_node_address = 16;
NodeAddress arbitrator_node_address = 17;
int64 trade_fee = 6;
string account_id = 7;
string payment_account_id = 8;
string payment_method_id = 9;
string uid = 10;
bytes account_age_witness_signature_of_offer_id = 11;
int64 current_date = 12;
NodeAddress maker_node_address = 13;
NodeAddress taker_node_address = 14;
NodeAddress arbitrator_node_address = 15;
string reserve_tx_hash = 16;
string reserve_tx_hex = 17;
string reserve_tx_key = 18;
string payout_address = 19;
string maker_signature = 20;
}
message MakerReadyToFundMultisigRequest {
string trade_id = 1;
NodeAddress sender_node_address = 2;
PubKeyRing pub_key_ring = 3;
string uid = 4;
}
message MakerReadyToFundMultisigResponse {
string trade_id = 1;
string uid = 2;
bool is_maker_ready_to_fund_multisig = 3;
string maker_contract_as_json = 4;
string maker_contract_signature = 5;
string maker_payout_address_string = 6;
PaymentAccountPayload maker_payment_account_payload = 7;
string maker_account_id = 8;
int64 current_date = 9;
}
message InitMultisigMessage {
message InitMultisigRequest {
string trade_id = 1;
NodeAddress sender_node_address = 2;
PubKeyRing pub_key_ring = 3;
@ -325,6 +334,55 @@ message InitMultisigMessage {
string made_multisig_hex = 7;
}
message SignContractRequest {
string trade_id = 1;
NodeAddress sender_node_address = 2;
PubKeyRing pub_key_ring = 3;
string uid = 4;
int64 current_date = 5;
string account_id = 6;
bytes payment_account_payload_hash = 7;
string payout_address = 8;;
string deposit_tx_hash = 9;
}
message SignContractResponse {
string trade_id = 1;
NodeAddress sender_node_address = 2;
PubKeyRing pub_key_ring = 3;
string uid = 4;
int64 current_date = 5;
string contract_signature = 6;
}
message DepositRequest {
string trade_id = 1;
NodeAddress sender_node_address = 2;
PubKeyRing pub_key_ring = 3;
string uid = 4;
int64 current_date = 5;
string contract_signature = 6;
string deposit_tx_hex = 7;
string deposit_tx_key = 8;
}
message DepositResponse {
string trade_id = 1;
NodeAddress sender_node_address = 2;
PubKeyRing pub_key_ring = 3;
string uid = 4;
int64 current_date = 5;
}
message PaymentAccountPayloadRequest {
string trade_id = 1;
NodeAddress sender_node_address = 2;
PubKeyRing pub_key_ring = 3;
string uid = 4;
int64 current_date = 5;
PaymentAccountPayload payment_account_payload = 6;
}
message UpdateMultisigRequest {
string trade_id = 1;
NodeAddress sender_node_address = 2;
@ -855,32 +913,33 @@ message OfferPayload {
int64 min_amount = 10;
string base_currency_code = 11;
string counter_currency_code = 12;
repeated NodeAddress arbitrator_node_addresses = 13 [deprecated = true]; // not used anymore but still required as old clients check for nonNull
repeated NodeAddress mediator_node_addresses = 14 [deprecated = true]; // not used anymore but still required as old clients check for nonNull
string payment_method_id = 15;
string maker_payment_account_id = 16;
string offer_fee_payment_tx_id = 17;
string country_code = 18;
repeated string accepted_country_codes = 19;
string bank_id = 20;
repeated string accepted_bank_ids = 21;
string version_nr = 22;
int64 block_height_at_offer_creation = 23;
int64 tx_fee = 24;
int64 maker_fee = 25;
bool is_currency_for_maker_fee_btc = 26;
int64 buyer_security_deposit = 27;
int64 seller_security_deposit = 28;
int64 max_trade_limit = 29;
int64 max_trade_period = 30;
bool use_auto_close = 31;
bool use_re_open_after_auto_close = 32;
int64 lower_close_price = 33;
int64 upper_close_price = 34;
bool is_private_offer = 35;
string hash_of_challenge = 36;
map<string, string> extra_data = 37;
int32 protocol_version = 38;
string payment_method_id = 13;
string maker_payment_account_id = 14;
string offer_fee_payment_tx_id = 15;
string country_code = 16;
repeated string accepted_country_codes = 17;
string bank_id = 18;
repeated string accepted_bank_ids = 19;
string version_nr = 20;
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;
NodeAddress arbitrator_node_address = 1001;
string arbitrator_signature = 1002;
}
message AccountAgeWitness {
@ -920,34 +979,36 @@ message Dispute {
string trade_id = 1;
string id = 2;
int32 trader_id = 3;
bool dispute_opener_is_buyer = 4;
bool dispute_opener_is_maker = 5;
int64 opening_date = 6;
PubKeyRing trader_pub_key_ring = 7;
int64 trade_date = 8;
Contract contract = 9;
bytes contract_hash = 10;
bytes deposit_tx_serialized = 11;
bytes payout_tx_serialized = 12;
string deposit_tx_id = 13;
string payout_tx_id = 14;
string contract_as_json = 15;
string maker_contract_signature = 16;
string taker_contract_signature = 17;
PubKeyRing agent_pub_key_ring = 18;
bool is_support_ticket = 19;
repeated ChatMessage chat_message = 20;
bool is_closed = 21;
DisputeResult dispute_result = 22;
string dispute_payout_tx_id = 23;
SupportType support_type = 24;
string mediators_dispute_result = 25;
string delayed_payout_tx_id = 26;
string donation_address_of_delayed_payout_tx = 27;
State state = 28;
int64 trade_period_end = 29;
map<string, string> extra_data = 30;
bool is_opener = 100;
bool is_opener = 4;
bool dispute_opener_is_buyer = 5;
bool dispute_opener_is_maker = 6;
int64 opening_date = 7;
PubKeyRing trader_pub_key_ring = 8;
int64 trade_date = 9;
Contract contract = 10;
bytes contract_hash = 11;
bytes deposit_tx_serialized = 12;
bytes payout_tx_serialized = 13;
string deposit_tx_id = 14;
string payout_tx_id = 15;
string contract_as_json = 16;
string maker_contract_signature = 17;
string taker_contract_signature = 18;
PaymentAccountPayload maker_payment_account_payload = 19;
PaymentAccountPayload taker_payment_account_payload = 20;
PubKeyRing agent_pub_key_ring = 21;
bool is_support_ticket = 22;
repeated ChatMessage chat_message = 23;
bool is_closed = 24;
DisputeResult dispute_result = 25;
string dispute_payout_tx_id = 26;
SupportType support_type = 27;
string mediators_dispute_result = 28;
string delayed_payout_tx_id = 29;
string donation_address_of_delayed_payout_tx = 30;
State state = 31;
int64 trade_period_end = 32;
map<string, string> extra_data = 33;
}
message Attachment {
@ -1010,16 +1071,20 @@ message Contract {
bool is_buyer_maker_and_seller_taker = 6;
string maker_account_id = 7;
string taker_account_id = 8;
PaymentAccountPayload maker_payment_account_payload = 9;
PaymentAccountPayload taker_payment_account_payload = 10;
PubKeyRing maker_pub_key_ring = 11;
PubKeyRing taker_pub_key_ring = 12;
NodeAddress buyer_node_address = 13;
NodeAddress seller_node_address = 14;
string maker_payout_address_string = 15;
string taker_payout_address_string = 16;
NodeAddress arbitrator_node_address = 17;
int64 lock_time = 18;
string maker_payment_method_id = 9;
string taker_payment_method_id = 10;
bytes maker_payment_account_payload_hash = 11;
bytes taker_payment_account_payload_hash = 12;
PubKeyRing maker_pub_key_ring = 13;
PubKeyRing taker_pub_key_ring = 14;
NodeAddress buyer_node_address = 15;
NodeAddress seller_node_address = 16;
string maker_payout_address_string = 17;
string taker_payout_address_string = 18;
NodeAddress arbitrator_node_address = 19;
int64 lock_time = 20;
string maker_deposit_tx_hash = 21;
string taker_deposit_tx_hash = 22;
}
message RawTransactionInput {
@ -1043,6 +1108,7 @@ enum AvailabilityResult {
UNCONF_TX_LIMIT_HIT = 11;
MAKER_DENIED_API_USER = 12;
PRICE_CHECK_FAILED = 13;
MAKER_DENIED_TAKER = 14;
}
///////////////////////////////////////////////////////////////////////////////////////////
@ -1352,7 +1418,8 @@ message PersistableEnvelope {
IgnoredMailboxMap ignored_mailbox_map = 33;
RemovedPayloadsMap removed_payloads_map = 34;
XmrAddressEntryList xmr_address_entry_list = 100;
XmrAddressEntryList xmr_address_entry_list = 1001;
SignedOfferList signed_offer_list = 1002;
}
}
@ -1444,7 +1511,7 @@ message XmrAddressEntry {
TRADE_PAYOUT = 6;
}
int32 account_index = 7;
int32 subaddress_index = 7;
string address_string = 8;
string offer_id = 9;
Context context = 10;
@ -1481,6 +1548,17 @@ message Offer {
OfferPayload offer_payload = 1;
}
message SignedOfferList {
repeated SignedOffer signed_offer = 1;
}
message SignedOffer {
string offer_id = 1;
string reserve_tx_hash = 2;
string reserve_tx_hex = 3;
string arbitrator_signature = 4;
}
message OpenOffer {
enum State {
PB_ERROR = 0;
@ -1494,9 +1572,8 @@ message OpenOffer {
Offer offer = 1;
State state = 2;
NodeAddress arbitrator_node_address = 3;
NodeAddress mediator_node_address = 4;
NodeAddress refund_agent_node_address = 5;
int64 trigger_price = 6;
int64 trigger_price = 4;
repeated string frozen_key_images = 5;
}
message Tradable {
@ -1507,6 +1584,8 @@ message Tradable {
SellerAsMakerTrade seller_as_maker_trade = 4;
SellerAsTakerTrade seller_as_taker_trade = 5;
ArbitratorTrade arbitrator_trade = 6;
SignedOffer signed_offer = 1001;
}
}
@ -1596,34 +1675,30 @@ message Trade {
Contract contract = 16;
string contract_as_json = 17;
bytes contract_hash = 18;
string taker_contract_signature = 19;
string maker_contract_signature = 20;
NodeAddress arbitrator_node_address = 21;
NodeAddress mediator_node_address = 22;
bytes arbitrator_btc_pub_key = 23;
string taker_payment_account_id = 24;
string error_message = 25;
PubKeyRing arbitrator_pub_key_ring = 26;
PubKeyRing mediator_pub_key_ring = 27;
string counter_currency_tx_id = 28;
repeated ChatMessage chat_message = 29;
MediationResultState mediation_result_state = 30;
int64 lock_time = 31;
bytes delayed_payout_tx_bytes = 32;
NodeAddress refund_agent_node_address = 33;
PubKeyRing refund_agent_pub_key_ring = 34;
RefundResultState refund_result_state = 35;
int64 last_refresh_request_date = 36 [deprecated = true];
string counter_currency_extra_data = 37;
string asset_tx_proof_result = 38; // name of AssetTxProofResult enum
string uid = 39;
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;
NodeAddress taker_node_address = 100;
PubKeyRing taker_pub_key_ring = 101;
string taker_deposit_tx_id = 102;
NodeAddress maker_node_address = 103;
PubKeyRing maker_pub_key_ring = 104;
string maker_deposit_tx_id = 105;
NodeAddress maker_node_address = 100; // TODO (woodser): move these into TradingPeer
NodeAddress taker_node_address = 101;
PubKeyRing taker_pub_key_ring = 102;
PubKeyRing maker_pub_key_ring = 103;
}
message BuyerAsMakerTrade {
@ -1668,39 +1743,50 @@ message ProcessModel {
int64 buyer_payout_amount_from_mediation = 19;
int64 seller_payout_amount_from_mediation = 20;
TradingPeer maker = 1001;
TradingPeer taker = 1002;
TradingPeer arbitrator = 1003;
NodeAddress temp_trading_peer_node_address = 1004;
string prepared_multisig_hex = 1005;
string made_multisig_hex = 1006;
bool multisig_setup_complete = 1007;
bool maker_ready_to_fund_multisig = 1008;
bool multisig_deposit_initiated = 1009;
string taker_prepared_deposit_tx_id = 1010;
string maker_prepared_deposit_tx_id = 1011;
string maker_signature = 1001;
NodeAddress arbitrator_node_address = 1002;
TradingPeer maker = 1003;
TradingPeer taker = 1004;
TradingPeer arbitrator = 1005;
NodeAddress temp_trading_peer_node_address = 1006;
string reserve_tx_hash = 1007;
repeated string frozen_key_images = 1008;
string prepared_multisig_hex = 1009;
string made_multisig_hex = 1010;
bool multisig_setup_complete = 1011;
bool maker_ready_to_fund_multisig = 1012;
bool multisig_deposit_initiated = 1013;
}
message TradingPeer {
string account_id = 1;
PaymentAccountPayload payment_account_payload = 2;
string payout_address_string = 3;
string contract_as_json = 4;
string contract_signature = 5;
bytes signature = 6; // TODO (woodser): remove unused fields? this was buyer-signed payout tx as bytes
PubKeyRing pub_key_ring = 7;
bytes multi_sig_pub_key = 8;
repeated RawTransactionInput raw_transaction_inputs = 9;
int64 change_output_value = 10;
string change_output_address = 11;
bytes account_age_witness_nonce = 12;
bytes account_age_witness_signature = 13;
int64 current_date = 14;
bytes mediated_payout_tx_signature = 15;
string payment_account_id = 2;
string payment_method_id = 3;
bytes payment_account_payload_hash = 4;
PaymentAccountPayload payment_account_payload = 5;
string payout_address_string = 6;
string contract_as_json = 7;
string contract_signature = 8;
bytes signature = 9; // TODO (woodser): remove unused fields? this was buyer-signed payout tx as bytes
PubKeyRing pub_key_ring = 10;
bytes multi_sig_pub_key = 11;
repeated RawTransactionInput raw_transaction_inputs = 12;
int64 change_output_value = 13;
string change_output_address = 14;
bytes account_age_witness_nonce = 15;
bytes account_age_witness_signature = 16;
int64 current_date = 17;
bytes mediated_payout_tx_signature = 18;
string prepared_multisig_hex = 1001;
string made_multisig_hex = 1002;
string signed_payout_tx_hex = 1003;
string reserve_tx_hash = 1001;
string reserve_tx_hex = 1002;
string reserve_tx_key = 1003;
string prepared_multisig_hex = 1004;
string made_multisig_hex = 1005;
string signed_payout_tx_hex = 1006;
string deposit_tx_hash = 1007;
string deposit_tx_hex = 1008;
string deposit_tx_key = 1009;
}
///////////////////////////////////////////////////////////////////////////////////////////

257
package-lock.json generated
View File

@ -5,6 +5,7 @@
"requires": true,
"packages": {
"": {
"name": "haveno-ui-poc",
"version": "0.1.0",
"dependencies": {
"@testing-library/jest-dom": "^5.11.10",
@ -3634,6 +3635,17 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/ansi-escapes/node_modules/type-fest": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz",
"integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==",
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/ansi-html": {
"version": "0.0.7",
"resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz",
@ -4865,15 +4877,15 @@
}
},
"node_modules/browserslist": {
"version": "4.16.4",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.4.tgz",
"integrity": "sha512-d7rCxYV8I9kj41RH8UKYnvDYCRENUlHRgyXy/Rhr/1BaeLGfiCptEdFE8MIrvGfWbBFNjVYx76SQWvNX1j+/cQ==",
"version": "4.17.0",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.0.tgz",
"integrity": "sha512-g2BJ2a0nEYvEFQC208q8mVAhfNwpZ5Mu8BwgtCdZKO3qx98HChmeg448fPdUzld8aFmfLgVh7yymqV+q1lJZ5g==",
"dependencies": {
"caniuse-lite": "^1.0.30001208",
"colorette": "^1.2.2",
"electron-to-chromium": "^1.3.712",
"caniuse-lite": "^1.0.30001254",
"colorette": "^1.3.0",
"electron-to-chromium": "^1.3.830",
"escalade": "^3.1.1",
"node-releases": "^1.1.71"
"node-releases": "^1.1.75"
},
"bin": {
"browserslist": "cli.js"
@ -5082,9 +5094,13 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001214",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001214.tgz",
"integrity": "sha512-O2/SCpuaU3eASWVaesQirZv1MSjUNOvmugaD8zNSJqw6Vv5SGwoOpA9LJs3pNPfM745nxqPvfZY3MQKY4AKHYg=="
"version": "1.0.30001255",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001255.tgz",
"integrity": "sha512-F+A3N9jTZL882f/fg/WWVnKSu6IOo3ueLz4zwaOPbPYHNmM/ZaDUyzyJwS1mZhX7Ex5jqTyW599Gdelh5PDYLQ==",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
}
},
"node_modules/capture-exit": {
"version": "2.0.0",
@ -5390,9 +5406,9 @@
}
},
"node_modules/colorette": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz",
"integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w=="
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz",
"integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g=="
},
"node_modules/combined-stream": {
"version": "1.0.8",
@ -6605,9 +6621,9 @@
"integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0="
},
"node_modules/dns-packet": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz",
"integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==",
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.4.tgz",
"integrity": "sha512-BQ6F4vycLXBvdrJZ6S3gZewt6rcrks9KBgM9vrhW+knGRqc8uEdT7fuCwloc7nny5xNoMJ17HGH0R/6fpo8ECA==",
"dependencies": {
"ip": "^1.1.0",
"safe-buffer": "^5.0.1"
@ -6818,9 +6834,9 @@
}
},
"node_modules/electron-to-chromium": {
"version": "1.3.719",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.719.tgz",
"integrity": "sha512-heM78GKSqrIzO9Oz0/y22nTBN7bqSP1Pla2SyU9DiSnQD+Ea9SyyN5RWWlgqsqeBLNDkSlE9J9EHFmdMPzxB/g=="
"version": "1.3.833",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.833.tgz",
"integrity": "sha512-h+9aVaUHjyunLqtCjJF2jrJ73tYcJqo2cCGKtVAXH9WmnBsb8hiChRQ0P1uXjdxR6Wcfxibephy41c1YlZA/pA=="
},
"node_modules/elliptic": {
"version": "6.5.4",
@ -13376,9 +13392,9 @@
}
},
"node_modules/node-releases": {
"version": "1.1.71",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz",
"integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg=="
"version": "1.1.75",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.75.tgz",
"integrity": "sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw=="
},
"node_modules/normalize-package-data": {
"version": "2.5.0",
@ -14040,9 +14056,9 @@
}
},
"node_modules/path-parse": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
},
"node_modules/path-to-regexp": {
"version": "0.1.7",
@ -14292,9 +14308,9 @@
}
},
"node_modules/postcss": {
"version": "7.0.35",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz",
"integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==",
"version": "7.0.36",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
"dependencies": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",
@ -16602,9 +16618,9 @@
"deprecated": "https://github.com/lydell/resolve-url#deprecated"
},
"node_modules/resolve-url-loader": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-3.1.2.tgz",
"integrity": "sha512-QEb4A76c8Mi7I3xNKXlRKQSlLBwjUV/ULFMP+G7n3/7tJZ8MG5wsZ3ucxP1Jz8Vevn6fnJsxDx9cIls+utGzPQ==",
"version": "3.1.4",
"resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-3.1.4.tgz",
"integrity": "sha512-D3sQ04o0eeQEySLrcz4DsX3saHfsr8/N6tfhblxgZKXxMT2Louargg12oGNfoTRLV09GXhVUe5/qgA5vdgNigg==",
"dependencies": {
"adjust-sourcemap-loader": "3.0.0",
"camelcase": "5.3.1",
@ -16612,7 +16628,7 @@
"convert-source-map": "1.7.0",
"es6-iterator": "2.0.3",
"loader-utils": "1.2.3",
"postcss": "7.0.21",
"postcss": "7.0.36",
"rework": "1.0.1",
"rework-visit": "1.0.0",
"source-map": "0.6.1"
@ -16661,19 +16677,6 @@
"node": ">=4.0.0"
}
},
"node_modules/resolve-url-loader/node_modules/postcss": {
"version": "7.0.21",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.21.tgz",
"integrity": "sha512-uIFtJElxJo29QC753JzhidoAhvp/e/Exezkdhfmt8AymWT6/5B7W1WmponYWkHk2eg6sONyTch0A3nkMPun3SQ==",
"dependencies": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",
"supports-color": "^6.1.0"
},
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/resolve-url-loader/node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
@ -16682,17 +16685,6 @@
"node": ">=0.10.0"
}
},
"node_modules/resolve-url-loader/node_modules/supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"dependencies": {
"has-flag": "^3.0.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/ret": {
"version": "0.1.15",
"resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
@ -18561,9 +18553,9 @@
}
},
"node_modules/tar": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.0.tgz",
"integrity": "sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA==",
"version": "6.1.11",
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz",
"integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==",
"dependencies": {
"chownr": "^2.0.0",
"fs-minipass": "^2.0.0",
@ -19101,9 +19093,11 @@
}
},
"node_modules/type-fest": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz",
"integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==",
"version": "0.13.1",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz",
"integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==",
"optional": true,
"peer": true,
"engines": {
"node": ">=10"
},
@ -19398,9 +19392,9 @@
}
},
"node_modules/url-parse": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.1.tgz",
"integrity": "sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q==",
"version": "1.5.3",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.3.tgz",
"integrity": "sha512-IIORyIQD9rvj0A4CLWsHkBBJuNqWpFQe224b6j9t/ABmquIS0qDU2pY6kl6AuOrL5OkCXHMCFNe1jBcuAggjvQ==",
"dependencies": {
"querystringify": "^2.1.1",
"requires-port": "^1.0.0"
@ -20537,9 +20531,9 @@
}
},
"node_modules/webpack-dev-server/node_modules/ws": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz",
"integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==",
"version": "6.2.2",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz",
"integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==",
"dependencies": {
"async-limiter": "~1.0.0"
}
@ -21330,9 +21324,9 @@
}
},
"node_modules/ws": {
"version": "7.4.5",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.5.tgz",
"integrity": "sha512-xzyu3hFvomRfXKH8vOFMU3OguG6oOvhXMo3xsGy3xWExqaM2dxBbVxuD99O7m3ZUFMvvscsZDqxfgMaRr/Nr1g==",
"version": "7.5.5",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz",
"integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==",
"engines": {
"node": ">=8.3.0"
},
@ -24244,6 +24238,13 @@
"integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==",
"requires": {
"type-fest": "^0.21.3"
},
"dependencies": {
"type-fest": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz",
"integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w=="
}
}
},
"ansi-html": {
@ -25237,15 +25238,15 @@
}
},
"browserslist": {
"version": "4.16.4",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.4.tgz",
"integrity": "sha512-d7rCxYV8I9kj41RH8UKYnvDYCRENUlHRgyXy/Rhr/1BaeLGfiCptEdFE8MIrvGfWbBFNjVYx76SQWvNX1j+/cQ==",
"version": "4.17.0",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.0.tgz",
"integrity": "sha512-g2BJ2a0nEYvEFQC208q8mVAhfNwpZ5Mu8BwgtCdZKO3qx98HChmeg448fPdUzld8aFmfLgVh7yymqV+q1lJZ5g==",
"requires": {
"caniuse-lite": "^1.0.30001208",
"colorette": "^1.2.2",
"electron-to-chromium": "^1.3.712",
"caniuse-lite": "^1.0.30001254",
"colorette": "^1.3.0",
"electron-to-chromium": "^1.3.830",
"escalade": "^3.1.1",
"node-releases": "^1.1.71"
"node-releases": "^1.1.75"
}
},
"bser": {
@ -25406,9 +25407,9 @@
}
},
"caniuse-lite": {
"version": "1.0.30001214",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001214.tgz",
"integrity": "sha512-O2/SCpuaU3eASWVaesQirZv1MSjUNOvmugaD8zNSJqw6Vv5SGwoOpA9LJs3pNPfM745nxqPvfZY3MQKY4AKHYg=="
"version": "1.0.30001255",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001255.tgz",
"integrity": "sha512-F+A3N9jTZL882f/fg/WWVnKSu6IOo3ueLz4zwaOPbPYHNmM/ZaDUyzyJwS1mZhX7Ex5jqTyW599Gdelh5PDYLQ=="
},
"capture-exit": {
"version": "2.0.0",
@ -25656,9 +25657,9 @@
}
},
"colorette": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz",
"integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w=="
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz",
"integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g=="
},
"combined-stream": {
"version": "1.0.8",
@ -26624,9 +26625,9 @@
"integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0="
},
"dns-packet": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz",
"integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==",
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.4.tgz",
"integrity": "sha512-BQ6F4vycLXBvdrJZ6S3gZewt6rcrks9KBgM9vrhW+knGRqc8uEdT7fuCwloc7nny5xNoMJ17HGH0R/6fpo8ECA==",
"requires": {
"ip": "^1.1.0",
"safe-buffer": "^5.0.1"
@ -26813,9 +26814,9 @@
"integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA=="
},
"electron-to-chromium": {
"version": "1.3.719",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.719.tgz",
"integrity": "sha512-heM78GKSqrIzO9Oz0/y22nTBN7bqSP1Pla2SyU9DiSnQD+Ea9SyyN5RWWlgqsqeBLNDkSlE9J9EHFmdMPzxB/g=="
"version": "1.3.833",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.833.tgz",
"integrity": "sha512-h+9aVaUHjyunLqtCjJF2jrJ73tYcJqo2cCGKtVAXH9WmnBsb8hiChRQ0P1uXjdxR6Wcfxibephy41c1YlZA/pA=="
},
"elliptic": {
"version": "6.5.4",
@ -31820,9 +31821,9 @@
}
},
"node-releases": {
"version": "1.1.71",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz",
"integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg=="
"version": "1.1.75",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.75.tgz",
"integrity": "sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw=="
},
"normalize-package-data": {
"version": "2.5.0",
@ -32323,9 +32324,9 @@
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="
},
"path-parse": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
},
"path-to-regexp": {
"version": "0.1.7",
@ -32512,9 +32513,9 @@
"integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs="
},
"postcss": {
"version": "7.0.35",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz",
"integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==",
"version": "7.0.36",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
"requires": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",
@ -34366,9 +34367,9 @@
"integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo="
},
"resolve-url-loader": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-3.1.2.tgz",
"integrity": "sha512-QEb4A76c8Mi7I3xNKXlRKQSlLBwjUV/ULFMP+G7n3/7tJZ8MG5wsZ3ucxP1Jz8Vevn6fnJsxDx9cIls+utGzPQ==",
"version": "3.1.4",
"resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-3.1.4.tgz",
"integrity": "sha512-D3sQ04o0eeQEySLrcz4DsX3saHfsr8/N6tfhblxgZKXxMT2Louargg12oGNfoTRLV09GXhVUe5/qgA5vdgNigg==",
"requires": {
"adjust-sourcemap-loader": "3.0.0",
"camelcase": "5.3.1",
@ -34376,7 +34377,7 @@
"convert-source-map": "1.7.0",
"es6-iterator": "2.0.3",
"loader-utils": "1.2.3",
"postcss": "7.0.21",
"postcss": "7.0.36",
"rework": "1.0.1",
"rework-visit": "1.0.0",
"source-map": "0.6.1"
@ -34410,28 +34411,10 @@
"json5": "^1.0.1"
}
},
"postcss": {
"version": "7.0.21",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.21.tgz",
"integrity": "sha512-uIFtJElxJo29QC753JzhidoAhvp/e/Exezkdhfmt8AymWT6/5B7W1WmponYWkHk2eg6sONyTch0A3nkMPun3SQ==",
"requires": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",
"supports-color": "^6.1.0"
}
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
},
"supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"requires": {
"has-flag": "^3.0.0"
}
}
}
},
@ -35945,9 +35928,9 @@
"integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA=="
},
"tar": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.0.tgz",
"integrity": "sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA==",
"version": "6.1.11",
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz",
"integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==",
"requires": {
"chownr": "^2.0.0",
"fs-minipass": "^2.0.0",
@ -36357,9 +36340,11 @@
"integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g=="
},
"type-fest": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz",
"integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w=="
"version": "0.13.1",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz",
"integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==",
"optional": true,
"peer": true
},
"type-is": {
"version": "1.6.18",
@ -36588,9 +36573,9 @@
}
},
"url-parse": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.1.tgz",
"integrity": "sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q==",
"version": "1.5.3",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.3.tgz",
"integrity": "sha512-IIORyIQD9rvj0A4CLWsHkBBJuNqWpFQe224b6j9t/ABmquIS0qDU2pY6kl6AuOrL5OkCXHMCFNe1jBcuAggjvQ==",
"requires": {
"querystringify": "^2.1.1",
"requires-port": "^1.0.0"
@ -37724,9 +37709,9 @@
}
},
"ws": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz",
"integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==",
"version": "6.2.2",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz",
"integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==",
"requires": {
"async-limiter": "~1.0.0"
}
@ -38168,9 +38153,9 @@
}
},
"ws": {
"version": "7.4.5",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.5.tgz",
"integrity": "sha512-xzyu3hFvomRfXKH8vOFMU3OguG6oOvhXMo3xsGy3xWExqaM2dxBbVxuD99O7m3ZUFMvvscsZDqxfgMaRr/Nr1g==",
"version": "7.5.5",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz",
"integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==",
"requires": {}
},
"xml-name-validator": {

View File

@ -1,20 +1,19 @@
import React from 'react';
import logo from './logo.png';
import './App.css';
import {HavenoDaemon} from './HavenoDaemon';
/**
* These files are generated by protoc-gen-grpc-web (created with `sudo make install-plugin` in grpc-web) using the following command:
*
* `protoc -I=./ *.proto --js_out=import_style=commonjs:./ --grpc-web_out=import_style=commonjs,mode=grpcwebtext:./`
*/
const {GetVersionRequest} = require('./grpc_grpc_web_pb.js');
const {GetVersionClient} = require('./grpc_pb.js');
const HAVENO_DAEMON_URL = "http://localhost:8080";
const HAVENO_DAEMON_PASSWORD = "apitest";
class App extends React.Component<{}, {daemonVersion: string}> {
daemon: HavenoDaemon;
constructor(props: any) {
super(props);
this.state = {daemonVersion: ""};
this.daemon = new HavenoDaemon(HAVENO_DAEMON_URL, HAVENO_DAEMON_PASSWORD);
}
render() {
@ -42,18 +41,12 @@ class App extends React.Component<{}, {daemonVersion: string}> {
}
async componentDidMount() {
this.setState({daemonVersion: await this.getDaemonVersion()});
}
async getDaemonVersion(): Promise<string> {
let getVersionClient = new GetVersionClient('http://localhost:8080');
let request = new GetVersionRequest();
return new Promise(function(resolve, reject) {
getVersionClient.getVersion(request, {password: 'apitest'}, function(err: any, response: any) {
if (err) reject(err);
else resolve(response.getVersion());
});
});
try {
this.setState({daemonVersion: await this.daemon.getVersion()});
} catch (err) {
console.error(err);
this.setState({daemonVersion: " not available"});
}
}
}

32
src/HavenoDaemon.test.tsx Normal file
View File

@ -0,0 +1,32 @@
import {HavenoDaemon, HavenoBalances, HavenoOffer} from "./HavenoDaemon";
const HAVENO_UI_VERSION = "1.6.2";
const HAVENO_DAEMON_URL = "http://localhost:8080";
const HAVENO_DAEMON_PASSWORD = "apitest";
const daemon = new HavenoDaemon(HAVENO_DAEMON_URL, HAVENO_DAEMON_PASSWORD);
test("Can get the version", async () => {
let version = await daemon.getVersion();
expect(version).toEqual(HAVENO_UI_VERSION);
});
test("Can get the user's balances", async () => {
let balances: HavenoBalances = await daemon.getBalances();
expect(balances.unlockedBalance);
expect(balances.lockedBalance);
expect(balances.reservedOfferBalance);
expect(balances.reservedTradeBalance);
});
test("Can get offers", async() => {
let offers: HavenoOffer[] = await daemon.getOffers("SELL", "XMR");
for (let offer of offers) {
testOffer(offer);
}
});
function testOffer(offer: HavenoOffer) {
expect(offer.id).toHaveLength;
// TODO: test rest of offer
}

212
src/HavenoDaemon.tsx Normal file
View File

@ -0,0 +1,212 @@
/**
* These imports are generated by protoc-gen-grpc-web (created with `sudo make install-plugin` in grpc-web) using the following command:
*
* `protoc -I=./ *.proto --js_out=import_style=commonjs:./ --grpc-web_out=import_style=commonjs,mode=grpcwebtext:./`
*/
const {GetVersionRequest, WalletsClient, OffersClient} = require('./grpc_grpc_web_pb.js');
const {GetVersionClient, GetBalancesRequest, GetOffersRequest} = require('./grpc_pb.js');
/**
* Haveno daemon client using gRPC.
*/
class HavenoDaemon {
// instance variables
_url: string;
_password?: string;
_getVersionClient: any;
_walletsClient?: any;
_offersClient?: any;
/**
* Construct a client connected to a Haveno daemon.
*
* @param {string} url - Haveno daemon url
* @param {string} password - Haveno daemon password if applicable
*/
constructor(url: string, password?: string) {
this._url = url;
this._password = password;
}
/**
* Get the Haveno version.
*
* @return {string} the Haveno daemon version
*/
async getVersion(): Promise<string> {
if (!this._getVersionClient) this._getVersionClient = new GetVersionClient(this._url);
let request = new GetVersionRequest();
let that = this;
return new Promise(function(resolve, reject) {
that._getVersionClient.getVersion(request, {password: that._password}, function(err: any, response: any) {
if (err) reject(err);
else resolve(response.getVersion());
});
});
}
/**
* Get the user's balances.
*
* @return {HavenoBalances} the user's balances
*/
async getBalances(): Promise<HavenoBalances> {
if (!this._walletsClient) this._walletsClient = new WalletsClient(this._url);
let request = new GetBalancesRequest();
let that = this;
return new Promise(function(resolve, reject) {
that._walletsClient.getBalances(request, {password: that._password}, function(err: any, response: any) {
if (err) reject(err);
else resolve(new HavenoBalances(
BigInt(response.getBalances().getXmr().getUnlockedbalance()),
BigInt(response.getBalances().getXmr().getLockedbalance()),
BigInt(response.getBalances().getXmr().getReservedofferbalance()),
BigInt(response.getBalances().getXmr().getReservedtradebalance())));
});
});
}
/**
* Get available offers.
*
* @param {string} direction - one of "BUY" or "SELL"
* @param {string} currencyCode - the currency being bought or sold, e.g. "ETH"
*
* @return {HavenoOffer[]} available offers
*/
async getOffers(direction: string, currencyCode: string): Promise<HavenoOffer[]> {
if (!this._offersClient) this._offersClient = new OffersClient(this._url);
let request = new GetOffersRequest()
.setDirection(direction)
.setCurrencycode(currencyCode);
let that = this;
return new Promise(function(resolve, reject) {
that._offersClient.getOffers(request, {password: that._password}, function(err: any, response: any) {
if (err) reject(err);
else {
let offers: HavenoOffer[] = [];
for (let offer of response.getOffersList()) {
offers.push(new HavenoOffer(
offer.getId(),
offer.getDirection(),
offer.getPrice(),
offer.getUsemarketbasedprice(),
offer.getMarketpricemargin(),
offer.getAmount(),
offer.getMinamount(),
offer.getVolume(),
offer.getMinvolume(),
offer.getBuyersecuritydeposit(),
offer.getTriggerprice(),
offer.getIscurrencyformakerfeebtc(),
offer.getPaymentaccountid(),
offer.getPaymentmethodid(),
offer.getPaymentmethodshortname(),
offer.getBasecurrencycode(),
offer.getCountercurrencycode(),
offer.getDate(),
offer.getState(),
offer.getSellersecuritydeposit(),
offer.getOfferfeepaymenttxid(),
offer.getTxfee(),
offer.getMakerfee()
));
}
resolve(offers);
}
});
});
}
}
class HavenoBalances {
unlockedBalance: bigint;
lockedBalance: bigint;
reservedOfferBalance: bigint;
reservedTradeBalance: bigint;
constructor(unlockedBalance: bigint,
lockedBalance: bigint,
reservedOfferBalance: bigint,
reservedTradeBalance: bigint) {
this.unlockedBalance = unlockedBalance;
this.lockedBalance = lockedBalance;
this.reservedOfferBalance = reservedOfferBalance;
this.reservedTradeBalance = reservedTradeBalance;
}
}
class HavenoOffer {
id: string;
direction: string;
price: bigint;
useMarketBasedPrice: boolean;
marketPriceMargin: number;
amount: bigint;
minAmount: bigint;
volume: bigint;
minVolume: bigint;
buyerSecurityDeposit: bigint;
triggerPrice: bigint;
isCurrencyForMakerFeeBtc: boolean;
paymentAccountId: string;
paymentMethodId: string;
paymentMethodShortName: string;
baseCurrencyCode: string;
counterCurrencyCode: string;
date: bigint;
state: string;
sellerSecurityDeposit: bigint;
offerFeePaymentTxId: string;
txFee: bigint;
makerFee: bigint;
constructor(id: string,
direction: string,
price: bigint,
useMarketBasedPrice: boolean,
marketPriceMargin: number,
amount: bigint,
minAmount: bigint,
volume: bigint,
minVolume: bigint,
buyerSecurityDeposit: bigint,
triggerPrice: bigint,
isCurrencyForMakerFeeBtc: boolean,
paymentAccountId: string,
paymentMethodId: string,
paymentMethodShortName: string,
baseCurrencyCode: string,
counterCurrencyCode: string,
date: bigint,
state: string,
sellerSecurityDeposit: bigint,
offerFeePaymentTxId: string,
txFee: bigint,
makerFee: bigint,) {
this.id = id;
this.direction = direction;
this.price = price;
this.useMarketBasedPrice = useMarketBasedPrice;
this.marketPriceMargin = marketPriceMargin;
this.amount = amount;
this.minAmount = minAmount;
this.volume = volume;
this.minVolume = minVolume;
this.buyerSecurityDeposit = buyerSecurityDeposit;
this.triggerPrice = triggerPrice;
this.isCurrencyForMakerFeeBtc = isCurrencyForMakerFeeBtc;
this.paymentAccountId = paymentAccountId;
this.paymentMethodId = paymentMethodId;
this.paymentMethodShortName = paymentMethodShortName;
this.baseCurrencyCode = baseCurrencyCode;
this.counterCurrencyCode = counterCurrencyCode;
this.date = date;
this.state = state;
this.sellerSecurityDeposit = sellerSecurityDeposit;
this.offerFeePaymentTxId = offerFeePaymentTxId;
this.txFee = txFee;
this.makerFee = makerFee;
}
}
export {HavenoDaemon, HavenoBalances, HavenoOffer};

View File

@ -16533,11 +16533,10 @@ proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.toObject = function(opt_inclu
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.toObject = function(includeInstance, msg) {
var f, obj = {
balance: jspb.Message.getFieldWithDefault(msg, 1, 0),
availablebalance: jspb.Message.getFieldWithDefault(msg, 2, 0),
lockedbalance: jspb.Message.getFieldWithDefault(msg, 3, 0),
reservedbalance: jspb.Message.getFieldWithDefault(msg, 4, 0),
totalbalance: jspb.Message.getFieldWithDefault(msg, 5, 0)
unlockedbalance: jspb.Message.getFieldWithDefault(msg, 1, 0),
lockedbalance: jspb.Message.getFieldWithDefault(msg, 2, 0),
reservedofferbalance: jspb.Message.getFieldWithDefault(msg, 3, 0),
reservedtradebalance: jspb.Message.getFieldWithDefault(msg, 4, 0)
};
if (includeInstance) {
@ -16576,23 +16575,19 @@ proto.io.bisq.protobuffer.XmrBalanceInfo.deserializeBinaryFromReader = function(
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readUint64());
msg.setBalance(value);
msg.setUnlockedbalance(value);
break;
case 2:
var value = /** @type {number} */ (reader.readUint64());
msg.setAvailablebalance(value);
msg.setLockedbalance(value);
break;
case 3:
var value = /** @type {number} */ (reader.readUint64());
msg.setLockedbalance(value);
msg.setReservedofferbalance(value);
break;
case 4:
var value = /** @type {number} */ (reader.readUint64());
msg.setReservedbalance(value);
break;
case 5:
var value = /** @type {number} */ (reader.readUint64());
msg.setTotalbalance(value);
msg.setReservedtradebalance(value);
break;
default:
reader.skipField();
@ -16623,49 +16618,42 @@ proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.serializeBinary = function()
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getBalance();
f = message.getUnlockedbalance();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
f = message.getAvailablebalance();
f = message.getLockedbalance();
if (f !== 0) {
writer.writeUint64(
2,
f
);
}
f = message.getLockedbalance();
f = message.getReservedofferbalance();
if (f !== 0) {
writer.writeUint64(
3,
f
);
}
f = message.getReservedbalance();
f = message.getReservedtradebalance();
if (f !== 0) {
writer.writeUint64(
4,
f
);
}
f = message.getTotalbalance();
if (f !== 0) {
writer.writeUint64(
5,
f
);
}
};
/**
* optional uint64 balance = 1;
* optional uint64 unlockedBalance = 1;
* @return {number}
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.getBalance = function() {
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.getUnlockedbalance = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
@ -16674,16 +16662,16 @@ proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.getBalance = function() {
* @param {number} value
* @return {!proto.io.bisq.protobuffer.XmrBalanceInfo} returns this
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.setBalance = function(value) {
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.setUnlockedbalance = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional uint64 availableBalance = 2;
* optional uint64 lockedBalance = 2;
* @return {number}
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.getAvailablebalance = function() {
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.getLockedbalance = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
@ -16692,16 +16680,16 @@ proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.getAvailablebalance = functio
* @param {number} value
* @return {!proto.io.bisq.protobuffer.XmrBalanceInfo} returns this
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.setAvailablebalance = function(value) {
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.setLockedbalance = function(value) {
return jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional uint64 lockedBalance = 3;
* optional uint64 reservedOfferBalance = 3;
* @return {number}
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.getLockedbalance = function() {
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.getReservedofferbalance = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
@ -16710,16 +16698,16 @@ proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.getLockedbalance = function()
* @param {number} value
* @return {!proto.io.bisq.protobuffer.XmrBalanceInfo} returns this
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.setLockedbalance = function(value) {
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.setReservedofferbalance = function(value) {
return jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional uint64 reservedBalance = 4;
* optional uint64 reservedTradeBalance = 4;
* @return {number}
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.getReservedbalance = function() {
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.getReservedtradebalance = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
@ -16728,29 +16716,11 @@ proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.getReservedbalance = function
* @param {number} value
* @return {!proto.io.bisq.protobuffer.XmrBalanceInfo} returns this
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.setReservedbalance = function(value) {
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.setReservedtradebalance = function(value) {
return jspb.Message.setProto3IntField(this, 4, value);
};
/**
* optional uint64 totalBalance = 5;
* @return {number}
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.getTotalbalance = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/**
* @param {number} value
* @return {!proto.io.bisq.protobuffer.XmrBalanceInfo} returns this
*/
proto.io.bisq.protobuffer.XmrBalanceInfo.prototype.setTotalbalance = function(value) {
return jspb.Message.setProto3IntField(this, 5, value);
};

File diff suppressed because it is too large Load Diff