From c6ece486ed9479404f8ab484035d3fddc8a59b91 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Wed, 28 Oct 2015 02:11:59 +0100 Subject: [PATCH] move network code to module --- .gitignore | 2 + .idea/codeStyleSettings.xml | 79 -- .idea/copyright/Bitsquare_Affero_GPLv3.xml | 9 - .idea/copyright/profiles_settings.xml | 2 +- .../app/bootstrap/BootstrapNode.java | 157 --- .../app/bootstrap/BootstrapNodeMain.java | 52 - bootstrap/src/main/resources/logback.xml | 4 +- .../main/java/io/bitsquare/app/Logging.java | 6 +- .../common}/crypto/CryptoException.java | 10 +- .../bitsquare/common/crypto/CryptoUtil.java | 136 +++ .../io/bitsquare/common}/crypto/KeyRing.java | 48 +- .../bitsquare/common}/crypto/KeyStorage.java | 41 +- .../bitsquare/common}/crypto/PubKeyRing.java | 57 +- .../bitsquare/common}/util/DesktopUtil.java | 13 +- .../io/bitsquare/common}/util/Utilities.java | 179 +-- core/pom.xml | 116 +- .../java/io/bitsquare/BitsquareModule.java | 71 -- .../bitsquare/app/BitsquareEnvironment.java | 42 +- .../io/bitsquare/app/BitsquareExecutable.java | 7 +- .../main/java/io/bitsquare/app/Version.java | 35 - .../arbitration/ArbitrationRepository.java | 130 --- .../io/bitsquare/arbitration/Arbitrator.java | 261 ++--- .../arbitration/ArbitratorModule.java | 23 +- .../arbitration/ArbitratorService.java | 80 +- .../io/bitsquare/arbitration/Reputation.java | 43 - .../tomp2p/TomP2PArbitratorModule.java | 37 - .../tomp2p/TomP2PArbitratorService.java | 173 --- .../btc/AddressBasedCoinSelector.java | 114 +- .../java/io/bitsquare/btc/AddressEntry.java | 79 +- .../io/bitsquare/btc/AddressEntryList.java | 50 +- .../java/io/bitsquare/btc/BitcoinModule.java | 21 +- .../io/bitsquare/btc/BlockChainService.java | 76 -- .../main/java/io/bitsquare/btc/FeePolicy.java | 85 +- .../java/io/bitsquare/btc/Restrictions.java | 5 +- .../io/bitsquare/btc/TradeWalletService.java | 1030 +++++++++++------ .../java/io/bitsquare/btc/WalletService.java | 495 ++++---- .../common/handlers/ErrorMessageHandler.java | 25 - .../common/handlers/ExceptionHandler.java | 25 - .../common/handlers/FaultHandler.java | 25 - .../common/handlers/ResultHandler.java | 22 - .../taskrunner/InterceptTaskException.java | 30 - .../io/bitsquare/common/taskrunner/Model.java | 24 - .../io/bitsquare/common/taskrunner/Task.java | 74 -- .../common/taskrunner/TaskRunner.java | 97 -- .../io/bitsquare/crypto/CryptoService.java | 228 ---- .../bitsquare/crypto/MessageWithPubKey.java | 46 - .../java/io/bitsquare/crypto/ScryptUtil.java | 40 + .../crypto/SealedAndSignedMessage.java | 64 - .../main/java/io/bitsquare/crypto/Util.java | 47 - .../java/io/bitsquare/fiat/FiatAccount.java | 128 -- .../java/io/bitsquare/locale/BSResources.java | 15 +- .../java/io/bitsquare/locale/Country.java | 7 +- .../java/io/bitsquare/locale/CountryUtil.java | 95 +- .../io/bitsquare/locale/CurrencyUtil.java | 217 +++- .../io/bitsquare/locale/LanguageUtil.java | 36 +- .../main/java/io/bitsquare/locale/Region.java | 11 +- .../java/io/bitsquare/p2p/AddressService.java | 26 - .../java/io/bitsquare/p2p/BaseP2PService.java | 71 -- .../java/io/bitsquare/p2p/BootstrapNodes.java | 139 --- .../java/io/bitsquare/p2p/ClientNode.java | 40 - .../java/io/bitsquare/p2p/DHTService.java | 45 - .../p2p/DecryptedMessageHandler.java | 24 - .../java/io/bitsquare/p2p/MailboxMessage.java | 23 - .../p2p/MailboxMessagesResultHandler.java | 26 - .../java/io/bitsquare/p2p/MailboxService.java | 33 - .../main/java/io/bitsquare/p2p/Message.java | 23 - .../java/io/bitsquare/p2p/MessageHandler.java | 22 - .../java/io/bitsquare/p2p/MessageService.java | 35 - .../io/bitsquare/p2p/NetworkException.java | 40 - core/src/main/java/io/bitsquare/p2p/Node.java | 163 --- .../main/java/io/bitsquare/p2p/P2PModule.java | 37 - .../java/io/bitsquare/p2p/P2PService.java | 28 - core/src/main/java/io/bitsquare/p2p/Peer.java | 26 - .../p2p/listener/GetPeerAddressListener.java | 26 - .../p2p/listener/SendMessageListener.java | 24 - .../p2p/tomp2p/BootstrappedPeerBuilder.java | 412 ------- .../p2p/tomp2p/TomP2PAddressService.java | 172 --- .../p2p/tomp2p/TomP2PDHTService.java | 270 ----- .../p2p/tomp2p/TomP2PMailboxService.java | 188 --- .../p2p/tomp2p/TomP2PMessageService.java | 226 ---- .../io/bitsquare/p2p/tomp2p/TomP2PModule.java | 88 -- .../io/bitsquare/p2p/tomp2p/TomP2PNode.java | 196 ---- .../io/bitsquare/p2p/tomp2p/TomP2PPeer.java | 56 - .../bitsquare/p2p/tomp2p/TomP2PService.java | 50 - .../io/bitsquare/storage/FileManager.java | 62 +- .../java/io/bitsquare/storage/Storage.java | 27 +- .../bitsquare/trade/BuyerAsOffererTrade.java | 26 +- .../io/bitsquare/trade/BuyerAsTakerTrade.java | 31 +- .../java/io/bitsquare/trade/BuyerTrade.java | 94 +- .../java/io/bitsquare/trade/Contract.java | 236 +++- .../java/io/bitsquare/trade/OffererTrade.java | 5 +- .../bitsquare/trade/SellerAsOffererTrade.java | 20 +- .../bitsquare/trade/SellerAsTakerTrade.java | 25 +- .../java/io/bitsquare/trade/SellerTrade.java | 89 +- .../java/io/bitsquare/trade/Tradable.java | 3 +- .../java/io/bitsquare/trade/TradableList.java | 17 +- .../main/java/io/bitsquare/trade/Trade.java | 434 ++++--- .../java/io/bitsquare/trade/TradeManager.java | 378 +++--- .../java/io/bitsquare/trade/TradeModule.java | 9 +- .../java/io/bitsquare/trade/TradeState.java | 111 -- .../trade/closed/ClosedTradableManager.java | 20 +- .../trade/failed/FailedTradesManager.java | 20 +- .../handlers/TakeOfferResultHandler.java | 25 - .../java/io/bitsquare/trade/offer/Offer.java | 304 +++-- .../trade/offer/OfferBookService.java | 70 +- .../io/bitsquare/trade/offer/OfferModule.java | 23 +- .../io/bitsquare/trade/offer/OpenOffer.java | 39 +- .../trade/offer/OpenOfferManager.java | 217 ++-- .../offer/tomp2p/TomP2POfferBookService.java | 345 ------ .../trade/offer/tomp2p/TomP2POfferModule.java | 37 - .../availability/OfferAvailabilityModel.java | 30 +- .../OfferAvailabilityProtocol.java | 55 +- .../messages/OfferAvailabilityRequest.java | 10 +- .../messages/OfferAvailabilityResponse.java | 4 +- .../availability/messages/OfferMessage.java | 6 +- .../availability/tasks/GetPeerAddress.java | 30 +- .../ProcessOfferAvailabilityResponse.java | 6 +- .../tasks/SendOfferAvailabilityRequest.java | 26 +- .../protocol/placeoffer/PlaceOfferModel.java | 8 +- .../placeoffer/PlaceOfferProtocol.java | 12 +- .../tasks/AddOfferToRemoteOfferBook.java | 13 +- .../tasks/BroadcastCreateOfferFeeTx.java | 57 +- .../placeoffer/tasks/CreateOfferFeeTx.java | 21 +- .../placeoffer/tasks/ValidateOffer.java | 4 +- .../trade/BuyerAsOffererProtocol.java | 104 +- .../protocol/trade/BuyerAsTakerProtocol.java | 72 +- .../trade/protocol/trade/OffererProtocol.java | 5 +- .../trade/protocol/trade/ProcessModel.java | 217 ++-- .../trade/SellerAsOffererProtocol.java | 106 +- .../protocol/trade/SellerAsTakerProtocol.java | 144 +-- .../trade/protocol/trade/TradeProtocol.java | 164 +-- .../trade/protocol/trade/TradingPeer.java | 102 +- .../messages/DepositTxInputsRequest.java | 47 - .../messages/DepositTxPublishedMessage.java | 42 +- .../messages/FiatTransferStartedMessage.java | 39 +- .../messages/FinalizePayoutTxRequest.java | 44 +- .../trade/messages/PayDepositRequest.java | 136 ++- .../messages/PayoutTxFinalizedMessage.java | 41 +- .../messages/PublishDepositTxRequest.java | 77 +- .../protocol/trade/messages/TradeMessage.java | 22 +- .../trade/protocol/trade/tasks/TradeTask.java | 3 +- .../tasks/buyer/CreateDepositTxInputs.java | 55 - .../buyer/ProcessDepositTxInputsRequest.java | 56 - .../buyer/ProcessFinalizePayoutTxRequest.java | 10 +- .../buyer/ProcessPublishDepositTxRequest.java | 61 - .../buyer/SendDepositTxPublishedMessage.java | 70 -- .../buyer/SendFiatTransferStartedMessage.java | 39 +- .../tasks/buyer/SendPayDepositRequest.java | 76 -- .../buyer/SendPayoutTxFinalizedMessage.java | 56 +- .../tasks/buyer/SignAndFinalizePayoutTx.java | 16 +- .../tasks/buyer/SignAndPublishDepositTx.java | 82 -- .../tasks/buyer/VerifyAndSignContract.java | 62 - .../offerer/VerifyTakeOfferFeePayment.java | 3 +- .../tasks/offerer/VerifyTakerAccount.java | 20 +- .../trade/tasks/seller/CommitDepositTx.java | 50 - .../tasks/seller/CreateAndSignContract.java | 63 - .../tasks/seller/CreateAndSignDepositTx.java | 65 -- .../ProcessDepositTxPublishedMessage.java | 56 - .../ProcessFiatTransferStartedMessage.java | 11 +- .../seller/ProcessPayDepositRequest.java | 61 - .../ProcessPayoutTxFinalizedMessage.java | 11 +- .../seller/SendDepositTxInputsRequest.java | 86 -- .../seller/SendFinalizePayoutTxRequest.java | 63 +- .../seller/SendPublishDepositTxRequest.java | 73 -- .../trade/tasks/seller/SignPayoutTx.java | 68 -- .../trade/tasks/shared/CommitPayoutTx.java | 14 +- .../SetupPayoutTxLockTimeReachedListener.java | 42 +- .../tasks/taker/BroadcastTakeOfferFeeTx.java | 7 +- .../tasks/taker/CreateTakeOfferFeeTx.java | 19 +- .../tasks/taker/VerifyOfferFeePayment.java | 3 +- .../tasks/taker/VerifyOffererAccount.java | 18 +- .../io/bitsquare/user/AccountSettings.java | 139 --- .../java/io/bitsquare/user/Preferences.java | 195 +++- .../src/main/java/io/bitsquare/user/User.java | 302 +++-- .../java/io/bitsquare/util/Validator.java | 4 +- .../util/joptsimple/EnumValueConverter.java | 3 +- .../spring/JOptCommandLinePropertySource.java | 4 +- .../textsecuregcm/metrics/CpuUsageGauge.java | 7 +- .../metrics/FreeMemoryGauge.java | 7 +- .../textsecuregcm/metrics/NetworkGauge.java | 12 +- .../metrics/NetworkReceivedGauge.java | 11 +- .../metrics/NetworkSentGauge.java | 11 +- .../textsecuregcm/util/Pair.java | 6 +- .../io/bitsquare/btc/RestrictionsTest.java | 4 +- .../test/java/io/bitsquare/p2p/NodeTests.java | 47 - .../java/io/bitsquare/p2p/TomP2PTests.java | 766 ------------ .../bitsquare/p2p/tomp2p/TomP2PPeerTest.java | 32 - .../placeoffer/PlaceOfferProtocolTest.java | 289 ----- .../test/java/io/bitsquare/util/Repeat.java | 37 - .../java/io/bitsquare/util/RepeatRule.java | 57 - .../io/bitsquare/util/RepeatRuleTests.java | 68 -- .../test/java/net/tomp2p/dht/UtilsDHT2.java | 363 ------ .../actual_design/create_offer_1.png | Bin 118415 -> 0 bytes .../actual_design/create_offer_2.png | Bin 160250 -> 0 bytes .../actual_design/create_offer_3.png | Bin 163568 -> 0 bytes .../actual_design/create_offer_4.png | Bin 159525 -> 0 bytes .../actual_design/create_offer_5.png | Bin 176094 -> 0 bytes doc/screenshots/actual_design/setup_1.png | Bin 137434 -> 0 bytes doc/screenshots/actual_design/setup_2.png | Bin 138559 -> 0 bytes doc/screenshots/actual_design/setup_3.png | Bin 166768 -> 0 bytes doc/screenshots/bank_tx_inited.png | Bin 176999 -> 0 bytes doc/screenshots/deposit.png | Bin 181081 -> 0 bytes doc/screenshots/deposit_conf.png | Bin 100313 -> 0 bytes doc/screenshots/funds_deposit.png | Bin 98649 -> 0 bytes doc/screenshots/funds_tx.png | Bin 110926 -> 0 bytes doc/screenshots/funds_withdrawal.png | Bin 122468 -> 0 bytes doc/screenshots/offerer_remove_offer.png | Bin 133977 -> 0 bytes doc/screenshots/orderbook1.png | Bin 150926 -> 0 bytes doc/screenshots/orderbook2.png | Bin 94309 -> 0 bytes doc/screenshots/take_offer.png | Bin 100910 -> 0 bytes doc/screenshots/taker_see_offer.png | Bin 169466 -> 0 bytes doc/screenshots/trade_complete.png | Bin 126998 -> 0 bytes gui/pom.xml | 9 +- .../enzo/notification/Notification.java | 39 +- .../java/io/bitsquare/app/BitsquareApp.java | 183 ++- .../io/bitsquare/app/BitsquareAppMain.java | 47 +- .../io/bitsquare/app/BitsquareAppModule.java | 68 +- .../java/io/bitsquare/app/UpdateProcess.java | 65 +- .../main/java/io/bitsquare/gui/GuiModule.java | 26 +- .../java/io/bitsquare/gui/Navigation.java | 23 +- .../java/io/bitsquare/gui/OverlayManager.java | 59 - .../java/io/bitsquare/gui/SystemTray.java | 19 +- .../main/java/io/bitsquare/gui/bitsquare.css | 259 ++++- .../gui/common/fxml/FxmlViewLoader.java | 17 +- .../gui/common/model/Activatable.java | 8 +- .../model/ActivatableWithDataModel.java | 18 +- .../gui/common/model/WithDataModel.java | 8 +- .../common/view/ActivatableViewAndModel.java | 30 +- .../bitsquare/gui/common/view/ViewPath.java | 3 +- .../gui/components/AddressTextField.java | 49 +- .../gui/components/BalanceTextField.java | 21 +- .../BalanceWithConfirmationTextField.java | 21 +- .../bitsquare/gui/components/InfoDisplay.java | 31 +- .../io/bitsquare/gui/components/Popups.java | 219 ---- .../gui/components/SystemNotification.java | 3 +- .../gui/components/TextFieldWithCopyIcon.java | 18 +- .../gui/components/TitledGroupBg.java | 7 +- .../gui/components/TitledSeparator.java | 78 -- .../gui/components/TxIdTextField.java | 52 +- .../ConfidenceProgressIndicator.java | 16 +- .../components/processbar/ProcessStepBar.java | 9 +- gui/src/main/java/io/bitsquare/gui/images.css | 43 +- .../java/io/bitsquare/gui/main/MainView.fxml | 3 +- .../java/io/bitsquare/gui/main/MainView.java | 208 ++-- .../io/bitsquare/gui/main/MainViewModel.java | 620 +++++++--- .../gui/main/account/AccountView.fxml | 7 +- .../gui/main/account/AccountView.java | 64 +- .../arbitrator/ArbitratorSettingsView.fxml | 38 - .../arbitrator/ArbitratorSettingsView.java | 80 -- .../browser/ArbitratorBrowserView.fxml | 34 - .../arbitrator/browser/BrowserView.java | 140 --- .../profile/ArbitratorProfileView.fxml | 88 -- .../profile/ArbitratorProfileView.java | 73 -- .../ArbitratorRegistrationView.fxml | 192 --- .../ArbitratorRegistrationView.java | 366 ------ .../altcoin/AltCoinAccountDataModel.java | 92 -- .../content/altcoin/AltCoinAccountView.fxml | 87 -- .../content/altcoin/AltCoinAccountView.java | 196 ---- .../altcoin/AltCoinAccountViewModel.java | 142 --- .../content/fiat/FiatAccountDataModel.java | 170 --- .../account/content/fiat/FiatAccountView.fxml | 137 --- .../account/content/fiat/FiatAccountView.java | 257 ---- .../content/fiat/FiatAccountViewModel.java | 274 ----- .../content/password/PasswordView.fxml | 50 +- .../content/password/PasswordView.java | 191 ++- .../content/password/PasswordViewModel.java | 87 -- .../registration/RegistrationDataModel.java | 130 --- .../registration/RegistrationView.fxml | 93 -- .../registration/RegistrationView.java | 138 --- .../registration/RegistrationViewModel.java | 125 -- .../restrictions/RestrictionsDataModel.java | 106 -- .../restrictions/RestrictionsView.fxml | 144 --- .../restrictions/RestrictionsView.java | 324 ------ .../restrictions/RestrictionsViewModel.java | 116 -- .../content/seedwords/SeedWordsView.fxml | 43 +- .../content/seedwords/SeedWordsView.java | 213 +++- .../content/seedwords/SeedWordsViewModel.java | 44 - .../account/settings/AccountSettingsView.java | 107 +- .../account/setup/AccountSetupWizard.java | 64 +- .../bitsquare/gui/main/debug/DebugView.fxml | 13 +- .../bitsquare/gui/main/debug/DebugView.java | 180 ++- .../bitsquare/gui/main/funds/FundsView.fxml | 7 +- .../bitsquare/gui/main/funds/FundsView.java | 30 +- .../main/funds/reserved/ReservedListItem.java | 74 +- .../gui/main/funds/reserved/ReservedView.fxml | 14 +- .../gui/main/funds/reserved/ReservedView.java | 147 +-- .../funds/transactions/TransactionsView.fxml | 10 +- .../funds/transactions/TransactionsView.java | 39 +- .../funds/withdrawal/WithdrawalListItem.java | 33 +- .../main/funds/withdrawal/WithdrawalView.fxml | 5 +- .../main/funds/withdrawal/WithdrawalView.java | 261 +++-- .../java/io/bitsquare/gui/main/help/Help.java | 9 +- .../io/bitsquare/gui/main/home/HomeView.fxml | 35 - .../io/bitsquare/gui/main/home/HomeView.java | 27 - .../io/bitsquare/gui/main/msg/MsgView.fxml | 36 - .../io/bitsquare/gui/main/msg/MsgView.java | 27 - .../bitsquare/gui/main/offer/OfferView.java | 71 +- .../createoffer/CreateOfferDataModel.java | 248 ++-- .../offer/createoffer/CreateOfferView.fxml | 262 +---- .../offer/createoffer/CreateOfferView.java | 795 +++++++------ .../createoffer/CreateOfferViewModel.java | 313 ++--- .../gui/main/offer/offerbook/OfferBook.java | 147 +-- .../offer/offerbook/OfferBookDataModel.java | 324 ------ .../offer/offerbook/OfferBookListItem.java | 20 +- .../main/offer/offerbook/OfferBookView.fxml | 134 +-- .../main/offer/offerbook/OfferBookView.java | 743 +++++------- .../offer/offerbook/OfferBookViewModel.java | 332 +++--- .../offer/takeoffer/TakeOfferDataModel.java | 288 +++-- .../main/offer/takeoffer/TakeOfferView.fxml | 259 +---- .../main/offer/takeoffer/TakeOfferView.java | 770 +++++++----- .../offer/takeoffer/TakeOfferViewModel.java | 728 ++++++------ .../gui/main/portfolio/PortfolioView.java | 29 +- .../closedtrades/ClosedTradesDataModel.java | 22 +- .../closedtrades/ClosedTradesListItem.java | 36 - .../closedtrades/ClosedTradesView.fxml | 32 +- .../closedtrades/ClosedTradesView.java | 133 ++- .../closedtrades/ClosedTradesViewModel.java | 74 +- .../failedtrades/FailedTradesDataModel.java | 17 +- .../failedtrades/FailedTradesView.fxml | 27 +- .../failedtrades/FailedTradesView.java | 31 +- .../failedtrades/FailedTradesViewModel.java | 42 +- .../openoffer/OpenOffersDataModel.java | 24 +- .../portfolio/openoffer/OpenOffersView.fxml | 32 +- .../portfolio/openoffer/OpenOffersView.java | 88 +- .../openoffer/OpenOffersViewModel.java | 17 +- .../portfolio/pendingtrades/BuyerSubView.java | 87 +- .../pendingtrades/PendingTradesDataModel.java | 266 +++-- .../pendingtrades/PendingTradesListItem.java | 6 +- .../pendingtrades/PendingTradesView.fxml | 84 +- .../pendingtrades/PendingTradesView.java | 128 +- .../pendingtrades/PendingTradesViewModel.java | 330 +++--- .../pendingtrades/SellerSubView.java | 123 +- .../portfolio/pendingtrades/TradeSubView.java | 21 +- .../pendingtrades/steps/CompletedView.java | 87 +- .../steps/ConfirmFiatReceivedView.java | 132 --- .../pendingtrades/steps/StartFiatView.java | 142 --- .../steps/TradeStepDetailsView.java | 233 +++- .../steps/WaitFiatReceivedView.java | 98 -- .../steps/WaitPayoutFinalizedView.java | 45 +- .../steps/WaitPayoutLockTimeView.java | 86 +- .../steps/WaitTxInBlockchainView.java | 37 +- .../gui/main/settings/SettingsView.fxml | 8 +- .../gui/main/settings/SettingsView.java | 18 +- .../application/PreferencesDataModel.java | 21 +- .../settings/application/PreferencesView.fxml | 45 +- .../settings/application/PreferencesView.java | 84 +- .../application/PreferencesViewModel.java | 106 +- .../settings/network/NetworkSettingsView.fxml | 4 +- .../settings/network/NetworkSettingsView.java | 128 +- .../io/bitsquare/gui/util/BSFormatter.java | 124 +- .../java/io/bitsquare/gui/util/Colors.java | 5 +- .../bitsquare/gui/util/ComponentBuilder.java | 278 ----- .../java/io/bitsquare/gui/util/GUIUtil.java | 18 +- .../java/io/bitsquare/gui/util/ImageUtil.java | 12 +- .../java/io/bitsquare/gui/util/Layout.java | 8 +- .../io/bitsquare/gui/util/Transitions.java | 138 +-- .../BankAccountNumberValidator.java | 39 - .../util/validation/BtcAddressValidator.java | 3 +- .../gui/util/validation/BtcValidator.java | 16 +- .../gui/util/validation/FiatValidator.java | 26 +- .../util/validation/OptionalBtcValidator.java | 9 + .../validation/OptionalFiatValidator.java | 6 +- .../util/validation/PasswordValidator.java | 10 + .../resources/i18n/displayStrings.properties | 40 +- gui/src/main/resources/images/nav/home.png | Bin 3416 -> 0 bytes gui/src/main/resources/images/nav/home@2x.png | Bin 3751 -> 0 bytes .../main/resources/images/nav/home_active.png | Bin 999 -> 0 bytes .../resources/images/nav/home_active@2x.png | Bin 1068 -> 0 bytes gui/src/main/resources/images/nav/msg.png | Bin 3229 -> 0 bytes gui/src/main/resources/images/nav/msg@2x.png | Bin 3490 -> 0 bytes .../main/resources/images/nav/msg_active.png | Bin 848 -> 0 bytes .../resources/images/nav/msg_active@2x.png | Bin 813 -> 0 bytes gui/src/main/resources/logback.xml | 15 +- .../bitsquare/gui/util/BSFormatterTest.java | 49 +- .../gui/util/validation/BtcValidatorTest.java | 21 +- .../util/validation/FiatValidatorTest.java | 11 +- .../bitsquare/crypto/EncryptionService.java | 135 +++ .../crypto/EncryptionServiceModule.java | 10 +- .../main/java/io/bitsquare/p2p/Message.java | 7 + .../main/java/io/bitsquare/p2p/P2PModule.java | 55 + .../java/io/bitsquare/p2p/P2PService.java | 628 ++++++++++ .../crypto/EncryptionServiceTests.java | 42 +- package/mac/create_app.sh | 3 +- pom.xml | 104 +- 384 files changed, 11571 insertions(+), 21763 deletions(-) delete mode 100644 .idea/copyright/Bitsquare_Affero_GPLv3.xml delete mode 100644 bootstrap/src/main/java/io/bitsquare/app/bootstrap/BootstrapNode.java delete mode 100644 bootstrap/src/main/java/io/bitsquare/app/bootstrap/BootstrapNodeMain.java rename {core => common}/src/main/java/io/bitsquare/app/Logging.java (95%) rename {core/src/main/java/io/bitsquare => common/src/main/java/io/bitsquare/common}/crypto/CryptoException.java (77%) create mode 100644 common/src/main/java/io/bitsquare/common/crypto/CryptoUtil.java rename {core/src/main/java/io/bitsquare => common/src/main/java/io/bitsquare/common}/crypto/KeyRing.java (63%) rename {core/src/main/java/io/bitsquare => common/src/main/java/io/bitsquare/common}/crypto/KeyStorage.java (86%) rename {core/src/main/java/io/bitsquare => common/src/main/java/io/bitsquare/common}/crypto/PubKeyRing.java (65%) rename {core/src/main/java/io/bitsquare => common/src/main/java/io/bitsquare/common}/util/DesktopUtil.java (97%) rename {core/src/main/java/io/bitsquare => common/src/main/java/io/bitsquare/common}/util/Utilities.java (65%) delete mode 100644 core/src/main/java/io/bitsquare/BitsquareModule.java delete mode 100644 core/src/main/java/io/bitsquare/app/Version.java delete mode 100644 core/src/main/java/io/bitsquare/arbitration/ArbitrationRepository.java delete mode 100644 core/src/main/java/io/bitsquare/arbitration/Reputation.java delete mode 100644 core/src/main/java/io/bitsquare/arbitration/tomp2p/TomP2PArbitratorModule.java delete mode 100644 core/src/main/java/io/bitsquare/arbitration/tomp2p/TomP2PArbitratorService.java delete mode 100644 core/src/main/java/io/bitsquare/btc/BlockChainService.java delete mode 100644 core/src/main/java/io/bitsquare/common/handlers/ErrorMessageHandler.java delete mode 100644 core/src/main/java/io/bitsquare/common/handlers/ExceptionHandler.java delete mode 100644 core/src/main/java/io/bitsquare/common/handlers/FaultHandler.java delete mode 100644 core/src/main/java/io/bitsquare/common/handlers/ResultHandler.java delete mode 100644 core/src/main/java/io/bitsquare/common/taskrunner/InterceptTaskException.java delete mode 100644 core/src/main/java/io/bitsquare/common/taskrunner/Model.java delete mode 100644 core/src/main/java/io/bitsquare/common/taskrunner/Task.java delete mode 100644 core/src/main/java/io/bitsquare/common/taskrunner/TaskRunner.java delete mode 100644 core/src/main/java/io/bitsquare/crypto/CryptoService.java delete mode 100644 core/src/main/java/io/bitsquare/crypto/MessageWithPubKey.java create mode 100644 core/src/main/java/io/bitsquare/crypto/ScryptUtil.java delete mode 100644 core/src/main/java/io/bitsquare/crypto/SealedAndSignedMessage.java delete mode 100644 core/src/main/java/io/bitsquare/crypto/Util.java delete mode 100644 core/src/main/java/io/bitsquare/fiat/FiatAccount.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/AddressService.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/BaseP2PService.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/BootstrapNodes.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/ClientNode.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/DHTService.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/DecryptedMessageHandler.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/MailboxMessage.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/MailboxMessagesResultHandler.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/MailboxService.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/Message.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/MessageHandler.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/MessageService.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/NetworkException.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/Node.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/P2PModule.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/P2PService.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/Peer.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/listener/GetPeerAddressListener.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/listener/SendMessageListener.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/tomp2p/BootstrappedPeerBuilder.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/tomp2p/TomP2PAddressService.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/tomp2p/TomP2PDHTService.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/tomp2p/TomP2PMailboxService.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/tomp2p/TomP2PMessageService.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/tomp2p/TomP2PModule.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/tomp2p/TomP2PNode.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/tomp2p/TomP2PPeer.java delete mode 100644 core/src/main/java/io/bitsquare/p2p/tomp2p/TomP2PService.java delete mode 100644 core/src/main/java/io/bitsquare/trade/TradeState.java delete mode 100644 core/src/main/java/io/bitsquare/trade/handlers/TakeOfferResultHandler.java delete mode 100644 core/src/main/java/io/bitsquare/trade/offer/tomp2p/TomP2POfferBookService.java delete mode 100644 core/src/main/java/io/bitsquare/trade/offer/tomp2p/TomP2POfferModule.java delete mode 100644 core/src/main/java/io/bitsquare/trade/protocol/trade/messages/DepositTxInputsRequest.java delete mode 100644 core/src/main/java/io/bitsquare/trade/protocol/trade/tasks/buyer/CreateDepositTxInputs.java delete mode 100644 core/src/main/java/io/bitsquare/trade/protocol/trade/tasks/buyer/ProcessDepositTxInputsRequest.java delete mode 100644 core/src/main/java/io/bitsquare/trade/protocol/trade/tasks/buyer/ProcessPublishDepositTxRequest.java delete mode 100644 core/src/main/java/io/bitsquare/trade/protocol/trade/tasks/buyer/SendDepositTxPublishedMessage.java delete mode 100644 core/src/main/java/io/bitsquare/trade/protocol/trade/tasks/buyer/SendPayDepositRequest.java delete mode 100644 core/src/main/java/io/bitsquare/trade/protocol/trade/tasks/buyer/SignAndPublishDepositTx.java delete mode 100644 core/src/main/java/io/bitsquare/trade/protocol/trade/tasks/buyer/VerifyAndSignContract.java delete mode 100644 core/src/main/java/io/bitsquare/trade/protocol/trade/tasks/seller/CommitDepositTx.java delete mode 100644 core/src/main/java/io/bitsquare/trade/protocol/trade/tasks/seller/CreateAndSignContract.java delete mode 100644 core/src/main/java/io/bitsquare/trade/protocol/trade/tasks/seller/CreateAndSignDepositTx.java delete mode 100644 core/src/main/java/io/bitsquare/trade/protocol/trade/tasks/seller/ProcessDepositTxPublishedMessage.java delete mode 100644 core/src/main/java/io/bitsquare/trade/protocol/trade/tasks/seller/ProcessPayDepositRequest.java delete mode 100644 core/src/main/java/io/bitsquare/trade/protocol/trade/tasks/seller/SendDepositTxInputsRequest.java delete mode 100644 core/src/main/java/io/bitsquare/trade/protocol/trade/tasks/seller/SendPublishDepositTxRequest.java delete mode 100644 core/src/main/java/io/bitsquare/trade/protocol/trade/tasks/seller/SignPayoutTx.java delete mode 100644 core/src/main/java/io/bitsquare/user/AccountSettings.java delete mode 100644 core/src/test/java/io/bitsquare/p2p/NodeTests.java delete mode 100644 core/src/test/java/io/bitsquare/p2p/TomP2PTests.java delete mode 100644 core/src/test/java/io/bitsquare/p2p/tomp2p/TomP2PPeerTest.java delete mode 100644 core/src/test/java/io/bitsquare/trade/protocol/placeoffer/PlaceOfferProtocolTest.java delete mode 100644 core/src/test/java/io/bitsquare/util/Repeat.java delete mode 100644 core/src/test/java/io/bitsquare/util/RepeatRule.java delete mode 100644 core/src/test/java/io/bitsquare/util/RepeatRuleTests.java delete mode 100644 core/src/test/java/net/tomp2p/dht/UtilsDHT2.java delete mode 100644 doc/screenshots/actual_design/create_offer_1.png delete mode 100644 doc/screenshots/actual_design/create_offer_2.png delete mode 100644 doc/screenshots/actual_design/create_offer_3.png delete mode 100644 doc/screenshots/actual_design/create_offer_4.png delete mode 100644 doc/screenshots/actual_design/create_offer_5.png delete mode 100644 doc/screenshots/actual_design/setup_1.png delete mode 100644 doc/screenshots/actual_design/setup_2.png delete mode 100644 doc/screenshots/actual_design/setup_3.png delete mode 100644 doc/screenshots/bank_tx_inited.png delete mode 100644 doc/screenshots/deposit.png delete mode 100644 doc/screenshots/deposit_conf.png delete mode 100644 doc/screenshots/funds_deposit.png delete mode 100644 doc/screenshots/funds_tx.png delete mode 100644 doc/screenshots/funds_withdrawal.png delete mode 100644 doc/screenshots/offerer_remove_offer.png delete mode 100644 doc/screenshots/orderbook1.png delete mode 100644 doc/screenshots/orderbook2.png delete mode 100644 doc/screenshots/take_offer.png delete mode 100644 doc/screenshots/taker_see_offer.png delete mode 100644 doc/screenshots/trade_complete.png delete mode 100644 gui/src/main/java/io/bitsquare/gui/OverlayManager.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/components/Popups.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/components/TitledSeparator.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/arbitrator/ArbitratorSettingsView.fxml delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/arbitrator/ArbitratorSettingsView.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/arbitrator/browser/ArbitratorBrowserView.fxml delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/arbitrator/browser/BrowserView.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/arbitrator/profile/ArbitratorProfileView.fxml delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/arbitrator/profile/ArbitratorProfileView.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/arbitrator/registration/ArbitratorRegistrationView.fxml delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/arbitrator/registration/ArbitratorRegistrationView.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/content/altcoin/AltCoinAccountDataModel.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/content/altcoin/AltCoinAccountView.fxml delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/content/altcoin/AltCoinAccountView.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/content/altcoin/AltCoinAccountViewModel.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/content/fiat/FiatAccountDataModel.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/content/fiat/FiatAccountView.fxml delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/content/fiat/FiatAccountView.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/content/fiat/FiatAccountViewModel.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/content/password/PasswordViewModel.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/content/registration/RegistrationDataModel.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/content/registration/RegistrationView.fxml delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/content/registration/RegistrationView.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/content/registration/RegistrationViewModel.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/content/restrictions/RestrictionsDataModel.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/content/restrictions/RestrictionsView.fxml delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/content/restrictions/RestrictionsView.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/content/restrictions/RestrictionsViewModel.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/account/content/seedwords/SeedWordsViewModel.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/home/HomeView.fxml delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/home/HomeView.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/msg/MsgView.fxml delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/msg/MsgView.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/offer/offerbook/OfferBookDataModel.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/portfolio/closedtrades/ClosedTradesListItem.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/portfolio/pendingtrades/steps/ConfirmFiatReceivedView.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/portfolio/pendingtrades/steps/StartFiatView.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/main/portfolio/pendingtrades/steps/WaitFiatReceivedView.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/util/ComponentBuilder.java delete mode 100644 gui/src/main/java/io/bitsquare/gui/util/validation/BankAccountNumberValidator.java delete mode 100644 gui/src/main/resources/images/nav/home.png delete mode 100644 gui/src/main/resources/images/nav/home@2x.png delete mode 100644 gui/src/main/resources/images/nav/home_active.png delete mode 100644 gui/src/main/resources/images/nav/home_active@2x.png delete mode 100644 gui/src/main/resources/images/nav/msg.png delete mode 100644 gui/src/main/resources/images/nav/msg@2x.png delete mode 100644 gui/src/main/resources/images/nav/msg_active.png delete mode 100644 gui/src/main/resources/images/nav/msg_active@2x.png create mode 100644 network/src/main/java/io/bitsquare/crypto/EncryptionService.java rename core/src/main/java/io/bitsquare/crypto/CryptoModule.java => network/src/main/java/io/bitsquare/crypto/EncryptionServiceModule.java (81%) create mode 100644 network/src/main/java/io/bitsquare/p2p/Message.java create mode 100644 network/src/main/java/io/bitsquare/p2p/P2PModule.java create mode 100644 network/src/main/java/io/bitsquare/p2p/P2PService.java rename core/src/test/java/io/bitsquare/crypto/CryptoServiceTests.java => network/src/test/java/io/bitsquare/crypto/EncryptionServiceTests.java (69%) diff --git a/.gitignore b/.gitignore index c965dc5076..a1e6c4336a 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ build .project .settings *.java.hsp + +gui/updatefx \ No newline at end of file diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml index c5c60b8c1d..84c6b86a03 100644 --- a/.idea/codeStyleSettings.xml +++ b/.idea/codeStyleSettings.xml @@ -3,88 +3,9 @@