├── .config └── dotnet-tools.json ├── .editorconfig ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug-report.md │ ├── feature-request.md │ └── general-issue.md └── workflows │ ├── build-and-test.yml │ └── build-backend.yml ├── .gitignore ├── Chaincase.Android ├── Assets │ └── AboutAssets.txt ├── Chaincase.Android.csproj ├── MainActivity.cs ├── Properties │ ├── AndroidManifest.xml │ └── AssemblyInfo.cs ├── Resources │ ├── AboutResources.txt │ ├── Resource.designer.cs │ ├── layout │ │ ├── Tabbar.xml │ │ └── Toolbar.xml │ ├── mipmap-anydpi-v26 │ │ ├── icon.xml │ │ └── icon_round.xml │ ├── mipmap-hdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ ├── mipmap-mdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ ├── mipmap-xhdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ ├── mipmap-xxhdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ ├── mipmap-xxxhdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ └── values │ │ ├── colors.xml │ │ └── styles.xml └── wwwroot │ └── index.html ├── Chaincase.Common ├── Chaincase.Common.csproj ├── Config.cs ├── Contracts │ ├── AppInitializedEventArgs.cs │ ├── IClipboard.cs │ ├── IDataDirProvider.cs │ ├── IHsmStorage.cs │ ├── IMainThreadInvoker.cs │ ├── INotificationManager.cs │ ├── IShare.cs │ ├── IThemeManager.cs │ ├── ITorManager.cs │ └── IWebsiteLauncher.cs ├── Extensions.cs ├── Global.cs ├── Models │ ├── LatestMatureHeaderResponse.cs │ ├── RoundPhaseState.cs │ ├── SmartCoinStatus.cs │ ├── Status.cs │ ├── StatusSet.cs │ ├── StatusType.cs │ └── TransactionInfo.cs ├── Services │ ├── AesThenHmac.cs │ ├── ChaincaseBitcoinStore.cs │ ├── ChaincaseClient.cs │ ├── ChaincaseSynchronizer.cs │ ├── ChaincaseWalletManager.cs │ ├── Mock │ │ ├── MockHsmStorage.cs │ │ ├── MockNotificationManager.cs │ │ ├── MockThemeManager.cs │ │ └── MockTorManager.cs │ └── SensitiveStorage.cs └── UiConfig.cs ├── Chaincase.SSB ├── Chaincase.SSB.csproj ├── DesktopStartupActions.cs ├── DesktopTorManager.cs ├── JsClipboard.cs ├── JsInteropConfigProvider.cs ├── JsInteropSecureConfigProvider.cs ├── Pages │ ├── Error.cshtml │ └── _Host.cshtml ├── Program.cs ├── Properties │ └── launchSettings.json ├── README.md ├── SSBDataDirProvider.cs ├── SSBMainThreadInvoker.cs ├── SSBShare.cs ├── Startup.cs ├── _Imports.razor ├── appsettings.Development.json └── appsettings.json ├── Chaincase.Tests ├── .dockerignore ├── BackendTests.cs ├── Chaincase.Tests.csproj ├── Dockerfile ├── E2ETests.cs ├── StorageTests.cs ├── TestUtils.cs ├── UiTests.cs ├── WebHostServerFixture.cs ├── docker-compose.yml ├── docker-entrypoint.sh ├── readme ├── run-tests.ps1 └── run-tests.sh ├── Chaincase.UI ├── App.razor ├── Chaincase.UI.csproj ├── Components │ ├── AuthorizeCoinJoinModal.razor │ ├── ClipboardToast.razor │ ├── CoinDetailModal.razor │ ├── FeeModal.razor │ ├── IonPasswordInput.razor │ ├── QRCode.razor │ ├── SelectableCoin.razor │ ├── SplashLogo.razor │ ├── Status.razor │ └── TransactionDetailModal.razor ├── Pages │ ├── BackUpPage.razor │ ├── BackUpStartPage.razor │ ├── BackUpVerifyPage.razor │ ├── CoinJoinPage.razor │ ├── CoinJoinSelectCoinsPage.razor │ ├── LandingPage.razor │ ├── LoadWalletPage.razor │ ├── LoginPage.razor │ ├── NewPasswordPage.razor │ ├── OverviewPage.razor │ ├── ReceiveAddressPage.razor │ ├── ReceiveLabelPage.razor │ ├── SelectCoinsPage.razor │ ├── SendAmountPage.razor │ ├── SendApprovalPage.razor │ ├── SendWhoPage.razor │ ├── SentPage.razor │ └── WalletInfoPage.razor ├── Services │ ├── Extensions.cs │ ├── StackService.cs │ ├── ThemeSwitcher.cs │ └── UIStateService.cs ├── Shared │ ├── FullPageLayout.razor │ ├── MainLayout.razor │ └── TabLayout.razor ├── ViewModels │ ├── BackUpViewModel.cs │ ├── CoinJoinViewModel.cs │ ├── CoinViewModel.cs │ ├── LoadWalletViewModel.cs │ ├── NewPasswordViewModel.cs │ ├── OverviewViewModel.cs │ ├── PINViewModel.cs │ ├── ReceiveViewModel.cs │ ├── SelectCoinsViewModel.cs │ ├── SendViewModel.cs │ ├── StatusViewModel.cs │ ├── TransactionViewModel.cs │ └── WalletInfoViewModel.cs ├── _Imports.razor ├── package-lock.json ├── package.json └── wwwroot │ ├── fetchfix.js │ ├── global.js │ ├── img │ ├── chaincase-dark-theme-mark.svg │ ├── chaincase-dark-theme-vertical-logomark.svg │ ├── chaincase-light-theme-mark.svg │ ├── chaincase-light-theme-vertical-logomark.svg │ ├── chaincase-white-theme-mark.svg │ └── logo_vertical.png │ └── style │ └── global.css ├── Chaincase.iOS ├── AppDelegate.cs ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon1024.png │ │ ├── Icon120.png │ │ ├── Icon152.png │ │ ├── Icon167.png │ │ ├── Icon180.png │ │ ├── Icon20.png │ │ ├── Icon29.png │ │ ├── Icon40.png │ │ ├── Icon58.png │ │ ├── Icon60.png │ │ ├── Icon76.png │ │ ├── Icon80.png │ │ └── Icon87.png │ └── logo_vertical.imageset │ │ ├── Contents.json │ │ └── logo_vertical.png ├── Background │ ├── iOSInitializeNoWalletContext.cs │ └── iOSOnSleepingTask.cs ├── Chaincase.iOS.csproj ├── Entitlements.developer.plist ├── Entitlements.plist ├── Info.plist ├── LiveSharp.dashboard.cs ├── Main.cs ├── Properties │ └── AssemblyInfo.cs ├── Resources │ ├── Default-568h@2x.png │ ├── Default-Portrait.png │ ├── Default-Portrait@2x.png │ ├── Default.png │ ├── Default@2x.png │ ├── LaunchScreen.storyboard │ └── wwwroot │ │ └── index.html └── Services │ ├── iOSHsmStorage.cs │ ├── iOSNotificationManager.cs │ ├── iOSNotificationReceiver.cs │ ├── iOSTorManager.cs │ └── iOSWalletDirectories.cs ├── Chaincase.sln ├── Chaincase ├── AssemblyInfo.cs ├── Background │ └── BackgroundMessages.cs ├── BlazorApp.cs ├── Chaincase.csproj ├── Main.razor ├── Services │ ├── XamarinClipboard.cs │ ├── XamarinDataDirProvider.cs │ ├── XamarinHsmStorage.cs │ ├── XamarinMainThreadInvoker.cs │ ├── XamarinShare.cs │ └── XamarinThemeManager.cs └── _Imports.razor ├── LICENSE ├── README.md └── WalletWasabi.SDK ├── .coverage.sh ├── .editorconfig ├── .gitattributes ├── .github └── ISSUE_TEMPLATE │ ├── bug-report.md │ ├── feature-request.md │ └── general-issue.md ├── .gitignore ├── .gitrepo ├── CONTRIBUTING.md ├── CodeMaid.config ├── Directory.Build.props ├── Dockerfile ├── LICENSE.md ├── NuGet.Config ├── PGP.txt ├── README.md ├── SECURITY.md ├── Settings.StyleCop ├── WalletWasabi.Backend ├── .dockerignore ├── Chaincase │ └── LatestMatureHeaderResponse.cs ├── Config.cs ├── Controllers │ ├── BatchController.cs │ ├── BlockchainController.cs │ ├── ChaumianCoinJoinController.cs │ ├── HomeController.cs │ ├── NotificationTokensController.cs │ ├── OffchainController.cs │ ├── SoftwareController.cs │ └── WasabiController.cs ├── Data │ ├── DesignTimeDbContextFactoryBase.cs │ ├── MigrationStartupTask.cs │ ├── WasabiBackendContext.cs │ └── WasabiDesignTimeDbContextFactory.cs ├── Extensions.cs ├── Global.cs ├── HashCashFilter.cs ├── IStartupTask.cs ├── InitConfigStartupTask.cs ├── Middlewares │ └── HeadMethodMiddleware.cs ├── Migrations │ ├── 20211022170655_InitialMigration.Designer.cs │ ├── 20211022170655_InitialMigration.cs │ └── WasabiBackendContextModelSnapshot.cs ├── Polyfills │ ├── DbContextFactory.cs │ ├── Extensions.cs │ └── IDbContextFactory.cs ├── Program.cs ├── Properties │ └── launchSettings.json ├── README.md ├── SendPushService.cs ├── Startup.cs ├── WalletWasabi.Backend.csproj ├── WebsiteTorifier.cs ├── ZoneLimits.cs ├── appsettings.Development.json ├── appsettings.json ├── docker-compose.yml └── wwwroot │ ├── css │ ├── _variables.scss │ ├── bootstrap.css │ └── style.css │ ├── fonts │ ├── inconsolata-v18-latin_vietnamese_latin-ext-700.woff │ ├── inconsolata-v18-latin_vietnamese_latin-ext-700.woff2 │ ├── inconsolata-v18-latin_vietnamese_latin-ext-regular.woff │ ├── inconsolata-v18-latin_vietnamese_latin-ext-regular.woff2 │ ├── playfair-display-v15-latin_vietnamese_latin-ext_cyrillic-700.woff │ └── playfair-display-v15-latin_vietnamese_latin-ext_cyrillic-700.woff2 │ ├── images │ ├── favicon.ico │ ├── hero-off.jpg │ ├── hero-on.jpg │ ├── icon-colored-finder.svg │ ├── icon-colored-linux.svg │ ├── icon-colored-onion.png │ ├── icon-colored-ubuntu.svg │ ├── icon-colored-windows.svg │ ├── icon-external.svg │ ├── illustration-coinjoin.svg │ ├── infographics.jpg │ ├── shader-loop.svg │ ├── shader-wasabi.svg │ ├── wasabi-social.jpg │ ├── wasabi-wallet-laptop.png │ ├── wasabi-wallet-logo.svg │ └── wasabi_wallet_logo_2-1.png │ └── index.html ├── WalletWasabi.Community └── Dojo.md ├── WalletWasabi.Documentation ├── BackendDeployment.md ├── ClientDeployment.md ├── CodeCoverage.md ├── FAQ.md ├── Guides │ ├── 20180719DemoGuide.md │ ├── 20190416HardwareWalletTestingGuide.md │ ├── 20190617ContributionGame.md │ ├── DeterministicBuildGuide.md │ ├── HowToDebug.md │ ├── InstallInstructions.md │ ├── MacOsSigning.md │ └── UpgradeTorDaemons.md ├── PasswordFinder.md ├── Ports.md ├── RPC.md ├── WasabiCompatibility.md ├── WasabiSetupRegtest.md └── WasabikaCodex.md ├── WalletWasabi.Gui ├── App.xaml ├── App.xaml.cs ├── Assets │ ├── CascadiaMono.ttf │ ├── WasabiLogo.icns │ ├── WasabiLogo.ico │ ├── WasabiLogo.png │ ├── WasabiLogo128.png │ ├── WasabiLogo16.png │ ├── WasabiLogo192.png │ ├── WasabiLogo22.png │ ├── WasabiLogo24.png │ ├── WasabiLogo256.png │ ├── WasabiLogo32.png │ ├── WasabiLogo36.png │ ├── WasabiLogo42.png │ ├── WasabiLogo48.png │ ├── WasabiLogo512.png │ ├── WasabiLogo52.png │ ├── WasabiLogo64.png │ ├── WasabiLogo72.png │ ├── WasabiLogo8.png │ └── WasabiLogo96.png ├── Behaviors │ ├── BindSelectedTextBehavior.cs │ ├── ClearPropertyOnLostFocusBehavior.cs │ ├── CloseWindowBehavior.cs │ ├── CommandBaseBehavior.cs │ ├── CommandOnClickBehavior.cs │ ├── CommandOnClickReleaseBehavior.cs │ ├── CommandOnDoubleClickBehavior.cs │ ├── CommandOnEnterBehavior.cs │ ├── CommandOnFirstVisible.cs │ ├── CommandOnKeyDownBehavior.cs │ ├── CommandOnKeyUpBehavior.cs │ ├── CommandOnLostFocusBehavior.cs │ ├── CommandOnPointerEnterLeaveBehavior.cs │ ├── FocusBehavior.cs │ ├── FocusOnAttachedBehavior.cs │ ├── GreyOutOnDisabledBehavior.cs │ ├── PasteAddressOnClickBehavior.cs │ └── PreventTooltipStuckBehavior.cs ├── CommandLine │ ├── CommandInterpreter.cs │ ├── CrashReportCommand.cs │ ├── Daemon.cs │ ├── MixerCommand.cs │ ├── Native.cs │ ├── PasswordFinder.cs │ └── PasswordFinderCommand.cs ├── Config.cs ├── Controls │ ├── BusyIndicator.cs │ ├── BusyIndicator.xaml │ ├── EditableTextBlock.cs │ ├── EditableTextBlock.xaml │ ├── ExtendedListBox.cs │ ├── ExtendedTextBox.cs │ ├── ExtendedTextBox.xaml │ ├── GroupBox.cs │ ├── GroupBox.xaml │ ├── LockScreen │ │ ├── LockScreen.xaml │ │ ├── LockScreen.xaml.cs │ │ ├── LockScreenViewModelBase.cs │ │ ├── PinLockScreenView.xaml │ │ ├── PinLockScreenView.xaml.cs │ │ ├── PinLockScreenViewModel.cs │ │ ├── SlideLock.cs │ │ ├── SlideLock.xaml │ │ ├── SlideLockScreenView.xaml │ │ ├── SlideLockScreenView.xaml.cs │ │ ├── SlideLockScreenViewModel.cs │ │ └── WasabiLockScreenViewModelBase.cs │ ├── ModalDialog.xaml │ ├── ModalDialog.xaml.cs │ ├── MultiTextBox.cs │ ├── MultiTextBox.xaml │ ├── QrCode.cs │ ├── Shields.cs │ ├── Shields.xaml │ ├── SortingArrow.cs │ ├── Spinner.xaml │ ├── Spinner.xaml.cs │ ├── StatusBar.xaml │ ├── StatusBar.xaml.cs │ ├── TogglePasswordBox.cs │ ├── TogglePasswordBox.xaml │ ├── TransactionDetails │ │ ├── ViewModels │ │ │ └── TransactionDetailsViewModel.cs │ │ └── Views │ │ │ ├── TransactionDetails.xaml │ │ │ └── TransactionDetails.xaml.cs │ └── WalletExplorer │ │ ├── BuildTabView.xaml │ │ ├── BuildTabView.xaml.cs │ │ ├── BuildTabViewModel.cs │ │ ├── ClosedHardwareWalletViewModel.cs │ │ ├── ClosedWalletViewModel.cs │ │ ├── ClosedWatchOnlyWalletViewModel.cs │ │ ├── CoinInfoTabView.xaml │ │ ├── CoinInfoTabView.xaml.cs │ │ ├── CoinInfoTabViewModel.cs │ │ ├── CoinJoinTabView.xaml │ │ ├── CoinJoinTabView.xaml.cs │ │ ├── CoinJoinTabViewModel.cs │ │ ├── CoinListView.xaml │ │ ├── CoinListView.xaml.cs │ │ ├── CoinListViewModel.cs │ │ ├── CoinViewModel.cs │ │ ├── HardwareWalletViewModel.cs │ │ ├── HistoryTabView.xaml │ │ ├── HistoryTabView.xaml.cs │ │ ├── HistoryTabViewModel.cs │ │ ├── PinPadView.xaml │ │ ├── PinPadView.xaml.cs │ │ ├── PinPadViewModel.cs │ │ ├── ReceiveTabView.xaml │ │ ├── ReceiveTabView.xaml.cs │ │ ├── ReceiveTabViewModel.cs │ │ ├── SendControlView.xaml │ │ ├── SendControlView.xaml.cs │ │ ├── SendControlViewModel.cs │ │ ├── SendTabView.xaml │ │ ├── SendTabView.xaml.cs │ │ ├── SendTabViewModel.cs │ │ ├── TransactionBroadcasterView.xaml │ │ ├── TransactionBroadcasterView.xaml.cs │ │ ├── TransactionBroadcasterViewModel.cs │ │ ├── TransactionInfoTabView.xaml │ │ ├── TransactionInfoTabView.xaml.cs │ │ ├── TransactionInfoTabViewModel.cs │ │ ├── TransactionViewModel.cs │ │ ├── TransactionViewerView.xaml │ │ ├── TransactionViewerView.xaml.cs │ │ ├── TransactionViewerViewModel.cs │ │ ├── WalletAdvancedViewModel.cs │ │ ├── WalletExplorerView.xaml │ │ ├── WalletExplorerView.xaml.cs │ │ ├── WalletExplorerViewModel.cs │ │ ├── WalletInfoView.xaml │ │ ├── WalletInfoView.xaml.cs │ │ ├── WalletInfoViewModel.cs │ │ ├── WalletViewModel.cs │ │ ├── WalletViewModelBase.cs │ │ └── WatchOnlyWalletViewModel.cs ├── Converters │ ├── AmountForegroundConverter.cs │ ├── BooleanStringConverter.cs │ ├── CoinItemExpanderColorConverter.cs │ ├── CoinJoinedVisibilityConverter.cs │ ├── CoinStatusBorderBrushConverter.cs │ ├── CoinStatusColorConverter.cs │ ├── CoinStatusForegroundConverter.cs │ ├── CoinStatusStringConverter.cs │ ├── ErrorDescriptorToBorderColorConverter.cs │ ├── ErrorSeverityColorConverter.cs │ ├── FeeTargetTimeConverter.cs │ ├── FileSizeStringConverter.cs │ ├── FilterLeftStatusConverter.cs │ ├── InverseBooleanConverter.cs │ ├── LurkingWifeModeStringConverter.cs │ ├── MoneyBrushConverter.cs │ ├── MoneyStringConverter.cs │ ├── NetworkStringConverter.cs │ ├── PascalToPhraseConverter.cs │ ├── PhaseColorConverter.cs │ ├── PhaseStringConverter.cs │ ├── PrivacyLevelValueConverter.cs │ ├── RpcStatusStringConverter.cs │ ├── ShouldDisplayValueConverter.cs │ ├── ShowCursorConverter.cs │ ├── SortingPreferenceJsonConverter.cs │ ├── StatusColorConverter.cs │ ├── TimeSpanStringConverter.cs │ ├── TimeSpanVisibilityConverter.cs │ ├── UsdExchangeRateAmountToolTipConverter.cs │ ├── VersionStringConverter.cs │ ├── WalletLoadingBoolConverter.cs │ └── WindowStateAfterSartJsonConverter.cs ├── CrashReport │ ├── CrashReportApp.xaml │ ├── CrashReportApp.xaml.cs │ ├── CrashReporter.cs │ ├── ViewModels │ │ └── CrashReportWindowViewModel.cs │ └── Views │ │ ├── CrashReportWindow.xaml │ │ └── CrashReportWindow.xaml.cs ├── Dialogs │ ├── AvaloniaControlsExtensions.cs │ ├── CannotCloseDialogView.xaml │ ├── CannotCloseDialogView.xaml.cs │ ├── CannotCloseDialogViewModel.cs │ ├── GenSocksServFailDialogView.xaml │ ├── GenSocksServFailDialogView.xaml.cs │ ├── GenSocksServFailDialogViewModel.cs │ ├── TextInputDialogView.xaml │ ├── TextInputDialogView.xaml.cs │ └── TextInputDialogViewModel.cs ├── Extensions │ └── DummyHack.txt ├── Global.cs ├── Helpers │ ├── AvalonStudioShellExtensions.cs │ ├── AvaloniaThreadingExtensions.cs │ ├── ByteSizeHelper.cs │ ├── FileHelpers.cs │ ├── NotificationHelpers.cs │ ├── NullNotificationManager.cs │ ├── ShellExecuteResult.cs │ ├── ShellType.cs │ ├── ShellUtils.cs │ └── Utils.cs ├── Icons │ └── Icons.xaml ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── Models │ ├── FeeDisplayFormat.cs │ ├── JsonRpcServerConfiguration.cs │ ├── LockScreenType.cs │ ├── RoundPhaseState.cs │ ├── ShieldState.cs │ ├── SmartCoinStatus.cs │ ├── Sorting │ │ ├── SortOrder.cs │ │ └── SortingPreference.cs │ └── StatusBarStatuses │ │ ├── Status.cs │ │ ├── StatusSet.cs │ │ └── StatusType.cs ├── Program.cs ├── Properties │ └── launchSettings.json ├── Rpc │ ├── JsonRpcErrorCodes.cs │ ├── JsonRpcMethodAttribute.cs │ ├── JsonRpcMethodMetadata.cs │ ├── JsonRpcRequest.cs │ ├── JsonRpcRequestHandler.cs │ ├── JsonRpcResponse.cs │ ├── JsonRpcServer.cs │ ├── JsonRpcService.cs │ ├── PaymentInfo.cs │ └── WasabiJsonRpcService.cs ├── Shell │ ├── Commands │ │ ├── DiskCommands.cs │ │ ├── HelpCommands.cs │ │ ├── SystemCommands.cs │ │ ├── ToolCommands.cs │ │ └── WalletCommands.cs │ └── MainMenu │ │ ├── FileMainMenuItems.cs │ │ ├── HelpMainMenuItems.cs │ │ └── ToolsMainMenuItems.cs ├── Styles │ └── Styles.xaml ├── Suggestions │ ├── SuggestLabelView.xaml │ ├── SuggestLabelView.xaml.cs │ ├── SuggestLabelViewModel.cs │ ├── SuggestionBehavior.cs │ └── SuggestionViewModel.cs ├── Tabs │ ├── AboutView.xaml │ ├── AboutView.xaml.cs │ ├── AboutViewModel.cs │ ├── LegalDocumentsView.xaml │ ├── LegalDocumentsView.xaml.cs │ ├── LegalDocumentsViewModel.cs │ ├── SettingsView.xaml │ ├── SettingsView.xaml.cs │ ├── SettingsViewModel.cs │ └── WalletManager │ │ ├── GenerateWallets │ │ ├── GenerateWalletSuccessView.xaml │ │ ├── GenerateWalletSuccessView.xaml.cs │ │ ├── GenerateWalletSuccessViewModel.cs │ │ ├── GenerateWalletView.xaml │ │ ├── GenerateWalletView.xaml.cs │ │ └── GenerateWalletViewModel.cs │ │ ├── HardwareWallets │ │ ├── ConnectHardwareWalletView.xaml │ │ ├── ConnectHardwareWalletView.xaml.cs │ │ ├── ConnectHardwareWalletViewModel.cs │ │ └── HardwareWalletViewModel.cs │ │ ├── LoadWallets │ │ ├── LoadWalletType.cs │ │ ├── LoadWalletView.xaml │ │ ├── LoadWalletView.xaml.cs │ │ └── LoadWalletViewModel.cs │ │ ├── RecoverWallets │ │ ├── RecoverWalletView.xaml │ │ ├── RecoverWalletView.xaml.cs │ │ └── RecoverWalletViewModel.cs │ │ ├── WalletManagerView.xaml │ │ ├── WalletManagerView.xaml.cs │ │ └── WalletManagerViewModel.cs ├── UiConfig.cs ├── Validation │ ├── IRegisterValidationMethod.cs │ ├── IValidations.cs │ ├── ValidationExtensions.cs │ └── Validations.cs ├── ViewModels │ ├── AddressViewModel.cs │ ├── ApplicationViewModel.cs │ ├── CategoryViewModel.cs │ ├── IWalletViewModel.cs │ ├── MainWindowViewModel.cs │ ├── StatusBarViewModel.cs │ ├── ViewModelBase.cs │ └── WasabiDocumentTabViewModel.cs ├── WalletWasabi.Gui.csproj ├── WasabiWindow.xaml ├── WasabiWindow.xaml.cs └── packages.lock.json ├── WalletWasabi.Packager ├── Content │ └── Osx │ │ ├── App │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── WasabiLogo.icns │ │ ├── Dmg │ │ ├── .DS_Store.dat │ │ ├── .background │ │ │ └── Logo_with_text_small.png │ │ └── .fseventsd │ │ │ ├── 000000000081abf0 │ │ │ ├── 000000000081abf1 │ │ │ └── fseventsd-uuid │ │ ├── WasabiLogo.icns │ │ ├── addcert.sh │ │ └── entitlements.plist ├── MacSignTools.cs ├── NSubsys │ ├── NSubsysUtil.cs │ └── PeUtility.cs ├── Program.cs ├── Tools.cs ├── WalletWasabi.Packager.csproj └── packages.lock.json ├── WalletWasabi.Tests ├── AcceptanceTests │ └── HwiKatas.cs ├── Global.cs ├── Helpers │ ├── StringNoWhiteSpaceEqualityComparer.cs │ ├── TestNodeBuilder.cs │ └── TransactionProcessorExtensions.cs ├── IntegrationTests │ ├── ExtPubKeyExplorerTests.cs │ ├── ExternalApiTests.cs │ ├── LiveServerTests.cs │ ├── P2pTests.cs │ └── TorTests.cs ├── README.md ├── RegressionTests │ ├── BackendTests.cs │ ├── BuildTests.cs │ ├── CoinJoinTests.cs │ ├── Common.cs │ ├── DosTests.cs │ ├── SendTests.cs │ └── WalletTests.cs ├── RpcTests.cs ├── TestableRpcService.cs ├── UnitTests │ ├── AllFeeEstimateTests.cs │ ├── AsyncMutexTests.cs │ ├── BestEffortEndpointConnectorTests.cs │ ├── BitcoinCore │ │ ├── ConfigTests.cs │ │ ├── ConfigTranslatorTests.cs │ │ ├── IndexBuilderServiceTests.cs │ │ ├── NodeBuildingTests.cs │ │ ├── P2pBasedTests.cs │ │ └── RpcBasedTests.cs │ ├── BlockNotifierTests.cs │ ├── Clients │ │ ├── MockTorHttpClient.cs │ │ └── WasabiClientTests.cs │ ├── Converters │ │ ├── OutPointAsTxoRefJsonConverterTests.cs │ │ └── TxoRef.cs │ ├── Crypto │ │ ├── BlindingTests.cs │ │ ├── HashingTests.cs │ │ ├── RandomTests.cs │ │ ├── ScalarTests.cs │ │ └── StringCipherTests.cs │ ├── Filters │ │ ├── IndexBuilderTests.cs │ │ └── IndexStoreTests.cs │ ├── GUI │ │ └── CommandInterpreterTest.cs │ ├── GuardTests.cs │ ├── HashChainTests.cs │ ├── Hwi │ │ ├── DefaultResponseTests.cs │ │ ├── HwiProcessBridgeMock.cs │ │ └── MockedDeviceTests.cs │ ├── InputsResponseTests.cs │ ├── IoTests.cs │ ├── KeyManagementTests.cs │ ├── LegalTests.cs │ ├── LinqExtensionsTests.cs │ ├── ListExtensionTests.cs │ ├── LoggerTests.cs │ ├── MemoryTests.cs │ ├── MockRpcClient.cs │ ├── NBitcoinTests.cs │ ├── ParserTests.cs │ ├── PasswordTests.cs │ ├── SerializableExceptionTests.cs │ ├── SmartBlockProviderTests.cs │ ├── SmartCoinTests.cs │ ├── SmartHeaderTests.cs │ ├── SmartLabelTests.cs │ ├── StringNoWhiteSpaceEqualityComparerTests.cs │ ├── Transactions │ │ ├── AllTransactionStoreTests.cs │ │ ├── OperationMergerTests.cs │ │ ├── PayjoinTests.cs │ │ ├── SmartTransactionTests.cs │ │ ├── TransactionFactoryTests.cs │ │ ├── TransactionProcessorTests.cs │ │ ├── TransactionStoreMock.cs │ │ └── TransactionStoreTests.cs │ ├── UpdateStatusTests.cs │ ├── UtxoRefereeTests.cs │ └── WalletDirTests.cs ├── WalletWasabi.Tests.csproj ├── XunitConfiguration │ ├── CollectionDefinitions.cs │ ├── LiveServerTestsFixture.cs │ ├── LiverServerTestsCollections.cs │ └── RegTestFixture.cs └── xunit.runner.json ├── WalletWasabi.WindowsInstaller ├── Common.wxl ├── Components.wxs ├── ComponentsGenerated.wxs ├── Directories.wxs ├── Product.wxs └── WalletWasabi.WindowsInstaller.wixproj ├── WalletWasabi.sln ├── WalletWasabi ├── AssemblyInfo.cs ├── Backend │ └── Models │ │ ├── DeviceToken.cs │ │ ├── ExchangeRate.cs │ │ ├── FeeEstimationPair.cs │ │ ├── FilterModel.cs │ │ ├── FiltersResponseState.cs │ │ ├── Requests │ │ └── BroadcastRequest.cs │ │ └── Responses │ │ ├── FiltersResponse.cs │ │ ├── StatusResponse.cs │ │ ├── SynchronizeResponse.cs │ │ └── VersionsResponse.cs ├── Bases │ ├── ByteArraySerializableBase.cs │ ├── ConfigBase.cs │ ├── NotifyPropertyChangedBase.cs │ ├── OctetSerializableBase.cs │ ├── PeriodicRunner.cs │ └── TorDisposableBase.cs ├── BestEffortEndpointConnector.cs ├── BitcoinCore │ ├── CachedRpcClient.cs │ ├── Configuration │ │ ├── CoreConfig.cs │ │ ├── CoreConfigLine.cs │ │ ├── CoreConfigTranslator.cs │ │ ├── NetworkTranslator.cs │ │ └── Whitening │ │ │ ├── WhiteBind.cs │ │ │ ├── WhiteEntry.cs │ │ │ └── WhiteList.cs │ ├── CoreNode.cs │ ├── CoreNodeParams.cs │ ├── Endpointing │ │ ├── EndPointStrategy.cs │ │ ├── EndPointStrategyType.cs │ │ ├── EndPointType.cs │ │ └── PortFinder.cs │ ├── IRPCClient.cs │ ├── Monitoring │ │ ├── P2pReconnector.cs │ │ ├── RpcFeeProvider.cs │ │ ├── RpcMonitor.cs │ │ └── RpcStatus.cs │ ├── P2pNode.cs │ ├── Processes │ │ ├── BitcoindException.cs │ │ ├── BitcoindProcessBridge.cs │ │ ├── BitcoindRpcProcessBridge.cs │ │ └── PidFile.cs │ ├── RpcClientBase.cs │ ├── RpcModels │ │ ├── RpcPubkeyType.cs │ │ ├── VerboseBlockInfo.cs │ │ ├── VerboseInputInfo.cs │ │ ├── VerboseOutputInfo.cs │ │ └── VerboseTransactionInfo.cs │ └── RpcParser.cs ├── Blockchain │ ├── Analysis │ │ ├── Clustering │ │ │ ├── Cluster.cs │ │ │ └── SmartLabel.cs │ │ └── FeesEstimation │ │ │ ├── AllFeeEstimate.cs │ │ │ ├── FeeProviders.cs │ │ │ └── IFeeProvider.cs │ ├── BlockFilters │ │ ├── IndexBuilderService.cs │ │ ├── StartingFilters.cs │ │ └── SyncInfo.cs │ ├── Blocks │ │ ├── BlockNotifier.cs │ │ ├── SmartHeader.cs │ │ └── SmartHeaderChain.cs │ ├── Keys │ │ ├── BlockchainState.cs │ │ ├── HdPubKey.cs │ │ ├── KeyManager.cs │ │ ├── KeyState.cs │ │ └── WalletGenerator.cs │ ├── Mempool │ │ └── MempoolService.cs │ ├── P2p │ │ ├── P2pBehavior.cs │ │ ├── TrustedP2pBehavior.cs │ │ └── UntrustedP2pBehavior.cs │ ├── TransactionBroadcasting │ │ └── TransactionBroadcaster.cs │ ├── TransactionBuilding │ │ ├── BuildTransactionResult.cs │ │ ├── ChangeStrategy.cs │ │ ├── DestinationRequest.cs │ │ ├── FeeStrategy.cs │ │ ├── FeeStrategyType.cs │ │ ├── MoneyRequest.cs │ │ ├── MoneyRequestType.cs │ │ ├── PaymentIntent.cs │ │ └── SmartCoinSelector.cs │ ├── TransactionOutputs │ │ ├── CoinsRegistry.cs │ │ ├── CoinsView.cs │ │ ├── ICoinsView.cs │ │ └── SmartCoin.cs │ ├── TransactionProcessing │ │ ├── ProcessedResult.cs │ │ └── TransactionProcessor.cs │ └── Transactions │ │ ├── AllTransactionStore.cs │ │ ├── AllTransactionStoreMock.cs │ │ ├── Operations │ │ ├── Append.cs │ │ ├── ITxStoreOperation.cs │ │ ├── OperationMerger.cs │ │ ├── Remove.cs │ │ └── Update.cs │ │ ├── SmartTransaction.cs │ │ ├── TransactionBroadcastEntry.cs │ │ ├── TransactionDependencyNode.cs │ │ ├── TransactionFactory.cs │ │ ├── TransactionHistoryBuilder.cs │ │ ├── TransactionStore.cs │ │ └── TransactionSummary.cs ├── CoinJoin │ ├── Client │ │ ├── Clients │ │ │ ├── AliceClient.cs │ │ │ ├── AliceClient4.cs │ │ │ ├── AliceClientBase.cs │ │ │ ├── BobClient.cs │ │ │ ├── CoinJoinClient.cs │ │ │ ├── Queuing │ │ │ │ ├── DequeueReason.cs │ │ │ │ └── DequeueResult.cs │ │ │ └── SatoshiClient.cs │ │ ├── CoinJoinProcessor.cs │ │ └── Rounds │ │ │ ├── ClientRound.cs │ │ │ ├── ClientRoundRegistration.cs │ │ │ └── ClientState.cs │ ├── Common │ │ ├── Crypto │ │ │ ├── SchnorrKey.cs │ │ │ └── SchnorrPubKey.cs │ │ └── Models │ │ │ ├── ActiveOutput.cs │ │ │ ├── BlindedOutputWithNonceIndex.cs │ │ │ ├── ConnectionConfirmationResponse.cs │ │ │ ├── HdPubKeyBlindedPair.cs │ │ │ ├── InputProofModel.cs │ │ │ ├── InputsRequest.cs │ │ │ ├── InputsRequest4.cs │ │ │ ├── InputsRequestBase.cs │ │ │ ├── InputsResponse.cs │ │ │ ├── OutputRequest.cs │ │ │ ├── PublicNonceWithIndex.cs │ │ │ ├── RoundPhase.cs │ │ │ ├── RoundStateResponse.cs │ │ │ ├── RoundStateResponse4.cs │ │ │ └── RoundStateResponseBase.cs │ └── Coordinator │ │ ├── Banning │ │ ├── BannedUtxo.cs │ │ └── UtxoReferee.cs │ │ ├── Coordinator.cs │ │ ├── MixingLevels │ │ ├── MixingLevel.cs │ │ └── MixingLevelCollection.cs │ │ ├── Participants │ │ ├── Alice.cs │ │ ├── AliceState.cs │ │ └── Bob.cs │ │ └── Rounds │ │ ├── CoordinatorRound.cs │ │ ├── CoordinatorRoundConfig.cs │ │ ├── CoordinatorRoundStatus.cs │ │ └── RoundNonceProvider.cs ├── Crypto │ ├── HashHelpers.cs │ ├── Randomness │ │ ├── IWasabiRandom.cs │ │ ├── MockRandom.cs │ │ ├── SecureRandom.cs │ │ └── UnsecureRandom.cs │ ├── SchnorrBlindingSignature.cs │ ├── StringCipher.cs │ ├── TokenGenerator.cs │ └── UnblindedSignature.cs ├── Exceptions │ ├── ConnectionException.cs │ ├── InsufficientBalanceException.cs │ ├── InvalidTxException.cs │ ├── NotSupportedNetworkException.cs │ ├── TorException.cs │ ├── TorSocks5FailureResponseException.cs │ └── TypeArgumentException.cs ├── Extensions │ ├── ExceptionExtensions.cs │ ├── HttpContentExtensions.cs │ ├── HttpRequestMessageExtensions.cs │ ├── HttpResponseMessageExtensions.cs │ ├── HttpStatusCodeExtensions.cs │ ├── LinqExtensions.cs │ ├── ListExtensions.cs │ ├── MemoryExtensions.cs │ ├── NBitcoinExtensions.cs │ ├── ProcessExtensions.cs │ ├── RPCClientExtensions.cs │ ├── ReflectionExtensions.cs │ ├── StreamExtensions.cs │ ├── StringExtensions.cs │ ├── SystemNetExtensions.cs │ ├── TaskExtensions.cs │ ├── TextReaderExtensions.cs │ └── TorHttpClientExtensions.cs ├── Gma │ └── QrCodeNet │ │ └── Encoding │ │ ├── BitList.cs │ │ ├── BitMatrix.cs │ │ ├── BitMatrixBase.cs │ │ ├── DataEncodation │ │ ├── CharCountIndicatorTable.cs │ │ ├── DataEncode.cs │ │ ├── ECISet.cs │ │ ├── EightBitByteEncoder.cs │ │ ├── EncodationStruct.cs │ │ ├── EncoderBase.cs │ │ └── InputRecognition │ │ │ ├── InputRecognise.cs │ │ │ ├── ModeEncodeCheck.cs │ │ │ └── RecognitionStruct.cs │ │ ├── EncodingRegion │ │ ├── BCHCalculator.cs │ │ ├── Codeword.cs │ │ ├── FormatInformation.cs │ │ └── VersionInformation.cs │ │ ├── ErrorCorrection │ │ └── ECGenerator.cs │ │ ├── ErrorCorrectionLevel.cs │ │ ├── InputOutOfBoundaryException.cs │ │ ├── Masking │ │ ├── MaskPatternType.cs │ │ ├── MatrixExtensions.cs │ │ ├── Pattern.cs │ │ ├── Pattern0.cs │ │ ├── Pattern1.cs │ │ ├── Pattern2.cs │ │ ├── Pattern3.cs │ │ ├── Pattern4.cs │ │ ├── Pattern5.cs │ │ ├── Pattern6.cs │ │ ├── Pattern7.cs │ │ ├── PatternFactory.cs │ │ └── Scoring │ │ │ ├── MatrixScoreCalculator.cs │ │ │ ├── Penalty.cs │ │ │ ├── Penalty1.cs │ │ │ ├── Penalty2.cs │ │ │ ├── Penalty3.cs │ │ │ ├── Penalty4.cs │ │ │ ├── PenaltyFactory.cs │ │ │ └── PenaltyRules.cs │ │ ├── MatrixPoint.cs │ │ ├── MatrixRectangle.cs │ │ ├── MatrixSize.cs │ │ ├── MatrixStatus.cs │ │ ├── Positioning │ │ ├── PositioninngPatternBuilder.cs │ │ └── Stencils │ │ │ ├── AlignmentPattern.cs │ │ │ ├── DarkDotAtLeftBottom.cs │ │ │ ├── PatternStencilBase.cs │ │ │ ├── PositionDetectionPattern.cs │ │ │ └── TimingPattern.cs │ │ ├── QRCodeConstantVariable.cs │ │ ├── QRCodeEncode.cs │ │ ├── QrCode.cs │ │ ├── QrEncoder.cs │ │ ├── ReedSolomon │ │ ├── GaloisField256.cs │ │ ├── GeneratorPolynomial.cs │ │ ├── PolyDivideStruct.cs │ │ ├── Polynomial.cs │ │ └── ReedSolomonEncoder.cs │ │ ├── StateMatrix.cs │ │ ├── Terminate │ │ └── Terminator.cs │ │ ├── TriStateMatrix.cs │ │ ├── VersionDetail.cs │ │ └── Versions │ │ ├── ErrorCorrectionBlock.cs │ │ ├── ErrorCorrectionBlocks.cs │ │ ├── QRCodeVersion.cs │ │ ├── VersionControl.cs │ │ ├── VersionControlStruct.cs │ │ └── VersionTable.cs ├── Helpers │ ├── AddressStringParser.cs │ ├── ByteArrayBuilder.cs │ ├── ByteArrayEqualityComparer.cs │ ├── ByteHelpers.cs │ ├── Constants.cs │ ├── EndPointParser.cs │ ├── EnvironmentHelpers.cs │ ├── EventAwaiter.cs │ ├── EventsAwaiter.cs │ ├── Guard.cs │ ├── HashCashUtils.cs │ ├── HttpMessageHelper.cs │ ├── HttpRequestUriBuilder.cs │ ├── HttpStatusCodeHelper.cs │ ├── IoHelpers.cs │ ├── JsonHelpers.cs │ ├── NBitcoinHelpers.cs │ ├── PasswordConsole.cs │ ├── PasswordHelper.cs │ ├── RandomString.cs │ ├── RuntimeParams.cs │ └── ThreadingHelpers.cs ├── Http │ ├── Constants.cs │ └── Models │ │ ├── HeaderField.cs │ │ ├── HeaderSection.cs │ │ ├── HttpProtocol.cs │ │ ├── HttpRequestContentHeaders.cs │ │ ├── HttpResponseContentHeaders.cs │ │ ├── RequestLine.cs │ │ ├── StartLine.cs │ │ ├── StatusLine.cs │ │ └── UriScheme.cs ├── Hwi │ ├── Exceptions │ │ ├── HwiErrorCode.cs │ │ └── HwiException.cs │ ├── HwiClient.cs │ ├── Models │ │ ├── HardwareWalletModels.cs │ │ ├── HwiCommands.cs │ │ ├── HwiEnumerateEntry.cs │ │ ├── HwiOption.cs │ │ └── HwiOptions.cs │ ├── Parsers │ │ └── HwiParser.cs │ └── ProcessBridge │ │ └── HwiProcessBridge.cs ├── Interfaces │ ├── IByteArraySerializable.cs │ ├── IByteSerializable.cs │ ├── IConfig.cs │ └── IExchangeRateProvider.cs ├── Io │ ├── DigestableSafeMutexIoManager.cs │ ├── IoManager.cs │ ├── MutexIoManager.cs │ └── SafeMutexIoManager.cs ├── JsonConverters │ ├── BitcoinAddressJsonConverter.cs │ ├── BitcoinEncryptedSecretNoECJsonConverter.cs │ ├── BlockCypherDateTimeOffsetJsonConverter.cs │ ├── ByteArrayJsonConverter.cs │ ├── DateTimeOffsetUnixSecondsConverter.cs │ ├── EndPointJsonConverter.cs │ ├── ExtPubKeyJsonConverter.cs │ ├── FeeRatePerKbJsonConverter.cs │ ├── FilterModelJsonConverter.cs │ ├── FunnyBoolJsonConverter.cs │ ├── GolombRiceFilterJsonConverter.cs │ ├── GuidJsonConverter.cs │ ├── HDFingerprintJsonConverter.cs │ ├── HeightJsonConverter.cs │ ├── KeyJsonConverter.cs │ ├── KeyPathJsonConverter.cs │ ├── MoneyBtcJsonConverter.cs │ ├── MoneySatoshiJsonConverter.cs │ ├── NetworkJsonConverter.cs │ ├── OutPointAsTxoRefJsonConverter.cs │ ├── OutPointJsonConverter.cs │ ├── PubKeyJsonConverter.cs │ ├── RoundStateResponseJsonConverter.cs │ ├── ScriptJsonConverter.cs │ ├── SmartLabelJsonConverter.cs │ ├── TransactionJsonConverter.cs │ ├── Uint256JsonConverter.cs │ └── UnblindedSignatureJsonConverter.cs ├── Legal │ ├── Assets │ │ └── LegalDocuments.txt │ └── LegalDocuments.cs ├── Logging │ ├── BenchmarkLogger.cs │ ├── LogLevel.cs │ ├── LogMode.cs │ └── Logger.cs ├── Microservices │ ├── Binaries │ │ ├── README.md │ │ ├── lin64 │ │ │ ├── bitcoind │ │ │ └── hwi │ │ ├── osx64 │ │ │ ├── bitcoind │ │ │ └── hwi │ │ └── win64 │ │ │ ├── bitcoind.exe │ │ │ └── hwi.exe │ ├── IProcessBridge.cs │ ├── MicroserviceHelpers.cs │ └── ProcessBridge.cs ├── Models │ ├── BackendStatus.cs │ ├── ErrorDescriptor.cs │ ├── ErrorDescriptors.cs │ ├── ErrorSeverity.cs │ ├── Height.cs │ ├── HeightType.cs │ ├── IValidationErrors.cs │ ├── MixUntilAnonymitySet.cs │ ├── SerializableException.cs │ ├── ServiceConfiguration.cs │ ├── TorStatus.cs │ └── UpdateStatus.cs ├── Mono │ ├── ArgumentSource.cs │ ├── Command.cs │ ├── CommandOption.cs │ ├── CommandOptionSet.cs │ ├── CommandSet.cs │ ├── HelpCommand.cs │ ├── HelpOption.cs │ ├── Option.cs │ ├── OptionAction.cs │ ├── OptionContext.cs │ ├── OptionException.cs │ ├── OptionSet.cs │ ├── OptionValueCollection.cs │ ├── OptionValueType.cs │ └── StringCoda.cs ├── Nito │ ├── AsyncEx │ │ ├── AsyncLock.cs │ │ ├── AsyncMutex.cs │ │ ├── AsyncWaitQueueExtensions.cs │ │ ├── AwaitableDisposable.cs │ │ ├── DefaultAsyncWaitQueue.cs │ │ ├── IAsyncWaitQueue.cs │ │ ├── IdManager.cs │ │ ├── Synchronous │ │ │ └── SynchronousTaskExtensions.cs │ │ └── TaskCompletionSourceExtensions.cs │ ├── Collections │ │ ├── CollectionHelpers.cs │ │ └── Deque.cs │ └── Disposables │ │ ├── Internals │ │ └── BoundAction.cs │ │ └── SingleDisposable.cs ├── OnionSeeds │ ├── MainOnionSeeds.txt │ └── TestNetOnionSeeds.txt ├── Services │ ├── ConfigWatcher.cs │ ├── ExtPubKeyExplorer.cs │ ├── HostedService.cs │ ├── HostedServices.cs │ ├── SingleInstanceChecker.cs │ ├── UpdateChecker.cs │ └── WasabiSynchronizer.cs ├── Stores │ ├── BitcoinStore.cs │ ├── BitcoinStoreMock.cs │ └── IndexStore.cs ├── TorDaemons │ ├── data-folder.zip │ ├── digests.txt │ ├── tor-linux64.zip │ ├── tor-osx64.zip │ └── tor-win64.zip ├── TorSocks5 │ ├── ITorHttpClient.cs │ ├── Models │ │ ├── Fields │ │ │ ├── ByteArrayFields │ │ │ │ ├── AddrField.cs │ │ │ │ ├── MethodsField.cs │ │ │ │ ├── PasswdField.cs │ │ │ │ ├── PortField.cs │ │ │ │ └── UNameField.cs │ │ │ └── OctetFields │ │ │ │ ├── AtypField.cs │ │ │ │ ├── AuthStatusField.cs │ │ │ │ ├── AuthVerField.cs │ │ │ │ ├── CmdField.cs │ │ │ │ ├── MethodField.cs │ │ │ │ ├── NMethodsField.cs │ │ │ │ ├── PLenField.cs │ │ │ │ ├── RepField.cs │ │ │ │ ├── RsvField.cs │ │ │ │ ├── ULenField.cs │ │ │ │ └── VerField.cs │ │ ├── Messages │ │ │ ├── MethodSelectionResponse.cs │ │ │ ├── TorSocks5Request.cs │ │ │ ├── TorSocks5Response.cs │ │ │ ├── UsernamePasswordRequest.cs │ │ │ ├── UsernamePasswordResponse.cs │ │ │ └── VersionMethodRequest.cs │ │ └── ReplyType.cs │ ├── TorHttpClient.cs │ ├── TorProcessManager.cs │ └── TorSocks5Client.cs ├── WalletWasabi.csproj ├── Wallets │ ├── CachedBlockProvider.cs │ ├── FileSystemBlockRepository.cs │ ├── IBlockProvider.cs │ ├── IRepository.cs │ ├── P2pBlockProvider.cs │ ├── SmartBlockProvider.cs │ ├── Wallet.cs │ ├── WalletDirectories.cs │ ├── WalletManager.cs │ └── WalletState.cs ├── WebClients │ ├── BlockchainInfo │ │ └── BlockchainInfoExchangeRateProvider.cs │ ├── Coinbase │ │ └── CoinbaseExchangeRateProvider.cs │ ├── ExchangeRateProviders.cs │ ├── Gemini │ │ └── GeminiExchangeRateProvider.cs │ ├── ItBit │ │ └── ItBitExchangeRateProvider.cs │ ├── PayJoin │ │ ├── IPayjoinClient.cs │ │ ├── PayjoinClient.cs │ │ ├── PayjoinClientParameters.cs │ │ ├── PayjoinException.cs │ │ ├── PayjoinReceiverException.cs │ │ └── PayjoinSenderException.cs │ ├── SmartBit │ │ ├── Models │ │ │ └── SmartBitExchangeRate.cs │ │ ├── SmartBitClient.cs │ │ └── SmartBitExchangeRateProvider.cs │ └── Wasabi │ │ └── WasabiClient.cs └── packages.lock.json ├── azure-pipelines-linux.yml ├── azure-pipelines-osx.yml ├── azure-pipelines-windows.yml └── omnisharp.json /.config/dotnet-tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "isRoot": true, 4 | "tools": { 5 | "microsoft.playwright.cli": { 6 | "version": "1.2.0", 7 | "commands": [ 8 | "playwright" 9 | ] 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | 7 | # Matches multiple files with brace expansion notation 8 | [*.{cs}] 9 | charset = utf-8 10 | indent_style = tab 11 | trim_trailing_whitespace = true 12 | csharp_new_line_before_open_brace = all 13 | 14 | [*.{xaml,js,jsx,html,sass}] 15 | charset = utf-8 16 | indent_style = space 17 | indent_size = 2 18 | trim_trailing_whitespace = true 19 | 20 | [*.md] 21 | trim_trailing_whitespace = false 22 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | ### Is your feature request related to a problem? Please describe. 8 | 9 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 10 | 11 | ### Describe the solution you'd like 12 | 13 | A clear and concise description of what you want to happen. 14 | 15 | ### Describe alternatives you've considered 16 | 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/general-issue.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: General Issue 3 | about: Submit a general issue 4 | 5 | --- 6 | 7 | 8 | -------------------------------------------------------------------------------- /.github/workflows/build-and-test.yml: -------------------------------------------------------------------------------- 1 | name: build and test 2 | on: 3 | pull_request: 4 | push: 5 | tags-ignore: 6 | - Backend/* 7 | jobs: 8 | build-and-test: 9 | name: build-and-test-${{matrix.os}} 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v2 13 | - name: Build Backend Docker Image 14 | run: cd WalletWasabi.SDK && dotnet clean && docker build . && cd ../ 15 | - name: Build And Run Tests 16 | run: cd Chaincase.Tests && ./run-tests.sh 17 | -------------------------------------------------------------------------------- /Chaincase.Android/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with your package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); 20 | -------------------------------------------------------------------------------- /Chaincase.Android/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Chaincase.Android/Resources/layout/Tabbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | -------------------------------------------------------------------------------- /Chaincase.Android/Resources/layout/Toolbar.xml: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /Chaincase.Android/Resources/mipmap-anydpi-v26/icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Chaincase.Android/Resources/mipmap-anydpi-v26/icon_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Chaincase.Android/Resources/mipmap-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.Android/Resources/mipmap-hdpi/icon.png -------------------------------------------------------------------------------- /Chaincase.Android/Resources/mipmap-hdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.Android/Resources/mipmap-hdpi/launcher_foreground.png -------------------------------------------------------------------------------- /Chaincase.Android/Resources/mipmap-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.Android/Resources/mipmap-mdpi/icon.png -------------------------------------------------------------------------------- /Chaincase.Android/Resources/mipmap-mdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.Android/Resources/mipmap-mdpi/launcher_foreground.png -------------------------------------------------------------------------------- /Chaincase.Android/Resources/mipmap-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.Android/Resources/mipmap-xhdpi/icon.png -------------------------------------------------------------------------------- /Chaincase.Android/Resources/mipmap-xhdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.Android/Resources/mipmap-xhdpi/launcher_foreground.png -------------------------------------------------------------------------------- /Chaincase.Android/Resources/mipmap-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.Android/Resources/mipmap-xxhdpi/icon.png -------------------------------------------------------------------------------- /Chaincase.Android/Resources/mipmap-xxhdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.Android/Resources/mipmap-xxhdpi/launcher_foreground.png -------------------------------------------------------------------------------- /Chaincase.Android/Resources/mipmap-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.Android/Resources/mipmap-xxxhdpi/icon.png -------------------------------------------------------------------------------- /Chaincase.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png -------------------------------------------------------------------------------- /Chaincase.Android/Resources/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | #3F51B5 5 | #303F9F 6 | #FF4081 7 | 8 | -------------------------------------------------------------------------------- /Chaincase.Common/Contracts/AppInitializedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NBitcoin.Protocol; 3 | using WalletWasabi.Blockchain.TransactionBroadcasting; 4 | 5 | namespace Chaincase.Common.Contracts 6 | { 7 | public class AppInitializedEventArgs : EventArgs 8 | { 9 | public NodesGroup Nodes { get; set; } 10 | public TransactionBroadcaster TransactionBroadcaster { get; set; } 11 | 12 | public AppInitializedEventArgs(Global global) 13 | { 14 | Nodes = global.Nodes; 15 | TransactionBroadcaster = global.TransactionBroadcaster; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Chaincase.Common/Contracts/IClipboard.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace Chaincase.Common.Contracts 4 | { 5 | public interface IClipboard 6 | { 7 | Task Copy(string text); 8 | 9 | Task Paste(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Chaincase.Common/Contracts/IDataDirProvider.cs: -------------------------------------------------------------------------------- 1 | namespace Chaincase.Common.Contracts 2 | { 3 | public interface IDataDirProvider 4 | { 5 | string Get(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Chaincase.Common/Contracts/IHsmStorage.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace Chaincase.Common.Contracts 4 | { 5 | // Use keys from device Hardware Security Module to encrypt 6 | public interface IHsmStorage 7 | { 8 | // use the most convenient authentication available in implementation 9 | public Task SetAsync(string key, string value); 10 | 11 | public Task GetAsync(string key); 12 | 13 | public bool Remove(string key); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Chaincase.Common/Contracts/IMainThreadInvoker.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Chaincase.Common.Contracts 4 | { 5 | public interface IMainThreadInvoker 6 | { 7 | void Invoke(Action action); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Chaincase.Common/Contracts/IShare.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace Chaincase.Common.Contracts 4 | { 5 | public interface IShare 6 | { 7 | public Task ShareText(string text, string title = "Share"); 8 | public Task ShareFile(string file, string title = "Share"); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Chaincase.Common/Contracts/IThemeManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | namespace Chaincase.Common.Contracts 3 | { 4 | public interface IThemeManager 5 | { 6 | public bool IsDarkTheme(); 7 | 8 | public void SubscribeToThemeChanged(Action handler); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Chaincase.Common/Contracts/ITorManager.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace Chaincase.Common.Contracts 4 | { 5 | public enum TorState 6 | { 7 | None, 8 | Started, 9 | Connected, 10 | Stopped 11 | } 12 | 13 | public interface ITorManager 14 | { 15 | TorState State { get; } 16 | 17 | Task StopAsync(); 18 | 19 | Task StartAsync(bool ensureRunning, string dataDir); 20 | 21 | string CreateHiddenService(); 22 | 23 | void DestroyHiddenService(string serviceId); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Chaincase.Common/Contracts/IWebsiteLauncher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | 4 | namespace Chaincase.Common.Contracts 5 | { 6 | public interface IWebsiteLauncher 7 | { 8 | Task Launch(Uri uri); 9 | } 10 | } -------------------------------------------------------------------------------- /Chaincase.Common/Models/LatestMatureHeaderResponse.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NBitcoin; 3 | using NBitcoin.JsonConverters; 4 | using Newtonsoft.Json; 5 | using WalletWasabi.JsonConverters; 6 | 7 | namespace Chaincase.Common.Models 8 | { 9 | public class LatestMatureHeaderResponse 10 | { 11 | [JsonConverter(typeof(Uint256JsonConverter))] 12 | public uint256 MatureHeaderHash { get; set; } 13 | 14 | [JsonConverter(typeof(DateTimeOffsetUnixSecondsConverter))] 15 | public DateTimeOffset MatureHeaderTime { get; set; } 16 | [JsonConverter(typeof(Uint256JsonConverter))] 17 | public uint256 MatureHeaderPrevHash { get; set; } 18 | [JsonConverter(typeof(Uint256JsonConverter))] 19 | public uint256 BestHeaderHash { get; set; } 20 | public uint MatureHeight { get; set; } 21 | public uint BestHeight { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Chaincase.Common/Models/RoundPhaseState.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using WalletWasabi.CoinJoin.Common.Models; 3 | 4 | namespace Chaincase.Common.Models 5 | { 6 | public struct RoundPhaseState 7 | { 8 | public RoundPhaseState(RoundPhase phase, bool error) 9 | { 10 | Phase = phase; 11 | Error = error; 12 | } 13 | 14 | public RoundPhase Phase { get; } 15 | 16 | public bool Error { get; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Chaincase.Common/Models/StatusType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Chaincase.Common.Models 6 | { 7 | /// 8 | /// Order: priority the lower. 9 | /// 10 | public enum StatusType 11 | { 12 | CriticalUpdate, 13 | OptionalUpdate, 14 | Connecting, 15 | WalletProcessingFilters, 16 | WalletProcessingTransactions, 17 | WalletLoading, 18 | Synchronizing, 19 | Loading, 20 | BroadcastingTransaction, 21 | SigningTransaction, 22 | AcquiringSignatureFromHardwareWallet, 23 | AcquiringXpubFromHardwareWallet, 24 | ConnectingToHardwareWallet, 25 | SettingUpHardwareWallet, 26 | BuildingTransaction, 27 | DequeuingSelectedCoins, 28 | Ready 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Chaincase.Common/Services/Mock/MockNotificationManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Chaincase.Common.Contracts; 3 | 4 | namespace Chaincase.Common.Services.Mock 5 | { 6 | public class MockNotificationManager : INotificationManager 7 | { 8 | public event EventHandler NotificationReceived; 9 | 10 | public void RequestAuthorization() 11 | { 12 | } 13 | 14 | public int ScheduleNotification(string title, string message, double timeInterval) 15 | { 16 | return new Random().Next(); 17 | } 18 | 19 | public void ReceiveNotification(string title, string message) 20 | { 21 | } 22 | 23 | public void RemoveAllPendingNotifications() 24 | { 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Chaincase.Common/Services/Mock/MockThemeManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Chaincase.Common.Contracts; 3 | 4 | namespace Chaincase.Common.Services.Mock 5 | { 6 | public class MockThemeManager : IThemeManager 7 | { 8 | public bool IsDarkTheme() => true; 9 | 10 | public void SubscribeToThemeChanged(Action handler) 11 | { 12 | return; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Chaincase.Common/Services/Mock/MockTorManager.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Chaincase.Common.Contracts; 3 | 4 | namespace Chaincase.Common.Services.Mock 5 | { 6 | public class MockTorManager : ITorManager 7 | 8 | { 9 | public TorState State { get; } = TorState.Connected; 10 | 11 | public Task StartAsync(bool ensureRunning, string dataDir) 12 | { 13 | return Task.CompletedTask; 14 | } 15 | 16 | public Task StopAsync() 17 | { 18 | return Task.CompletedTask; 19 | } 20 | 21 | public string CreateHiddenService() { 22 | return "foobar"; 23 | } 24 | 25 | public void DestroyHiddenService(string serviceId) { 26 | return; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Chaincase.SSB/JsClipboard.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Microsoft.JSInterop; 3 | using Chaincase.Common.Contracts; 4 | 5 | namespace Chaincase.SSB 6 | { 7 | public sealed class JSClipboard : IClipboard 8 | { 9 | private readonly IJSRuntime _jsRuntime; 10 | 11 | public JSClipboard(IJSRuntime jsRuntime) 12 | { 13 | _jsRuntime = jsRuntime; 14 | } 15 | 16 | public async Task Paste() 17 | { 18 | return await _jsRuntime.InvokeAsync("navigator.clipboard.readText"); 19 | } 20 | 21 | public async Task Copy(string text) 22 | { 23 | await _jsRuntime.InvokeVoidAsync("navigator.clipboard.writeText", text); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Chaincase.SSB/Pages/Error.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | 3 | 4 |

Error.

5 |

An error occurred while processing your request.

6 | 7 |

Development Mode

8 |

9 | Swapping to Development environment will display more detailed information about the error that occurred. 10 |

11 |

12 | The Development environment shouldn't be enabled for deployed applications. 13 | It can result in displaying sensitive information from exceptions to end users. 14 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 15 | and restarting the app. 16 |

-------------------------------------------------------------------------------- /Chaincase.SSB/Program.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Microsoft.AspNetCore.Hosting; 3 | using Microsoft.Extensions.Hosting; 4 | 5 | namespace Chaincase.SSB 6 | { 7 | // his class is responsible for launching the UI of the appliication, 8 | // as well as listening (and optionally responding) to application events 9 | // from Server Side Blazor 10 | public class Program 11 | { 12 | public static async Task Main(string[] args) 13 | { 14 | // analagous to new BlazorApp() 15 | await CreateHostBuilder(args).RunConsoleAsync(); 16 | } 17 | 18 | public static IHostBuilder CreateHostBuilder(string[] args) 19 | { 20 | return Host.CreateDefaultBuilder(args) 21 | .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); }); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Chaincase.SSB/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:43250", 7 | "sslPort": 44364 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "Chaincase.SSB": { 19 | "commandName": "Project", 20 | "dotnetRunMessages": "true", 21 | "launchBrowser": true, 22 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 23 | "environmentVariables": { 24 | "ASPNETCORE_ENVIRONMENT": "Development" 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Chaincase.SSB/SSBDataDirProvider.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using Chaincase.Common.Contracts; 3 | using WalletWasabi.Helpers; 4 | 5 | namespace Chaincase.SSB 6 | { 7 | public class SSBDataDirProvider:IDataDirProvider 8 | { 9 | protected string SubDirectory; 10 | 11 | public SSBDataDirProvider() 12 | { 13 | SubDirectory = Path.Combine("Chaincase", "Client"); 14 | Directory.CreateDirectory(Get()); 15 | } 16 | public string Get() 17 | { 18 | return EnvironmentHelpers.GetDataDir(SubDirectory); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Chaincase.SSB/SSBMainThreadInvoker.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | using Chaincase.Common.Contracts; 4 | 5 | namespace Chaincase.SSB 6 | { 7 | public class SSBMainThreadInvoker:IMainThreadInvoker 8 | { 9 | public void Invoke(Action action) 10 | { 11 | Task.Run(action); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Chaincase.SSB/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.JSInterop 8 | @using Chaincase.UI 9 | -------------------------------------------------------------------------------- /Chaincase.SSB/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "DetailedErrors": true, 3 | "Logging": { 4 | "LogLevel": { 5 | "Default": "Information", 6 | "Microsoft": "Warning", 7 | "Microsoft.Hosting.Lifetime": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Chaincase.SSB/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /Chaincase.Tests/.dockerignore: -------------------------------------------------------------------------------- 1 | **/.dockerignore 2 | **/.env 3 | **/.git 4 | **/.gitignore 5 | **/.project 6 | **/.settings 7 | **/.toolstarget 8 | **/.vs 9 | **/.vscode 10 | **/.idea 11 | **/*.*proj.user 12 | **/*.dbmdl 13 | **/*.jfm 14 | **/azds.yaml 15 | **/bin 16 | **/charts 17 | **/docker-compose* 18 | **/Dockerfile* 19 | **/node_modules 20 | **/npm-debug.log 21 | **/obj 22 | **/secrets.dev.yaml 23 | **/values.dev.yaml 24 | LICENSE 25 | README.md -------------------------------------------------------------------------------- /Chaincase.Tests/Dockerfile: -------------------------------------------------------------------------------- 1 |  2 | FROM mcr.microsoft.com/dotnet/core/sdk:3.1.415-focal 3 | WORKDIR /src 4 | COPY . . 5 | 6 | RUN apt update && apt install nodejs npm libbrotli1 libmbedtls12 -y 7 | RUN dotnet restore "Chaincase.Tests/Chaincase.Tests.csproj" 8 | ENV IN_CI="true" 9 | WORKDIR "/src/Chaincase.Tests" 10 | RUN dotnet build "Chaincase.Tests.csproj" 11 | 12 | RUN dotnet playwright install chromium 13 | RUN dotnet playwright install-deps chromium 14 | ENTRYPOINT ["./docker-entrypoint.sh"] 15 | 16 | 17 | -------------------------------------------------------------------------------- /Chaincase.Tests/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | 4 | tests: 5 | build: 6 | context: .. 7 | dockerfile: Chaincase.Tests/Dockerfile 8 | links: 9 | - bitcoind 10 | - postgres 11 | 12 | volumes: 13 | postgres_datadir: 14 | bitcoin_datadir: 15 | -------------------------------------------------------------------------------- /Chaincase.Tests/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | FILTERS=" " 5 | if [ ! -z "$TEST_FILTERS" ]; then 6 | FILTERS="--filter $TEST_FILTERS" 7 | fi 8 | 9 | dotnet test $FILTERS --no-build -v n 10 | -------------------------------------------------------------------------------- /Chaincase.Tests/readme: -------------------------------------------------------------------------------- 1 | To run the tests: 2 | `docker compose -f WalletWasabi.SDK/WalletWasabi.Backend/docker-compose.yml up -d` 3 | `dotnet tool install --global Microsoft.Playwright.CLI` 4 | `playwright install` 5 | 6 | 7 | To assist with test creation: 8 | * Run chaincase ssb 9 | * playwright codegen --target csharp https://localhost:5001 10 | 11 | -------------------------------------------------------------------------------- /Chaincase.Tests/run-tests.ps1: -------------------------------------------------------------------------------- 1 | docker-compose -f "../WalletWasabi.SDK/WalletWasabi.Backend/docker-compose.yml" -f "docker-compose.yml" down -v 2 | docker-compose -f "../WalletWasabi.SDK/WalletWasabi.Backend/docker-compose.yml" -f "docker-compose.yml" pull 3 | docker-compose -f "docker-compose.yml" -f "../WalletWasabi.SDK/WalletWasabi.Backend/docker-compose.yml" build 4 | docker-compose -f "docker-compose.yml" -f "../WalletWasabi.SDK/WalletWasabi.Backend/docker-compose.yml" run tests 5 | 6 | -------------------------------------------------------------------------------- /Chaincase.Tests/run-tests.sh: -------------------------------------------------------------------------------- 1 | docker-compose -f "../WalletWasabi.SDK/WalletWasabi.Backend/docker-compose.yml" -f "docker-compose.yml" down -v 2 | docker-compose -f "../WalletWasabi.SDK/WalletWasabi.Backend/docker-compose.yml" -f "docker-compose.yml" pull 3 | docker-compose -f "docker-compose.yml" -f "../WalletWasabi.SDK/WalletWasabi.Backend/docker-compose.yml" build 4 | docker-compose -f "docker-compose.yml" -f "../WalletWasabi.SDK/WalletWasabi.Backend/docker-compose.yml" run tests 5 | 6 | -------------------------------------------------------------------------------- /Chaincase.UI/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |

Sorry, there's nothing at this address.

9 |
10 |
11 |
12 |
-------------------------------------------------------------------------------- /Chaincase.UI/Components/ClipboardToast.razor: -------------------------------------------------------------------------------- 1 | @inherits IonToast 2 | 3 | 4 | @code { 5 | 6 | protected override void OnParametersSet() 7 | { 8 | InputAttributes = new Dictionary() 9 | { 10 | { "style", "text-align: center;" }, 11 | { "message", "Copied to clipboard" }, 12 | { "color", "light" }, 13 | { "position", "top" }, 14 | { "duration", 1000 } 15 | }; 16 | base.OnParametersSet(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Chaincase.UI/Components/QRCode.razor: -------------------------------------------------------------------------------- 1 | @using QRCoder 2 | @using System.Drawing 3 | @inject QRCodeGenerator QrCodeGenerator 4 | @((MarkupString) svgHtml) 5 | 6 | @code { 7 | 8 | [Parameter] 9 | public string Data 10 | { 11 | get => _data; 12 | set 13 | { 14 | var qrCodeData = QrCodeGenerator.CreateQrCode(value, QRCodeGenerator.ECCLevel.Q); 15 | var qrCode = new SvgQRCode(qrCodeData); 16 | svgHtml = qrCode.GetGraphic(new Size(256, 256), "#000", "#fff", true, SvgQRCode.SizingMode.ViewBoxAttribute); 17 | _data = value; 18 | } 19 | } 20 | 21 | private string svgHtml = ""; 22 | private string _data; 23 | } 24 | -------------------------------------------------------------------------------- /Chaincase.UI/Components/SplashLogo.razor: -------------------------------------------------------------------------------- 1 | @using Chaincase.UI.Services 2 | @inject UIStateService UiStateService 3 | 5 | -------------------------------------------------------------------------------- /Chaincase.UI/Services/ThemeSwitcher.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Microsoft.JSInterop; 3 | 4 | namespace Chaincase.UI.Services 5 | { 6 | public class ThemeSwitcher 7 | { 8 | private readonly IJSRuntime _jsRuntime; 9 | 10 | public ThemeSwitcher(IJSRuntime jsRuntime) 11 | { 12 | _jsRuntime = jsRuntime; 13 | } 14 | 15 | public async Task ToggleDark(bool val) 16 | { 17 | await _jsRuntime.InvokeVoidAsync("document.body.classList.toggle", "dark", val); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Chaincase.UI/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using Blazor.Ionic 2 | @using Chaincase.UI.Shared 3 | @using Chaincase.UI.ViewModels 4 | @using Chaincase.UI.Components 5 | @using Microsoft.AspNetCore.Components.Forms 6 | @using Microsoft.AspNetCore.Components.Routing 7 | @using Microsoft.AspNetCore.Components.Web 8 | @using Microsoft.JSInterop 9 | @using ReactiveUI.Blazor 10 | @using System.Net.Http 11 | -------------------------------------------------------------------------------- /Chaincase.UI/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Chaincase.UI", 3 | "version": "1.0.0", 4 | "description": "js deps for UI", 5 | "license": "GPL-3.0", 6 | "repository": "https://github.com/chaincase-app/chaincase", 7 | "dependencies": { 8 | "@ionic/core": "^5.5.1", 9 | "copyfiles": "^2.4.1", 10 | "npm-run-all": "^4.1.5", 11 | "rimraf": "^3.0.2" 12 | }, 13 | "scripts": { 14 | "clean": "rimraf wwwroot/ionic", 15 | "copyionicjs": "copyfiles -u 5 \"node_modules/@ionic/core/dist/ionic/**/*\" wwwroot/ionic", 16 | "copyioniccss": "copyfiles -u 4 \"node_modules/@ionic/core/css/ionic.bundle.*\" wwwroot/ionic", 17 | "prepare": "npm-run-all clean copyionicjs copyioniccss" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Chaincase.UI/wwwroot/fetchfix.js: -------------------------------------------------------------------------------- 1 | var originalFetch = window.fetch; 2 | 3 | window.fetch = function () { 4 | var args = []; 5 | for (var _i = 0; _i < arguments.length; _i++) { 6 | args[_i] = arguments[_i]; 7 | } 8 | var url = args[0]; 9 | if (typeof url === 'string' && url.match(/\.svg/)) { 10 | return new Promise(function (resolve, reject) { 11 | var req = new XMLHttpRequest(); 12 | req.open('GET', url, true); 13 | req.addEventListener('load', function () { 14 | resolve({ ok: true, status: 200, text: function () { return Promise.resolve(req.responseText); } }); 15 | }); 16 | req.addEventListener('error', reject); 17 | req.send(); 18 | }); 19 | } 20 | else { 21 | return originalFetch.apply(void 0, args); 22 | } 23 | }; 24 | -------------------------------------------------------------------------------- /Chaincase.UI/wwwroot/global.js: -------------------------------------------------------------------------------- 1 | function dispatchEventWrapper(evt) { 2 | window.dispatchEvent(new CustomEvent(evt)) 3 | } 4 | 5 | if (!navigator.share && navigator.clipboard) { 6 | navigator.share = (data) => { 7 | const toast = document.createElement('ion-toast'); 8 | toast.message = data.title ? `${data.title} copied to clipboard` : 'Copied to clipboard'; 9 | toast.duration = 2000; 10 | navigator.clipboard.writeText(data.text || data.url).catch(reason => console.error(reason)); 11 | document.body.appendChild(toast); 12 | return toast.present(); 13 | } 14 | } else if (!navigator.share) { 15 | navigator.share = (data) => { 16 | console.warn("Wanted to use share API but not supported on this platform.", data); 17 | return Promise.resolve(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Chaincase.UI/wwwroot/img/logo_vertical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.UI/wwwroot/img/logo_vertical.png -------------------------------------------------------------------------------- /Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png -------------------------------------------------------------------------------- /Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png -------------------------------------------------------------------------------- /Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png -------------------------------------------------------------------------------- /Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png -------------------------------------------------------------------------------- /Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png -------------------------------------------------------------------------------- /Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png -------------------------------------------------------------------------------- /Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png -------------------------------------------------------------------------------- /Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png -------------------------------------------------------------------------------- /Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png -------------------------------------------------------------------------------- /Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png -------------------------------------------------------------------------------- /Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png -------------------------------------------------------------------------------- /Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png -------------------------------------------------------------------------------- /Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png -------------------------------------------------------------------------------- /Chaincase.iOS/Assets.xcassets/logo_vertical.imageset/logo_vertical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.iOS/Assets.xcassets/logo_vertical.imageset/logo_vertical.png -------------------------------------------------------------------------------- /Chaincase.iOS/Entitlements.developer.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | 8 | 9 | -------------------------------------------------------------------------------- /Chaincase.iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | production 7 | 8 | 9 | -------------------------------------------------------------------------------- /Chaincase.iOS/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Foundation; 5 | using Microsoft.MobileBlazorBindings.WebView.iOS; 6 | using UIKit; 7 | 8 | namespace Chaincase.iOS 9 | { 10 | public class Application 11 | { 12 | // This is the main entry point of the application. 13 | static void Main(string[] args) 14 | { 15 | BlazorHybridIOS.Init(); 16 | 17 | // if you want to use a different Application Delegate class from "AppDelegate" 18 | // you can specify it here. 19 | UIApplication.Main(args, null, "AppDelegate"); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Chaincase.iOS/Resources/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.iOS/Resources/Default-568h@2x.png -------------------------------------------------------------------------------- /Chaincase.iOS/Resources/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.iOS/Resources/Default-Portrait.png -------------------------------------------------------------------------------- /Chaincase.iOS/Resources/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.iOS/Resources/Default-Portrait@2x.png -------------------------------------------------------------------------------- /Chaincase.iOS/Resources/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.iOS/Resources/Default.png -------------------------------------------------------------------------------- /Chaincase.iOS/Resources/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/Chaincase.iOS/Resources/Default@2x.png -------------------------------------------------------------------------------- /Chaincase/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms.Xaml; 2 | 3 | [assembly: XamlCompilation(XamlCompilationOptions.Compile)] -------------------------------------------------------------------------------- /Chaincase/Background/BackgroundMessages.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Chaincase.Background 4 | { 5 | public class OnSleepingTaskMessage { } 6 | 7 | public class InitializeNoWalletTaskMessage { } 8 | } 9 | -------------------------------------------------------------------------------- /Chaincase/Main.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Chaincase/Services/XamarinClipboard.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Chaincase.Common.Contracts; 3 | using Xamarin.Essentials; 4 | 5 | namespace Chaincase.Services 6 | { 7 | public class XamarinClipboard : IClipboard 8 | { 9 | public async Task Copy(string text) 10 | { 11 | await Clipboard.SetTextAsync(text); 12 | } 13 | 14 | public async Task Paste() 15 | { 16 | return await Clipboard.GetTextAsync(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Chaincase/Services/XamarinDataDirProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using Chaincase.Common.Contracts; 4 | using WalletWasabi.Helpers; 5 | using Xamarin.Forms; 6 | 7 | namespace Chaincase.Services 8 | { 9 | public class XamarinDataDirProvider : IDataDirProvider 10 | { 11 | public string Get() 12 | { 13 | string dataDir; 14 | if (Device.RuntimePlatform == Device.iOS) 15 | { 16 | var library = Environment.GetFolderPath(Environment.SpecialFolder.Resources); 17 | var client = Path.Combine(library, "Client"); 18 | dataDir = client; 19 | } 20 | else 21 | { 22 | dataDir = EnvironmentHelpers.GetDataDir(Path.Combine("Chaincase", "Client")); 23 | } 24 | 25 | return dataDir; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Chaincase/Services/XamarinHsmStorage.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Chaincase.Common.Contracts; 3 | using Xamarin.Essentials; 4 | 5 | namespace Chaincase.Services 6 | { 7 | public class XamarinHsmStorage : IHsmStorage 8 | { 9 | public Task SetAsync(string key, string value) 10 | { 11 | return SecureStorage.SetAsync(key, value); 12 | } 13 | 14 | public Task GetAsync(string key) 15 | { 16 | return SecureStorage.GetAsync(key); 17 | } 18 | 19 | public bool Remove(string key) 20 | { 21 | return SecureStorage.Remove(key); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /Chaincase/Services/XamarinMainThreadInvoker.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Chaincase.Common.Contracts; 3 | using Xamarin.Forms; 4 | 5 | namespace Chaincase.Services 6 | { 7 | public class XamarinMainThreadInvoker : IMainThreadInvoker 8 | { 9 | public void Invoke(Action action) 10 | { 11 | Device.BeginInvokeOnMainThread(action); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Chaincase/Services/XamarinShare.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | using Chaincase.Common.Contracts; 4 | using Xamarin.Essentials; 5 | using Xamarin.Forms; 6 | 7 | namespace Chaincase.Services 8 | { 9 | public class XamarinShare : IShare 10 | { 11 | public async Task ShareText(string text, string title = "Share") 12 | { 13 | await Share.RequestAsync(new ShareTextRequest 14 | { 15 | Title = title, 16 | Text = text 17 | }); 18 | } 19 | public async Task ShareFile(string file, string title) 20 | { 21 | await Share.RequestAsync(new ShareFileRequest 22 | { 23 | Title = title, 24 | File = new ShareFile(file) 25 | }); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Chaincase/Services/XamarinThemeManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Chaincase.Common.Contracts; 3 | using Xamarin.Forms; 4 | 5 | namespace Chaincase.Services 6 | { 7 | public class XamarinThemeManager : IThemeManager 8 | { 9 | public bool IsDarkTheme() => Xamarin.Forms.Application.Current.RequestedTheme == OSAppTheme.Dark; 10 | 11 | public void SubscribeToThemeChanged(Action handler) 12 | { 13 | Xamarin.Forms.Application.Current.RequestedThemeChanged += (s, a) => 14 | { 15 | handler.Invoke(); 16 | }; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Chaincase/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using Microsoft.MobileBlazorBindings 2 | @using Microsoft.MobileBlazorBindings.Elements 3 | @using Xamarin.Essentials 4 | @using Xamarin.Forms 5 | @using Blazor.Ionic 6 | @using Chaincase.UI 7 | @using Chaincase.UI.Shared 8 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/.coverage.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | COLLECT_COVERAGE="//p:CollectCoverage=true" 3 | OUTPUT_FORMAT="//p:CoverletOutputFormat=lcov" 4 | FILE_NAME="//p:CoverletOutputName=lcov" 5 | 6 | dotnet restore --locked-mode && dotnet build 7 | 8 | cd WalletWasabi.Tests 9 | dotnet test --no-build $COLLECT_COVERAGE $OUTPUT_FORMAT $FILE_NAME -------------------------------------------------------------------------------- /WalletWasabi.SDK/.github/ISSUE_TEMPLATE/feature-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | ### Is your feature request related to a problem? Please describe. 8 | 9 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 10 | 11 | ### Describe the solution you'd like 12 | 13 | A clear and concise description of what you want to happen. 14 | 15 | ### Describe alternatives you've considered 16 | 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/.github/ISSUE_TEMPLATE/general-issue.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: General Issue 3 | about: Submit a general issue 4 | 5 | --- 6 | 7 | 8 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/.gitrepo: -------------------------------------------------------------------------------- 1 | ; DO NOT EDIT (unless you know what you are doing) 2 | ; 3 | ; This subdirectory is a git "subrepo", and this file is maintained by the 4 | ; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme 5 | ; 6 | [subrepo] 7 | remote = https://github.com/chaincase-app/WalletWasabi.Standard 8 | branch = sdk 9 | commit = 7c2ebfacdfaac63bad4e2f3a2cc49f2486943e47 10 | parent = ca9d6dcde92de4425544e2d7ec219c7afdc4e04b 11 | method = merge 12 | cmdver = 0.4.3 13 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | 5 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS base 2 | ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 3 | WORKDIR /app 4 | EXPOSE 37127 5 | 6 | FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build 7 | WORKDIR /src 8 | COPY . ./ 9 | RUN dotnet restore 10 | 11 | WORKDIR "/src/WalletWasabi.Backend" 12 | RUN dotnet build "WalletWasabi.Backend.csproj" -c Release -o /app/build 13 | 14 | FROM build AS publish 15 | RUN dotnet publish "WalletWasabi.Backend.csproj" -c Release -o /app/publish 16 | 17 | FROM base AS final 18 | WORKDIR /app 19 | COPY --from=publish /app/publish . 20 | ENTRYPOINT ["dotnet", "WalletWasabi.Backend.dll"] 21 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/NuGet.Config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/.dockerignore: -------------------------------------------------------------------------------- 1 | **/.dockerignore 2 | **/.env 3 | **/.git 4 | **/.gitignore 5 | **/.project 6 | **/.settings 7 | **/.toolstarget 8 | **/.vs 9 | **/.vscode 10 | **/.idea 11 | **/*.*proj.user 12 | **/*.dbmdl 13 | **/*.jfm 14 | **/azds.yaml 15 | **/bin 16 | **/charts 17 | **/docker-compose* 18 | **/Dockerfile* 19 | **/node_modules 20 | **/npm-debug.log 21 | **/obj 22 | **/secrets.dev.yaml 23 | **/values.dev.yaml 24 | LICENSE 25 | README.md -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/Chaincase/LatestMatureHeaderResponse.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NBitcoin; 3 | using NBitcoin.JsonConverters; 4 | using Newtonsoft.Json; 5 | using WalletWasabi.JsonConverters; 6 | 7 | namespace Chaincase.Common.Models 8 | { 9 | public class LatestMatureHeaderResponse 10 | { 11 | [JsonConverter(typeof(Uint256JsonConverter))] 12 | public uint256 MatureHeaderHash { get; set; } 13 | 14 | [JsonConverter(typeof(DateTimeOffsetUnixSecondsConverter))] 15 | public DateTimeOffset MatureHeaderTime { get; set; } 16 | [JsonConverter(typeof(Uint256JsonConverter))] 17 | public uint256 MatureHeaderPrevHash { get; set; } 18 | [JsonConverter(typeof(Uint256JsonConverter))] 19 | public uint256 BestHeaderHash { get; set; } 20 | public uint MatureHeight { get; set; } 21 | public uint BestHeight { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using System; 3 | 4 | namespace WalletWasabi.Backend.Controllers 5 | { 6 | [Route("")] 7 | public class HomeController : Controller 8 | { 9 | [HttpGet("")] 10 | public IActionResult Index() 11 | { 12 | string host = HttpContext?.Request?.Host.Host; 13 | 14 | VirtualFileResult response = !string.IsNullOrWhiteSpace(host) && host.TrimEnd('/').EndsWith(".onion", StringComparison.OrdinalIgnoreCase) 15 | ? File("onion-index.html", "text/html") 16 | : File("index.html", "text/html"); 17 | 18 | response.LastModified = DateTimeOffset.UtcNow; 19 | return response; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/Data/WasabiBackendContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using WalletWasabi.Backend.Models; 3 | 4 | namespace WalletWasabi.Backend.Data 5 | { 6 | public class WasabiBackendContext : DbContext 7 | { 8 | public DbSet Tokens { get; set; } 9 | 10 | public WasabiBackendContext(DbContextOptions options) : base(options) 11 | { 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/Data/WasabiDesignTimeDbContextFactory.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace WalletWasabi.Backend.Data 4 | { 5 | public class WasabiDesignTimeDbContextFactory : 6 | DesignTimeDbContextFactoryBase 7 | { 8 | protected override WasabiBackendContext CreateNewInstance(DbContextOptions options) 9 | { 10 | return new WasabiBackendContext(options); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/IStartupTask.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading; 5 | using System.Threading.Tasks; 6 | 7 | namespace WalletWasabi.Backend 8 | { 9 | public interface IStartupTask 10 | { 11 | Task ExecuteAsync(CancellationToken cancellationToken = default); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/Polyfills/DbContextFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.EntityFrameworkCore; 3 | using Microsoft.Extensions.DependencyInjection; 4 | 5 | namespace WalletWasabi.Backend.Polyfills 6 | { 7 | public class DbContextFactory 8 | : IDbContextFactory where TContext : DbContext 9 | { 10 | private readonly IServiceProvider _provider; 11 | 12 | public DbContextFactory(IServiceProvider provider) 13 | { 14 | _provider = provider; 15 | } 16 | 17 | public TContext CreateDbContext() 18 | { 19 | if (_provider == null) 20 | { 21 | throw new InvalidOperationException( 22 | $"You must configure an instance of IServiceProvider"); 23 | } 24 | 25 | return ActivatorUtilities.CreateInstance(_provider); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/Polyfills/IDbContextFactory.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace WalletWasabi.Backend.Polyfills 4 | { 5 | public interface IDbContextFactorywhere TContext : DbContext 6 | { 7 | TContext CreateDbContext(); 8 | } 9 | } -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "WalletWasabi.Backend": { 4 | "commandName": "Project", 5 | "launchBrowser": true, 6 | "launchUrl": "swagger", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development", 9 | 10 | "WASABI_BIND": "http://0.0.0.0:37127" 11 | }, 12 | "applicationUrl": "http://localhost:37127" 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/ZoneLimits.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.Backend 2 | { 3 | public class ZoneLimits 4 | { 5 | public const string NotificationTokens = nameof(NotificationTokens); 6 | } 7 | 8 | 9 | } -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "Debug": { 5 | "LogLevel": { 6 | "Default": "Warning", 7 | "Microsoft": "Warning" 8 | } 9 | }, 10 | "Console": { 11 | "LogLevel": { 12 | "Default": "Warning", 13 | "Microsoft": "Warning" 14 | } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/css/_variables.scss: -------------------------------------------------------------------------------- 1 | // Wasabi Wallet CSS Theme 2 | // Compile Bootstrap 4.3+ with these variables 3 | 4 | $green: #58A567; 5 | $dark: #211B24; 6 | $blue: #3B83F7; 7 | $body-color: $dark; 8 | $headings-font-family: 'Playfair Display', serif; 9 | $font-family-monospace: Inconsolata, monospace; 10 | $font-family-base: $font-family-monospace; 11 | $headings-font-weight: 600; 12 | $border-radius: .2rem; 13 | $h1-font-size: $font-size-base * 4; 14 | $h2-font-size: $font-size-base * 4; 15 | $font-weight-bold: 600; 16 | $text-muted: #716686; 17 | $spacer: 3rem; 18 | $navbar-nav-link-padding-x: 2rem; 19 | $navbar-dark-color: $white; 20 | $list-group-bg: $dark; 21 | $list-group-color: $white; 22 | $list-group-border-color: rgba($white, .125); 23 | $input-btn-padding-y: .5rem; 24 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/fonts/inconsolata-v18-latin_vietnamese_latin-ext-700.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/fonts/inconsolata-v18-latin_vietnamese_latin-ext-700.woff -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/fonts/inconsolata-v18-latin_vietnamese_latin-ext-700.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/fonts/inconsolata-v18-latin_vietnamese_latin-ext-700.woff2 -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/fonts/inconsolata-v18-latin_vietnamese_latin-ext-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/fonts/inconsolata-v18-latin_vietnamese_latin-ext-regular.woff -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/fonts/inconsolata-v18-latin_vietnamese_latin-ext-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/fonts/inconsolata-v18-latin_vietnamese_latin-ext-regular.woff2 -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/fonts/playfair-display-v15-latin_vietnamese_latin-ext_cyrillic-700.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/fonts/playfair-display-v15-latin_vietnamese_latin-ext_cyrillic-700.woff -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/fonts/playfair-display-v15-latin_vietnamese_latin-ext_cyrillic-700.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/fonts/playfair-display-v15-latin_vietnamese_latin-ext_cyrillic-700.woff2 -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/images/favicon.ico -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/images/hero-off.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/images/hero-off.jpg -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/images/hero-on.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/images/hero-on.jpg -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/images/icon-colored-onion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/images/icon-colored-onion.png -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/images/icon-external.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/images/infographics.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/images/infographics.jpg -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/images/wasabi-social.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/images/wasabi-social.jpg -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/images/wasabi-wallet-laptop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/images/wasabi-wallet-laptop.png -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/images/wasabi_wallet_logo_2-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Backend/wwwroot/images/wasabi_wallet_logo_2-1.png -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Community/Dojo.md: -------------------------------------------------------------------------------- 1 | The dojo can be found in the [documentation](https://docs.wasabiwallet.io/building-wasabi/Dojo.html). 2 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Documentation/FAQ.md: -------------------------------------------------------------------------------- 1 | The frequently asked questions can be found in the [documentation](https://docs.wasabiwallet.io/FAQ). 2 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Documentation/Guides/20180719DemoGuide.md: -------------------------------------------------------------------------------- 1 | The demo guide can be found in the [documentation](https://docs.wasabiwallet.io/building-wasabi/DemoGuide.html). 2 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Documentation/Guides/20190416HardwareWalletTestingGuide.md: -------------------------------------------------------------------------------- 1 | The hardware wallet testing guide can be found in the [documentation](https://docs.wasabiwallet.io/building-wasabi/HardwareWalletTestingGuide.html). 2 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Documentation/Guides/20190617ContributionGame.md: -------------------------------------------------------------------------------- 1 | The contribution game can be found in the [documentation](https://docs.wasabiwallet.io/building-wasabi/ContributionGame.html). 2 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Documentation/Guides/InstallInstructions.md: -------------------------------------------------------------------------------- 1 | The step-by-step PGP verification and package installation guide can be found in the [documentation](https://docs.wasabiwallet.io/using-wasabi/InstallPackage.html). 2 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Documentation/PasswordFinder.md: -------------------------------------------------------------------------------- 1 | The step-by-step guide of the password finder is in the [documentation](https://docs.wasabiwallet.io/using-wasabi/PasswordFinder.html). 2 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Documentation/RPC.md: -------------------------------------------------------------------------------- 1 | The RPC documentation can be found in the [documentation](https://docs.wasabiwallet.io/using-wasabi/RPC.html). 2 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Assets/CascadiaMono.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Gui/Assets/CascadiaMono.ttf -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo.icns -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo.ico -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo.png -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo128.png -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo16.png -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo192.png -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo22.png -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo24.png -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo256.png -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo32.png -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo36.png -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo42.png -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo48.png -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo512.png -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo52.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo52.png -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo64.png -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo72.png -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo8.png -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Gui/Assets/WasabiLogo96.png -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Behaviors/CommandOnClickBehavior.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Input; 3 | using System.Reactive.Disposables; 4 | 5 | namespace WalletWasabi.Gui.Behaviors 6 | { 7 | public class CommandOnClickBehavior : CommandBasedBehavior 8 | { 9 | private CompositeDisposable Disposables { get; set; } 10 | 11 | protected override void OnAttached() 12 | { 13 | Disposables = new CompositeDisposable(); 14 | 15 | base.OnAttached(); 16 | 17 | Disposables.Add(AssociatedObject.AddHandler(InputElement.PointerPressedEvent, (sender, e) => e.Handled = ExecuteCommand())); 18 | } 19 | 20 | protected override void OnDetaching() 21 | { 22 | base.OnDetaching(); 23 | 24 | Disposables?.Dispose(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Behaviors/CommandOnClickReleaseBehavior.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Input; 3 | using System.Reactive.Disposables; 4 | 5 | namespace WalletWasabi.Gui.Behaviors 6 | { 7 | public class CommandOnClickReleaseBehavior : CommandBasedBehavior 8 | { 9 | private CompositeDisposable Disposables { get; set; } 10 | 11 | protected override void OnAttached() 12 | { 13 | Disposables = new CompositeDisposable(); 14 | 15 | base.OnAttached(); 16 | 17 | Disposables.Add(AssociatedObject.AddHandler(InputElement.PointerReleasedEvent, (sender, e) => e.Handled = ExecuteCommand())); 18 | } 19 | 20 | protected override void OnDetaching() 21 | { 22 | base.OnDetaching(); 23 | 24 | Disposables?.Dispose(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Behaviors/CommandOnDoubleClickBehavior.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Input; 3 | using System.Reactive.Disposables; 4 | 5 | namespace WalletWasabi.Gui.Behaviors 6 | { 7 | public class CommandOnDoubleClickBehavior : CommandBasedBehavior 8 | { 9 | private CompositeDisposable Disposables { get; set; } 10 | 11 | protected override void OnAttached() 12 | { 13 | Disposables = new CompositeDisposable(); 14 | 15 | base.OnAttached(); 16 | 17 | Disposables.Add(AssociatedObject.AddHandler(InputElement.DoubleTappedEvent, (sender, e) => e.Handled = ExecuteCommand())); 18 | } 19 | 20 | protected override void OnDetaching() 21 | { 22 | base.OnDetaching(); 23 | 24 | Disposables?.Dispose(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Behaviors/FocusOnAttachedBehavior.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Threading; 3 | using Avalonia.Xaml.Interactivity; 4 | 5 | namespace WalletWasabi.Gui.Behaviors 6 | { 7 | public class FocusOnAttachedBehavior : Behavior 8 | { 9 | protected override void OnAttached() 10 | { 11 | base.OnAttached(); 12 | 13 | Dispatcher.UIThread.Post(() => AssociatedObject.Focus(), DispatcherPriority.Layout); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Behaviors/PreventTooltipStuckBehavior.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Xaml.Interactivity; 3 | 4 | namespace WalletWasabi.Gui.Behaviors 5 | { 6 | /// 7 | /// Ensures Tooltips are closed when parent control is removed from visual tree. 8 | /// This is a workaround and should be removed when Avalonia 0.10.0 upgrade is complete. TODO 9 | /// 10 | public class PreventTooltipStuckBehavior : Behavior 11 | { 12 | protected override void OnDetaching() 13 | { 14 | base.OnDetaching(); 15 | 16 | ToolTip.SetIsOpen(AssociatedObject, false); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/GroupBox.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Controls.Presenters; 4 | using Avalonia.Controls.Primitives; 5 | using Avalonia.Media; 6 | using Avalonia.Styling; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Text; 10 | 11 | namespace WalletWasabi.Gui.Controls 12 | { 13 | public class GroupBox : ContentControl 14 | { 15 | public static readonly StyledProperty TitleProperty = 16 | AvaloniaProperty.Register(nameof(Title)); 17 | 18 | public object Title 19 | { 20 | get => GetValue(TitleProperty); 21 | set => SetValue(TitleProperty, value); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/LockScreen/LockScreen.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/LockScreen/LockScreen.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reactive.Disposables; 3 | using System.Reactive.Linq; 4 | using Avalonia; 5 | using Avalonia.Controls; 6 | using Avalonia.Markup.Xaml; 7 | 8 | namespace WalletWasabi.Gui.Controls.LockScreen 9 | { 10 | public class LockScreen : UserControl 11 | { 12 | public LockScreen() : base() 13 | { 14 | InitializeComponent(); 15 | } 16 | 17 | private void InitializeComponent() 18 | { 19 | AvaloniaXamlLoader.Load(this); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/LockScreen/PinLockScreenView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Markup.Xaml; 3 | 4 | namespace WalletWasabi.Gui.Controls.LockScreen 5 | { 6 | public class PinLockScreenView : UserControl 7 | { 8 | public PinLockScreenView() 9 | { 10 | InitializeComponent(); 11 | } 12 | 13 | private void InitializeComponent() 14 | { 15 | AvaloniaXamlLoader.Load(this); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/LockScreen/SlideLockScreenView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Markup.Xaml; 3 | 4 | namespace WalletWasabi.Gui.Controls.LockScreen 5 | { 6 | public class SlideLockScreenView : UserControl 7 | { 8 | public SlideLockScreenView() 9 | { 10 | InitializeComponent(); 11 | } 12 | 13 | private void InitializeComponent() 14 | { 15 | AvaloniaXamlLoader.Load(this); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/LockScreen/SlideLockScreenViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReactiveUI; 3 | using System.Reactive.Linq; 4 | 5 | namespace WalletWasabi.Gui.Controls.LockScreen 6 | { 7 | public class SlideLockScreenViewModel : WasabiLockScreenViewModelBase 8 | { 9 | public readonly double ThresholdPercent = 1 / 6d; 10 | 11 | public SlideLockScreenViewModel() : base() 12 | { 13 | CanSlide = true; 14 | 15 | this.WhenAnyValue(x => x.IsLocked) 16 | .Where(x => !x) 17 | .Take(1) 18 | .Subscribe(x => Close()); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/LockScreen/WasabiLockScreenViewModelBase.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using Splat; 3 | using System.Reactive.Disposables; 4 | using System.Reactive.Linq; 5 | 6 | namespace WalletWasabi.Gui.Controls.LockScreen 7 | { 8 | public abstract class WasabiLockScreenViewModelBase : LockScreenViewModelBase 9 | { 10 | protected override void OnInitialize(CompositeDisposable disposables) 11 | { 12 | base.OnInitialize(disposables); 13 | 14 | var global = Locator.Current.GetService(); 15 | 16 | global.UiConfig.LockScreenActive = true; 17 | 18 | Disposable.Create(() => 19 | { 20 | var global = Locator.Current.GetService(); 21 | 22 | global.UiConfig.LockScreenActive = false; 23 | }) 24 | .DisposeWith(disposables); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/ModalDialog.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Markup.Xaml; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace WalletWasabi.Gui.Controls 8 | { 9 | internal class ModalDialog : UserControl 10 | { 11 | public ModalDialog() 12 | { 13 | InitializeComponent(); 14 | } 15 | 16 | private void InitializeComponent() 17 | { 18 | AvaloniaXamlLoader.Load(this); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/Spinner.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 15 | 16 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/Spinner.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Markup.Xaml; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace WalletWasabi.Gui.Controls 8 | { 9 | internal class Spinner : UserControl 10 | { 11 | public Spinner() 12 | { 13 | InitializeComponent(); 14 | } 15 | 16 | private void InitializeComponent() 17 | { 18 | AvaloniaXamlLoader.Load(this); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/StatusBar.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Markup.Xaml; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace WalletWasabi.Gui.Controls 8 | { 9 | internal class StatusBar : UserControl 10 | { 11 | public StatusBar() 12 | { 13 | InitializeComponent(); 14 | } 15 | 16 | private void InitializeComponent() 17 | { 18 | AvaloniaXamlLoader.Load(this); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/TransactionDetails/Views/TransactionDetails.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Data; 4 | using Avalonia.Markup.Xaml; 5 | using ReactiveUI; 6 | using System.Reactive.Linq; 7 | 8 | namespace WalletWasabi.Gui.Controls.TransactionDetails.Views 9 | { 10 | public class TransactionDetails : UserControl 11 | { 12 | public TransactionDetails() 13 | { 14 | InitializeComponent(); 15 | } 16 | 17 | private void InitializeComponent() 18 | { 19 | AvaloniaXamlLoader.Load(this); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/WalletExplorer/BuildTabView.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/WalletExplorer/BuildTabView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace WalletWasabi.Gui.Controls.WalletExplorer 6 | { 7 | public class BuildTabView : UserControl 8 | { 9 | public BuildTabView() 10 | { 11 | InitializeComponent(); 12 | } 13 | 14 | private void InitializeComponent() 15 | { 16 | AvaloniaXamlLoader.Load(this); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/WalletExplorer/ClosedHardwareWalletViewModel.cs: -------------------------------------------------------------------------------- 1 | using WalletWasabi.Wallets; 2 | 3 | namespace WalletWasabi.Gui.Controls.WalletExplorer 4 | { 5 | public class ClosedHardwareWalletViewModel : ClosedWalletViewModel 6 | { 7 | internal ClosedHardwareWalletViewModel(Wallet wallet) : base(wallet) 8 | { 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/WalletExplorer/ClosedWatchOnlyWalletViewModel.cs: -------------------------------------------------------------------------------- 1 | using WalletWasabi.Wallets; 2 | 3 | namespace WalletWasabi.Gui.Controls.WalletExplorer 4 | { 5 | public class ClosedWatchOnlyWalletViewModel : ClosedWalletViewModel 6 | { 7 | internal ClosedWatchOnlyWalletViewModel(Wallet wallet) : base(wallet) 8 | { 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/WalletExplorer/CoinInfoTabView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Data; 4 | using Avalonia.Markup.Xaml; 5 | using ReactiveUI; 6 | using System.Reactive.Linq; 7 | 8 | namespace WalletWasabi.Gui.Controls.WalletExplorer 9 | { 10 | public class CoinInfoTabView : UserControl 11 | { 12 | public CoinInfoTabView() 13 | { 14 | InitializeComponent(); 15 | } 16 | 17 | private void InitializeComponent() 18 | { 19 | AvaloniaXamlLoader.Load(this); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/WalletExplorer/CoinInfoTabViewModel.cs: -------------------------------------------------------------------------------- 1 | using WalletWasabi.Gui.ViewModels; 2 | 3 | namespace WalletWasabi.Gui.Controls.WalletExplorer 4 | { 5 | public class CoinInfoTabViewModel : WasabiDocumentTabViewModel 6 | { 7 | public CoinInfoTabViewModel(CoinViewModel coin) : base("") 8 | { 9 | Coin = coin; 10 | Title = $"Coin ({coin.Amount.ToString(false, true)}) Details"; 11 | } 12 | 13 | public CoinViewModel Coin { get; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Markup.Xaml; 3 | 4 | namespace WalletWasabi.Gui.Controls.WalletExplorer 5 | { 6 | public class CoinJoinTabView : UserControl 7 | { 8 | public CoinJoinTabView() 9 | { 10 | InitializeComponent(); 11 | } 12 | 13 | private void InitializeComponent() 14 | { 15 | AvaloniaXamlLoader.Load(this); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/WalletExplorer/HardwareWalletViewModel.cs: -------------------------------------------------------------------------------- 1 | using WalletWasabi.Wallets; 2 | 3 | namespace WalletWasabi.Gui.Controls.WalletExplorer 4 | { 5 | public class HardwareWalletViewModel : WalletViewModel 6 | { 7 | internal HardwareWalletViewModel(Wallet wallet) : base(wallet) 8 | { 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/WalletExplorer/HistoryTabView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Markup.Xaml; 3 | 4 | namespace WalletWasabi.Gui.Controls.WalletExplorer 5 | { 6 | public class HistoryTabView : UserControl 7 | { 8 | public HistoryTabView() 9 | { 10 | InitializeComponent(); 11 | } 12 | 13 | private void InitializeComponent() 14 | { 15 | AvaloniaXamlLoader.Load(this); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/WalletExplorer/PinPadView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace WalletWasabi.Gui.Controls.WalletExplorer 6 | { 7 | public class PinPadView : UserControl 8 | { 9 | public PinPadView() 10 | { 11 | InitializeComponent(); 12 | } 13 | 14 | private void InitializeComponent() 15 | { 16 | AvaloniaXamlLoader.Load(this); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/WalletExplorer/ReceiveTabView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Markup.Xaml; 3 | 4 | namespace WalletWasabi.Gui.Controls.WalletExplorer 5 | { 6 | public class ReceiveTabView : UserControl 7 | { 8 | public ReceiveTabView() 9 | { 10 | InitializeComponent(); 11 | } 12 | 13 | private void InitializeComponent() 14 | { 15 | AvaloniaXamlLoader.Load(this); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/WalletExplorer/SendControlView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace WalletWasabi.Gui.Controls.WalletExplorer 6 | { 7 | public class SendControlView : UserControl 8 | { 9 | public SendControlView() 10 | { 11 | InitializeComponent(); 12 | } 13 | 14 | private void InitializeComponent() 15 | { 16 | AvaloniaXamlLoader.Load(this); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/WalletExplorer/SendTabView.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 7 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/WalletExplorer/SendTabView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace WalletWasabi.Gui.Controls.WalletExplorer 6 | { 7 | public class SendTabView : UserControl 8 | { 9 | public SendTabView() 10 | { 11 | InitializeComponent(); 12 | } 13 | 14 | private void InitializeComponent() 15 | { 16 | AvaloniaXamlLoader.Load(this); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/WalletExplorer/TransactionBroadcasterView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace WalletWasabi.Gui.Controls.WalletExplorer 6 | { 7 | public class TransactionBroadcasterView : UserControl 8 | { 9 | public TransactionBroadcasterView() 10 | { 11 | InitializeComponent(); 12 | } 13 | 14 | private void InitializeComponent() 15 | { 16 | AvaloniaXamlLoader.Load(this); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/WalletExplorer/TransactionInfoTabView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Data; 4 | using Avalonia.Markup.Xaml; 5 | using ReactiveUI; 6 | using System.Reactive.Linq; 7 | 8 | namespace WalletWasabi.Gui.Controls.WalletExplorer 9 | { 10 | public class TransactionInfoTabView : UserControl 11 | { 12 | public TransactionInfoTabView() 13 | { 14 | InitializeComponent(); 15 | } 16 | 17 | private void InitializeComponent() 18 | { 19 | AvaloniaXamlLoader.Load(this); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/WalletExplorer/TransactionInfoTabViewModel.cs: -------------------------------------------------------------------------------- 1 | using WalletWasabi.Gui.Controls.TransactionDetails; 2 | using WalletWasabi.Gui.Controls.TransactionDetails.ViewModels; 3 | using WalletWasabi.Gui.ViewModels; 4 | 5 | namespace WalletWasabi.Gui.Controls.WalletExplorer 6 | { 7 | public class TransactionInfoTabViewModel : WasabiDocumentTabViewModel 8 | { 9 | public TransactionInfoTabViewModel(TransactionDetailsViewModel transaction) : base("") 10 | { 11 | Transaction = transaction; 12 | Title = $"Transaction ({transaction.TransactionId[0..10]}) Details"; 13 | } 14 | 15 | public TransactionDetailsViewModel Transaction { get; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/WalletExplorer/TransactionViewerView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace WalletWasabi.Gui.Controls.WalletExplorer 6 | { 7 | public class TransactionViewerView : UserControl 8 | { 9 | public TransactionViewerView() 10 | { 11 | InitializeComponent(); 12 | } 13 | 14 | private void InitializeComponent() 15 | { 16 | AvaloniaXamlLoader.Load(this); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/WalletExplorer/WalletExplorerView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Markup.Xaml; 3 | 4 | namespace WalletWasabi.Gui.Controls.WalletExplorer 5 | { 6 | public class WalletExplorerView : UserControl 7 | { 8 | public WalletExplorerView() 9 | { 10 | InitializeComponent(); 11 | } 12 | 13 | private void InitializeComponent() 14 | { 15 | AvaloniaXamlLoader.Load(this); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/WalletExplorer/WalletInfoView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace WalletWasabi.Gui.Controls.WalletExplorer 6 | { 7 | public class WalletInfoView : UserControl 8 | { 9 | public WalletInfoView() 10 | { 11 | InitializeComponent(); 12 | } 13 | 14 | private void InitializeComponent() 15 | { 16 | AvaloniaXamlLoader.Load(this); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Controls/WalletExplorer/WatchOnlyWalletViewModel.cs: -------------------------------------------------------------------------------- 1 | using WalletWasabi.Wallets; 2 | 3 | namespace WalletWasabi.Gui.Controls.WalletExplorer 4 | { 5 | public class WatchOnlyWalletViewModel : WalletViewModel 6 | { 7 | internal WatchOnlyWalletViewModel(Wallet wallet) : base(wallet) 8 | { 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Converters/FileSizeStringConverter.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Data.Converters; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Globalization; 5 | using System.Text; 6 | using WalletWasabi.Gui.Helpers; 7 | 8 | namespace WalletWasabi.Gui.Converters 9 | { 10 | public class FileSizeStringConverter : IValueConverter 11 | { 12 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 13 | { 14 | if (value is long size && size > 0) 15 | { 16 | return ByteSizeHelper.ToString(size); 17 | } 18 | 19 | return ""; 20 | } 21 | 22 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 23 | { 24 | throw new NotImplementedException(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Converters/InverseBooleanConverter.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Data.Converters; 2 | using System; 3 | using System.Globalization; 4 | using WalletWasabi.Exceptions; 5 | 6 | namespace WalletWasabi.Gui.Converters 7 | { 8 | public class InverseBooleanConverter : IValueConverter 9 | { 10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 11 | { 12 | if (value is bool boolean) 13 | { 14 | return !boolean; 15 | } 16 | else 17 | { 18 | throw new TypeArgumentException(value, typeof(bool), nameof(value)); 19 | } 20 | } 21 | 22 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 23 | { 24 | throw new NotSupportedException(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Converters/ShouldDisplayValueConverter.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Data.Converters; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Globalization; 5 | using System.Text; 6 | 7 | namespace WalletWasabi.Gui.Converters 8 | { 9 | public class ShouldDisplayValueConverter : IValueConverter 10 | { 11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 12 | { 13 | if (value is int integer && integer <= 0) 14 | { 15 | return false; 16 | } 17 | 18 | return true; 19 | } 20 | 21 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 22 | { 23 | throw new NotSupportedException(); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Converters/ShowCursorConverter.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Data.Converters; 2 | using Avalonia.Input; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Globalization; 6 | using System.Text; 7 | 8 | namespace WalletWasabi.Gui.Converters 9 | { 10 | public class ShowCursorConverter : IValueConverter 11 | { 12 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 13 | { 14 | if (value is bool boolean && boolean) 15 | { 16 | return new Cursor(StandardCursorType.Hand); 17 | } 18 | 19 | return new Cursor(StandardCursorType.Arrow); 20 | } 21 | 22 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 23 | { 24 | throw new NotSupportedException(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/CrashReport/Views/CrashReportWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using Avalonia; 4 | using Avalonia.Markup.Xaml; 5 | using AvalonStudio.Shell.Controls; 6 | using Splat; 7 | 8 | namespace WalletWasabi.Gui.CrashReport.Views 9 | { 10 | public class CrashReportWindow : WasabiWindow 11 | { 12 | public CrashReportWindow() 13 | { 14 | InitializeComponent(); 15 | #if DEBUG 16 | this.AttachDevTools(); 17 | #endif 18 | } 19 | 20 | private void InitializeComponent() 21 | { 22 | AvaloniaXamlLoader.Load(this); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Dialogs/CannotCloseDialogView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Markup.Xaml; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace WalletWasabi.Gui.Dialogs 8 | { 9 | internal class CannotCloseDialogView : UserControl 10 | { 11 | public CannotCloseDialogView() 12 | { 13 | InitializeComponent(); 14 | } 15 | 16 | private void InitializeComponent() 17 | { 18 | AvaloniaXamlLoader.Load(this); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Dialogs/GenSocksServFailDialogView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace WalletWasabi.Gui.Dialogs 6 | { 7 | public class GenSocksServFailDialogView : UserControl 8 | { 9 | public GenSocksServFailDialogView() 10 | { 11 | InitializeComponent(); 12 | } 13 | 14 | private void InitializeComponent() 15 | { 16 | AvaloniaXamlLoader.Load(this); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Dialogs/GenSocksServFailDialogViewModel.cs: -------------------------------------------------------------------------------- 1 | using AvalonStudio.Extensibility.Dialogs; 2 | using ReactiveUI; 3 | using WalletWasabi.Logging; 4 | using System.Reactive.Linq; 5 | using System; 6 | 7 | namespace WalletWasabi.Gui.Dialogs 8 | { 9 | public class GenSocksServFailDialogViewModel : ModalDialogViewModelBase 10 | { 11 | public GenSocksServFailDialogViewModel() : base("", true, false) 12 | { 13 | OKCommand = ReactiveCommand.Create(() => Close(true)); // OK pressed. 14 | OKCommand.ThrownExceptions 15 | .ObserveOn(RxApp.TaskpoolScheduler) 16 | .Subscribe(ex => Logger.LogError(ex)); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Dialogs/TextInputDialogView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace WalletWasabi.Gui.Dialogs 6 | { 7 | public class TextInputDialogView : UserControl 8 | { 9 | public TextInputDialogView() 10 | { 11 | InitializeComponent(); 12 | } 13 | 14 | private void InitializeComponent() 15 | { 16 | AvaloniaXamlLoader.Load(this); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Extensions/DummyHack.txt: -------------------------------------------------------------------------------- 1 | This file is necessary to have in the publish folder, otherwise Avalonia or AvalonStudio and Wix won't work together. 2 | It matters on Windows. It may or may not make a difference in Linux and OSX. 3 | For more info see: https://github.com/VitalElement/AvalonStudio.Shell/issues/11 -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Helpers/ByteSizeHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.Gui.Helpers 6 | { 7 | public static class ByteSizeHelper 8 | { 9 | private static readonly string[] Prefixes = 10 | { 11 | "B", 12 | "KB", 13 | "MB", 14 | "GB", 15 | "TB" 16 | }; 17 | 18 | public static string ToString(long bytes) 19 | { 20 | var index = 0; 21 | while (bytes >= 1000) 22 | { 23 | bytes /= 1000; 24 | ++index; 25 | } 26 | return $"{bytes:N} {Prefixes[index]}"; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Helpers/NullNotificationManager.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls.Notifications; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace WalletWasabi.Gui.Helpers 7 | { 8 | public class NullNotificationManager : INotificationManager 9 | { 10 | public void Show(INotification notification) 11 | { 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Helpers/ShellExecuteResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.Gui.Helpers 6 | { 7 | public struct ShellExecuteResult 8 | { 9 | public int ExitCode { get; set; } 10 | public string Output { get; set; } 11 | public string ErrorOutput { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Helpers/ShellType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.Gui.Helpers 6 | { 7 | public enum ShellType 8 | { 9 | Generic, 10 | Windows, 11 | Unix 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Helpers/Utils.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Threading; 2 | using System; 3 | using System.IO; 4 | using System.Threading.Tasks; 5 | 6 | namespace WalletWasabi.Gui.Helpers 7 | { 8 | public static class Utils 9 | { 10 | public static bool DetectLLVMPipeRasterizer() 11 | { 12 | try 13 | { 14 | var shellResult = ShellUtils.ExecuteShellCommand("glxinfo | grep renderer", ""); 15 | 16 | if (!string.IsNullOrWhiteSpace(shellResult.Output) && shellResult.Output.Contains("llvmpipe")) 17 | { 18 | return true; 19 | } 20 | } 21 | catch 22 | { 23 | // do nothing 24 | } 25 | 26 | return false; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Models/FeeDisplayFormat.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.Gui.Models 6 | { 7 | public enum FeeDisplayFormat 8 | { 9 | USD, 10 | BTC, 11 | SatoshiPerByte, 12 | Percentage 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Models/JsonRpcServerConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.Gui.Models 2 | { 3 | public class JsonRpcServerConfiguration 4 | { 5 | private Config _config; 6 | 7 | public JsonRpcServerConfiguration(Config config) 8 | { 9 | _config = config; 10 | } 11 | 12 | public bool IsEnabled => _config.JsonRpcServerEnabled; 13 | public string JsonRpcUser => _config.JsonRpcUser; 14 | public string JsonRpcPassword => _config.JsonRpcPassword; 15 | public string[] Prefixes => _config.JsonRpcServerPrefixes; 16 | 17 | public bool RequiresCredentials => !string.IsNullOrEmpty(JsonRpcUser) && !string.IsNullOrEmpty(JsonRpcPassword); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Models/LockScreenType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.Gui.Models 6 | { 7 | public enum LockScreenType 8 | { 9 | SlideLock, 10 | PinLock 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Models/RoundPhaseState.cs: -------------------------------------------------------------------------------- 1 | using WalletWasabi.CoinJoin.Common.Models; 2 | 3 | namespace WalletWasabi.Gui.Models 4 | { 5 | public struct RoundPhaseState 6 | { 7 | public RoundPhaseState(RoundPhase phase, bool error) 8 | { 9 | Phase = phase; 10 | Error = error; 11 | } 12 | 13 | public RoundPhase Phase { get; } 14 | 15 | public bool Error { get; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Models/Sorting/SortOrder.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.Gui.Models.Sorting 2 | { 3 | public enum SortOrder 4 | { 5 | None, 6 | Increasing, 7 | Decreasing 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Models/StatusBarStatuses/StatusType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.Gui.Models.StatusBarStatuses 6 | { 7 | /// 8 | /// Order: priority the lower. 9 | /// 10 | public enum StatusType 11 | { 12 | CriticalUpdate, 13 | OptionalUpdate, 14 | Connecting, 15 | WalletProcessingFilters, 16 | WalletProcessingTransactions, 17 | WalletLoading, 18 | Synchronizing, 19 | Loading, 20 | BroadcastingTransaction, 21 | SigningTransaction, 22 | AcquiringSignatureFromHardwareWallet, 23 | AcquiringXpubFromHardwareWallet, 24 | ConnectingToHardwareWallet, 25 | SettingUpHardwareWallet, 26 | BuildingTransaction, 27 | DequeuingSelectedCoins, 28 | Ready 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "WalletWasabi.Gui": { 4 | "commandName": "Project" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Rpc/JsonRpcErrorCodes.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.Gui.Rpc 2 | { 3 | public enum JsonRpcErrorCodes 4 | { 5 | ParseError = -32700, // Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text. 6 | InvalidRequest = -32600, // The JSON sent is not a valid Request object. 7 | MethodNotFound = -32601, // The method does not exist / is not available. 8 | InvalidParams = -32602, // Invalid method parameter(s). 9 | InternalError = -32603 // Internal JSON-RPC error. 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Rpc/JsonRpcMethodAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace WalletWasabi.Gui.Rpc 4 | { 5 | /// 6 | /// Class used to decorate service methods and map them with their rpc method name. 7 | /// 8 | [AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = true)] 9 | public sealed class JsonRpcMethodAttribute : Attribute 10 | { 11 | public JsonRpcMethodAttribute(string name) 12 | { 13 | Name = name; 14 | } 15 | 16 | public string Name { get; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Rpc/PaymentInfo.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | 3 | namespace WalletWasabi.Gui.Rpc 4 | { 5 | public class PaymentInfo 6 | { 7 | public BitcoinAddress Sendto { get; set; } 8 | public Money Amount { get; set; } 9 | public string Label { get; set; } 10 | public bool SubtractFee { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Suggestions/SuggestLabelView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace WalletWasabi.Gui.Suggestions 6 | { 7 | public class SuggestLabelView : UserControl 8 | { 9 | public SuggestLabelView() 10 | { 11 | InitializeComponent(); 12 | } 13 | 14 | private void InitializeComponent() 15 | { 16 | AvaloniaXamlLoader.Load(this); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Suggestions/SuggestionViewModel.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | 6 | namespace WalletWasabi.Gui.Suggestions 7 | { 8 | public class SuggestionViewModel : ReactiveObject 9 | { 10 | private bool _isHighLighted; 11 | 12 | public SuggestionViewModel(string word, Action onSeleted) 13 | { 14 | Word = word; 15 | OnSelection = onSeleted; 16 | } 17 | 18 | public string Word { get; } 19 | public Action OnSelection { get; } 20 | 21 | public bool IsHighLighted 22 | { 23 | get => _isHighLighted; 24 | set => this.RaiseAndSetIfChanged(ref _isHighLighted, value); 25 | } 26 | 27 | public void OnSelected() 28 | { 29 | OnSelection?.Invoke(Word); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Tabs/AboutView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Markup.Xaml; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace WalletWasabi.Gui.Tabs 8 | { 9 | internal class AboutView : UserControl 10 | { 11 | public AboutView() 12 | { 13 | InitializeComponent(); 14 | } 15 | 16 | private void InitializeComponent() 17 | { 18 | AvaloniaXamlLoader.Load(this); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Tabs/LegalDocumentsView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace WalletWasabi.Gui.Tabs 6 | { 7 | public class LegalDocumentsView : UserControl 8 | { 9 | public LegalDocumentsView() 10 | { 11 | InitializeComponent(); 12 | } 13 | 14 | private void InitializeComponent() 15 | { 16 | AvaloniaXamlLoader.Load(this); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Tabs/SettingsView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Markup.Xaml; 3 | 4 | namespace WalletWasabi.Gui.Tabs 5 | { 6 | internal class SettingsView : UserControl 7 | { 8 | public SettingsView() 9 | { 10 | InitializeComponent(); 11 | } 12 | 13 | private void InitializeComponent() 14 | { 15 | AvaloniaXamlLoader.Load(this); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Tabs/WalletManager/GenerateWallets/GenerateWalletSuccessView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Markup.Xaml; 3 | 4 | namespace WalletWasabi.Gui.Tabs.WalletManager.GenerateWallets 5 | { 6 | public class GenerateWalletSuccessView : UserControl 7 | { 8 | public GenerateWalletSuccessView() 9 | { 10 | InitializeComponent(); 11 | } 12 | 13 | private void InitializeComponent() 14 | { 15 | AvaloniaXamlLoader.Load(this); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Tabs/WalletManager/GenerateWallets/GenerateWalletView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Markup.Xaml; 3 | 4 | namespace WalletWasabi.Gui.Tabs.WalletManager.GenerateWallets 5 | { 6 | internal class GenerateWalletView : UserControl 7 | { 8 | public GenerateWalletView() 9 | { 10 | InitializeComponent(); 11 | } 12 | 13 | private void InitializeComponent() 14 | { 15 | AvaloniaXamlLoader.Load(this); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Tabs/WalletManager/HardwareWallets/ConnectHardwareWalletView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Markup.Xaml; 4 | 5 | namespace WalletWasabi.Gui.Tabs.WalletManager.HardwareWallets 6 | { 7 | public class ConnectHardwareWalletView : UserControl 8 | { 9 | public ConnectHardwareWalletView() 10 | { 11 | InitializeComponent(); 12 | } 13 | 14 | private void InitializeComponent() 15 | { 16 | AvaloniaXamlLoader.Load(this); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Tabs/WalletManager/LoadWallets/LoadWalletType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.Gui.Tabs.WalletManager.LoadWallets 6 | { 7 | public enum LoadWalletType 8 | { 9 | Desktop, 10 | Password 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Tabs/WalletManager/LoadWallets/LoadWalletView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Markup.Xaml; 3 | 4 | namespace WalletWasabi.Gui.Tabs.WalletManager.LoadWallets 5 | { 6 | internal class LoadWalletView : UserControl 7 | { 8 | public LoadWalletView() 9 | { 10 | InitializeComponent(); 11 | } 12 | 13 | private void InitializeComponent() 14 | { 15 | AvaloniaXamlLoader.Load(this); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Tabs/WalletManager/RecoverWallets/RecoverWalletView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Markup.Xaml; 3 | 4 | namespace WalletWasabi.Gui.Tabs.WalletManager.RecoverWallets 5 | { 6 | internal class RecoverWalletView : UserControl 7 | { 8 | public RecoverWalletView() 9 | { 10 | InitializeComponent(); 11 | } 12 | 13 | private void InitializeComponent() 14 | { 15 | AvaloniaXamlLoader.Load(this); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Tabs/WalletManager/WalletManagerView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Linq; 4 | using Avalonia.Controls; 5 | using Avalonia.Markup.Xaml; 6 | using AvalonStudio.Extensibility; 7 | using AvalonStudio.Shell; 8 | 9 | namespace WalletWasabi.Gui.Tabs.WalletManager 10 | { 11 | internal class WalletManagerView : UserControl 12 | { 13 | public WalletManagerView() 14 | { 15 | InitializeComponent(); 16 | } 17 | 18 | private void InitializeComponent() 19 | { 20 | AvaloniaXamlLoader.Load(this); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Validation/IRegisterValidationMethod.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.Gui.Validation 2 | { 3 | public interface IRegisterValidationMethod 4 | { 5 | void RegisterValidationMethod(string propertyName, ValidateMethod validateMethod); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Validation/IValidations.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace WalletWasabi.Gui.Validation 4 | { 5 | public interface IValidations 6 | { 7 | bool Any { get; } 8 | 9 | bool AnyErrors { get; } 10 | 11 | bool AnyWarnings { get; } 12 | 13 | bool AnyInfos { get; } 14 | 15 | IEnumerable Infos { get; } 16 | 17 | IEnumerable Warnings { get; } 18 | 19 | IEnumerable Errors { get; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/Validation/ValidationExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq.Expressions; 3 | using WalletWasabi.Models; 4 | 5 | namespace WalletWasabi.Gui.Validation 6 | { 7 | public delegate void ValidateMethod(IValidationErrors errors); 8 | 9 | public static class ValidationExtensions 10 | { 11 | public static void ValidateProperty(this TSender viewModel, Expression> property, ValidateMethod validateMethod) where TSender : IRegisterValidationMethod 12 | { 13 | var expression = (MemberExpression)property.Body; 14 | 15 | viewModel.RegisterValidationMethod(expression.Member.Name, validateMethod); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/ViewModels/CategoryViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.Gui.ViewModels 6 | { 7 | public class CategoryViewModel : ViewModelBase 8 | { 9 | public CategoryViewModel(string title) 10 | { 11 | Title = title; 12 | } 13 | 14 | public string Title { get; } 15 | 16 | public virtual void OnCategorySelected() 17 | { 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/ViewModels/IWalletViewModel.cs: -------------------------------------------------------------------------------- 1 | using WalletWasabi.Wallets; 2 | 3 | namespace WalletWasabi.Gui.ViewModels 4 | { 5 | public interface IWalletViewModel 6 | { 7 | Wallet Wallet { get; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/WasabiWindow.xaml: -------------------------------------------------------------------------------- 1 | 12 | 13 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Gui/WasabiWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Markup.Xaml; 3 | using AvalonStudio.Shell.Controls; 4 | 5 | namespace WalletWasabi.Gui 6 | { 7 | public class WasabiWindow : MetroWindow 8 | { 9 | public WasabiWindow() 10 | { 11 | InitializeComponent(); 12 | #if DEBUG 13 | this.AttachDevTools(); 14 | #endif 15 | } 16 | 17 | private void InitializeComponent() 18 | { 19 | AvaloniaXamlLoader.Load(this); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Packager/Content/Osx/App/Contents/Resources/WasabiLogo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Packager/Content/Osx/App/Contents/Resources/WasabiLogo.icns -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Packager/Content/Osx/Dmg/.DS_Store.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Packager/Content/Osx/Dmg/.DS_Store.dat -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Packager/Content/Osx/Dmg/.background/Logo_with_text_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Packager/Content/Osx/Dmg/.background/Logo_with_text_small.png -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Packager/Content/Osx/Dmg/.fseventsd/000000000081abf0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Packager/Content/Osx/Dmg/.fseventsd/000000000081abf0 -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Packager/Content/Osx/Dmg/.fseventsd/000000000081abf1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Packager/Content/Osx/Dmg/.fseventsd/000000000081abf1 -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Packager/Content/Osx/Dmg/.fseventsd/fseventsd-uuid: -------------------------------------------------------------------------------- 1 | 5D4F6D41-8967-4D1E-9953-35A263D5EFDF -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Packager/Content/Osx/WasabiLogo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi.Packager/Content/Osx/WasabiLogo.icns -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Packager/Content/Osx/addcert.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | key_chain="build.keychain" 4 | key_chain_pass="mysecretpassword" 5 | security create-keychain -p "$key_chain_pass" "$key_chain" 6 | security default-keychain -s "$key_chain" 7 | security unlock-keychain -p "$key_chain_pass" "$key_chain" 8 | security import macdevsign.p12 -k "$key_chain" -P "alma" -A 9 | security set-key-partition-list -S apple-tool:,apple: -s -k "$key_chain_pass" "$key_chain" -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Packager/Content/Osx/entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.cs.allow-jit 6 | 7 | com.apple.security.cs.allow-unsigned-executable-memory 8 | 9 | com.apple.security.cs.allow-dyld-environment-variables 10 | 11 | com.apple.security.cs.disable-library-validation 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Tests/Helpers/StringNoWhiteSpaceEqualityComparer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics.CodeAnalysis; 4 | using System.Linq; 5 | 6 | namespace WalletWasabi.Tests.Helpers 7 | { 8 | public class StringNoWhiteSpaceEqualityComparer : IEqualityComparer 9 | { 10 | public bool Equals([AllowNull] string x, [AllowNull] string y) 11 | { 12 | if (x == y) 13 | { 14 | return true; 15 | } 16 | 17 | if (x is null || y is null) 18 | { 19 | return false; 20 | } 21 | 22 | return Enumerable.SequenceEqual( 23 | x.Where(c => !char.IsWhiteSpace(c)), 24 | y.Where(c => !char.IsWhiteSpace(c))); 25 | } 26 | 27 | public int GetHashCode([DisallowNull] string obj) 28 | { 29 | throw new NotImplementedException(); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Tests/Helpers/TransactionProcessorExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using WalletWasabi.Blockchain.Keys; 5 | 6 | namespace WalletWasabi.Blockchain.TransactionProcessing 7 | { 8 | public static class TransactionProcessorExtensions 9 | { 10 | public static HdPubKey NewKey(this TransactionProcessor me, string label) 11 | { 12 | return me.KeyManager.GenerateNewKey(label, KeyState.Clean, true); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Tests/README.md: -------------------------------------------------------------------------------- 1 | # Tests 2 | 3 | We divide tests into 4 different categories. **Unit Tests**, **Integration Tests**, **Regression Tests** and **Acceptance Tests**. 4 | 5 | We define **Unit Tests** as tests that have no **external dependencies**, however **local dependencies** are allowed. **Unit Tests** run on CI. -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Tests/UnitTests/InputsResponseTests.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | using WalletWasabi.CoinJoin.Common.Models; 6 | using Xunit; 7 | 8 | namespace WalletWasabi.Tests.UnitTests 9 | { 10 | public class InputsResponseTests 11 | { 12 | [Fact] 13 | public void InputsResponseSerialization() 14 | { 15 | var resp = new InputsResponse 16 | { 17 | UniqueId = Guid.NewGuid(), 18 | RoundId = 1, 19 | }; 20 | var serialized = JsonConvert.SerializeObject(resp); 21 | var deserialized = JsonConvert.DeserializeObject(serialized); 22 | 23 | Assert.Equal(resp.RoundId, deserialized.RoundId); 24 | Assert.Equal(resp.UniqueId, deserialized.UniqueId); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Tests/XunitConfiguration/CollectionDefinitions.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | namespace WalletWasabi.Tests.XunitConfiguration 4 | { 5 | [CollectionDefinition("RegTest collection")] 6 | public class RegTestCollection : ICollectionFixture 7 | { 8 | // This class has no code, and is never created. Its purpose is simply 9 | // to be the place to apply [CollectionDefinition] and all the 10 | // ICollectionFixture<> interfaces. 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Tests/XunitConfiguration/LiverServerTestsCollections.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Xunit; 5 | 6 | namespace WalletWasabi.Tests.XunitConfiguration 7 | { 8 | [CollectionDefinition("LiveServerTests collection")] 9 | public class LiverServerTestsCollections : ICollectionFixture 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.Tests/xunit.runner.json: -------------------------------------------------------------------------------- 1 | { 2 | "methodDisplay": "method" 3 | } 4 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.WindowsInstaller/Common.wxl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Wasabi Wallet 5 | WasabiWallet 6 | zkSNACKs 7 | 8 | 1033 9 | 10 | Privacy focused Bitcoin wallet. 11 | bitcoin,cryptocurrency,blockchain,privacy,fungibility,anonymity 12 | Easy Peasy Lemon Squeezey 13 | 14 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.WindowsInstaller/ComponentsGenerated.wxs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi.WindowsInstaller/Directories.wxs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | [assembly: InternalsVisibleTo("WalletWasabi.Tests")] 4 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Backend/Models/DeviceToken.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.ComponentModel.DataAnnotations.Schema; 3 | using Newtonsoft.Json; 4 | using Newtonsoft.Json.Converters; 5 | 6 | namespace WalletWasabi.Backend.Models 7 | { 8 | public class DeviceToken 9 | { 10 | [Key] 11 | [Required] 12 | [DatabaseGenerated(DatabaseGeneratedOption.None)] 13 | public string Token { get; set; } 14 | 15 | [JsonConverter(typeof(StringEnumConverter))] 16 | public TokenType Type { get; set; } 17 | 18 | [JsonIgnore] 19 | public TokenStatus Status { get; set; } = TokenStatus.New; 20 | } 21 | 22 | public enum TokenStatus 23 | { 24 | New, 25 | Valid, 26 | Invalid 27 | } 28 | 29 | public enum TokenType 30 | { 31 | Apple, 32 | AppleDebug 33 | } 34 | } -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Backend/Models/ExchangeRate.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace WalletWasabi.Backend.Models 4 | { 5 | public class ExchangeRate 6 | { 7 | [Required] 8 | public string Ticker { get; set; } 9 | 10 | [Required] 11 | public decimal Rate { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Backend/Models/FeeEstimationPair.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace WalletWasabi.Backend.Models 4 | { 5 | /// 6 | /// Satoshi per byte. 7 | /// 8 | public class FeeEstimationPair 9 | { 10 | [Required] 11 | public long Economical { get; set; } 12 | 13 | [Required] 14 | public long Conservative { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Backend/Models/FiltersResponseState.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.Backend.Models 6 | { 7 | public enum FiltersResponseState 8 | { 9 | BestKnownHashNotFound, // When this happens, it's a reorg. 10 | NoNewFilter, 11 | NewFilters 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Backend/Models/Requests/BroadcastRequest.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace WalletWasabi.Backend.Models.Requests 4 | { 5 | public class BroadcastRequest 6 | { 7 | [Required] 8 | public string Hex { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Backend/Models/Responses/FiltersResponse.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System.Collections.Generic; 3 | using WalletWasabi.JsonConverters; 4 | 5 | namespace WalletWasabi.Backend.Models.Responses 6 | { 7 | public class FiltersResponse 8 | { 9 | public int BestHeight { get; set; } 10 | 11 | [JsonProperty(ItemConverterType = typeof(FilterModelJsonConverter))] // Do not use the default jsonifyer, because that's too much data. 12 | public IEnumerable Filters { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Backend/Models/Responses/StatusResponse.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.Backend.Models.Responses 2 | { 3 | public class StatusResponse 4 | { 5 | public bool FilterCreationActive { get; set; } 6 | public bool CoinJoinCreationActive { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Backend/Models/Responses/VersionsResponse.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace WalletWasabi.Backend.Models.Responses 4 | { 5 | public class VersionsResponse 6 | { 7 | public string ClientVersion { get; set; } 8 | 9 | // KEEP THE TYPO IN IT! Otherwise the response would not be backwards compatible. 10 | [JsonProperty(PropertyName = "BackenMajordVersion")] 11 | public string BackendMajorVersion { get; set; } 12 | 13 | public string LegalDocumentsVersion { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/BitcoinCore/Configuration/Whitening/WhiteBind.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Net; 5 | using System.Text; 6 | 7 | namespace WalletWasabi.BitcoinCore.Configuration.Whitening 8 | { 9 | public class WhiteBind : WhiteEntry 10 | { 11 | public static bool TryParse(string value, Network network, out WhiteBind white) 12 | => TryParse(value, network, out white); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/BitcoinCore/Configuration/Whitening/WhiteList.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Net; 5 | using System.Text; 6 | 7 | namespace WalletWasabi.BitcoinCore.Configuration.Whitening 8 | { 9 | public class WhiteList : WhiteEntry 10 | { 11 | public static bool TryParse(string value, Network network, out WhiteList white) 12 | => TryParse(value, network, out white); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/BitcoinCore/Endpointing/EndPointStrategyType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.BitcoinCore.Endpointing 6 | { 7 | public enum EndPointStrategyType 8 | { 9 | Default, 10 | Custom, 11 | Random 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/BitcoinCore/Endpointing/EndPointType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.BitcoinCore.Endpointing 6 | { 7 | public enum EndPointType 8 | { 9 | P2p, 10 | Rpc 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/BitcoinCore/Processes/BitcoindException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.BitcoinCore.Processes 6 | { 7 | public class BitcoindException : Exception 8 | { 9 | public BitcoindException(string message) : base(message) 10 | { 11 | } 12 | 13 | public BitcoindException(string message, Exception innerException) : base(message, innerException) 14 | { 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/BitcoinCore/Processes/BitcoindProcessBridge.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using WalletWasabi.Microservices; 5 | 6 | namespace WalletWasabi.BitcoinCore.Processes 7 | { 8 | public class BitcoindProcessBridge : ProcessBridge 9 | { 10 | public BitcoindProcessBridge() : base(MicroserviceHelpers.GetBinaryPath("bitcoind")) 11 | { 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/BitcoinCore/RpcModels/RpcPubkeyType.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.BitcoinCore.RpcModels 2 | { 3 | public enum RpcPubkeyType 4 | { 5 | Unknown, 6 | TxNonstandard, 7 | TxPubkey, 8 | TxPubkeyhash, 9 | TxScripthash, 10 | TxMultisig, 11 | TxNullData, 12 | TxWitnessV0Keyhash, 13 | TxWitnessV0Scripthash, 14 | TxWitnessUnknown, 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/BitcoinCore/RpcModels/VerboseInputInfo.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | 3 | namespace WalletWasabi.BitcoinCore.RpcModels 4 | { 5 | public class VerboseInputInfo 6 | { 7 | public VerboseInputInfo(string coinbase) 8 | { 9 | Coinbase = coinbase; 10 | } 11 | 12 | public VerboseInputInfo(OutPoint outPoint, VerboseOutputInfo prevOutput) 13 | { 14 | OutPoint = outPoint; 15 | PrevOutput = prevOutput; 16 | } 17 | 18 | public OutPoint OutPoint { get; } 19 | 20 | public VerboseOutputInfo PrevOutput { get; } 21 | 22 | public string Coinbase { get; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/BitcoinCore/RpcModels/VerboseOutputInfo.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | 3 | namespace WalletWasabi.BitcoinCore.RpcModels 4 | { 5 | public class VerboseOutputInfo 6 | { 7 | public VerboseOutputInfo(Money value, Script scriptPubKey, string pubkeyType) 8 | { 9 | Value = value; 10 | ScriptPubKey = scriptPubKey; 11 | PubkeyType = RpcParser.ConvertPubkeyType(pubkeyType); 12 | } 13 | 14 | public Money Value { get; } 15 | 16 | public Script ScriptPubKey { get; } 17 | 18 | public RpcPubkeyType PubkeyType { get; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/BitcoinCore/RpcModels/VerboseTransactionInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NBitcoin; 3 | 4 | namespace WalletWasabi.BitcoinCore.RpcModels 5 | { 6 | public class VerboseTransactionInfo 7 | { 8 | public VerboseTransactionInfo(uint256 id, IEnumerable inputs, IEnumerable outputs) 9 | { 10 | Id = id; 11 | Inputs = inputs; 12 | Outputs = outputs; 13 | } 14 | 15 | public uint256 Id { get; } 16 | 17 | public IEnumerable Inputs { get; } 18 | 19 | public IEnumerable Outputs { get; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Blockchain/Analysis/FeesEstimation/IFeeProvider.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel; 5 | using System.Text; 6 | 7 | namespace WalletWasabi.Blockchain.Analysis.FeesEstimation 8 | { 9 | public interface IFeeProvider 10 | { 11 | public event EventHandler AllFeeEstimateChanged; 12 | 13 | public AllFeeEstimate AllFeeEstimate { get; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Blockchain/Keys/KeyState.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.Blockchain.Keys 2 | { 3 | public enum KeyState 4 | { 5 | Clean, 6 | Locked, 7 | Used 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Blockchain/TransactionBuilding/ChangeStrategy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.Blockchain.TransactionBuilding 6 | { 7 | public enum ChangeStrategy 8 | { 9 | Auto, 10 | Custom, 11 | AllRemainingCustom 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Blockchain/TransactionBuilding/FeeStrategyType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.Blockchain.TransactionBuilding 6 | { 7 | public enum FeeStrategyType 8 | { 9 | Target, 10 | Rate 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Blockchain/TransactionBuilding/MoneyRequestType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.Blockchain.TransactionBuilding 6 | { 7 | public enum MoneyRequestType 8 | { 9 | Value, 10 | Change, 11 | AllRemaining 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Blockchain/Transactions/AllTransactionStoreMock.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | 3 | namespace WalletWasabi.Blockchain.Transactions 4 | { 5 | public class AllTransactionStoreMock : AllTransactionStore 6 | { 7 | public override bool TryGetTransaction(uint256 hash, out SmartTransaction sameStx) 8 | { 9 | sameStx = null; 10 | return false; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Blockchain/Transactions/Operations/Append.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace WalletWasabi.Blockchain.Transactions.Operations 7 | { 8 | public class Append : ITxStoreOperation 9 | { 10 | public Append(params SmartTransaction[] transactions) : this(transactions as IEnumerable) 11 | { 12 | } 13 | 14 | public Append(IEnumerable transactions) 15 | { 16 | Transactions = transactions; 17 | } 18 | 19 | public IEnumerable Transactions { get; } 20 | 21 | public bool IsEmpty => Transactions is null || !Transactions.Any(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Blockchain/Transactions/Operations/ITxStoreOperation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.Blockchain.Transactions.Operations 6 | { 7 | public interface ITxStoreOperation 8 | { 9 | public bool IsEmpty { get; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Blockchain/Transactions/Operations/Remove.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace WalletWasabi.Blockchain.Transactions.Operations 8 | { 9 | public class Remove : ITxStoreOperation 10 | { 11 | public Remove(params uint256[] transactions) : this(transactions as IEnumerable) 12 | { 13 | } 14 | 15 | public Remove(IEnumerable transactions) 16 | { 17 | Transactions = transactions; 18 | } 19 | 20 | public IEnumerable Transactions { get; } 21 | public bool IsEmpty => Transactions is null || !Transactions.Any(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Blockchain/Transactions/Operations/Update.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace WalletWasabi.Blockchain.Transactions.Operations 7 | { 8 | public class Update : ITxStoreOperation 9 | { 10 | public Update(params SmartTransaction[] transactions) : this(transactions as IEnumerable) 11 | { 12 | } 13 | 14 | public Update(IEnumerable transactions) 15 | { 16 | Transactions = transactions; 17 | } 18 | 19 | public IEnumerable Transactions { get; } 20 | 21 | public bool IsEmpty => Transactions is null || !Transactions.Any(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Blockchain/Transactions/TransactionDependencyNode.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace WalletWasabi.Blockchain.Transactions 7 | { 8 | public class TransactionDependencyNode 9 | { 10 | public List Children { get; } = new List(); 11 | public List Parents { get; } = new List(); 12 | public Transaction Transaction { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Blockchain/Transactions/TransactionSummary.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | using System; 3 | using WalletWasabi.Models; 4 | 5 | namespace WalletWasabi.Blockchain.Transactions 6 | { 7 | public class TransactionSummary 8 | { 9 | public DateTimeOffset DateTime { get; set; } 10 | public Height Height { get; set; } 11 | public Money Amount { get; set; } 12 | public string Label { get; set; } 13 | public uint256 TransactionId { get; set; } 14 | public int BlockIndex { get; set; } 15 | public bool IsLikelyCoinJoinOutput { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/CoinJoin/Client/Clients/Queuing/DequeueResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using WalletWasabi.Blockchain.TransactionOutputs; 5 | using WalletWasabi.Helpers; 6 | 7 | namespace WalletWasabi.CoinJoin.Client.Clients.Queuing 8 | { 9 | public class DequeueResult 10 | { 11 | public DequeueResult(IDictionary> successful, IDictionary> unsuccessful) 12 | { 13 | Successful = Guard.NotNull(nameof(successful), successful); 14 | Unsuccessful = Guard.NotNull(nameof(unsuccessful), unsuccessful); 15 | } 16 | 17 | public IDictionary> Successful { get; } 18 | public IDictionary> Unsuccessful { get; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/CoinJoin/Common/Models/ActiveOutput.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | using WalletWasabi.Crypto; 6 | using WalletWasabi.Helpers; 7 | 8 | namespace WalletWasabi.CoinJoin.Common.Models 9 | { 10 | public class ActiveOutput 11 | { 12 | public ActiveOutput(BitcoinAddress address, UnblindedSignature signature, int mixingLevel) 13 | { 14 | Address = Guard.NotNull(nameof(address), address); 15 | Signature = Guard.NotNull(nameof(signature), signature); 16 | MixingLevel = Guard.MinimumAndNotNull(nameof(mixingLevel), mixingLevel, 0); 17 | } 18 | 19 | public BitcoinAddress Address { get; } 20 | public UnblindedSignature Signature { get; } 21 | public int MixingLevel { get; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/CoinJoin/Common/Models/ConnectionConfirmationResponse.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | using Newtonsoft.Json; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.ComponentModel.DataAnnotations; 6 | using System.Text; 7 | using WalletWasabi.JsonConverters; 8 | 9 | namespace WalletWasabi.CoinJoin.Common.Models 10 | { 11 | public class ConnectionConfirmationResponse 12 | { 13 | [JsonProperty(ItemConverterType = typeof(Uint256JsonConverter))] 14 | public IEnumerable BlindedOutputSignatures { get; set; } 15 | 16 | [Required] 17 | public RoundPhase CurrentPhase { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/CoinJoin/Common/Models/HdPubKeyBlindedPair.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | using Newtonsoft.Json; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | using WalletWasabi.Blockchain.Keys; 7 | using WalletWasabi.Helpers; 8 | using WalletWasabi.JsonConverters; 9 | 10 | namespace WalletWasabi.CoinJoin.Common.Models 11 | { 12 | [JsonObject(MemberSerialization.OptIn)] 13 | public class HdPubKeyBlindedPair 14 | { 15 | [JsonConstructor] 16 | public HdPubKeyBlindedPair(HdPubKey key, bool isBlinded) 17 | { 18 | Key = Guard.NotNull(nameof(key), key); 19 | IsBlinded = isBlinded; 20 | } 21 | 22 | [JsonProperty] 23 | public HdPubKey Key { get; set; } 24 | 25 | [JsonProperty] 26 | public bool IsBlinded { get; set; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/CoinJoin/Common/Models/InputProofModel.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | using Newtonsoft.Json; 3 | using System.ComponentModel.DataAnnotations; 4 | using WalletWasabi.JsonConverters; 5 | 6 | namespace WalletWasabi.CoinJoin.Common.Models 7 | { 8 | public class InputProofModel 9 | { 10 | [Required] 11 | [JsonConverter(typeof(OutPointAsTxoRefJsonConverter))] 12 | public OutPoint Input { get; set; } 13 | 14 | [Required] 15 | [MinLength(65, ErrorMessage = "Provided proof is invalid")] // Bitcoin compact signatures are 65 bytes length 16 | [MaxLength(65, ErrorMessage = "Provided proof is invalid")] // Bitcoin compact signatures are 65 bytes length 17 | [JsonConverter(typeof(ByteArrayJsonConverter))] 18 | public byte[] Proof { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/CoinJoin/Common/Models/InputsRequest.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | using Newtonsoft.Json; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations; 5 | using System.Net.Http; 6 | using System.Text; 7 | using WalletWasabi.JsonConverters; 8 | 9 | namespace WalletWasabi.CoinJoin.Common.Models 10 | { 11 | public class InputsRequest : InputsRequestBase 12 | { 13 | [Required, MinLength(1)] 14 | [JsonProperty(ItemConverterType = typeof(Uint256JsonConverter))] 15 | public IEnumerable BlindedOutputScripts { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/CoinJoin/Common/Models/InputsRequest4.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | using Newtonsoft.Json; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations; 5 | using System.Net.Http; 6 | using System.Text; 7 | using WalletWasabi.JsonConverters; 8 | 9 | namespace WalletWasabi.CoinJoin.Common.Models 10 | { 11 | public class InputsRequest4 : InputsRequestBase 12 | { 13 | [Required, MinLength(1)] 14 | public IEnumerable BlindedOutputScripts { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/CoinJoin/Common/Models/InputsResponse.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations; 5 | using WalletWasabi.JsonConverters; 6 | 7 | namespace WalletWasabi.CoinJoin.Common.Models 8 | { 9 | public class InputsResponse 10 | { 11 | [JsonConverter(typeof(GuidJsonConverter))] 12 | public Guid UniqueId { get; set; } 13 | 14 | public long RoundId { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/CoinJoin/Common/Models/PublicNonceWithIndex.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | using Newtonsoft.Json; 3 | using WalletWasabi.JsonConverters; 4 | 5 | namespace WalletWasabi.CoinJoin.Common.Models 6 | { 7 | public class PublicNonceWithIndex 8 | { 9 | public PublicNonceWithIndex(int n, PubKey rPubKey) 10 | { 11 | N = n; 12 | R = rPubKey; 13 | } 14 | 15 | [JsonProperty] 16 | public int N { get; set; } 17 | 18 | [JsonProperty] 19 | [JsonConverter(typeof(PubKeyJsonConverter))] 20 | public PubKey R { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/CoinJoin/Common/Models/RoundPhase.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.CoinJoin.Common.Models 2 | { 3 | public enum RoundPhase 4 | { 5 | InputRegistration, 6 | ConnectionConfirmation, 7 | OutputRegistration, 8 | Signing 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/CoinJoin/Common/Models/RoundStateResponse.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | using Newtonsoft.Json; 3 | using Newtonsoft.Json.Converters; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using WalletWasabi.CoinJoin.Common.Crypto; 8 | using WalletWasabi.JsonConverters; 9 | 10 | namespace WalletWasabi.CoinJoin.Common.Models 11 | { 12 | public class RoundStateResponse : RoundStateResponseBase 13 | { 14 | public IEnumerable SchnorrPubKeys { get; set; } 15 | 16 | public override int MixLevelCount => SchnorrPubKeys.Count(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/CoinJoin/Common/Models/RoundStateResponse4.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | using Newtonsoft.Json; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using WalletWasabi.JsonConverters; 8 | 9 | namespace WalletWasabi.CoinJoin.Common.Models 10 | { 11 | public class RoundStateResponse4 : RoundStateResponseBase 12 | { 13 | [JsonProperty(ItemConverterType = typeof(PubKeyJsonConverter))] 14 | public IEnumerable SignerPubKeys { get; set; } 15 | 16 | public IEnumerable RPubKeys { get; set; } 17 | 18 | public override int MixLevelCount => SignerPubKeys.Count(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/CoinJoin/Coordinator/Participants/AliceState.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.CoinJoin.Coordinator.Participants 2 | { 3 | public enum AliceState 4 | { 5 | InputsRegistered, 6 | ConnectionConfirmed, 7 | SignedCoinJoin 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/CoinJoin/Coordinator/Participants/Bob.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | using WalletWasabi.CoinJoin.Coordinator.MixingLevels; 3 | using WalletWasabi.Helpers; 4 | 5 | namespace WalletWasabi.CoinJoin.Coordinator.Participants 6 | { 7 | public class Bob 8 | { 9 | public Bob(BitcoinAddress activeOutputAddress, MixingLevel level) 10 | { 11 | ActiveOutputAddress = Guard.NotNull(nameof(activeOutputAddress), activeOutputAddress); 12 | Level = Guard.NotNull(nameof(level), level); 13 | } 14 | 15 | public MixingLevel Level { get; } 16 | public BitcoinAddress ActiveOutputAddress { get; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/CoinJoin/Coordinator/Rounds/CoordinatorRoundStatus.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.CoinJoin.Coordinator.Rounds 2 | { 3 | public enum CoordinatorRoundStatus 4 | { 5 | NotStarted, 6 | Running, 7 | Succeded, 8 | Aborted 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Crypto/Randomness/MockRandom.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin.Secp256k1; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace WalletWasabi.Crypto.Randomness 8 | { 9 | public class MockRandom : IWasabiRandom 10 | { 11 | public List GetBytesResults { get; } = new List(); 12 | 13 | public void GetBytes(byte[] output) 14 | { 15 | var first = GetBytesResults.First(); 16 | GetBytesResults.RemoveFirst(); 17 | Buffer.BlockCopy(first, 0, output, 0, first.Length); 18 | } 19 | 20 | public void GetBytes(Span output) 21 | { 22 | var first = GetBytesResults.First(); 23 | GetBytesResults.RemoveFirst(); 24 | first.AsSpan().CopyTo(output); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Crypto/Randomness/UnsecureRandom.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.Crypto.Randomness 6 | { 7 | public class UnsecureRandom : IWasabiRandom 8 | { 9 | public UnsecureRandom() 10 | { 11 | Random = new Random(); 12 | } 13 | 14 | private Random Random { get; } 15 | 16 | public void GetBytes(byte[] buffer) => Random.NextBytes(buffer); 17 | 18 | public void GetBytes(Span buffer) => Random.NextBytes(buffer); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Exceptions/ConnectionException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace WalletWasabi.Exceptions 4 | { 5 | public class ConnectionException : Exception 6 | { 7 | public ConnectionException(string message) : base(message) 8 | { 9 | } 10 | 11 | public ConnectionException(string message, Exception innerException) : base(message, innerException) 12 | { 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Exceptions/InsufficientBalanceException.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | using System; 3 | 4 | namespace WalletWasabi.Exceptions 5 | { 6 | public class InsufficientBalanceException : Exception 7 | { 8 | public InsufficientBalanceException(Money minimum, Money actual) : base($"Needed: {minimum.ToString(false, true)} BTC, got only: {actual.ToString(false, true)} BTC.") 9 | { 10 | Minimum = minimum ?? Money.Zero; 11 | Actual = actual ?? Money.Zero; 12 | } 13 | 14 | public Money Minimum { get; } 15 | public Money Actual { get; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Exceptions/InvalidTxException.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | using NBitcoin.Policy; 3 | using System; 4 | using System.Collections.Generic; 5 | using WalletWasabi.Helpers; 6 | 7 | namespace WalletWasabi.Exceptions 8 | { 9 | public class InvalidTxException : Exception 10 | { 11 | public InvalidTxException(Transaction invalidTx, IEnumerable errors = null) 12 | { 13 | Transaction = Guard.NotNull(nameof(invalidTx), invalidTx); 14 | Errors = errors; 15 | } 16 | 17 | public Transaction Transaction { get; } 18 | public IEnumerable Errors { get; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Exceptions/NotSupportedNetworkException.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace WalletWasabi.Exceptions 7 | { 8 | public class NotSupportedNetworkException : NotSupportedException 9 | { 10 | public NotSupportedNetworkException(Network network) 11 | : base($"{nameof(Network)} not supported: {network}.") 12 | { 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Exceptions/TorSocks5FailureResponseException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using WalletWasabi.Helpers; 3 | using WalletWasabi.TorSocks5.Models.Fields.OctetFields; 4 | 5 | namespace WalletWasabi.Exceptions 6 | { 7 | public class TorSocks5FailureResponseException : Exception 8 | { 9 | public TorSocks5FailureResponseException(RepField rep) : base($"Tor SOCKS5 proxy responded with {rep}.") 10 | { 11 | RepField = Guard.NotNull(nameof(rep), rep); 12 | } 13 | 14 | public RepField RepField { get; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Exceptions/TypeArgumentException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.Exceptions 6 | { 7 | public class TypeArgumentException : ArgumentException 8 | { 9 | public TypeArgumentException(object value, Type expected, string paramName) : base($"Invalid type: {value.GetType()}. Expected: {expected}.", paramName) 10 | { 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Extensions/HttpContentExtensions.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using Newtonsoft.Json.Serialization; 3 | using System.Threading.Tasks; 4 | using WalletWasabi.JsonConverters; 5 | using WalletWasabi.WebClients.Wasabi; 6 | 7 | namespace System.Net.Http 8 | { 9 | public static class HttpContentExtensions 10 | { 11 | public static async Task ReadAsJsonAsync(this HttpContent me) 12 | { 13 | if (me is null) 14 | { 15 | return default; 16 | } 17 | 18 | var settings = new JsonSerializerSettings 19 | { 20 | Converters = new[] { new RoundStateResponseJsonConverter(WasabiClient.ApiVersion) } 21 | }; 22 | var jsonString = await me.ReadAsStringAsync(); 23 | return JsonConvert.DeserializeObject(jsonString, settings); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Extensions/HttpStatusCodeExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Net.Http; 2 | 3 | namespace System.Net 4 | { 5 | public static class HttpStatusCodeExtensions 6 | { 7 | public static string ToReasonString(this HttpStatusCode me) 8 | { 9 | using var message = new HttpResponseMessage(me); 10 | return message.ReasonPhrase; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Extensions/ReflectionExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | namespace System.Reflection 4 | { 5 | public static class MethodInfoExtensions 6 | { 7 | public static bool IsAsync(this MethodInfo mi) 8 | { 9 | Type attType = typeof(AsyncStateMachineAttribute); 10 | 11 | var attrib = (AsyncStateMachineAttribute)mi.GetCustomAttribute(attType); 12 | 13 | return attrib is { }; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/DataEncodation/EncodationStruct.cs: -------------------------------------------------------------------------------- 1 | using Gma.QrCodeNet.Encoding.Versions; 2 | 3 | namespace Gma.QrCodeNet.Encoding.DataEncodation 4 | { 5 | internal struct EncodationStruct 6 | { 7 | internal EncodationStruct(VersionControlStruct vcStruct) : this() 8 | { 9 | VersionDetail = vcStruct.VersionDetail; 10 | } 11 | 12 | internal VersionDetail VersionDetail { get; set; } 13 | internal BitList DataCodewords { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/DataEncodation/InputRecognition/RecognitionStruct.cs: -------------------------------------------------------------------------------- 1 | namespace Gma.QrCodeNet.Encoding.DataEncodation.InputRecognition 2 | { 3 | public struct RecognitionStruct 4 | { 5 | public RecognitionStruct(string encodingName) 6 | : this() 7 | { 8 | EncodingName = encodingName; 9 | } 10 | 11 | public string EncodingName { get; private set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/ErrorCorrectionLevel.cs: -------------------------------------------------------------------------------- 1 | namespace Gma.QrCodeNet.Encoding 2 | { 3 | public enum ErrorCorrectionLevel 4 | { 5 | L, 6 | M, 7 | Q, 8 | H 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/InputOutOfBoundaryException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Gma.QrCodeNet.Encoding 4 | { 5 | /// 6 | /// Use this exception for null or empty input string or when input string is too large. 7 | /// 8 | public class InputOutOfBoundaryException : Exception 9 | { 10 | public InputOutOfBoundaryException() : base() 11 | { 12 | } 13 | 14 | public InputOutOfBoundaryException(string message) : base(message) 15 | { 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/Masking/MaskPatternType.cs: -------------------------------------------------------------------------------- 1 | namespace Gma.QrCodeNet.Encoding.Masking 2 | { 3 | public enum MaskPatternType 4 | { 5 | Type0 = 0, 6 | Type1 = 1, 7 | Type2 = 2, 8 | Type3 = 3, 9 | Type4 = 4, 10 | Type5 = 5, 11 | Type6 = 6, 12 | Type7 = 7 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/Masking/Pattern.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Gma.QrCodeNet.Encoding.Masking 4 | { 5 | public abstract class Pattern : BitMatrix 6 | { 7 | public override int Width => throw new NotSupportedException(); 8 | public override int Height => throw new NotSupportedException(); 9 | 10 | public override bool[,] InternalArray => throw new NotImplementedException(); 11 | 12 | public abstract MaskPatternType MaskPatternType { get; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/Masking/Pattern0.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Gma.QrCodeNet.Encoding.Masking 4 | { 5 | internal class Pattern0 : Pattern 6 | { 7 | public override MaskPatternType MaskPatternType => MaskPatternType.Type0; 8 | 9 | public override bool this[int i, int j] 10 | { 11 | get => (j + i) % 2 == 0; 12 | set => throw new NotSupportedException(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/Masking/Pattern1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Gma.QrCodeNet.Encoding.Masking 4 | { 5 | internal class Pattern1 : Pattern 6 | { 7 | public override MaskPatternType MaskPatternType => MaskPatternType.Type1; 8 | 9 | public override bool this[int i, int j] 10 | { 11 | get => j % 2 == 0; 12 | set => throw new NotSupportedException(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/Masking/Pattern2.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Gma.QrCodeNet.Encoding.Masking 4 | { 5 | internal class Pattern2 : Pattern 6 | { 7 | public override MaskPatternType MaskPatternType => MaskPatternType.Type2; 8 | 9 | public override bool this[int i, int j] 10 | { 11 | get => i % 3 == 0; 12 | set => throw new NotSupportedException(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/Masking/Pattern3.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Gma.QrCodeNet.Encoding.Masking 4 | { 5 | internal class Pattern3 : Pattern 6 | { 7 | public override MaskPatternType MaskPatternType => MaskPatternType.Type3; 8 | 9 | public override bool this[int i, int j] 10 | { 11 | get => (j + i) % 3 == 0; 12 | set => throw new NotSupportedException(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/Masking/Pattern4.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Gma.QrCodeNet.Encoding.Masking 4 | { 5 | internal class Pattern4 : Pattern 6 | { 7 | public override MaskPatternType MaskPatternType => MaskPatternType.Type4; 8 | 9 | public override bool this[int i, int j] 10 | { 11 | get => ((j / 2) + (i / 3)) % 2 == 0; 12 | set => throw new NotSupportedException(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/Masking/Pattern5.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Gma.QrCodeNet.Encoding.Masking 4 | { 5 | internal class Pattern5 : Pattern 6 | { 7 | public override MaskPatternType MaskPatternType => MaskPatternType.Type5; 8 | 9 | public override bool this[int i, int j] 10 | { 11 | get => (((i * j) % 2) + ((i * j) % 3)) == 0; 12 | set => throw new NotSupportedException(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/Masking/Pattern6.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Gma.QrCodeNet.Encoding.Masking 4 | { 5 | internal class Pattern6 : Pattern 6 | { 7 | public override MaskPatternType MaskPatternType => MaskPatternType.Type6; 8 | 9 | public override bool this[int i, int j] 10 | { 11 | get => ((((i * j) % 2) + ((i * j) % 3)) % 2) == 0; 12 | set => throw new NotSupportedException(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/Masking/Pattern7.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Gma.QrCodeNet.Encoding.Masking 4 | { 5 | internal class Pattern7 : Pattern 6 | { 7 | public override MaskPatternType MaskPatternType => MaskPatternType.Type7; 8 | 9 | public override bool this[int i, int j] 10 | { 11 | get => (((i * j) % 3) + (((i + j) % 2) % 2)) == 0; 12 | set => throw new NotSupportedException(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/Masking/Scoring/Penalty.cs: -------------------------------------------------------------------------------- 1 | namespace Gma.QrCodeNet.Encoding.Masking.Scoring 2 | { 3 | public abstract class Penalty 4 | { 5 | internal abstract int PenaltyCalculate(BitMatrix matrix); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/Masking/Scoring/PenaltyRules.cs: -------------------------------------------------------------------------------- 1 | namespace Gma.QrCodeNet.Encoding.Masking.Scoring 2 | { 3 | public enum PenaltyRules 4 | { 5 | Rule01 = 1, 6 | Rule02 = 2, 7 | Rule03 = 3, 8 | Rule04 = 4 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/MatrixPoint.cs: -------------------------------------------------------------------------------- 1 | namespace Gma.QrCodeNet.Encoding 2 | { 3 | public struct MatrixPoint 4 | { 5 | internal MatrixPoint(int x, int y) 6 | : this() 7 | { 8 | X = x; 9 | Y = y; 10 | } 11 | 12 | public int X { get; private set; } 13 | public int Y { get; private set; } 14 | 15 | public MatrixPoint Offset(MatrixPoint offset) => new MatrixPoint(offset.X + X, offset.Y + Y); 16 | 17 | internal MatrixPoint Offset(int offsetX, int offsetY) => Offset(new MatrixPoint(offsetX, offsetY)); 18 | 19 | public override string ToString() => $"Point({X};{Y})"; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/MatrixSize.cs: -------------------------------------------------------------------------------- 1 | namespace Gma.QrCodeNet.Encoding 2 | { 3 | public struct MatrixSize 4 | { 5 | internal MatrixSize(int width, int height) 6 | : this() 7 | { 8 | Width = width; 9 | Height = height; 10 | } 11 | 12 | public int Width { get; private set; } 13 | public int Height { get; private set; } 14 | 15 | public override string ToString() 16 | { 17 | return $"Size({Width};{Height})"; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/MatrixStatus.cs: -------------------------------------------------------------------------------- 1 | namespace Gma.QrCodeNet.Encoding 2 | { 3 | public enum MatrixStatus 4 | { 5 | None, 6 | NoMask, 7 | Data 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/Positioning/PositioninngPatternBuilder.cs: -------------------------------------------------------------------------------- 1 | using Gma.QrCodeNet.Encoding.Positioning.Stencils; 2 | 3 | namespace Gma.QrCodeNet.Encoding.Positioning 4 | { 5 | internal static class PositioningPatternBuilder 6 | { 7 | internal static void EmbedBasicPatterns(int version, TriStateMatrix matrix) 8 | { 9 | new PositionDetectionPattern(version).ApplyTo(matrix); 10 | new DarkDotAtLeftBottom(version).ApplyTo(matrix); 11 | new AlignmentPattern(version).ApplyTo(matrix); 12 | new TimingPattern(version).ApplyTo(matrix); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/Positioning/Stencils/DarkDotAtLeftBottom.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Gma.QrCodeNet.Encoding.Positioning.Stencils 4 | { 5 | internal class DarkDotAtLeftBottom : PatternStencilBase 6 | { 7 | public DarkDotAtLeftBottom(int version) : base(version) 8 | { 9 | } 10 | 11 | public override bool[,] Stencil => throw new NotImplementedException(); 12 | 13 | public override void ApplyTo(TriStateMatrix matrix) 14 | { 15 | matrix[8, matrix.Width - 8, MatrixStatus.NoMask] = true; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/QrCode.cs: -------------------------------------------------------------------------------- 1 | namespace Gma.QrCodeNet.Encoding 2 | { 3 | /// 4 | /// This class contain two variables. 5 | /// BitMatrix for QrCode 6 | /// isContainMatrix for indicate whether QrCode contains BitMatrix or not. 7 | /// BitMatrix will be equal to null if isContainMatrix is false. 8 | /// 9 | public class QrCode 10 | { 11 | internal QrCode(BitMatrix matrix) 12 | { 13 | Matrix = matrix; 14 | IsContainMatrix = true; 15 | } 16 | 17 | public QrCode() 18 | { 19 | IsContainMatrix = false; 20 | Matrix = null; 21 | } 22 | 23 | public bool IsContainMatrix 24 | { 25 | get; 26 | private set; 27 | } 28 | 29 | public BitMatrix Matrix 30 | { 31 | get; 32 | private set; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/ReedSolomon/PolyDivideStruct.cs: -------------------------------------------------------------------------------- 1 | namespace Gma.QrCodeNet.Encoding.ReedSolomon 2 | { 3 | internal struct PolyDivideStruct 4 | { 5 | internal PolyDivideStruct(Polynomial quotient, Polynomial remainder) 6 | : this() 7 | { 8 | Quotient = quotient; 9 | Remainder = remainder; 10 | } 11 | 12 | internal Polynomial Quotient { get; private set; } 13 | 14 | internal Polynomial Remainder { get; private set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/StateMatrix.cs: -------------------------------------------------------------------------------- 1 | namespace Gma.QrCodeNet.Encoding 2 | { 3 | public sealed class StateMatrix 4 | { 5 | public StateMatrix(int width) 6 | { 7 | Width = width; 8 | MatrixStatus = new MatrixStatus[width, width]; 9 | } 10 | 11 | private MatrixStatus[,] MatrixStatus { get; } 12 | 13 | public MatrixStatus this[int x, int y] 14 | { 15 | get => MatrixStatus[x, y]; 16 | set => MatrixStatus[x, y] = value; 17 | } 18 | 19 | internal MatrixStatus this[MatrixPoint point] 20 | { 21 | get => this[point.X, point.Y]; 22 | set => this[point.X, point.Y] = value; 23 | } 24 | 25 | public int Width { get; } 26 | 27 | public int Height => Width; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/Versions/ErrorCorrectionBlock.cs: -------------------------------------------------------------------------------- 1 | namespace Gma.QrCodeNet.Encoding.Versions 2 | { 3 | internal struct ErrorCorrectionBlock 4 | { 5 | internal ErrorCorrectionBlock(int numErrorCorrectionBlock, int numDataCodewards) 6 | : this() 7 | { 8 | NumErrorCorrectionBlock = numErrorCorrectionBlock; 9 | NumDataCodewords = numDataCodewards; 10 | } 11 | 12 | internal int NumErrorCorrectionBlock { get; private set; } 13 | 14 | internal int NumDataCodewords { get; private set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Gma/QrCodeNet/Encoding/Versions/VersionControlStruct.cs: -------------------------------------------------------------------------------- 1 | namespace Gma.QrCodeNet.Encoding.Versions 2 | { 3 | internal struct VersionControlStruct 4 | { 5 | internal VersionDetail VersionDetail { get; set; } 6 | internal bool IsContainECI { get; set; } 7 | internal BitList ECIHeader { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Helpers/ByteArrayEqualityComparer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics.CodeAnalysis; 4 | using System.Text; 5 | using WalletWasabi.Crypto; 6 | 7 | namespace WalletWasabi.Helpers 8 | { 9 | public class ByteArrayEqualityComparer : IEqualityComparer 10 | { 11 | public bool Equals([AllowNull] byte[] x, [AllowNull] byte[] y) => ByteHelpers.CompareFastUnsafe(x, y); 12 | 13 | public int GetHashCode([DisallowNull] byte[] obj) => HashHelpers.ComputeHashCode(obj); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Helpers/HttpStatusCodeHelper.cs: -------------------------------------------------------------------------------- 1 | namespace System.Net 2 | { 3 | public static class HttpStatusCodeHelper 4 | { 5 | /// 6 | /// 1xx 7 | /// 8 | public static bool IsInformational(HttpStatusCode status) 9 | { 10 | return ((int)status).ToString()[0] == '1'; 11 | } 12 | 13 | /// 14 | /// 2xx 15 | /// 16 | public static bool IsSuccessful(HttpStatusCode status) 17 | { 18 | return ((int)status).ToString()[0] == '2'; 19 | } 20 | 21 | public static bool IsValidCode(int codeToValidate) 22 | { 23 | foreach (var code in Enum.GetValues(typeof(HttpStatusCode))) 24 | { 25 | if ((int)code == codeToValidate) 26 | { 27 | return true; 28 | } 29 | } 30 | 31 | return false; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Helpers/JsonHelpers.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json.Linq; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace Newtonsoft.Json 7 | { 8 | public static class JsonHelpers 9 | { 10 | public static bool TryParseJToken(string text, out JToken token) 11 | { 12 | token = null; 13 | try 14 | { 15 | token = JToken.Parse(text); 16 | return true; 17 | } 18 | catch (JsonReaderException) 19 | { 20 | return false; 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Helpers/RandomString.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using WalletWasabi.Helpers; 3 | 4 | namespace System 5 | { 6 | public static class RandomString 7 | { 8 | private static Random Random { get; } = new Random(); 9 | 10 | public static string Generate(int length) 11 | { 12 | Guard.MinimumAndNotNull(nameof(length), length, 1); 13 | 14 | return new string(Enumerable.Repeat(Constants.Chars, length) 15 | .Select(s => s[Random.Next(s.Length)]).ToArray()); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Helpers/ThreadingHelpers.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace System.Threading 6 | { 7 | public static class ThreadingHelpers 8 | { 9 | public static CancellationToken Cancelled 10 | { 11 | get 12 | { 13 | if (!CancelledBacking.HasValue) 14 | { 15 | using var cts = new CancellationTokenSource(); 16 | cts.Cancel(); 17 | CancelledBacking = cts.Token; 18 | } 19 | return CancelledBacking.Value; 20 | } 21 | } 22 | 23 | private static CancellationToken? CancelledBacking { get; set; } = null; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Http/Constants.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.Http 2 | { 3 | public static class Constants 4 | { 5 | public const string SP = " "; 6 | public const string HTAB = "\t"; 7 | public const string CR = "\r"; 8 | public const string LF = "\n"; 9 | public const string CRLF = "\r\n"; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Http/Models/HttpRequestContentHeaders.cs: -------------------------------------------------------------------------------- 1 | using System.Net.Http.Headers; 2 | 3 | namespace WalletWasabi.Http.Models 4 | { 5 | public class HttpRequestContentHeaders 6 | { 7 | public HttpRequestHeaders RequestHeaders { get; set; } 8 | public HttpContentHeaders ContentHeaders { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Http/Models/HttpResponseContentHeaders.cs: -------------------------------------------------------------------------------- 1 | using System.Net.Http.Headers; 2 | 3 | namespace WalletWasabi.Http.Models 4 | { 5 | public class HttpResponseContentHeaders 6 | { 7 | public HttpResponseHeaders ResponseHeaders { get; set; } 8 | public HttpContentHeaders ContentHeaders { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Http/Models/StartLine.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using WalletWasabi.Helpers; 7 | using static WalletWasabi.Http.Constants; 8 | 9 | namespace WalletWasabi.Http.Models 10 | { 11 | public abstract class StartLine 12 | { 13 | protected StartLine(HttpProtocol protocol) 14 | { 15 | Protocol = protocol; 16 | } 17 | 18 | public HttpProtocol Protocol { get; } 19 | 20 | public static string[] GetParts(string startLineString) 21 | { 22 | var trimmed = Guard.NotNullOrEmptyOrWhitespace(nameof(startLineString), startLineString, trim: true); 23 | return trimmed.Split(SP, StringSplitOptions.RemoveEmptyEntries).Select(x => x.Trim()).ToArray(); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Http/Models/UriScheme.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.Http.Models 2 | { 3 | // https://tools.ietf.org/html/rfc7230#section-2.7.3 4 | // The scheme and host are case-insensitive and normally provided in lowercase; 5 | // all other components are compared in a case-sensitive manner. 6 | public enum UriScheme 7 | { 8 | http, 9 | https 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Hwi/Exceptions/HwiException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.Hwi.Exceptions 6 | { 7 | public class HwiException : Exception 8 | { 9 | public HwiException(HwiErrorCode errorCode, string message) : base(message) 10 | { 11 | ErrorCode = errorCode; 12 | } 13 | 14 | public HwiErrorCode ErrorCode { get; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Hwi/Models/HardwareWalletModels.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.Hwi.Models 6 | { 7 | /// 8 | /// Source: https://github.com/bitcoin-core/HWI/pull/228 9 | /// 10 | public enum HardwareWalletModels 11 | { 12 | Unknown, 13 | Coldcard, 14 | Coldcard_Simulator, 15 | DigitalBitBox_01, 16 | DigitalBitBox_01_Simulator, 17 | KeepKey, 18 | KeepKey_Simulator, 19 | Ledger_Nano_S, 20 | Trezor_1, 21 | Trezor_1_Simulator, 22 | Trezor_T, 23 | Trezor_T_Simulator 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Hwi/Models/HwiOptions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.Hwi.Models 6 | { 7 | public enum HwiOptions 8 | { 9 | Help, 10 | DevicePath, 11 | DeviceType, 12 | Password, 13 | StdInPass, 14 | TestNet, 15 | Debug, 16 | Fingerprint, 17 | Version, 18 | StdIn, 19 | Interactive 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Interfaces/IByteArraySerializable.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.Interfaces 2 | { 3 | public interface IByteArraySerializable 4 | { 5 | byte[] ToBytes(); 6 | 7 | void FromBytes(params byte[] bytes); 8 | 9 | string ToHex(bool xhhSyntax); 10 | 11 | void FromHex(string hex); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Interfaces/IByteSerializable.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.Interfaces 2 | { 3 | public interface IByteSerializable 4 | { 5 | byte ToByte(); 6 | 7 | void FromByte(byte b); 8 | 9 | string ToHex(bool xhhSyntax); 10 | 11 | void FromHex(string hex); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Interfaces/IExchangeRateProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using WalletWasabi.Backend.Models; 4 | 5 | namespace WalletWasabi.Interfaces 6 | { 7 | public interface IExchangeRateProvider 8 | { 9 | Task> GetExchangeRateAsync(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Io/MutexIoManager.cs: -------------------------------------------------------------------------------- 1 | using Nito.AsyncEx; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Text; 6 | using WalletWasabi.Crypto; 7 | 8 | namespace WalletWasabi.Io 9 | { 10 | public class MutexIoManager : IoManager 11 | { 12 | public MutexIoManager(string filePath) : base(filePath) 13 | { 14 | Mutex = new AsyncLock(); 15 | } 16 | 17 | public AsyncLock Mutex { get; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/JsonConverters/PubKeyJsonConverter.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | using Newtonsoft.Json; 3 | using System; 4 | 5 | namespace WalletWasabi.JsonConverters 6 | { 7 | public class PubKeyJsonConverter : JsonConverter 8 | { 9 | /// 10 | public override bool CanConvert(Type objectType) 11 | { 12 | return objectType == typeof(PubKey); 13 | } 14 | 15 | /// 16 | public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) 17 | { 18 | return new PubKey(((string)reader.Value).Trim()); 19 | } 20 | 21 | /// 22 | public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) 23 | { 24 | var pubKey = (PubKey)value; 25 | writer.WriteValue(pubKey.ToHex()); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Logging/LogMode.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.Logging 2 | { 3 | public enum LogMode 4 | { 5 | /// It uses Console.Write. 6 | Console, 7 | 8 | /// It uses Debug.Write. 9 | Debug, 10 | 11 | /// Logs into Log.txt, if filename is not specified. 12 | File 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Microservices/Binaries/README.md: -------------------------------------------------------------------------------- 1 | # Updating Executables 2 | 3 | 1. Replace executables. 4 | 2. Properties/Copy to Output: Copy if newer. (VSBUG: Sometimes Copy Always is needed. It's generally ok to do copy always then set it back to Copy if newer, so already running Bitcoin Core will not be tried to get recopied all the time.) 5 | 3. Make sure the Linux and the OSX binaries are executable: 6 | `git update-index --chmod=+x hwi` 7 | `git update-index --chmod=+x bitcoind` 8 | 4. Commit, push. 9 | 5. Make sure CI passes. 10 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Microservices/Binaries/lin64/bitcoind: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi/Microservices/Binaries/lin64/bitcoind -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Microservices/Binaries/lin64/hwi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi/Microservices/Binaries/lin64/hwi -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Microservices/Binaries/osx64/bitcoind: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi/Microservices/Binaries/osx64/bitcoind -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Microservices/Binaries/osx64/hwi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi/Microservices/Binaries/osx64/hwi -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Microservices/Binaries/win64/bitcoind.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi/Microservices/Binaries/win64/bitcoind.exe -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Microservices/Binaries/win64/hwi.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi/Microservices/Binaries/win64/hwi.exe -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Microservices/IProcessBridge.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.IO; 5 | using System.Text; 6 | using System.Threading; 7 | using System.Threading.Tasks; 8 | 9 | namespace WalletWasabi.Microservices 10 | { 11 | public interface IProcessBridge 12 | { 13 | Task<(string response, int exitCode)> SendCommandAsync(string arguments, bool openConsole, CancellationToken cancel, Action standardInputWriter = null); 14 | 15 | Process Start(string arguments, bool openConsole, bool redirectStandardInput); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Models/BackendStatus.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.Models 2 | { 3 | public enum BackendStatus 4 | { 5 | NotConnected, 6 | Connected 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Models/ErrorDescriptor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace WalletWasabi.Models 4 | { 5 | public struct ErrorDescriptor : IEquatable 6 | { 7 | public static ErrorDescriptor Default = new ErrorDescriptor(ErrorSeverity.Default, ""); 8 | 9 | public ErrorDescriptor(ErrorSeverity severity, string message) 10 | { 11 | Severity = severity; 12 | Message = message; 13 | } 14 | 15 | public ErrorSeverity Severity { get; } 16 | public string Message { get; } 17 | 18 | public bool Equals(ErrorDescriptor other) 19 | { 20 | return (Severity == other.Severity && Message == other.Message); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Models/ErrorDescriptors.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace WalletWasabi.Models 4 | { 5 | public class ErrorDescriptors : List, IValidationErrors 6 | { 7 | public static ErrorDescriptors Empty = Create(); 8 | 9 | private ErrorDescriptors() : base() 10 | { 11 | } 12 | 13 | public static ErrorDescriptors Create() 14 | { 15 | return new ErrorDescriptors(); 16 | } 17 | 18 | void IValidationErrors.Add(ErrorSeverity severity, string error) 19 | { 20 | Add(new ErrorDescriptor(severity, error)); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Models/ErrorSeverity.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.Models 2 | { 3 | public enum ErrorSeverity 4 | { 5 | Default, 6 | Info, 7 | Warning, 8 | Error 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Models/HeightType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.Models 6 | { 7 | public enum HeightType 8 | { 9 | Chain, 10 | Mempool, 11 | Unknown 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Models/IValidationErrors.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.Models 2 | { 3 | public interface IValidationErrors 4 | { 5 | void Add(ErrorSeverity severity, string error); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Models/MixUntilAnonymitySet.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.Models 6 | { 7 | public enum MixUntilAnonymitySet 8 | { 9 | PrivacyLevelSome, 10 | PrivacyLevelFine, 11 | PrivacyLevelStrong 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Models/TorStatus.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.Models 2 | { 3 | public enum TorStatus 4 | { 5 | NotRunning, 6 | TurnedOff, 7 | Running 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Nito/AsyncEx/TaskCompletionSourceExtensions.cs: -------------------------------------------------------------------------------- 1 | using Nito.AsyncEx.Synchronous; 2 | using System; 3 | using System.Threading.Tasks; 4 | 5 | namespace Nito.AsyncEx 6 | { 7 | /// 8 | /// Provides extension methods for . 9 | /// 10 | public static class TaskCompletionSourceExtensions 11 | { 12 | /// 13 | /// Creates a new TCS for use with async code, and which forces its continuations to execute asynchronously. 14 | /// 15 | /// The type of the result of the TCS. 16 | public static TaskCompletionSource CreateAsyncTaskSource() 17 | { 18 | return new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/OnionSeeds/TestNetOnionSeeds.txt: -------------------------------------------------------------------------------- 1 | thfsmmn2jbitcoin.onion:18333 2 | it2pj4f7657g3rhi.onion:18333 3 | nkf5e6b7pl4jfd4a.onion:18333 4 | 4zhkir2ofl7orfom.onion:18333 5 | t6xj6wilh4ytvcs7.onion:18333 6 | i6y6ivorwakd7nw3.onion:18333 7 | ubqj4rsu3nqtxmtp.onion:18333 8 | ocasutxnvl4lwegq.onion:18333 9 | cu6octp6yo754wda.onion:18333 10 | lkiggf5esgs7d5z6.onion:18333 11 | rhcv7q2quqn74zlr.onion:18333 12 | nq7cak6pufzs2ou2.onion:18333 13 | nec4kn4ghql7p7an.onion:18333 14 | qlllezfaif5cscnx.onion:18333 15 | zmtr2di735ngxpcl.onion:18333 16 | 4syvownyxejvqbzn.onion:18333 17 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Services/HostedService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Hosting; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using WalletWasabi.Helpers; 7 | 8 | namespace WalletWasabi.Services 9 | { 10 | public class HostedService 11 | { 12 | public HostedService(IHostedService service, string friendlyName) 13 | { 14 | Service = Guard.NotNull(nameof(service), service); 15 | FriendlyName = Guard.NotNull(nameof(friendlyName), friendlyName); 16 | } 17 | 18 | public IHostedService Service { get; } 19 | public string FriendlyName { get; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Stores/BitcoinStoreMock.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.Stores 2 | { 3 | /// 4 | /// This class provides a Mock version of for 5 | /// Unit tests that only need a dummy version of the class. 6 | /// 7 | public class BitcoinStoreMock : BitcoinStore 8 | { 9 | public BitcoinStoreMock() : base() 10 | { 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/TorDaemons/data-folder.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi/TorDaemons/data-folder.zip -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/TorDaemons/digests.txt: -------------------------------------------------------------------------------- 1 | af7302d62fc1e47f79af8860541365f77547233404302a1e601e1f367e6e2888 2 | fe6d719e18bf3a963f0274de259b7e029f40e4fe778f4d170bba343eb491af00 3 | d244a89f7ca9da2259925affa0bd008d3cdea1d9dfd24cf53efffb7c1eadc169 4 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/TorDaemons/tor-linux64.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi/TorDaemons/tor-linux64.zip -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/TorDaemons/tor-osx64.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi/TorDaemons/tor-osx64.zip -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/TorDaemons/tor-win64.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaincase-app/Chaincase-iOS-Beta/79ef485d0e48557ef4bc965ee61d56e5a14e52c1/WalletWasabi.SDK/WalletWasabi/TorDaemons/tor-win64.zip -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/TorSocks5/ITorHttpClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net; 3 | using System.Net.Http; 4 | using System.Threading; 5 | using System.Threading.Tasks; 6 | 7 | namespace WalletWasabi.TorSocks5 8 | { 9 | public interface ITorHttpClient : IDisposable 10 | { 11 | Uri DestinationUri { get; } 12 | Func DestinationUriAction { get; } 13 | EndPoint TorSocks5EndPoint { get; } 14 | 15 | bool IsTorUsed { get; } 16 | 17 | Task SendAsync(HttpMethod method, string relativeUri, HttpContent content = null, CancellationToken cancel = default); 18 | 19 | Task SendAsync(HttpRequestMessage request, CancellationToken cancel = default); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/TorSocks5/Models/Fields/OctetFields/AuthVerField.cs: -------------------------------------------------------------------------------- 1 | using WalletWasabi.Bases; 2 | using WalletWasabi.Helpers; 3 | 4 | namespace WalletWasabi.TorSocks5.Models.Fields.OctetFields 5 | { 6 | public class AuthVerField : OctetSerializableBase 7 | { 8 | #region Constructors 9 | 10 | public AuthVerField() 11 | { 12 | } 13 | 14 | public AuthVerField(int value) 15 | { 16 | ByteValue = (byte)Guard.InRangeAndNotNull(nameof(value), value, 0, 255); 17 | } 18 | 19 | #endregion Constructors 20 | 21 | #region Statics 22 | 23 | public static AuthVerField Version1 => new AuthVerField(1); 24 | 25 | #endregion Statics 26 | 27 | #region PropertiesAndMembers 28 | 29 | public int Value => ByteValue; 30 | 31 | #endregion PropertiesAndMembers 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/TorSocks5/Models/Fields/OctetFields/RsvField.cs: -------------------------------------------------------------------------------- 1 | using WalletWasabi.Bases; 2 | 3 | namespace WalletWasabi.TorSocks5.TorSocks5.Models.Fields.ByteArrayFields 4 | { 5 | public class RsvField : OctetSerializableBase 6 | { 7 | #region Constructors 8 | 9 | public RsvField() 10 | { 11 | } 12 | 13 | #endregion Constructors 14 | 15 | #region Statics 16 | 17 | public static RsvField X00 18 | { 19 | get 20 | { 21 | var rsv = new RsvField(); 22 | rsv.FromHex("00"); 23 | return rsv; 24 | } 25 | } 26 | 27 | #endregion Statics 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/TorSocks5/Models/Fields/OctetFields/VerField.cs: -------------------------------------------------------------------------------- 1 | using WalletWasabi.Bases; 2 | using WalletWasabi.Helpers; 3 | 4 | namespace WalletWasabi.TorSocks5.Models.Fields.OctetFields 5 | { 6 | public class VerField : OctetSerializableBase 7 | { 8 | #region Constructors 9 | 10 | public VerField() 11 | { 12 | } 13 | 14 | public VerField(int value) 15 | { 16 | ByteValue = (byte)Guard.InRangeAndNotNull(nameof(value), value, 0, 255); 17 | } 18 | 19 | #endregion Constructors 20 | 21 | #region Statics 22 | 23 | public static VerField Socks5 => new VerField(5); 24 | 25 | #endregion Statics 26 | 27 | #region PropertiesAndMembers 28 | 29 | public int Value => ByteValue; 30 | 31 | #endregion PropertiesAndMembers 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/TorSocks5/Models/ReplyType.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.TorSocks5.Models 2 | { 3 | public enum ReplyType : byte 4 | { 5 | Succeeded = 0x00, 6 | GeneralSocksServerFailure = 0x01, 7 | ConnectionNotAllowedByRuleset = 0x02, 8 | NetworkUnreachable = 0x03, 9 | HostUnreachable = 0x04, 10 | ConnectionRefused = 0x05, 11 | TtlExpired = 0x06, 12 | CommandNotSupported = 0x07, 13 | AddressTypeNotSupported = 0x08 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Wallets/IBlockProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Threading; 2 | using System.Threading.Tasks; 3 | using NBitcoin; 4 | 5 | namespace WalletWasabi.Wallets 6 | { 7 | /// 8 | /// IBlockProvider is an abstraction for types that can return blocks. 9 | /// 10 | public interface IBlockProvider 11 | { 12 | Task GetBlockAsync(uint256 hash, CancellationToken cancel); 13 | } 14 | } -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Wallets/IRepository.cs: -------------------------------------------------------------------------------- 1 | using System.Threading; 2 | using System.Threading.Tasks; 3 | 4 | namespace WalletWasabi.Wallets 5 | { 6 | /// 7 | /// IRepository is a generic abstraction of a repository pattern 8 | /// 9 | public interface IRepository 10 | { 11 | Task GetAsync(TID id, CancellationToken cancel); 12 | Task SaveAsync(TElement element, CancellationToken cancel); 13 | Task RemoveAsync(TID id, CancellationToken cancel); 14 | Task CountAsync(CancellationToken cancel); 15 | } 16 | } -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/Wallets/WalletState.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace WalletWasabi.Wallets 6 | { 7 | public enum WalletState 8 | { 9 | Uninitialized, 10 | WaitingForInit, 11 | Initialized, 12 | Starting, 13 | Started, 14 | Stopping, 15 | Stopped 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/WebClients/PayJoin/IPayjoinClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading; 3 | using System.Threading.Tasks; 4 | using NBitcoin; 5 | using WalletWasabi.Blockchain.Keys; 6 | 7 | namespace WalletWasabi.WebClients.PayJoin 8 | { 9 | public interface IPayjoinClient 10 | { 11 | Uri PaymentUrl { get; } 12 | 13 | Task RequestPayjoin(PSBT originalTx, IHDKey accountKey, RootedKeyPath rootedKeyPath, HdPubKey changeHdPubKey, CancellationToken cancellationToken); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/WebClients/PayJoin/PayjoinClientParameters.cs: -------------------------------------------------------------------------------- 1 | using NBitcoin; 2 | 3 | namespace WalletWasabi.WebClients.PayJoin 4 | { 5 | public class PayjoinClientParameters 6 | { 7 | public Money MaxAdditionalFeeContribution { get; set; } 8 | public FeeRate MinFeeRate { get; set; } 9 | public int? AdditionalFeeOutputIndex { get; set; } 10 | public bool DisableOutputSubstitution { get; set; } 11 | public int Version { get; set; } = 1; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/WebClients/PayJoin/PayjoinException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace WalletWasabi.WebClients.PayJoin 4 | { 5 | public class PayjoinException : Exception 6 | { 7 | public PayjoinException(string message) : base(message) 8 | { 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/WebClients/PayJoin/PayjoinReceiverException.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.WebClients.PayJoin 2 | { 3 | public class PayjoinReceiverException : PayjoinException 4 | { 5 | public PayjoinReceiverException(int httpCode, string errorCode, string message) 6 | : base(message) 7 | { 8 | HttpCode = httpCode; 9 | ErrorCode = errorCode; 10 | ErrorMessage = message; 11 | } 12 | 13 | public int HttpCode { get; } 14 | public string ErrorCode { get; } 15 | public string ErrorMessage { get; } 16 | 17 | private static string FormatMessage(in int httpCode, string errorCode, string message) 18 | { 19 | return $"{errorCode}: {message} (HTTP: {httpCode})"; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/WebClients/PayJoin/PayjoinSenderException.cs: -------------------------------------------------------------------------------- 1 | namespace WalletWasabi.WebClients.PayJoin 2 | { 3 | public class PayjoinSenderException : PayjoinException 4 | { 5 | public PayjoinSenderException(string message) : base(message) 6 | { 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WalletWasabi.SDK/WalletWasabi/WebClients/SmartBit/Models/SmartBitExchangeRate.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace WalletWasabi.WebClients.SmartBit.Models 4 | { 5 | [JsonObject(MemberSerialization.OptIn)] 6 | public class SmartBitExchangeRate 7 | { 8 | [JsonProperty(PropertyName = "code")] 9 | public string Code { get; set; } 10 | 11 | [JsonProperty(PropertyName = "name")] 12 | public string Name { get; set; } 13 | 14 | [JsonProperty(PropertyName = "rate")] 15 | public decimal Rate { get; set; } 16 | } 17 | } 18 | --------------------------------------------------------------------------------