├── .github └── ISSUE_TEMPLATE.md ├── .gitignore ├── .gitlab-ci.yml ├── .gitlab └── issue_templates │ └── Bug.md ├── .run └── GreenAndroid.run.xml ├── .travis.yml ├── BUILD.md ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── README.md ├── androidApp ├── .gitignore ├── build.gradle.kts ├── proguard-rules.pro ├── schemas │ └── com.blockstream.green.database.AppDatabase │ │ ├── 1.json │ │ ├── 2.json │ │ ├── 3.json │ │ ├── 4.json │ │ ├── 5.json │ │ └── 6.json └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── blockstream │ │ └── green │ │ ├── ExampleInstrumentedTest.kt │ │ └── utils │ │ └── AndroidKeystoreUnitTests.kt │ ├── development │ └── google-services.json │ ├── main │ ├── AndroidManifest.xml │ ├── ic_launcher-playstore.png │ ├── ic_launcher_dev-playstore.png │ ├── java │ │ └── com │ │ │ └── blockstream │ │ │ └── green │ │ │ ├── GreenActivity.kt │ │ │ ├── GreenApplication.kt │ │ │ ├── data │ │ │ ├── Countly.kt │ │ │ ├── CountlyAndroid.kt │ │ │ └── CountlyNoOp.kt │ │ │ ├── database │ │ │ ├── AppDatabase.kt │ │ │ ├── LoginCredentials.kt │ │ │ ├── Migrations.kt │ │ │ ├── Wallet.kt │ │ │ ├── WalletDao.kt │ │ │ └── WalletRepository.kt │ │ │ ├── di │ │ │ ├── DatabaseModule.kt │ │ │ ├── GreenModules.kt │ │ │ ├── KoinAndroid.kt │ │ │ └── ViewModels.kt │ │ │ ├── lifecycle │ │ │ └── ActivityLifecycle.kt │ │ │ ├── managers │ │ │ ├── FcmAndroid.kt │ │ │ └── NotificationManagerAndroid.kt │ │ │ ├── services │ │ │ └── TaskService.kt │ │ │ ├── settings │ │ │ ├── AndroidMigrator.kt │ │ │ ├── Constants.kt │ │ │ └── MigratorJava.java │ │ │ ├── utils │ │ │ ├── Animations.kt │ │ │ ├── QATester.kt │ │ │ └── Utils.kt │ │ │ └── work │ │ │ └── LightningWork.kt │ └── res │ │ ├── drawable-hdpi │ │ ├── ic_shortcut_eye_close.png │ │ └── ic_stat_green.png │ │ ├── drawable-mdpi │ │ ├── ic_shortcut_eye_close.png │ │ └── ic_stat_green.png │ │ ├── drawable-xhdpi │ │ ├── ic_shortcut_eye_close.png │ │ └── ic_stat_green.png │ │ ├── drawable-xxhdpi │ │ ├── ic_shortcut_eye_close.png │ │ └── ic_stat_green.png │ │ ├── drawable-xxxhdpi │ │ ├── ic_shortcut_eye_close.png │ │ └── ic_stat_green.png │ │ ├── drawable │ │ └── ic_close.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ ├── ic_launcher_dev.xml │ │ ├── ic_launcher_dev_round.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_background.png │ │ ├── ic_launcher_dev.webp │ │ ├── ic_launcher_dev_background.webp │ │ ├── ic_launcher_dev_foreground.webp │ │ ├── ic_launcher_dev_round.webp │ │ ├── ic_launcher_foreground.png │ │ ├── ic_launcher_monochrome.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_background.png │ │ ├── ic_launcher_dev.webp │ │ ├── ic_launcher_dev_background.webp │ │ ├── ic_launcher_dev_foreground.webp │ │ ├── ic_launcher_dev_round.webp │ │ ├── ic_launcher_foreground.png │ │ ├── ic_launcher_monochrome.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_background.png │ │ ├── ic_launcher_dev.webp │ │ ├── ic_launcher_dev_background.webp │ │ ├── ic_launcher_dev_foreground.webp │ │ ├── ic_launcher_dev_round.webp │ │ ├── ic_launcher_foreground.png │ │ ├── ic_launcher_monochrome.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_background.png │ │ ├── ic_launcher_dev.webp │ │ ├── ic_launcher_dev_background.webp │ │ ├── ic_launcher_dev_foreground.webp │ │ ├── ic_launcher_dev_round.webp │ │ ├── ic_launcher_foreground.png │ │ ├── ic_launcher_monochrome.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_background.png │ │ ├── ic_launcher_dev.webp │ │ ├── ic_launcher_dev_background.webp │ │ ├── ic_launcher_dev_foreground.webp │ │ ├── ic_launcher_dev_round.webp │ │ ├── ic_launcher_foreground.png │ │ ├── ic_launcher_monochrome.png │ │ └── ic_launcher_round.png │ │ ├── raw │ │ └── keep.xml │ │ ├── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── theme.xml │ │ └── xml │ │ ├── data_extraction_rules.xml │ │ ├── device_filter.xml │ │ ├── filepaths.xml │ │ ├── full_backup_content.xml │ │ ├── locales_config.xml │ │ └── network_security_config.xml │ ├── productionGoogle │ └── google-services.json │ └── test │ ├── java │ └── com │ │ └── blockstream │ │ ├── common │ │ └── models │ │ │ └── home │ │ │ └── HomeViewModelUnitTests.kt │ │ └── green │ │ ├── TestData.kt │ │ ├── TestUtils.kt │ │ ├── TestViewModel.kt │ │ ├── data │ │ └── ApplicationSettingsUnitTests.kt │ │ └── utils │ │ └── JsonConverterUnitTest.kt │ └── resources │ ├── gdk │ ├── authhandler │ │ ├── call.json │ │ └── done.json │ ├── network.json │ └── networks.json │ └── mockito-extensions │ └── org.mockito.plugins.MockMaker ├── base-gms ├── .gitignore ├── build.gradle.kts └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── blockstream │ └── base │ ├── GooglePlay.kt │ └── InstallReferrer.kt ├── build.gradle.kts ├── bump_gdk.sh ├── common ├── build.gradle.kts ├── common.podspec ├── fetch_ios_binaries.sh └── src │ ├── androidDeviceTest │ └── kotlin │ │ └── com │ │ └── blockstream │ │ ├── BaseTest.kt │ │ └── domain │ │ └── meld │ │ └── MeldUseCasesTest.kt │ ├── androidMain │ └── kotlin │ │ └── com │ │ └── blockstream │ │ └── common │ │ ├── Gdk │ │ ├── Gdk.android.kt │ │ ├── GdkJsonConverter.kt │ │ └── Wally.android.kt │ │ ├── Platform.android.kt │ │ ├── database │ │ └── Database.android.kt │ │ ├── devices │ │ ├── AndroidDevice.kt │ │ ├── DeviceManagerAndroid.kt │ │ └── JadeUsbDevice.kt │ │ ├── di │ │ └── Koin.android.kt │ │ ├── extensions │ │ └── BleExtensions.android.kt │ │ ├── managers │ │ ├── BluetoothManager.android.kt │ │ └── LocaleManager.android.kt │ │ └── utils │ │ ├── AndroidKeystore.kt │ │ ├── Date.android.kt │ │ ├── DecimalFormat.kt │ │ └── SecureRandom.android.kt │ ├── androidUnitTest │ └── kotlin │ │ └── com │ │ └── blockstream │ │ └── common │ │ └── models │ │ ├── TestViewModel.kt │ │ └── about │ │ └── AboutViewModelTest.kt │ ├── commonMain │ ├── composeResources │ │ ├── drawable │ │ │ ├── amp_asset.xml │ │ │ ├── arrow_bend_left_down.xml │ │ │ ├── arrow_bend_right_up.xml │ │ │ ├── arrow_down.xml │ │ │ ├── arrow_down_left.xml │ │ │ ├── arrow_fat_line_right.xml │ │ │ ├── arrow_fat_lines_right.xml │ │ │ ├── arrow_fat_right.xml │ │ │ ├── arrow_left.xml │ │ │ ├── arrow_line_down.xml │ │ │ ├── arrow_line_up.xml │ │ │ ├── arrow_right.xml │ │ │ ├── arrow_square_out.xml │ │ │ ├── arrow_u_left_down.xml │ │ │ ├── arrow_up.xml │ │ │ ├── arrow_up_right.xml │ │ │ ├── arrows_counter_clockwise.xml │ │ │ ├── arrows_counter_clockwise_bold.xml │ │ │ ├── arrows_down_up.xml │ │ │ ├── at.xml │ │ │ ├── backspace.xml │ │ │ ├── binoculars.xml │ │ │ ├── bip39_passphrase.xml │ │ │ ├── bitcoin.xml │ │ │ ├── bitcoin_letter.xml │ │ │ ├── bitcoin_lightning.xml │ │ │ ├── bitcoin_lightning_testnet.xml │ │ │ ├── bitcoin_testnet.xml │ │ │ ├── ble.xml │ │ │ ├── blockstream_devices.xml │ │ │ ├── blockstream_jade_action.xml │ │ │ ├── blockstream_jade_device.xml │ │ │ ├── blockstream_jade_plus_action.xml │ │ │ ├── blockstream_jade_plus_device.xml │ │ │ ├── box_arrow_down.xml │ │ │ ├── box_arrow_up.xml │ │ │ ├── brand.xml │ │ │ ├── broom.xml │ │ │ ├── caret_double_right.xml │ │ │ ├── caret_down.xml │ │ │ ├── check.xml │ │ │ ├── check_bold.xml │ │ │ ├── check_circle.xml │ │ │ ├── clipboard.xml │ │ │ ├── cloud.xml │ │ │ ├── code_block.xml │ │ │ ├── cpu.xml │ │ │ ├── currency_btc.xml │ │ │ ├── dots_three_vertical_bold.xml │ │ │ ├── empty.xml │ │ │ ├── export.xml │ │ │ ├── eye.xml │ │ │ ├── eye_slash.xml │ │ │ ├── facebook_logo.xml │ │ │ ├── file.xml │ │ │ ├── flask.xml │ │ │ ├── flask_fill.xml │ │ │ ├── funnel.xml │ │ │ ├── gauge.xml │ │ │ ├── generic_device.xml │ │ │ ├── github_logo.xml │ │ │ ├── globe.xml │ │ │ ├── green_shield.xml │ │ │ ├── green_to_blockstream.xml │ │ │ ├── hard_drives.xml │ │ │ ├── hardware_keys.xml │ │ │ ├── hardware_security.xml │ │ │ ├── house.xml │ │ │ ├── info.xml │ │ │ ├── key.xml │ │ │ ├── key_multisig.xml │ │ │ ├── key_singlesig.xml │ │ │ ├── keys_device.xml │ │ │ ├── keys_hardware.xml │ │ │ ├── ledger_device.xml │ │ │ ├── ledger_trezor.xml │ │ │ ├── lightning.xml │ │ │ ├── lightning_fill.xml │ │ │ ├── lightning_shortcut.xml │ │ │ ├── lightning_slash.xml │ │ │ ├── lightning_thunder.xml │ │ │ ├── linkedin_logo.xml │ │ │ ├── liquid.xml │ │ │ ├── liquid_asset.xml │ │ │ ├── liquid_circle.xml │ │ │ ├── liquid_testnet.xml │ │ │ ├── list.xml │ │ │ ├── lock_simple.xml │ │ │ ├── magnifying_glass.xml │ │ │ ├── magnifying_glass_plus.xml │ │ │ ├── note_pencil.xml │ │ │ ├── number_zero.xml │ │ │ ├── offline_key_storage.xml │ │ │ ├── password.xml │ │ │ ├── pencil_simple.xml │ │ │ ├── pencil_simple_line.xml │ │ │ ├── phone_keys.xml │ │ │ ├── plus_circle.xml │ │ │ ├── qr_airgapped.xml │ │ │ ├── qr_airgapped_keys.xml │ │ │ ├── qr_code.xml │ │ │ ├── question.xml │ │ │ ├── re_enable_two_factor.xml │ │ │ ├── scan.xml │ │ │ ├── seal_check.xml │ │ │ ├── share_network.xml │ │ │ ├── shield_check.xml │ │ │ ├── shield_warning.xml │ │ │ ├── sign_out.xml │ │ │ ├── signature.xml │ │ │ ├── spv_error.xml │ │ │ ├── spv_in_progress.xml │ │ │ ├── spv_verified.xml │ │ │ ├── spv_warning.xml │ │ │ ├── telegram_logo.xml │ │ │ ├── test_tube.xml │ │ │ ├── test_tube_fill.xml │ │ │ ├── text_aa.xml │ │ │ ├── tor.xml │ │ │ ├── trash.xml │ │ │ ├── trezor_device.xml │ │ │ ├── two_factor_authenticator.xml │ │ │ ├── two_factor_call.xml │ │ │ ├── two_factor_email.xml │ │ │ ├── two_factor_sms.xml │ │ │ ├── unknown.xml │ │ │ ├── usb.xml │ │ │ ├── users_three.xml │ │ │ ├── wallet.xml │ │ │ ├── wallet_hw.xml │ │ │ ├── wallet_passphrase.xml │ │ │ ├── warning.xml │ │ │ ├── x.xml │ │ │ ├── x_bold.xml │ │ │ ├── x_circle.xml │ │ │ ├── x_logo.xml │ │ │ └── youtube_logo.xml │ │ ├── files │ │ │ └── rive │ │ │ │ ├── account_archived.riv │ │ │ │ ├── checkmark.riv │ │ │ │ ├── create_wallet.riv │ │ │ │ ├── green_to_blockstream.riv │ │ │ │ ├── jade_button.riv │ │ │ │ ├── jade_plus_button.riv │ │ │ │ ├── jade_plus_power.riv │ │ │ │ ├── jade_plus_scroll.riv │ │ │ │ ├── jade_plus_update.riv │ │ │ │ ├── jade_power.riv │ │ │ │ ├── jade_refresh.riv │ │ │ │ ├── jade_scroll.riv │ │ │ │ ├── jade_update.riv │ │ │ │ ├── lightning_transaction.riv │ │ │ │ ├── rating_animation.riv │ │ │ │ ├── recovery_phrase.riv │ │ │ │ ├── rive_empty.riv │ │ │ │ ├── rocket.riv │ │ │ │ ├── stars.riv │ │ │ │ └── wallet.riv │ │ ├── font │ │ │ ├── inter.xml │ │ │ ├── inter_bold.ttf │ │ │ ├── inter_extra_light.ttf │ │ │ ├── inter_regular.ttf │ │ │ ├── inter_thin.ttf │ │ │ ├── monospace.xml │ │ │ ├── monospace_bold.ttf │ │ │ └── monospace_regular.ttf │ │ ├── values-cs │ │ │ └── strings.xml │ │ ├── values-de │ │ │ └── strings.xml │ │ ├── values-es │ │ │ └── strings.xml │ │ ├── values-fr │ │ │ └── strings.xml │ │ ├── values-he │ │ │ └── strings.xml │ │ ├── values-it │ │ │ └── strings.xml │ │ ├── values-ja │ │ │ └── strings.xml │ │ ├── values-ko │ │ │ └── strings.xml │ │ ├── values-nl │ │ │ └── strings.xml │ │ ├── values-pt-rBR │ │ │ └── strings.xml │ │ ├── values-pt │ │ │ └── strings.xml │ │ ├── values-ro │ │ │ └── strings.xml │ │ ├── values-ru │ │ │ └── strings.xml │ │ ├── values-uk │ │ │ └── strings.xml │ │ ├── values-vi │ │ │ └── strings.xml │ │ ├── values-zh │ │ │ └── strings.xml │ │ └── values │ │ │ ├── strings.xml │ │ │ └── strings_static.xml │ ├── database_local │ │ ├── com │ │ │ └── blockstream │ │ │ │ └── common │ │ │ │ └── database │ │ │ │ └── local │ │ │ │ └── Events.sq │ │ └── migrations │ │ │ ├── 1.sqm │ │ │ └── 2.sqm │ ├── database_wallet │ │ ├── com │ │ │ └── blockstream │ │ │ │ └── common │ │ │ │ └── database │ │ │ │ └── wallet │ │ │ │ ├── DeprecatedEvents.sq │ │ │ │ ├── LoginCredentials.sq │ │ │ │ └── Wallet.sq │ │ └── migrations │ │ │ ├── 1.sqm │ │ │ └── 2.sqm │ └── kotlin │ │ └── com │ │ └── blockstream │ │ ├── common │ │ ├── Constants.kt │ │ ├── CountlyBase.kt │ │ ├── Platform.kt │ │ ├── ZendeskSdk.kt │ │ ├── btcpricehistory │ │ │ ├── BitcoinPriceHistoryHttpClient.kt │ │ │ ├── BitcoinPriceHistoryModule.kt │ │ │ ├── BitcoinPriceHistoryRepository.kt │ │ │ ├── datasource │ │ │ │ └── BitcoinPriceHistoryRemoteDataSource.kt │ │ │ ├── mapper │ │ │ │ └── BitcoinChartPriceMapper.kt │ │ │ └── model │ │ │ │ ├── BitcoinChartData.kt │ │ │ │ ├── BitcoinChartPeriod.kt │ │ │ │ ├── BitcoinPriceGranularity.kt │ │ │ │ └── NetworkBitcoinPriceData.kt │ │ ├── crypto │ │ │ ├── GreenKeystore.kt │ │ │ └── NoKeystore.kt │ │ ├── data │ │ │ ├── AlertType.kt │ │ │ ├── AppConfig.kt │ │ │ ├── AppKeys.kt │ │ │ ├── ApplicationSettings.kt │ │ │ ├── Banner.kt │ │ │ ├── CountlyAsset.kt │ │ │ ├── CountlyWidget.kt │ │ │ ├── Countries.kt │ │ │ ├── CredentialType.kt │ │ │ ├── DataState.kt │ │ │ ├── DenominatedValue.kt │ │ │ ├── DeviceIdentifier.kt │ │ │ ├── EncryptedData.kt │ │ │ ├── EnrichedAsset.kt │ │ │ ├── ExceptionWithSupportData.kt │ │ │ ├── FeePriority.kt │ │ │ ├── GreenWallet.kt │ │ │ ├── HerokuResponse.kt │ │ │ ├── HwWatchOnlyCredentials.kt │ │ │ ├── LnUrlAuthRequest.kt │ │ │ ├── LnUrlWithdrawRequest.kt │ │ │ ├── LogoutReason.kt │ │ │ ├── MenuEntry.kt │ │ │ ├── Promo.kt │ │ │ ├── Redact.kt │ │ │ ├── RichWatchOnly.kt │ │ │ ├── ScanResult.kt │ │ │ ├── SetupArgs.kt │ │ │ ├── SupportData.kt │ │ │ ├── TwoFactorMethod.kt │ │ │ ├── TwoFactorResolverData.kt │ │ │ ├── TwoFactorSetupAction.kt │ │ │ ├── WalletExtras.kt │ │ │ ├── WalletSettings.kt │ │ │ └── WatchOnlyCredentials.kt │ │ ├── database │ │ │ ├── Adapters.kt │ │ │ └── Database.kt │ │ ├── devices │ │ │ ├── ConnectionType.kt │ │ │ ├── DeviceBrand.kt │ │ │ ├── DeviceModel.kt │ │ │ ├── GreenDevice.kt │ │ │ ├── JadeBleDevice.kt │ │ │ └── JadeDevice.kt │ │ ├── di │ │ │ ├── CommonModule.kt │ │ │ ├── Koin.kt │ │ │ └── ViewModels.kt │ │ ├── events │ │ │ ├── EventWithSideEffect.kt │ │ │ └── Events.kt │ │ ├── extensions │ │ │ ├── BleExtensions.kt │ │ │ ├── ConditionalExtensions.kt │ │ │ ├── CoroutineExtensions.kt │ │ │ ├── DatabaseExtension.kt │ │ │ ├── GdkExtensions.kt │ │ │ ├── LinkedHashMapExtensions.kt │ │ │ ├── List.kt │ │ │ ├── PreviewExtensions.kt │ │ │ ├── StringExtensions.kt │ │ │ └── Zip.kt │ │ ├── fcm │ │ │ ├── FcmCommon.kt │ │ │ └── Firebase.kt │ │ ├── gdk │ │ │ ├── AuthHandler.kt │ │ │ ├── Gdk.kt │ │ │ ├── GdkSession.kt │ │ │ ├── GreenJson.kt │ │ │ ├── JsonConverter.kt │ │ │ ├── Wally.kt │ │ │ ├── data │ │ │ │ ├── Account.kt │ │ │ │ ├── AccountAsset.kt │ │ │ │ ├── AccountAssetBalance.kt │ │ │ │ ├── AccountBalance.kt │ │ │ │ ├── AccountType.kt │ │ │ │ ├── Accounts.kt │ │ │ │ ├── Address.kt │ │ │ │ ├── Addressee.kt │ │ │ │ ├── Asset.kt │ │ │ │ ├── AssetBalance.kt │ │ │ │ ├── Assets.kt │ │ │ │ ├── AuthHandlerStatus.kt │ │ │ │ ├── Balance.kt │ │ │ │ ├── BcurDecodedData.kt │ │ │ │ ├── BcurEncodedData.kt │ │ │ │ ├── Bip21Params.kt │ │ │ │ ├── BlindedScripts.kt │ │ │ │ ├── Block.kt │ │ │ │ ├── BroadcastTransaction.kt │ │ │ │ ├── CreateSwapTransaction.kt │ │ │ │ ├── CreateTransaction.kt │ │ │ │ ├── Credentials.kt │ │ │ │ ├── Device.kt │ │ │ │ ├── DeviceRequest.kt │ │ │ │ ├── DeviceRequiredData.kt │ │ │ │ ├── DeviceResolvedData.kt │ │ │ │ ├── DeviceSupportsAntiExfilProtocol.kt │ │ │ │ ├── DeviceSupportsLiquid.kt │ │ │ │ ├── EncryptWithPin.kt │ │ │ │ ├── FeeEstimation.kt │ │ │ │ ├── InputOutput.kt │ │ │ │ ├── InputUnblindedData.kt │ │ │ │ ├── LiquiDex.kt │ │ │ │ ├── LiquiDexList.kt │ │ │ │ ├── LiquidAssets.kt │ │ │ │ ├── LoginData.kt │ │ │ │ ├── Network.kt │ │ │ │ ├── NetworkEvent.kt │ │ │ │ ├── Networks.kt │ │ │ │ ├── Notification.kt │ │ │ │ ├── Output.kt │ │ │ │ ├── OutputUnblindedData.kt │ │ │ │ ├── PendingTransaction.kt │ │ │ │ ├── PinData.kt │ │ │ │ ├── PreviousAddresses.kt │ │ │ │ ├── ProcessedTransactionDetails.kt │ │ │ │ ├── ProxySettings.kt │ │ │ │ ├── Psbt.kt │ │ │ │ ├── RsaVerify.kt │ │ │ │ ├── Settings.kt │ │ │ │ ├── SignMessage.kt │ │ │ │ ├── SubaccountEvent.kt │ │ │ │ ├── SwapProposal.kt │ │ │ │ ├── TickerEvent.kt │ │ │ │ ├── TorEvent.kt │ │ │ │ ├── Transaction.kt │ │ │ │ ├── TransactionEvent.kt │ │ │ │ ├── TransactionUnblindedData.kt │ │ │ │ ├── Transactions.kt │ │ │ │ ├── TwoFactorConfig.kt │ │ │ │ ├── TwoFactorMethodConfig.kt │ │ │ │ ├── TwoFactorReset.kt │ │ │ │ ├── UnspentOutputs.kt │ │ │ │ ├── Utxo.kt │ │ │ │ ├── UtxoView.kt │ │ │ │ ├── ValidateAddressees.kt │ │ │ │ └── WalletEvents.kt │ │ │ ├── device │ │ │ │ ├── BlindingFactorsResult.kt │ │ │ │ ├── DeviceResolver.kt │ │ │ │ ├── GdkHardwareWallet.kt │ │ │ │ ├── SignMessageResult.kt │ │ │ │ └── SignTransactionResult.kt │ │ │ ├── events │ │ │ │ ├── GenericEvent.kt │ │ │ │ └── JadeGenuineCheck.kt │ │ │ └── params │ │ │ │ ├── AddressParams.kt │ │ │ │ ├── AssetsParams.kt │ │ │ │ ├── BalanceParams.kt │ │ │ │ ├── BcurDecodeParams.kt │ │ │ │ ├── BcurEncodeParams.kt │ │ │ │ ├── BroadcastTransactionParams.kt │ │ │ │ ├── CompleteSwapParams.kt │ │ │ │ ├── ConnectionParams.kt │ │ │ │ ├── Convert.kt │ │ │ │ ├── CreateSwapParams.kt │ │ │ │ ├── CreateTransactionParams.kt │ │ │ │ ├── CredentialsParams.kt │ │ │ │ ├── CsvParams.kt │ │ │ │ ├── DecryptWithPinParams.kt │ │ │ │ ├── DeviceParams.kt │ │ │ │ ├── EncryptWithPinParams.kt │ │ │ │ ├── GetAssetsParams.kt │ │ │ │ ├── InitConfig.kt │ │ │ │ ├── Limits.kt │ │ │ │ ├── LiquidDexV0Params.kt │ │ │ │ ├── LoginCredentialsParams.kt │ │ │ │ ├── PreviousAddressParams.kt │ │ │ │ ├── ReceiveAddressParams.kt │ │ │ │ ├── ReconnectHintParams.kt │ │ │ │ ├── RsaVerifyParams.kt │ │ │ │ ├── SignMessageParams.kt │ │ │ │ ├── SubAccountParams.kt │ │ │ │ ├── SubAccountsParams.kt │ │ │ │ ├── TransactionParams.kt │ │ │ │ ├── UnspentOutputsPrivateKeyParams.kt │ │ │ │ ├── UpdateSubAccountParams.kt │ │ │ │ └── ValidateAddresseesParams.kt │ │ ├── interfaces │ │ │ ├── DeviceConnectionInterface.kt │ │ │ └── JadeHttpRequestUrlValidator.kt │ │ ├── jade │ │ │ ├── Handshake.kt │ │ │ ├── JadeHWWallet.kt │ │ │ ├── JadeResponse.kt │ │ │ └── QrData.kt │ │ ├── lightning │ │ │ ├── AppGreenlightCredentials.kt │ │ │ ├── BreezNotification.kt │ │ │ ├── Extensions.kt │ │ │ ├── GreenlightKeys.kt │ │ │ ├── LightningBridge.kt │ │ │ └── LightningManager.kt │ │ ├── looks │ │ │ ├── AccountTypeLook.kt │ │ │ ├── AmountAssetLook.kt │ │ │ ├── Color.kt │ │ │ ├── NetworkFeeLook.kt │ │ │ ├── TransactionDetailsLook.kt │ │ │ ├── TransactionStatusLook.kt │ │ │ ├── TransactionUtxo.kt │ │ │ ├── account │ │ │ │ ├── AddressLook.kt │ │ │ │ └── LightningInfoLook.kt │ │ │ ├── transaction │ │ │ │ ├── TransactionConfirmLook.kt │ │ │ │ ├── TransactionLook.kt │ │ │ │ └── TransactionStatus.kt │ │ │ └── wallet │ │ │ │ ├── WalletListLook.kt │ │ │ │ └── WatchOnlyLook.kt │ │ ├── managers │ │ │ ├── AssetManager.kt │ │ │ ├── BluetoothManager.kt │ │ │ ├── DeviceManager.kt │ │ │ ├── LifecycleManager.kt │ │ │ ├── LocaleManager.kt │ │ │ ├── NetworkAssetManager.kt │ │ │ ├── NotificationManager.kt │ │ │ ├── PromoManager.kt │ │ │ ├── SessionManager.kt │ │ │ └── SettingsManager.kt │ │ ├── models │ │ │ ├── GreenViewModel.kt │ │ │ ├── MainViewModel.kt │ │ │ ├── about │ │ │ │ └── AboutViewModel.kt │ │ │ ├── abstract │ │ │ │ └── AbstractScannerViewModel.kt │ │ │ ├── add │ │ │ │ ├── Account2of3ViewModel.kt │ │ │ │ ├── AddAccountViewModelAbstract.kt │ │ │ │ ├── ChooseAccountTypeViewModel.kt │ │ │ │ ├── ReviewAddAccountViewModel.kt │ │ │ │ └── XpubViewModel.kt │ │ │ ├── addresses │ │ │ │ ├── AddressesViewModel.kt │ │ │ │ └── SignMessageViewModel.kt │ │ │ ├── archived │ │ │ │ └── ArchivedAccountsViewModel.kt │ │ │ ├── camera │ │ │ │ └── CameraViewModel.kt │ │ │ ├── demo │ │ │ │ └── DemoViewModel.kt │ │ │ ├── devices │ │ │ │ ├── AbstractDeviceViewModel.kt │ │ │ │ ├── DeviceInfoViewModel.kt │ │ │ │ ├── DeviceListViewModel.kt │ │ │ │ ├── DeviceScanViewModel.kt │ │ │ │ ├── ImportPubKeyViewModel.kt │ │ │ │ ├── JadeGenuineCheckViewModel.kt │ │ │ │ └── JadeGuideViewModel.kt │ │ │ ├── exchange │ │ │ │ ├── AccountExchangeViewModel.kt │ │ │ │ ├── BuyViewModel.kt │ │ │ │ └── OnOffRampsViewModel.kt │ │ │ ├── home │ │ │ │ └── HomeViewModel.kt │ │ │ ├── jade │ │ │ │ └── JadeQRViewModel.kt │ │ │ ├── lightning │ │ │ │ ├── LnUrlAuthViewModel.kt │ │ │ │ ├── LnUrlWithdrawViewModel.kt │ │ │ │ └── RecoverFundsViewModel.kt │ │ │ ├── login │ │ │ │ ├── Bip39PassphraseViewModel.kt │ │ │ │ └── LoginViewModel.kt │ │ │ ├── onboarding │ │ │ │ ├── SetupNewWalletViewModel.kt │ │ │ │ ├── hardware │ │ │ │ │ └── UserHardwareDeviceViewModel.kt │ │ │ │ ├── phone │ │ │ │ │ ├── AddWalletViewModel.kt │ │ │ │ │ ├── EnterRecoveryPhraseViewModel.kt │ │ │ │ │ └── PinViewModel.kt │ │ │ │ └── watchonly │ │ │ │ │ ├── WatchOnlyCredentialsViewModel.kt │ │ │ │ │ ├── WatchOnlyNetworkViewModel.kt │ │ │ │ │ └── WatchOnlyPolicyViewModel.kt │ │ │ ├── overview │ │ │ │ ├── AccountOverviewViewModel.kt │ │ │ │ ├── SecurityViewModel.kt │ │ │ │ ├── TransactViewModel.kt │ │ │ │ ├── WalletAssetsViewModel.kt │ │ │ │ ├── WalletBalanceViewModel.kt │ │ │ │ └── WalletOverviewViewModel.kt │ │ │ ├── promo │ │ │ │ └── PromoViewModel.kt │ │ │ ├── receive │ │ │ │ ├── ReceiveViewModel.kt │ │ │ │ └── RequestAmountViewModel.kt │ │ │ ├── recovery │ │ │ │ ├── RecoveryCheckViewModel.kt │ │ │ │ ├── RecoveryIntroViewModel.kt │ │ │ │ ├── RecoveryPhraseViewModel.kt │ │ │ │ └── RecoveryWordsViewModel.kt │ │ │ ├── send │ │ │ │ ├── BumpViewModel.kt │ │ │ │ ├── CreateTransactionViewModel.kt │ │ │ │ ├── DenominationViewModel.kt │ │ │ │ ├── FeeViewModel.kt │ │ │ │ ├── RedepositViewModel.kt │ │ │ │ ├── SendConfirmViewModel.kt │ │ │ │ ├── SendViewModel.kt │ │ │ │ └── SweepViewModel.kt │ │ │ ├── settings │ │ │ │ ├── AppSettingsViewModel.kt │ │ │ │ ├── DenominationExchangeRateViewModel.kt │ │ │ │ ├── TwoFactorAuthenticationViewModel.kt │ │ │ │ ├── TwoFactorSetupViewModel.kt │ │ │ │ ├── WalletSettingsViewModel.kt │ │ │ │ ├── WatchOnlyCredentialsSettingsViewModel.kt │ │ │ │ └── WatchOnlyViewModel.kt │ │ │ ├── sheets │ │ │ │ ├── AnalyticsViewModel.kt │ │ │ │ ├── AssetDetailsViewModel.kt │ │ │ │ ├── JadeFirmwareUpdateViewModel.kt │ │ │ │ ├── LightningNodeViewModel.kt │ │ │ │ ├── NoteViewModel.kt │ │ │ │ ├── RecoveryHelpViewModel.kt │ │ │ │ └── TransactionDetailsViewModel.kt │ │ │ ├── support │ │ │ │ └── SupportViewModel.kt │ │ │ ├── transaction │ │ │ │ └── TransactionViewModel.kt │ │ │ ├── twofactor │ │ │ │ └── ReEnable2FAViewModel.kt │ │ │ └── wallet │ │ │ │ ├── WalletDeleteViewModel.kt │ │ │ │ └── WalletNameViewModel.kt │ │ ├── navigation │ │ │ ├── Destinations.kt │ │ │ └── PopTo.kt │ │ ├── serializers │ │ │ ├── AccountTypeSerializer.kt │ │ │ ├── Base64Serializer.kt │ │ │ ├── DeviceSupportsAntiExfilProtocolSerializer.kt │ │ │ ├── DeviceSupportsLiquidSerializer.kt │ │ │ ├── HtmlEntitiesSerializer.kt │ │ │ ├── ListUByteSerializer.kt │ │ │ ├── TransactionTypeSerializer.kt │ │ │ └── WalletSerializer.kt │ │ ├── sideeffects │ │ │ ├── OpenBrowserType.kt │ │ │ ├── SideEffectWithEvent.kt │ │ │ └── SideEffects.kt │ │ ├── usecases │ │ │ ├── CheckRecoveryPhraseUseCase.kt │ │ │ ├── CreateAccountUseCase.kt │ │ │ ├── EnableHardwareWatchOnlyUseCase.kt │ │ │ ├── NewWalletUseCase.kt │ │ │ ├── RestoreWalletUseCase.kt │ │ │ ├── SetBiometricsUseCase.kt │ │ │ └── SetPinUseCase.kt │ │ └── utils │ │ │ ├── AppReviewHelper.kt │ │ │ ├── BinaryUtils.kt │ │ │ ├── ConsumableEvent.kt │ │ │ ├── Conversions.kt │ │ │ ├── Date.kt │ │ │ ├── DecimalFormat.kt │ │ │ ├── KotlinUtils.kt │ │ │ ├── Resources.kt │ │ │ ├── SecureRandom.kt │ │ │ ├── StringHolder.kt │ │ │ ├── StringUtils.kt │ │ │ ├── Timer.kt │ │ │ ├── UserInput.kt │ │ │ ├── WalletName.kt │ │ │ └── Zendesk.kt │ │ └── domain │ │ ├── bitcoinpricehistory │ │ └── ObserveBitcoinPriceHistory.kt │ │ ├── hardware │ │ └── VerifyAddressUseCase.kt │ │ └── meld │ │ ├── CreateCryptoQuoteUseCase.kt │ │ ├── CreateCryptoWidgetUseCase.kt │ │ ├── DefaultValuesUseCase.kt │ │ └── MeldUseCase.kt │ ├── commonTest │ └── kotlin │ │ └── com │ │ └── blockstream │ │ └── common │ │ └── utils │ │ ├── BinaryUtilsTests.kt │ │ ├── DecimalFormatTests.kt │ │ ├── JsonConverterUnitTest.kt │ │ └── RandomTests.kt │ ├── iosMain │ └── kotlin │ │ └── com │ │ └── blockstream │ │ └── common │ │ ├── CountlyIOS.kt │ │ ├── Platform.ios.kt │ │ ├── database │ │ └── Database.ios.kt │ │ ├── di │ │ └── Koin.ios.kt │ │ ├── extensions │ │ └── BleExtensions.ios.kt │ │ ├── gdk │ │ ├── Gdk.ios.kt │ │ └── Wally.ios.kt │ │ ├── managers │ │ ├── BluetoothManager.ios.kt │ │ └── LocaleManager.ios.kt │ │ └── utils │ │ ├── Date.ios.kt │ │ ├── DecimalFormat.kt │ │ └── SecureRandom.ios.kt │ ├── jvmMain │ └── kotlin │ │ └── com │ │ └── blockstream │ │ └── common │ │ ├── Platform.jvm.kt │ │ ├── database │ │ └── Database.jvm.kt │ │ ├── di │ │ └── Koin.jvm.kt │ │ ├── extensions │ │ └── BleExtensions.jvm.kt │ │ ├── gdk │ │ ├── Gdk.jvm.kt │ │ └── Wally.jvm.kt │ │ ├── managers │ │ ├── BluetoothManager.jvm.kt │ │ └── LocaleManager.jvm.kt │ │ └── utils │ │ ├── Date.jvm.kt │ │ ├── DecimalFormat.jvm.kt │ │ └── SecureRandom.jvm.kt │ └── nativeInterop │ └── cinterop │ └── gdk.def ├── compose ├── .gitignore ├── build.gradle.kts └── src │ ├── androidMain │ ├── AndroidManifest.xml │ ├── kotlin │ │ └── com │ │ │ └── blockstream │ │ │ └── compose │ │ │ ├── ComposeUIActivity.kt │ │ │ ├── GreenApp.android.kt │ │ │ ├── android │ │ │ └── views │ │ │ │ └── ViewFinderView.kt │ │ │ ├── components │ │ │ ├── Banner.android.kt │ │ │ ├── BottomNav.android.kt │ │ │ ├── Buttons.android.kt │ │ │ ├── CameraView.android.kt │ │ │ ├── GreenAccountAsset.android.kt │ │ │ ├── GreenAccountCard.android.kt │ │ │ ├── GreenAddress.android.kt │ │ │ ├── GreenAlert.android.kt │ │ │ ├── GreenAmount.android.kt │ │ │ ├── GreenAmountField.android.kt │ │ │ ├── GreenAmounts.android.kt │ │ │ ├── GreenArrow.android.kt │ │ │ ├── GreenAsset.android.kt │ │ │ ├── GreenAssetAccounts.android.kt │ │ │ ├── GreenBottomSheet.android.kt │ │ │ ├── GreenCard.android.kt │ │ │ ├── GreenContentCard.android.kt │ │ │ ├── GreenDataLayout.android.kt │ │ │ ├── GreenNetworkFee.android.kt │ │ │ ├── GreenQR.android.kt │ │ │ ├── GreenScanner.android.kt │ │ │ ├── GreenSearchField.android.kt │ │ │ ├── GreenSwitch.android.kt │ │ │ ├── GreenTextField.android.kt │ │ │ ├── GreenTopAppBar.android.kt │ │ │ ├── GreenTransaction.android.kt │ │ │ ├── PopupMenu.android.kt │ │ │ ├── Promo.android.kt │ │ │ ├── Rive.android.kt │ │ │ ├── ScreenContainer.android.kt │ │ │ ├── SlideToUnlockMaterial.android.kt │ │ │ ├── SlideToUnlockMaterial3.android.kt │ │ │ ├── TransactionStatusIcon.android.kt │ │ │ └── VideoSurface.android.kt │ │ │ ├── devices │ │ │ ├── LedgerDevice.kt │ │ │ └── TrezorDevice.kt │ │ │ ├── dialogs │ │ │ ├── AppRateDialog.android.kt │ │ │ ├── ArchivedAccountsDialog.android.kt │ │ │ ├── DenominationExchangeDialog.android.kt │ │ │ ├── SingleChoiceDialog.android.kt │ │ │ ├── TextDialog.android.kt │ │ │ ├── TwoFactorCodeDialog.android.kt │ │ │ ├── UrlWarningDialog.android.kt │ │ │ └── WalletOverviewMenuDialog.android.kt │ │ │ ├── managers │ │ │ ├── DeviceConnectionManagerAndroid.kt │ │ │ └── PlatformManager.android.kt │ │ │ ├── screens │ │ │ ├── HomeScreen.android.kt │ │ │ ├── LockScreen.android.kt │ │ │ ├── about │ │ │ │ └── AboutScreen.android.kt │ │ │ ├── add │ │ │ │ ├── Account2of3Screen.android.kt │ │ │ │ ├── ChooseAccountTypeScreen.android.kt │ │ │ │ ├── ReviewAddAccountScreen.android.kt │ │ │ │ └── XpubScreen.android.kt │ │ │ ├── addresses │ │ │ │ └── AddressesScreen.android.kt │ │ │ ├── archived │ │ │ │ └── ArchivedAccountsScreen.android.kt │ │ │ ├── devices │ │ │ │ ├── DeviceInfoScreen.android.kt │ │ │ │ ├── DeviceListScreen.android.kt │ │ │ │ ├── DeviceScanScreen.android.kt │ │ │ │ ├── ImportPubKeyScreen.android.kt │ │ │ │ └── JadeGenuineCheckScreen.android.kt │ │ │ ├── exchange │ │ │ │ ├── AccountExchangeScreen.android.kt │ │ │ │ ├── BuyScreen.android.kt │ │ │ │ └── OnOffRampsScreen.android.kt │ │ │ ├── jade │ │ │ │ ├── JadePinViaQRScreen.android.kt │ │ │ │ └── JadeQRScreen.android.kt │ │ │ ├── lightning │ │ │ │ ├── LnUrlAuthScreen.android.kt │ │ │ │ ├── LnUrlWithdrawScreen.android.kt │ │ │ │ └── RecoverFundsScreen.android.kt │ │ │ ├── login │ │ │ │ └── LoginScreen.android.kt │ │ │ ├── onboarding │ │ │ │ ├── SetupNewWalletScreen.android.kt │ │ │ │ ├── hardware │ │ │ │ │ ├── JadeGuideScreen.android.kt │ │ │ │ │ └── UseHardwareDeviceScreen.android.kt │ │ │ │ ├── phone │ │ │ │ │ ├── AddWalletScreen.android.kt │ │ │ │ │ ├── EnterRecoveryPhraseScreen.android.kt │ │ │ │ │ └── PinScreen.android.kt │ │ │ │ └── watchonly │ │ │ │ │ ├── WatchOnlyCredentialsScreen.android.kt │ │ │ │ │ ├── WatchOnlyNetworkScreen.android.kt │ │ │ │ │ └── WatchOnlyPolicyScreen.android.kt │ │ │ ├── overview │ │ │ │ ├── AccountOverviewScreen.android.kt │ │ │ │ ├── SecurityScreen.android.kt │ │ │ │ ├── TransactScreen.android.kt │ │ │ │ └── WalletOverviewScreen.android.kt │ │ │ ├── promo │ │ │ │ └── PromoScreen.android.kt │ │ │ ├── receive │ │ │ │ └── ReceiveScreen.android.kt │ │ │ ├── recovery │ │ │ │ ├── RecoveryCheckScreen.android.kt │ │ │ │ ├── RecoveryIntroScreen.android.kt │ │ │ │ ├── RecoveryPhraseScreen.android.kt │ │ │ │ └── RecoveryWordsScreen.android.kt │ │ │ ├── send │ │ │ │ ├── BumpScreen.android.kt │ │ │ │ ├── RedepositScreen.android.kt │ │ │ │ ├── SendConfirmScreen.android.kt │ │ │ │ ├── SendScreen.android.kt │ │ │ │ └── SweepScreen.android.kt │ │ │ ├── settings │ │ │ │ ├── AppSettingsScreen.android.kt │ │ │ │ ├── ChangePinScreen.android.kt │ │ │ │ ├── TwoFactorAuthenticationScreen.android.kt │ │ │ │ ├── TwoFactorSetupScreen.android.kt │ │ │ │ ├── WalletSettingsScreen.android.kt │ │ │ │ └── WatchOnlyScreen.android.kt │ │ │ ├── support │ │ │ │ └── SupportScreen.android.kt │ │ │ ├── transaction │ │ │ │ └── TransactionScreen.android.kt │ │ │ └── twofactor │ │ │ │ └── ReEnable2FAScreen.android.kt │ │ │ ├── sheets │ │ │ ├── AccountRenameBottomSheet.android.kt │ │ │ ├── AccountsBottomSheet.android.kt │ │ │ ├── AnalyticsBottomSheet.android.kt │ │ │ ├── AskJadeUnlockBottomSheet.android.kt │ │ │ ├── AssetDetailsBottomSheet.android.kt │ │ │ ├── AssetsAccountsBottomSheet.android.kt │ │ │ ├── AssetsBottomSheet.android.kt │ │ │ ├── Bip39PassphraseBottomSheet.android.kt │ │ │ ├── Call2ActionBottomSheet.android.kt │ │ │ ├── CameraBottomSheet.android.kt │ │ │ ├── ChooseAssetAccountBottomSheet.android.kt │ │ │ ├── CountriesBottomSheet.android.kt │ │ │ ├── DenominationBottomSheet.android.kt │ │ │ ├── DeviceInteractionBottomSheet.android.kt │ │ │ ├── FeeRateBottomSheet.android.kt │ │ │ ├── JadeFirmwareUpdateBottomSheet.android.kt │ │ │ ├── LightningNodeBottomSheet.android.kt │ │ │ ├── MainMenuBottomSheet.android.kt │ │ │ ├── MenuBottomSheet.android.kt │ │ │ ├── NewJadeConnectedBottomSheet.android.kt │ │ │ ├── NoteBottomSheet.android.kt │ │ │ ├── PassphraseBottomSheet.android.kt │ │ │ ├── PinMatrixBottomSheet.android.kt │ │ │ ├── QrBottomSheet.android.kt │ │ │ ├── RecoveryHelpBottomSheet.android.kt │ │ │ ├── SecurityLevelBottomSheet.android.kt │ │ │ ├── SignMessageBottomSheet.android.kt │ │ │ ├── SystemMessageBottomSheet.android.kt │ │ │ ├── TransactionDetailsBottomSheet.android.kt │ │ │ ├── TwoFactorResetBottomSheet.android.kt │ │ │ ├── WalletDeleteBottomSheet.android.kt │ │ │ ├── WalletRenameBottomSheet.android.kt │ │ │ └── WatchOnlySettingsCredentialsBottomSheet.android.kt │ │ │ ├── sideeffects │ │ │ └── Biometrics.android.kt │ │ │ ├── theme │ │ │ └── Theme.android.kt │ │ │ ├── utils │ │ │ ├── Resources.android.kt │ │ │ ├── ScreenSizeInfo.android.kt │ │ │ └── Semantics.android.kt │ │ │ └── views │ │ │ ├── DataListItem.android.kt │ │ │ ├── LightningInfo.android.kt │ │ │ ├── PinView.android.kt │ │ │ └── WalletListItem.android.kt │ └── res │ │ ├── layout │ │ ├── camera.xml │ │ └── rive.xml │ │ └── raw │ │ └── rive_empty.riv │ ├── commonMain │ └── kotlin │ │ └── com │ │ └── blockstream │ │ └── compose │ │ ├── GreenApp.kt │ │ ├── components │ │ ├── Banner.kt │ │ ├── BottomNav.kt │ │ ├── Buttons.kt │ │ ├── CameraView.kt │ │ ├── GreenAccountAsset.kt │ │ ├── GreenAccountCard.kt │ │ ├── GreenAccountSelector.kt │ │ ├── GreenAddress.kt │ │ ├── GreenAlert.kt │ │ ├── GreenAmount.kt │ │ ├── GreenAmountField.kt │ │ ├── GreenAmounts.kt │ │ ├── GreenAsset.kt │ │ ├── GreenAssetAccounts.kt │ │ ├── GreenBottomSheet.kt │ │ ├── GreenCard.kt │ │ ├── GreenConfirmButton.kt │ │ ├── GreenContentCard.kt │ │ ├── GreenDataLayout.kt │ │ ├── GreenNetworkFee.kt │ │ ├── GreenQR.kt │ │ ├── GreenScanner.kt │ │ ├── GreenSearchField.kt │ │ ├── GreenTextField.kt │ │ ├── GreenTopAppBar.kt │ │ ├── GreenTransaction.kt │ │ ├── ListHeader.kt │ │ ├── MeldProvider.kt │ │ ├── PopupMenu.kt │ │ ├── Promo.kt │ │ ├── Rive.kt │ │ ├── ScreenContainer.kt │ │ ├── SlideToUnlockMaterial.kt │ │ ├── SlideToUnlockMaterial3.kt │ │ ├── TransactionStatusIcon.kt │ │ ├── VideoSurface.kt │ │ └── WalletBalance.kt │ │ ├── dialogs │ │ ├── AppRateDialog.kt │ │ ├── ArchivedAccountsDialog.kt │ │ ├── DenominationExchangeDialog.kt │ │ ├── FeedbackDialog.kt │ │ ├── SingleChoiceDialog.kt │ │ ├── TextDialog.kt │ │ ├── TorWarningDialog.kt │ │ ├── TwoFactorCodeDialog.kt │ │ ├── UrlWarningDialog.kt │ │ └── WalletOverviewMenuDialog.kt │ │ ├── extensions │ │ ├── Compose.kt │ │ ├── Resources.kt │ │ ├── Snackbar.kt │ │ └── Text.kt │ │ ├── managers │ │ ├── DeviceConnectionManager.kt │ │ └── PlatformManager.kt │ │ ├── navigation │ │ ├── AppScaffold.kt │ │ ├── CustomNavType.kt │ │ ├── NavGraphBuilder.kt │ │ ├── Navigate.kt │ │ └── Router.kt │ │ ├── screens │ │ ├── HomeScreen.kt │ │ ├── LockScreen.kt │ │ ├── WalletsScreen.kt │ │ ├── about │ │ │ └── AboutScreen.kt │ │ ├── add │ │ │ ├── Account2of3Screen.kt │ │ │ ├── ChooseAccountTypeScreen.kt │ │ │ ├── ReviewAddAccountScreen.kt │ │ │ └── XpubScreen.kt │ │ ├── addresses │ │ │ └── AddressesScreen.kt │ │ ├── archived │ │ │ └── ArchivedAccountsScreen.kt │ │ ├── devices │ │ │ ├── DeviceInfoScreen.kt │ │ │ ├── DeviceListScreen.kt │ │ │ ├── DeviceScanScreen.kt │ │ │ ├── ImportPubKeyScreen.kt │ │ │ └── JadeGenuineCheckScreen.kt │ │ ├── exchange │ │ │ ├── AccountExchangeScreen.kt │ │ │ ├── BuyScreen.kt │ │ │ └── OnOffRampsScreen.kt │ │ ├── jade │ │ │ ├── JadePinUnlockScreen.kt │ │ │ └── JadeQRScreen.kt │ │ ├── lightning │ │ │ ├── LnUrlAuthScreen.kt │ │ │ ├── LnUrlWithdrawScreen.kt │ │ │ └── RecoverFundsScreen.kt │ │ ├── login │ │ │ └── LoginScreen.kt │ │ ├── onboarding │ │ │ ├── SetupNewWalletScreen.kt │ │ │ ├── hardware │ │ │ │ ├── JadeGuideScreen.kt │ │ │ │ └── UseHardwareDeviceScreen.kt │ │ │ ├── phone │ │ │ │ ├── AddWalletScreen.kt │ │ │ │ ├── EnterRecoveryPhraseScreen.kt │ │ │ │ └── PinScreen.kt │ │ │ └── watchonly │ │ │ │ ├── WatchOnlyCredentialsScreen.kt │ │ │ │ ├── WatchOnlyNetworkScreen.kt │ │ │ │ └── WatchOnlyPolicyScreen.kt │ │ ├── overview │ │ │ ├── AccountOverviewScreen.kt │ │ │ ├── SecurityScreen.kt │ │ │ ├── TransactScreen.kt │ │ │ ├── WalletAssetsScreen.kt │ │ │ ├── WalletOverviewScreen.kt │ │ │ └── components │ │ │ │ └── BitcoinPriceChart.kt │ │ ├── promo │ │ │ └── PromoScreen.kt │ │ ├── receive │ │ │ └── ReceiveScreen.kt │ │ ├── recovery │ │ │ ├── RecoveryCheckScreen.kt │ │ │ ├── RecoveryIntroScreen.kt │ │ │ ├── RecoveryPhraseScreen.kt │ │ │ └── RecoveryWordsScreen.kt │ │ ├── send │ │ │ ├── BumpScreen.kt │ │ │ ├── RedepositScreen.kt │ │ │ ├── SendConfirmScreen.kt │ │ │ ├── SendScreen.kt │ │ │ └── SweepScreen.kt │ │ ├── settings │ │ │ ├── AppSettingsScreen.kt │ │ │ ├── ChangePinScreen.kt │ │ │ ├── TwoFactorAuthenticationScreen.kt │ │ │ ├── TwoFactorSetupScreen.kt │ │ │ ├── WalletSettingsScreen.kt │ │ │ └── WatchOnlyScreen.kt │ │ ├── support │ │ │ └── SupportScreen.kt │ │ ├── transaction │ │ │ └── TransactionScreen.kt │ │ └── twofactor │ │ │ └── ReEnable2FAScreen.kt │ │ ├── sheets │ │ ├── AccountRenameBottomSheet.kt │ │ ├── AccountsBottomSheet.kt │ │ ├── AnalyticsBottomSheet.kt │ │ ├── AskJadeUnlockBottomSheet.kt │ │ ├── AssetDetailsBottomSheet.kt │ │ ├── AssetsAccountsBottomSheet.kt │ │ ├── AssetsBottomSheet.kt │ │ ├── Bip39PassphraseBottomSheet.kt │ │ ├── BuyQuotesBottomSheet.kt │ │ ├── Call2ActionBottomSheet.kt │ │ ├── CameraBottomSheet.kt │ │ ├── ChooseAssetAccountBottomSheet.kt │ │ ├── CountriesBottomSheet.kt │ │ ├── DenominationBottomSheet.kt │ │ ├── DeviceInteractionBottomSheet.kt │ │ ├── EnvironmentBottomSheet.kt │ │ ├── FeeRateBottomSheet.kt │ │ ├── JadeFirmwareUpdateBottomSheet.kt │ │ ├── LightningNodeBottomSheet.kt │ │ ├── MainMenuBottomSheet.kt │ │ ├── MenuBottomSheet.kt │ │ ├── NewJadeConnectedBottomSheet.kt │ │ ├── NoteBottomSheet.kt │ │ ├── PassphraseBottomSheet.kt │ │ ├── PinMatrixBottomSheet.kt │ │ ├── QrBottomSheet.kt │ │ ├── RecoveryHelpBottomSheet.kt │ │ ├── SecurityLevelBottomSheet.kt │ │ ├── SignMessageBottomSheet.kt │ │ ├── SystemMessageBottomSheet.kt │ │ ├── TransactionDetailsBottomSheet.kt │ │ ├── TwoFactorResetBottomSheet.kt │ │ ├── WalletDeleteBottomSheet.kt │ │ ├── WalletRenameBottomSheet.kt │ │ └── WatchOnlySettingsCredentialsBottomSheet.kt │ │ ├── sideeffects │ │ ├── Biometrics.kt │ │ ├── Dialog.kt │ │ └── OpenBrowser.kt │ │ ├── theme │ │ ├── Color.kt │ │ ├── Theme.kt │ │ └── Type.kt │ │ ├── utils │ │ ├── Animations.kt │ │ ├── Containers.kt │ │ ├── DecimalFormatter.kt │ │ ├── Keyboard.kt │ │ ├── Modifiers.kt │ │ ├── Resources.kt │ │ ├── ScreenSizeInfo.kt │ │ ├── Semantics.kt │ │ ├── SetupScreen.kt │ │ ├── SideEffects.kt │ │ └── TextField.kt │ │ └── views │ │ ├── DataListItem.kt │ │ ├── LightningInfo.kt │ │ ├── PinView.kt │ │ └── WalletListItem.kt │ ├── desktopMain │ └── kotlin │ │ └── com │ │ └── blockstream │ │ └── compose │ │ ├── components │ │ ├── CameraView.desktop.kt │ │ ├── Rive.desktop.kt │ │ └── VideoSurface.desktop.kt │ │ ├── di │ │ └── KoinDesktop.kt │ │ ├── dialogs │ │ └── AppRateDialog.desktop.kt │ │ ├── managers │ │ └── PlatformManager.desktop.kt │ │ ├── sideeffects │ │ └── Biometrics.desktop.kt │ │ ├── theme │ │ └── Theme.desktop.kt │ │ └── utils │ │ ├── Resources.desktop.kt │ │ ├── ScreenSizeInfo.desktop.kt │ │ └── Semantics.desktop.kt │ └── iosMain │ └── kotlin │ ├── MainViewController.kt │ └── com │ └── blockstream │ └── compose │ ├── components │ ├── CameraView.ios.kt │ ├── Rive.ios.kt │ └── VideoSurface.ios.kt │ ├── di │ └── KoiniOS.kt │ ├── dialogs │ └── AppRateDialog.ios.kt │ ├── managers │ └── PlatformManager.ios.kt │ ├── sideeffects │ └── Biometrics.ios.kt │ ├── theme │ └── Theme.ios.kt │ └── utils │ ├── Resources.ios.kt │ ├── ScreenSizeInfo.ios.kt │ └── Semantics.ios.kt ├── contrib ├── Dockerfile ├── assetlinks.json ├── blockstream_keys.txt ├── bullseye_deps.sh ├── entrypoint.sh ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew └── sign_assembled.sh ├── data ├── .gitignore ├── build.gradle.kts └── src │ ├── androidDeviceTest │ └── kotlin │ │ └── com │ │ └── blockstream │ │ └── green │ │ └── data │ │ └── ExampleInstrumentedTest.kt │ ├── androidHostTest │ └── kotlin │ │ └── com │ │ └── blockstream │ │ └── green │ │ └── data │ │ └── ExampleUnitTest.kt │ ├── androidMain │ └── AndroidManifest.xml │ ├── commonMain │ └── kotlin │ │ └── com │ │ └── blockstream │ │ └── green │ │ └── data │ │ ├── DataModule.kt │ │ ├── GreenWebooksHttpClient.kt │ │ ├── config │ │ └── AppInfo.kt │ │ ├── json │ │ └── DefaultJson.kt │ │ ├── meld │ │ ├── MeldHttpClient.kt │ │ ├── MeldModule.kt │ │ ├── MeldRepository.kt │ │ └── data │ │ │ ├── BuyDefaultValues.kt │ │ │ ├── CryptoQuoteRequest.kt │ │ │ ├── CryptoWidget.kt │ │ │ ├── CryptoWidgetRequest.kt │ │ │ ├── LimitsResponse.kt │ │ │ ├── QuoteResponse.kt │ │ │ ├── QuotesResponse.kt │ │ │ ├── Resources.kt │ │ │ ├── SessionData.kt │ │ │ └── TransactionsResponse.kt │ │ └── notifications │ │ ├── NotificationsModule.kt │ │ ├── NotificationsRepository.kt │ │ ├── datasource │ │ └── NotificationsRemoteDataSource.kt │ │ └── models │ │ ├── NotificationData.kt │ │ ├── NotificationType.kt │ │ └── RegisterDeviceRequest.kt │ └── commonTest │ └── kotlin │ └── MeldRepositoryTest.kt ├── desktopApp ├── .gitignore ├── build.gradle.kts └── src │ └── desktopMain │ └── kotlin │ └── com │ └── blockstream │ └── green │ └── desktop │ ├── DevMain.kt │ └── Main.kt ├── docs └── QATester.md ├── domain ├── .gitignore ├── build.gradle.kts └── src │ ├── androidDeviceTest │ └── kotlin │ │ └── com │ │ └── blockstream │ │ └── green │ │ └── utils │ │ └── ExampleInstrumentedTest.kt │ ├── androidHostTest │ └── kotlin │ │ └── com │ │ └── blockstream │ │ └── green │ │ └── utils │ │ └── ExampleUnitTest.kt │ ├── androidMain │ └── AndroidManifest.xml │ └── commonMain │ └── kotlin │ └── com │ └── blockstream │ └── green │ └── domain │ ├── DomainModule.kt │ ├── base │ ├── NetworkBoundInMemoryUseCase.kt │ ├── NetworkBoundUseCase.kt │ ├── NetworkResultUseCase.kt │ └── Result.kt │ └── notifications │ ├── NotificationModule.kt │ └── RegisterFCMToken.kt ├── fastlane ├── Appfile ├── Fastfile ├── Matchfile ├── Pluginfile └── README.md ├── gdk ├── .gitignore ├── build.gradle.kts ├── consumer-rules.pro ├── fetch_android_binaries.sh ├── prepare_gdk_clang.sh └── src │ └── main │ └── AndroidManifest.xml ├── gms ├── .gitignore ├── _google-services.json ├── build.gradle.kts ├── consumer-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── blockstream │ └── gms │ ├── FirebaseImpl.kt │ ├── GooglePlayImpl.kt │ ├── InstallReferrerImpl.kt │ ├── ZendeskSdkAndroid.kt │ ├── di │ └── GmsModule.kt │ └── services │ └── FirebaseMessagingService.kt ├── gradle.properties ├── gradle ├── libs.versions.toml ├── verification-metadata.xml └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── hardware ├── .gitignore ├── build.gradle.kts ├── consumer-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ ├── blockstream │ │ └── Extensions.kt │ │ ├── btchip │ │ ├── BTChipConstants.java │ │ ├── BTChipDongle.java │ │ ├── BTChipException.java │ │ ├── BitcoinTransaction.java │ │ ├── comm │ │ │ ├── BTChipTransport.java │ │ │ ├── Dump.java │ │ │ ├── GattCallback.java │ │ │ ├── GattUtils.java │ │ │ ├── LedgerDeviceBLE.java │ │ │ ├── LedgerException.java │ │ │ ├── LedgerWrapper.java │ │ │ └── android │ │ │ │ ├── BTChipTransportAndroid.java │ │ │ │ ├── BTChipTransportAndroidHID.java │ │ │ │ └── BTChipTransportAndroidWinUSB.java │ │ └── utils │ │ │ ├── BufferUtils.java │ │ │ ├── CoinFormatUtils.java │ │ │ ├── Dump.java │ │ │ ├── FutureUtils.java │ │ │ ├── KeyUtils.java │ │ │ ├── SignatureUtils.java │ │ │ └── VarintUtils.java │ │ ├── greenaddress │ │ └── greenbits │ │ │ └── wallets │ │ │ ├── BTChipHWWallet.java │ │ │ ├── LedgerBLEAdapter.java │ │ │ └── TrezorHWWallet.java │ │ └── satoshilabs │ │ └── trezor │ │ ├── Trezor.java │ │ └── protobuf │ │ ├── TrezorMessage.java │ │ └── TrezorType.java │ └── res │ └── drawable │ ├── blockstream_jade_device.xml │ ├── ic_blockstream.xml │ ├── ic_ledger.xml │ ├── ic_trezor.xml │ ├── ledger_device.xml │ └── trezor_device.xml ├── iosApp ├── Configuration │ └── Config.xcconfig ├── Gemfile ├── Gemfile.lock ├── iosApp.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── swiftpm │ │ └── Package.resolved └── iosApp │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ └── app-icon-1024.png │ ├── Contents.json │ └── background.colorset │ │ └── Contents.json │ ├── ContentView.swift │ ├── Info.plist │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ └── iOSApp.swift ├── jade ├── .gitignore ├── build.gradle.kts ├── consumer-rules.pro └── src │ ├── androidInstrumentedTest │ └── kotlin │ │ └── com │ │ └── blockstream │ │ └── jade │ │ └── data │ │ └── InstrumentedTest.kt │ ├── androidMain │ ├── AndroidManifest.xml │ └── kotlin │ │ └── com │ │ └── blockstream │ │ └── jade │ │ ├── JadeApi.android.kt │ │ ├── JadeInterface.android.kt │ │ └── connection │ │ └── JadeUsbConnection.kt │ ├── androidUnitTest │ └── kotlin │ │ └── com │ │ └── blockstream │ │ └── jade │ │ └── data │ │ ├── JadeSerializationTest.kt │ │ └── JadeVersionTest.kt │ └── commonMain │ └── kotlin │ └── com │ └── blockstream │ └── jade │ ├── Constants.kt │ ├── HttpRequestHandler.kt │ ├── JadeAPI.kt │ ├── JadeInterface.kt │ ├── Loggable.kt │ ├── api │ ├── Auth.kt │ ├── BlindingFactor.kt │ ├── BlindingKey.kt │ ├── Commitment.kt │ ├── Entropy.kt │ ├── Error.kt │ ├── Handshake.kt │ ├── HttpRequest.kt │ ├── JadeSerializer.kt │ ├── Log.kt │ ├── Logout.kt │ ├── MasterBlindingKey.kt │ ├── Ota.kt │ ├── OtaComplete.kt │ ├── OtaData.kt │ ├── Pin.kt │ ├── ReceiveAddress.kt │ ├── Request.kt │ ├── Response.kt │ ├── SharedNonce.kt │ ├── SignAttestation.kt │ ├── SignMessage.kt │ ├── SignTx.kt │ ├── Signature.kt │ ├── TxInput.kt │ ├── VersionInfo.kt │ └── Xpub.kt │ ├── connection │ ├── JadeBleConnection.kt │ └── JadeConnection.kt │ ├── data │ ├── ChangeOutput.kt │ ├── JadeError.kt │ ├── JadeNetworks.kt │ ├── JadeState.kt │ ├── JadeVersion.kt │ └── SignedTransactionInputs.kt │ └── firmware │ ├── FirmwareInteraction.kt │ ├── HardwareQATester.kt │ └── JadeFirmwareManager.kt ├── keystore.properties.template ├── launch.sh ├── metadata └── en-US │ ├── full_description.txt │ ├── images │ ├── icon.png │ └── phoneScreenshots │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ └── 6.png │ ├── short_description.txt │ └── title.txt ├── network ├── .gitignore ├── build.gradle.kts └── src │ ├── androidDeviceTest │ └── kotlin │ │ └── com │ │ └── blockstream │ │ └── green │ │ ├── network │ │ └── ExampleInstrumentedTest.kt │ │ └── utils │ │ └── ExampleInstrumentedTest.kt │ ├── androidHostTest │ └── kotlin │ │ └── com │ │ └── blockstream │ │ └── green │ │ ├── network │ │ └── ExampleUnitTest.kt │ │ └── utils │ │ └── ExampleUnitTest.kt │ ├── androidMain │ └── AndroidManifest.xml │ └── commonMain │ └── kotlin │ └── com │ └── blockstream │ └── green │ └── network │ └── AppHttpClient.kt ├── no-gms ├── .gitignore ├── build.gradle.kts └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── blockstream │ └── gms │ └── di │ └── GmsModule.kt ├── prepare_fdroid.sh ├── settings.gradle.kts ├── tag_release.sh ├── ui-common ├── .gitignore ├── build.gradle.kts └── src │ ├── androidMain │ ├── AndroidManifest.xml │ └── kotlin │ │ └── com │ │ └── blockstream │ │ └── ui │ │ └── navigation │ │ └── bottomsheet │ │ └── BottomSheetNavigator.android.kt │ ├── commonMain │ └── kotlin │ │ └── com │ │ └── blockstream │ │ └── ui │ │ ├── common │ │ └── OnScreenFocus.kt │ │ ├── components │ │ ├── GradientEdgeBox.kt │ │ ├── GreenArrow.kt │ │ ├── GreenCircle.kt │ │ ├── GreenColumn.kt │ │ ├── GreenGradient.kt │ │ ├── GreenRow.kt │ │ ├── GreenSpacer.kt │ │ └── GreenSwitch.kt │ │ ├── events │ │ └── Event.kt │ │ ├── models │ │ └── BaseViewModel.kt │ │ ├── navigation │ │ ├── AppBarState.kt │ │ ├── AppNavigationDrawer.kt │ │ ├── Result.kt │ │ ├── Route.kt │ │ ├── bottomsheet │ │ │ ├── BottomSheetNavigator.kt │ │ │ ├── ModalBottomSheetLayout.kt │ │ │ └── NavGraphBuilder.kt │ │ └── dialogs │ │ │ └── GenericDialog.kt │ │ ├── sideeffects │ │ └── SideEffect.kt │ │ └── utils │ │ ├── Conditionals.kt │ │ └── PaddingValues.kt │ ├── desktopMain │ └── kotlin │ │ └── com │ │ └── blockstream │ │ └── ui │ │ └── navigation │ │ └── bottomsheet │ │ └── BottomSheetNavigator.desktop.kt │ └── iosMain │ └── kotlin │ └── com │ └── blockstream │ └── ui │ └── navigation │ └── bottomsheet │ └── BottomSheetNavigator.ios.kt ├── update_dependency_verification.sh └── utils ├── .gitignore ├── build.gradle.kts └── src ├── androidDeviceTest └── kotlin │ └── com │ └── blockstream │ └── green │ └── utils │ └── ExampleInstrumentedTest.kt ├── androidHostTest └── kotlin │ └── com │ └── blockstream │ └── green │ └── utils │ └── ExampleUnitTest.kt ├── androidMain └── AndroidManifest.xml └── commonMain └── kotlin └── com └── blockstream └── green └── utils └── Loggable.kt /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Guidelines for contributions to Green bitcoin wallet for Android 2 | 3 | If you want to contribute to the project, please refer to the following guidelines. 4 | 5 | #### Checklist before opening an issue 6 | 7 | * Issue is reproducible; 8 | 9 | * There aren't pending pull requests addressing the issue; 10 | 11 | * Issue reproduced on latest master branch or latest stable release; 12 | 13 | * Issue is not tracked already. 14 | 15 | 16 | #### Pull Requests 17 | 18 | * Pull request that involve GUI changes must contain screenshots in the description 19 | 20 | * Before opening a pull request make sure the changes pass the CI 21 | 22 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem "fastlane" 4 | plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') 5 | eval_gemfile(plugins_path) if File.exist?(plugins_path) 6 | -------------------------------------------------------------------------------- /androidApp/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /androidApp/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /androidApp/src/main/ic_launcher_dev-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/ic_launcher_dev-playstore.png -------------------------------------------------------------------------------- /androidApp/src/main/java/com/blockstream/green/di/DatabaseModule.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.di 2 | 3 | import com.blockstream.green.database.AppDatabase 4 | import org.koin.dsl.module 5 | 6 | val databaseModule = module { 7 | single { 8 | AppDatabase.getInstance(get()).walletDao() 9 | } 10 | } -------------------------------------------------------------------------------- /androidApp/src/main/java/com/blockstream/green/settings/Constants.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.settings 2 | 3 | 4 | object Preferences { 5 | const val MIGRATED_V2_V3 = "pref_migrated_v2_v3" 6 | const val MIGRATED_V3_V4_1 = "pref_migrated_v3_v4" 7 | const val MIGRATED_V3_V4_2 = "pref_migrated_v3_v4_2" 8 | const val APP_DATA_VERSION = "app_data_version" 9 | } -------------------------------------------------------------------------------- /androidApp/src/main/java/com/blockstream/green/utils/Utils.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.utils 2 | 3 | import com.blockstream.green.BuildConfig 4 | 5 | val isDebug by lazy { BuildConfig.DEBUG } 6 | val isDevelopmentFlavor by lazy { BuildConfig.FLAVOR == "development" || BuildConfig.APPLICATION_ID.contains(".dev") } 7 | val isDevelopmentOrDebug by lazy { isDevelopmentFlavor || isDebug } 8 | val isProductionFlavor by lazy { !isDevelopmentFlavor } 9 | -------------------------------------------------------------------------------- /androidApp/src/main/res/drawable-hdpi/ic_shortcut_eye_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/drawable-hdpi/ic_shortcut_eye_close.png -------------------------------------------------------------------------------- /androidApp/src/main/res/drawable-hdpi/ic_stat_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/drawable-hdpi/ic_stat_green.png -------------------------------------------------------------------------------- /androidApp/src/main/res/drawable-mdpi/ic_shortcut_eye_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/drawable-mdpi/ic_shortcut_eye_close.png -------------------------------------------------------------------------------- /androidApp/src/main/res/drawable-mdpi/ic_stat_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/drawable-mdpi/ic_stat_green.png -------------------------------------------------------------------------------- /androidApp/src/main/res/drawable-xhdpi/ic_shortcut_eye_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/drawable-xhdpi/ic_shortcut_eye_close.png -------------------------------------------------------------------------------- /androidApp/src/main/res/drawable-xhdpi/ic_stat_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/drawable-xhdpi/ic_stat_green.png -------------------------------------------------------------------------------- /androidApp/src/main/res/drawable-xxhdpi/ic_shortcut_eye_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/drawable-xxhdpi/ic_shortcut_eye_close.png -------------------------------------------------------------------------------- /androidApp/src/main/res/drawable-xxhdpi/ic_stat_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/drawable-xxhdpi/ic_stat_green.png -------------------------------------------------------------------------------- /androidApp/src/main/res/drawable-xxxhdpi/ic_shortcut_eye_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/drawable-xxxhdpi/ic_shortcut_eye_close.png -------------------------------------------------------------------------------- /androidApp/src/main/res/drawable-xxxhdpi/ic_stat_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/drawable-xxxhdpi/ic_stat_green.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-anydpi-v26/ic_launcher_dev.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-anydpi-v26/ic_launcher_dev_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-hdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-hdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-hdpi/ic_launcher_dev.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-hdpi/ic_launcher_dev.webp -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-hdpi/ic_launcher_dev_background.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-hdpi/ic_launcher_dev_background.webp -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-hdpi/ic_launcher_dev_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-hdpi/ic_launcher_dev_foreground.webp -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-hdpi/ic_launcher_dev_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-hdpi/ic_launcher_dev_round.webp -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-mdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-mdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-mdpi/ic_launcher_dev.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-mdpi/ic_launcher_dev.webp -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-mdpi/ic_launcher_dev_background.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-mdpi/ic_launcher_dev_background.webp -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-mdpi/ic_launcher_dev_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-mdpi/ic_launcher_dev_foreground.webp -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-mdpi/ic_launcher_dev_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-mdpi/ic_launcher_dev_round.webp -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xhdpi/ic_launcher_dev.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xhdpi/ic_launcher_dev.webp -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xhdpi/ic_launcher_dev_background.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xhdpi/ic_launcher_dev_background.webp -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xhdpi/ic_launcher_dev_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xhdpi/ic_launcher_dev_foreground.webp -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xhdpi/ic_launcher_dev_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xhdpi/ic_launcher_dev_round.webp -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_dev.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_dev.webp -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_dev_background.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_dev_background.webp -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_dev_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_dev_foreground.webp -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_dev_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_dev_round.webp -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_dev.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_dev.webp -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_dev_background.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_dev_background.webp -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_dev_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_dev_foreground.webp -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_dev_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_dev_round.webp -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png -------------------------------------------------------------------------------- /androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /androidApp/src/main/res/raw/keep.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /androidApp/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | fcm_default_channel 5 | Notifications 6 | 7 | -------------------------------------------------------------------------------- /androidApp/src/main/res/values/theme.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /androidApp/src/main/res/xml/data_extraction_rules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /androidApp/src/main/res/xml/filepaths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /androidApp/src/main/res/xml/full_backup_content.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /androidApp/src/main/res/xml/network_security_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | greciphd2z3eo6bpnvd6mctxgfs4sslx4hyvgoiew4suoxgoquzl72yd.onion 6 | 7 | -------------------------------------------------------------------------------- /androidApp/src/test/java/com/blockstream/green/TestUtils.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green 2 | 3 | import java.io.InputStreamReader 4 | 5 | object TestUtils{ 6 | fun readFromFile(path: String): String { 7 | val reader = InputStreamReader(javaClass.classLoader?.getResourceAsStream(path)) 8 | val contents = reader.readText() 9 | reader.close() 10 | return contents 11 | } 12 | 13 | } -------------------------------------------------------------------------------- /androidApp/src/test/resources/gdk/authhandler/call.json: -------------------------------------------------------------------------------- 1 | {"action":"get_balance","device":{},"status":"call"} -------------------------------------------------------------------------------- /androidApp/src/test/resources/gdk/authhandler/done.json: -------------------------------------------------------------------------------- 1 | {"action":"get_balance","device":{},"result":{"btc":10524333},"status":"done"} -------------------------------------------------------------------------------- /androidApp/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker: -------------------------------------------------------------------------------- 1 | mock-maker-inline -------------------------------------------------------------------------------- /base-gms/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /base-gms/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /base-gms/src/main/java/com/blockstream/base/GooglePlay.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.base 2 | 3 | import android.app.Activity 4 | 5 | open class GooglePlay { 6 | open fun showInAppReviewDialog(activity: Activity, openBrowser: () -> Unit) { } 7 | } -------------------------------------------------------------------------------- /base-gms/src/main/java/com/blockstream/base/InstallReferrer.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.base 2 | 3 | import ly.count.android.sdk.ModuleAttribution 4 | 5 | // No-Op Install Referrer for F-Droid 6 | open class InstallReferrer { 7 | open fun handleReferrer(attribution: ModuleAttribution.Attribution, onComplete: (referrer: String) -> Unit) { 8 | onComplete.invoke("") 9 | } 10 | } -------------------------------------------------------------------------------- /common/src/androidMain/kotlin/com/blockstream/common/Gdk/GdkJsonConverter.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk 2 | 3 | import com.blockstream.green_gdk.GDK 4 | 5 | 6 | class GdkJsonConverter constructor(private val jsonConverter: JsonConverter): GDK.JSONConverter { 7 | override fun toJSONObject(jsonString: String?): Any? { 8 | return jsonConverter.toJSONObject(jsonString) 9 | } 10 | 11 | override fun toJSONString(jsonObject: Any?): String { 12 | return jsonConverter.toJSONString(jsonObject) 13 | } 14 | } -------------------------------------------------------------------------------- /common/src/androidMain/kotlin/com/blockstream/common/Platform.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common 2 | 3 | import okio.FileSystem 4 | 5 | actual fun platformFileSystem(): FileSystem { return FileSystem.SYSTEM } 6 | 7 | actual fun platformName() = "android" -------------------------------------------------------------------------------- /common/src/androidMain/kotlin/com/blockstream/common/extensions/BleExtensions.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.extensions 2 | 3 | import com.juul.kable.PeripheralBuilder 4 | import com.juul.kable.PlatformAdvertisement 5 | import com.juul.kable.ScannerBuilder 6 | 7 | 8 | actual fun ScannerBuilder.conflate() { 9 | preConflate = true 10 | } 11 | 12 | actual fun PeripheralBuilder.setupJade(mtu: Int) { 13 | onServicesDiscovered { 14 | requestMtu(mtu) 15 | } 16 | } 17 | 18 | actual fun PlatformAdvertisement.isBonded(): Boolean { 19 | return bondState == PlatformAdvertisement.BondState.Bonded 20 | } -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/arrow_bend_left_down.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/arrow_bend_right_up.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/arrow_down.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/arrow_down_left.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/arrow_fat_line_right.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/arrow_fat_right.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/arrow_left.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/arrow_line_down.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/arrow_line_up.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/arrow_right.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/arrow_square_out.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/arrow_u_left_down.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/arrow_up.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/arrow_up_right.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/arrows_down_up.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/caret_double_right.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/caret_down.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/check.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/check_bold.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/check_circle.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/clipboard.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/cloud.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/currency_btc.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/dots_three_vertical_bold.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/empty.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/export.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/facebook_logo.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/file.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/info.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/lightning.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/lightning_fill.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/lightning_thunder.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/list.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/lock_simple.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/magnifying_glass.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/magnifying_glass_plus.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/number_zero.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/pencil_simple.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/pencil_simple_line.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/plus_circle.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/share_network.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/sign_out.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/test_tube_fill.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/trash.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/wallet.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/x.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/x_bold.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/x_circle.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/drawable/x_logo.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/files/rive/account_archived.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/files/rive/account_archived.riv -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/files/rive/checkmark.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/files/rive/checkmark.riv -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/files/rive/create_wallet.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/files/rive/create_wallet.riv -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/files/rive/green_to_blockstream.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/files/rive/green_to_blockstream.riv -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/files/rive/jade_button.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/files/rive/jade_button.riv -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/files/rive/jade_plus_button.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/files/rive/jade_plus_button.riv -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/files/rive/jade_plus_power.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/files/rive/jade_plus_power.riv -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/files/rive/jade_plus_scroll.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/files/rive/jade_plus_scroll.riv -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/files/rive/jade_plus_update.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/files/rive/jade_plus_update.riv -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/files/rive/jade_power.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/files/rive/jade_power.riv -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/files/rive/jade_refresh.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/files/rive/jade_refresh.riv -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/files/rive/jade_scroll.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/files/rive/jade_scroll.riv -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/files/rive/jade_update.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/files/rive/jade_update.riv -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/files/rive/lightning_transaction.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/files/rive/lightning_transaction.riv -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/files/rive/rating_animation.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/files/rive/rating_animation.riv -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/files/rive/recovery_phrase.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/files/rive/recovery_phrase.riv -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/files/rive/rive_empty.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/files/rive/rive_empty.riv -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/files/rive/rocket.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/files/rive/rocket.riv -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/files/rive/stars.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/files/rive/stars.riv -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/files/rive/wallet.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/files/rive/wallet.riv -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/font/inter_bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/font/inter_bold.ttf -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/font/inter_extra_light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/font/inter_extra_light.ttf -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/font/inter_regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/font/inter_regular.ttf -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/font/inter_thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/font/inter_thin.ttf -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/font/monospace.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/font/monospace_bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/font/monospace_bold.ttf -------------------------------------------------------------------------------- /common/src/commonMain/composeResources/font/monospace_regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/composeResources/font/monospace_regular.ttf -------------------------------------------------------------------------------- /common/src/commonMain/database_local/com/blockstream/common/database/local/Events.sq: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS `events` ( 2 | `id` TEXT NOT NULL PRIMARY KEY 3 | ); 4 | 5 | insertEvent: 6 | INSERT OR REPLACE INTO events(id) 7 | VALUES (?); 8 | 9 | eventExists: 10 | SELECT EXISTS(SELECT id FROM events WHERE id = ? LIMIT 1); 11 | 12 | deleteEvents: 13 | DELETE FROM events; 14 | -------------------------------------------------------------------------------- /common/src/commonMain/database_local/migrations/1.sqm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/database_local/migrations/1.sqm -------------------------------------------------------------------------------- /common/src/commonMain/database_local/migrations/2.sqm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/common/src/commonMain/database_local/migrations/2.sqm -------------------------------------------------------------------------------- /common/src/commonMain/database_wallet/com/blockstream/common/database/wallet/DeprecatedEvents.sq: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS `events` ( 2 | `id` TEXT NOT NULL PRIMARY KEY 3 | ); 4 | 5 | insertEvent: 6 | INSERT OR REPLACE INTO events(id) 7 | VALUES (?); 8 | 9 | eventExists: 10 | SELECT EXISTS(SELECT id FROM events WHERE id = ? LIMIT 1); 11 | 12 | deleteEvents: 13 | DELETE FROM events; 14 | -------------------------------------------------------------------------------- /common/src/commonMain/database_wallet/migrations/1.sqm: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS `events` ( 2 | `id` TEXT NOT NULL PRIMARY KEY 3 | ); -------------------------------------------------------------------------------- /common/src/commonMain/database_wallet/migrations/2.sqm: -------------------------------------------------------------------------------- 1 | ALTER TABLE `wallet` ADD COLUMN `is_recovery_confirmed` INTEGER NOT NULL DEFAULT 1; -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/Platform.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common 2 | 3 | import okio.FileSystem 4 | 5 | expect fun platformFileSystem(): FileSystem 6 | 7 | expect fun platformName(): String -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/btcpricehistory/BitcoinPriceHistoryHttpClient.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.btcpricehistory 2 | 3 | import com.blockstream.green.data.config.AppInfo 4 | import com.blockstream.green.network.AppHttpClient 5 | 6 | class BitcoinPriceHistoryHttpClient(appInfo: AppInfo): AppHttpClient(enableLogging = appInfo.isDevelopmentOrDebug) -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/btcpricehistory/BitcoinPriceHistoryModule.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.btcpricehistory 2 | 3 | import com.blockstream.common.btcpricehistory.datasource.BitcoinPriceHistoryRemoteDataSource 4 | import org.koin.dsl.module 5 | 6 | val btcPriceHistoryModule = module { 7 | single { 8 | BitcoinPriceHistoryHttpClient(get()) 9 | } 10 | 11 | single { 12 | BitcoinPriceHistoryRemoteDataSource(get()) 13 | } 14 | 15 | single { 16 | BitcoinPriceHistoryRepository( 17 | remoteDataSource = get() 18 | ) 19 | } 20 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/btcpricehistory/BitcoinPriceHistoryRepository.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.btcpricehistory 2 | 3 | import com.blockstream.common.btcpricehistory.datasource.BitcoinPriceHistoryRemoteDataSource 4 | 5 | class BitcoinPriceHistoryRepository( 6 | private val remoteDataSource: BitcoinPriceHistoryRemoteDataSource 7 | ) { 8 | suspend fun getPriceHistory(currency: String) = remoteDataSource.getPriceHistory(currency) 9 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/btcpricehistory/model/BitcoinChartData.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.btcpricehistory.model 2 | 3 | data class BitcoinChartData( 4 | val currency: String, 5 | val currentPrice: Float, 6 | val lastRefreshed: Long, 7 | val prices: Map>>, 8 | ) 9 | 10 | -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/btcpricehistory/model/BitcoinChartPeriod.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.btcpricehistory.model 2 | 3 | import kotlinx.datetime.Clock 4 | import kotlin.time.Duration.Companion.days 5 | 6 | enum class BitcoinChartPeriod(val label: String, val days: Int) { 7 | ONE_DAY("1D", 1), 8 | ONE_WEEK("1W", 7), 9 | ONE_MONTH("1M", 30), 10 | ONE_YEAR("1Y", 365), 11 | FIVE_YEAR("5Y", 1825) 12 | } 13 | 14 | fun BitcoinChartPeriod.timeAgoInMillis(): Long { 15 | return (Clock.System.now() - this.days.days).toEpochMilliseconds() 16 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/btcpricehistory/model/BitcoinPriceGranularity.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.btcpricehistory.model 2 | 3 | enum class BitcoinPriceGranularity() { 4 | DAILY, 5 | MONTHLY, 6 | FULL 7 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/data/ExceptionWithSupportData.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.data 2 | 3 | class ExceptionWithSupportData(throwable: Throwable, val supportData: SupportData) : Exception(throwable) -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/data/HerokuResponse.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.data 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | 8 | @Serializable 9 | data class HerokuResponse( 10 | @SerialName("proposal_id") val proposalId: String? = null 11 | ): GreenJson(){ 12 | override fun kSerializer() = serializer() 13 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/data/LogoutReason.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.data 2 | 3 | enum class LogoutReason { 4 | USER_ACTION, CONNECTION_DISCONNECTED, AUTO_LOGOUT_TIMEOUT, DEVICE_DISCONNECTED 5 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/data/MenuEntry.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.data 2 | 3 | import kotlinx.serialization.Serializable 4 | 5 | @Serializable 6 | data class MenuEntry constructor( 7 | val key: Int = 0, 8 | val title: String, 9 | val iconRes: String? = null 10 | ) 11 | 12 | @Serializable 13 | data class MenuEntryList constructor( 14 | val list: List 15 | ) -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/data/Redact.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.data 2 | 3 | interface Redact 4 | -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/data/ScanResult.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.data 2 | 3 | import com.blockstream.common.gdk.data.BcurDecodedData 4 | import kotlinx.serialization.Serializable 5 | 6 | @Serializable 7 | data class ScanResult(val result: String, val bcur: BcurDecodedData? = null) { 8 | companion object { 9 | fun from(bcurDecodedData: BcurDecodedData) = 10 | ScanResult(result = bcurDecodedData.simplePayload, bcur = bcurDecodedData) 11 | } 12 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/data/TwoFactorSetupAction.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.data 2 | 3 | import kotlinx.serialization.Serializable 4 | 5 | @Serializable 6 | enum class TwoFactorSetupAction { 7 | SETUP, SETUP_EMAIL, RESET, CANCEL, DISPUTE, UNDO_DISPUTE 8 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/devices/ConnectionType.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.devices 2 | 3 | enum class ConnectionType { 4 | USB, BLUETOOTH, QR 5 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/devices/DeviceBrand.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.devices 2 | 3 | enum class DeviceBrand(val brand: String) { 4 | Blockstream("Blockstream"), Ledger("Ledger"), Trezor("Trezor"), Generic("Generic"); 5 | 6 | val isTrezor 7 | get() = this == Trezor 8 | 9 | val isLedger 10 | get() = this == Ledger 11 | 12 | val isJade 13 | get() = this == Blockstream 14 | 15 | val isGeneric 16 | get() = this == Generic 17 | 18 | val hasBleConnectivity 19 | get() = this != Trezor 20 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/events/EventWithSideEffect.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.events 2 | 3 | import com.blockstream.ui.events.Event 4 | import com.blockstream.ui.sideeffects.SideEffect 5 | 6 | interface EventWithSideEffect : Event { 7 | val sideEffect: SideEffect 8 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/extensions/BleExtensions.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.extensions 2 | 3 | import com.blockstream.common.managers.DeviceManager.Companion.JADE 4 | import com.juul.kable.PeripheralBuilder 5 | import com.juul.kable.PlatformAdvertisement 6 | import com.juul.kable.ScannerBuilder 7 | 8 | 9 | expect fun ScannerBuilder.conflate() 10 | 11 | expect fun PeripheralBuilder.setupJade(mtu: Int) 12 | 13 | expect fun PlatformAdvertisement.isBonded(): Boolean 14 | 15 | val PlatformAdvertisement.isJade 16 | get() = uuids.firstOrNull()?.toString() == JADE -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/extensions/ConditionalExtensions.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.extensions 2 | 3 | inline fun Boolean.ifTrue(block: (Boolean) -> Unit): Boolean { 4 | if(this) { 5 | block(this) 6 | } 7 | return this 8 | } 9 | 10 | inline fun Boolean.ifFalse(block: (Boolean) -> Unit): Boolean { 11 | if(!this) { 12 | block(this) 13 | } 14 | return this 15 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/extensions/LinkedHashMapExtensions.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.extensions 2 | 3 | fun MutableMap.toSortedLinkedHashMap(comparator: Comparator): LinkedHashMap { 4 | val sorted = linkedMapOf() 5 | 6 | keys.sortedWith(comparator).forEach { k -> 7 | get(k)?.also { v -> 8 | sorted[k] = v 9 | } 10 | } 11 | 12 | return sorted 13 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/extensions/List.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.extensions 2 | 3 | fun List.indexOfOrNull(element: E): Int? = indexOf(element).takeIf { it != -1 } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/fcm/Firebase.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.fcm 2 | 3 | import com.blockstream.green.utils.Loggable 4 | 5 | open class Firebase { 6 | open fun initialize() { } 7 | 8 | companion object: Loggable() 9 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/Accounts.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | import kotlinx.serialization.SerialName 4 | import kotlinx.serialization.Serializable 5 | 6 | 7 | @Serializable 8 | data class Accounts( 9 | @SerialName("subaccounts") val accounts: List, 10 | ) -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/BcurEncodedData.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | @Serializable 8 | data class BcurEncodedData( 9 | @SerialName("parts") val parts: List, 10 | ): GreenJson(){ 11 | override fun kSerializer() = serializer() 12 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/BlindedScripts.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | @Serializable 8 | data class BlindedScripts( 9 | @SerialName("script") val script: String? = null, 10 | @SerialName("pubkey") val pubkey: String? = null, 11 | ): GreenJson() { 12 | 13 | override fun kSerializer() = serializer() 14 | } 15 | -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/Block.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | import kotlinx.serialization.SerialName 4 | import kotlinx.serialization.Serializable 5 | 6 | @Serializable 7 | data class Block constructor( 8 | @SerialName("block_hash") val hash: String? = null, 9 | @SerialName("block_height") val height: Long, 10 | @SerialName("initial_timestamp") val timestamp: Long = 0 11 | ) -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/CreateSwapTransaction.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | @Serializable 8 | data class CreateSwapTransaction constructor( 9 | @SerialName("liquidex_v0") val liquiDexV0: LiquiDexV0, 10 | ) : GreenJson() { 11 | override fun kSerializer() = serializer() 12 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/DeviceSupportsAntiExfilProtocol.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | 4 | enum class DeviceSupportsAntiExfilProtocol { 5 | None, Optional, Mandatory; 6 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/DeviceSupportsLiquid.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | 4 | enum class DeviceSupportsLiquid { 5 | None, Lite, Full; 6 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/EncryptWithPin.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | @Serializable 8 | data class EncryptWithPin constructor( 9 | var networkInjected: Network? = null, 10 | @SerialName("pin_data") val pinData: PinData, 11 | ): GreenJson() { 12 | override fun kSerializer() = serializer() 13 | 14 | val network 15 | get() = networkInjected!! 16 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/FeeEstimation.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | @Serializable 8 | data class FeeEstimation( 9 | @SerialName("fees") val fees: List 10 | ) : GreenJson() { 11 | override fun kSerializer() = serializer() 12 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/LiquiDexList.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | 8 | @Serializable 9 | data class LiquiDexV0List( 10 | @SerialName("proposals") val proposals: List, 11 | ) : GreenJson() { 12 | override fun kSerializer() = serializer() 13 | } 14 | -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/LiquidAssets.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | import com.blockstream.common.serializers.Base64Serializer 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | @Serializable 8 | data class LiquidAssets( 9 | @SerialName("assets") val assets: Map? = null, 10 | @SerialName("icons") val icons: Map? = null, 11 | ) -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/PendingTransaction.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | import com.blockstream.common.TransactionSegmentation 4 | import com.blockstream.common.gdk.params.CreateTransactionParams 5 | 6 | data class PendingTransaction constructor( 7 | val params: CreateTransactionParams, 8 | val transaction: CreateTransaction, 9 | val segmentation: TransactionSegmentation 10 | ) -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/PreviousAddresses.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | 8 | @Serializable 9 | data class PreviousAddresses( 10 | @SerialName("last_pointer") val lastPointer: Int? = null, 11 | @SerialName("list") val addresses: List
= listOf(), 12 | ): GreenJson(){ 13 | 14 | override fun kSerializer() = serializer() 15 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/ProxySettings.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | import kotlinx.serialization.SerialName 4 | import kotlinx.serialization.Serializable 5 | 6 | @Serializable 7 | data class ProxySettings constructor( 8 | @SerialName("proxy") val proxy: String? = null, 9 | @SerialName("use_tor") val tor: Boolean? = false, 10 | ) -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/Psbt.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | @Serializable 8 | data class Psbt constructor( 9 | @SerialName("blinding_nonces") val blindingNonces: List? = null, 10 | @SerialName("psbt") val psbt: String, // in base64 11 | ) : GreenJson() { 12 | override fun keepJsonElement() = true 13 | override fun kSerializer() = serializer() 14 | } 15 | -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/RsaVerify.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.Serializable 5 | 6 | @Serializable 7 | data class RsaVerify( 8 | val result: Boolean? = null, 9 | val error: String? = null, 10 | ) : GreenJson() { 11 | override fun kSerializer() = serializer() 12 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/SignMessage.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | @Serializable 8 | data class SignMessage( 9 | @SerialName("signature") val signature: String, 10 | ): GreenJson(){ 11 | 12 | override fun kSerializer() = serializer() 13 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/SubaccountEvent.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | import kotlinx.serialization.SerialName 4 | import kotlinx.serialization.Serializable 5 | 6 | @Serializable 7 | data class SubaccountEvent( 8 | @SerialName("pointer") val pointer: Int = 0, 9 | @SerialName("event_type") val eventType: String = "", 10 | ) { 11 | val isSynced: Boolean 12 | get() = eventType == "synced" 13 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/TickerEvent.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | import kotlinx.serialization.SerialName 4 | import kotlinx.serialization.Serializable 5 | 6 | @Serializable 7 | data class TickerEvent( 8 | @SerialName("exchange") val exchange: String? = null, 9 | @SerialName("currency") val currency: String? = null, 10 | @SerialName("rate") val rate: String? = null, 11 | ) -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/TorEvent.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | import kotlinx.serialization.SerialName 4 | import kotlinx.serialization.Serializable 5 | 6 | @Serializable 7 | data class TorEvent constructor( 8 | @SerialName("progress") val progress: Int, 9 | @SerialName("summary") val summary: String? = null, 10 | @SerialName("tag") val tag: String? = null, 11 | ) -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/TransactionEvent.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | import kotlinx.serialization.SerialName 4 | import kotlinx.serialization.Serializable 5 | 6 | @Serializable 7 | data class TransactionEvent( 8 | @SerialName("subaccounts") val subaccounts: List, 9 | // Not used in the App 10 | // @SerialName("txhash") val txHash: String? = null, // singlesig sends an event without txhash 11 | @SerialName("satoshi") val satoshi: Long? = null, 12 | @SerialName("type") val type: String? = null, 13 | ) -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/Transactions.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.KSerializer 5 | import kotlinx.serialization.SerialName 6 | import kotlinx.serialization.Serializable 7 | 8 | 9 | @Serializable 10 | data class Transactions( 11 | @SerialName("transactions") val transactions: List = listOf(), 12 | ): GreenJson() { 13 | override fun keepJsonElement() = true 14 | 15 | override fun kSerializer(): KSerializer = serializer() 16 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/TwoFactorReset.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | @Serializable 8 | data class TwoFactorReset constructor( 9 | @SerialName("is_active") val isActive: Boolean? = null, 10 | @SerialName("days_remaining") val daysRemaining: Int = 0, 11 | @SerialName("is_disputed") val isDisputed: Boolean? = null 12 | ) : GreenJson(){ 13 | override fun kSerializer() = serializer() 14 | } 15 | -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/ValidateAddressees.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | import kotlinx.serialization.json.JsonObject 7 | 8 | @Serializable 9 | data class ValidateAddressees constructor( 10 | @SerialName("addressees") val addressees: List, 11 | @SerialName("errors") val errors: List? = null, 12 | @SerialName("is_valid") val isValid: Boolean, 13 | ): GreenJson() { 14 | override fun kSerializer() = serializer() 15 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/data/WalletEvents.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.data 2 | 3 | enum class WalletEvents { 4 | ARCHIVED_ACCOUNT, APP_REVIEW; 5 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/device/BlindingFactorsResult.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.device 2 | 3 | class BlindingFactorsResult constructor( 4 | val assetblinders: MutableList, 5 | val amountblinders: MutableList 6 | ) { 7 | constructor(capacity: Int) : this( 8 | assetblinders = ArrayList(capacity), 9 | amountblinders = ArrayList(capacity) 10 | ) 11 | 12 | fun append(assetblinder: String, amountblinder: String) { 13 | assetblinders.add(assetblinder) 14 | amountblinders.add(amountblinder) 15 | } 16 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/device/SignMessageResult.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.device 2 | 3 | data class SignMessageResult constructor(val signature: String, val signerCommitment: String?) -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/device/SignTransactionResult.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.device 2 | 3 | data class SignTransactionResult(val signatures: List, val signerCommitments: List?) -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/events/GenericEvent.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.events 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.datetime.Clock 5 | import kotlinx.serialization.KSerializer 6 | import kotlinx.serialization.Serializable 7 | 8 | // deviceId creates uniqueness, else just timestamp can be reversed 9 | @Serializable 10 | data class GenericEvent constructor(val deviceId: String, val timestamp: Long = Clock.System.now().toEpochMilliseconds()): GreenJson() { 11 | override fun kSerializer(): KSerializer = serializer() 12 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/events/JadeGenuineCheck.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.events 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.KSerializer 5 | import kotlinx.serialization.Serializable 6 | 7 | @Serializable 8 | data class JadeGenuineCheck(val jadeId: String): GreenJson() { 9 | override fun kSerializer(): KSerializer = serializer() 10 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/params/AssetsParams.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.params 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | 8 | @Serializable 9 | data class AssetsParams( 10 | @SerialName("assets") val assets: Boolean, 11 | @SerialName("icons") val icons: Boolean, 12 | @SerialName("refresh") val refresh: Boolean, 13 | ) : GreenJson() { 14 | override fun kSerializer() = serializer() 15 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/params/BcurDecodeParams.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.params 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | @Serializable 8 | data class BcurDecodeParams constructor( 9 | @SerialName("part") val part: String 10 | ) : GreenJson() { 11 | 12 | override fun kSerializer() = serializer() 13 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/params/CredentialsParams.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.params 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | @Serializable 8 | data class CredentialsParams constructor( 9 | @SerialName("password") val password: String? = null 10 | ) : GreenJson() { 11 | override fun encodeDefaultsValues() = false 12 | 13 | override fun kSerializer() = serializer() 14 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/params/CsvParams.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.params 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | @Serializable 8 | data class CsvParams( 9 | @SerialName("value") val value: Int, 10 | ) : GreenJson() { 11 | 12 | override fun kSerializer() = serializer() 13 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/params/GetAssetsParams.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.params 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | 8 | @Serializable 9 | data class GetAssetsParams constructor( 10 | @SerialName("assets_id") val assets: List, 11 | ) : GreenJson() { 12 | override fun kSerializer() = serializer() 13 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/params/InitConfig.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.params 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | @Serializable 8 | data class InitConfig constructor( 9 | @SerialName("datadir") val datadir: String, 10 | @SerialName("log_level") val logLevel: String = "none", 11 | @SerialName("optimize_expired_csv") val optimizeExpiredCsv: Boolean = true 12 | ) : GreenJson() { 13 | 14 | override fun kSerializer() = serializer() 15 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/params/PreviousAddressParams.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.params 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | 8 | @Serializable 9 | data class PreviousAddressParams constructor( 10 | @SerialName("subaccount") val subaccount: Long, 11 | @SerialName("last_pointer") val lastPointer: Int? = null, 12 | ) : GreenJson() { 13 | 14 | override fun encodeDefaultsValues() = false 15 | 16 | override fun kSerializer() = serializer() 17 | } 18 | -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/params/ReceiveAddressParams.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.params 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | 8 | @Serializable 9 | data class ReceiveAddressParams( 10 | @SerialName("subaccount") val subaccount: Long, 11 | @SerialName("ignore_gap_limit") val ignoreGapLimit: Boolean = false, 12 | ) : GreenJson() { 13 | 14 | override fun encodeDefaultsValues() = false 15 | 16 | override fun kSerializer() = serializer() 17 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/params/SignMessageParams.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.params 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | @Serializable 8 | data class SignMessageParams constructor( 9 | @SerialName("address") val address: String, 10 | @SerialName("message") var message: String, 11 | ) : GreenJson() { 12 | override fun kSerializer() = serializer() 13 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/params/SubAccountsParams.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.params 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | @Serializable 8 | data class SubAccountsParams constructor( 9 | @SerialName("refresh") val refresh: Boolean? = null, 10 | ) : GreenJson() { 11 | override fun encodeDefaultsValues() = false 12 | 13 | override fun kSerializer() = serializer() 14 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/params/UnspentOutputsPrivateKeyParams.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.params 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | 8 | @Serializable 9 | data class UnspentOutputsPrivateKeyParams constructor( 10 | @SerialName("private_key") val privateKey: String, 11 | @SerialName("password") val password: String? = null 12 | ) : GreenJson() { 13 | override fun encodeDefaultsValues() = false 14 | 15 | override fun kSerializer() = serializer() 16 | } 17 | -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/gdk/params/UpdateSubAccountParams.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.gdk.params 2 | 3 | import com.blockstream.common.gdk.GreenJson 4 | import kotlinx.serialization.SerialName 5 | import kotlinx.serialization.Serializable 6 | 7 | 8 | @Serializable 9 | data class UpdateSubAccountParams constructor( 10 | @SerialName("subaccount") val subaccount: Long, 11 | @SerialName("name") val name: String? = null, 12 | @SerialName("hidden") val hidden: Boolean? = null, 13 | ) : GreenJson() { 14 | override fun encodeDefaultsValues() = false 15 | 16 | override fun kSerializer() = serializer() 17 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/interfaces/JadeHttpRequestUrlValidator.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.interfaces 2 | 3 | // HttpRequestHandler is used for network calls during pinserver handshake 4 | // useful on TOR enabled sessions 5 | interface JadeHttpRequestUrlValidator { 6 | suspend fun unsafeUrlWarning(urls: List): Boolean 7 | suspend fun torWarning(): Boolean 8 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/lightning/GreenlightKeys.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.lightning 2 | 3 | import breez_sdk.GreenlightCredentials 4 | 5 | 6 | data class GreenlightKeys( 7 | val breezApiKey: String, 8 | val deviceKey: List?, 9 | val deviceCert: List? 10 | ) { 11 | fun toGreenlightCredentials(): GreenlightCredentials? { 12 | return if (deviceKey != null && deviceCert != null) { 13 | GreenlightCredentials( 14 | developerKey = deviceKey, 15 | developerCert = deviceCert, 16 | ) 17 | } else null 18 | } 19 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/looks/AmountAssetLook.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.looks 2 | 3 | import kotlinx.serialization.Serializable 4 | 5 | @Serializable 6 | data class AmountAssetLook constructor( 7 | val amount: String, 8 | val assetId: String, 9 | val ticker: String, 10 | val fiat: String? = null 11 | ){ 12 | val isOutgoing by lazy { amount.startsWith("-") } 13 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/looks/Color.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.looks 2 | 3 | enum class Color { 4 | HIGH, MEDIUM, LOW, GREEN, ORANGE, RED 5 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/looks/wallet/WatchOnlyLook.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.looks.wallet 2 | 3 | import com.blockstream.common.gdk.data.Account 4 | import com.blockstream.common.gdk.data.Network 5 | 6 | data class WatchOnlyLook constructor( 7 | val account: Account? = null, 8 | val network: Network? = null, 9 | val username: String? = null, 10 | val outputDescriptors: String? = null, 11 | val extendedPubkey: String? = null 12 | ) -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/managers/BluetoothManager.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.managers 2 | 3 | import kotlinx.coroutines.flow.StateFlow 4 | 5 | enum class BluetoothState { 6 | OFF, UNAVAILABLE, ADAPTER_NOT_AVAILABLE, PERMISSIONS_NOT_GRANTED, LOCATION_SERVICES_DISABLED, ON 7 | } 8 | 9 | expect class BluetoothManager { 10 | val bluetoothState: StateFlow 11 | 12 | fun permissionsGranted() 13 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/managers/NotificationManager.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.managers 2 | 3 | open class NotificationManager { 4 | open fun notificationPermissionGiven() {} 5 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/navigation/PopTo.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.navigation 2 | 3 | import kotlinx.serialization.Serializable 4 | 5 | @Serializable 6 | enum class PopTo { 7 | Root, Receive, OnOffRamps 8 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/sideeffects/OpenBrowserType.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.sideeffects 2 | 3 | enum class OpenBrowserType { 4 | IN_APP, OPEN_SYSTEM, MELD 5 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/sideeffects/SideEffectWithEvent.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.sideeffects 2 | 3 | import com.blockstream.ui.events.Event 4 | import com.blockstream.ui.sideeffects.SideEffect 5 | 6 | interface SideEffectWithEvent: SideEffect { 7 | val event: Event 8 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/utils/Date.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.utils 2 | 3 | import kotlinx.datetime.Clock 4 | import kotlinx.datetime.Instant 5 | import kotlin.time.DurationUnit 6 | import kotlin.time.toDuration 7 | 8 | 9 | expect fun Instant.formatMediumOnlyDate(): String 10 | expect fun Instant.formatMediumWithTime(): String 11 | expect fun Instant.formatFullWithTime(): String 12 | 13 | fun Instant.formatAuto(): String = 14 | if (plus(1L.toDuration(DurationUnit.DAYS)) > Clock.System.now()) { 15 | formatMediumWithTime() 16 | } else { 17 | formatMediumOnlyDate() 18 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/utils/KotlinUtils.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.utils 2 | 3 | inline fun ifNotNull(a: A?, b: B?, block: (A, B) -> R): R? { 4 | return if (a != null && b != null) { 5 | block(a, b) 6 | } else { 7 | null 8 | } 9 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/common/utils/WalletName.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.utils 2 | 3 | import com.blockstream.common.managers.SettingsManager 4 | 5 | fun generateWalletName(settingsManager: SettingsManager): String { 6 | return "My Wallet ${settingsManager.walletCounter().plus(1).takeIf { it > 1 } ?: ""}".trim() 7 | } -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/blockstream/domain/meld/MeldUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.domain.meld 2 | 3 | 4 | class MeldUseCase constructor( 5 | val createCryptoQuoteUseCase: CreateCryptoQuoteUseCase, 6 | val createCryptoWidgetUseCase: CreateCryptoWidgetUseCase, 7 | val defaultValuesUseCase: DefaultValuesUseCase 8 | ) -------------------------------------------------------------------------------- /common/src/iosMain/kotlin/com/blockstream/common/Platform.ios.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common 2 | 3 | import okio.FileSystem 4 | 5 | actual fun platformFileSystem(): FileSystem { return FileSystem.SYSTEM } 6 | 7 | actual fun platformName() = "ios" 8 | -------------------------------------------------------------------------------- /common/src/iosMain/kotlin/com/blockstream/common/extensions/BleExtensions.ios.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.extensions 2 | 3 | import com.juul.kable.PeripheralBuilder 4 | import com.juul.kable.PlatformAdvertisement 5 | import com.juul.kable.ScannerBuilder 6 | 7 | 8 | actual fun ScannerBuilder.conflate() { } 9 | actual fun PeripheralBuilder.setupJade(mtu: Int) { } 10 | actual fun PlatformAdvertisement.isBonded(): Boolean = true -------------------------------------------------------------------------------- /common/src/iosMain/kotlin/com/blockstream/common/managers/BluetoothManager.ios.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.managers 2 | 3 | import kotlinx.coroutines.flow.MutableStateFlow 4 | import kotlinx.coroutines.flow.StateFlow 5 | 6 | 7 | actual open class BluetoothManager { 8 | actual val bluetoothState: StateFlow = MutableStateFlow(BluetoothState.ON) 9 | actual fun permissionsGranted() { 10 | } 11 | } -------------------------------------------------------------------------------- /common/src/iosMain/kotlin/com/blockstream/common/managers/LocaleManager.ios.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.managers 2 | 3 | import androidx.compose.ui.text.intl.Locale 4 | import platform.Foundation.NSLocale 5 | import platform.Foundation.currentLocale 6 | import platform.Foundation.languageCode 7 | 8 | actual class LocaleManager { 9 | 10 | actual fun getLocale(): String? { 11 | return NSLocale.currentLocale.languageCode 12 | } 13 | 14 | actual fun setLocale(locale: String?) { 15 | // TODO 16 | } 17 | 18 | actual fun getCountry() : String? = Locale.current.region 19 | } 20 | -------------------------------------------------------------------------------- /common/src/jvmMain/kotlin/com/blockstream/common/Platform.jvm.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common 2 | 3 | import okio.FileSystem 4 | 5 | actual fun platformFileSystem(): FileSystem { return FileSystem.SYSTEM } 6 | 7 | actual fun platformName() = "desktop" 8 | -------------------------------------------------------------------------------- /common/src/jvmMain/kotlin/com/blockstream/common/extensions/BleExtensions.jvm.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.extensions 2 | 3 | import com.juul.kable.PeripheralBuilder 4 | import com.juul.kable.PlatformAdvertisement 5 | import com.juul.kable.ScannerBuilder 6 | 7 | 8 | actual fun ScannerBuilder.conflate() { } 9 | actual fun PeripheralBuilder.setupJade(mtu: Int) { 10 | } 11 | 12 | actual fun PlatformAdvertisement.isBonded(): Boolean { 13 | return true 14 | } -------------------------------------------------------------------------------- /common/src/jvmMain/kotlin/com/blockstream/common/managers/BluetoothManager.jvm.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.managers 2 | 3 | import kotlinx.coroutines.flow.MutableStateFlow 4 | import kotlinx.coroutines.flow.StateFlow 5 | 6 | actual open class BluetoothManager { 7 | actual val bluetoothState: StateFlow 8 | get() = MutableStateFlow(BluetoothState.UNAVAILABLE) 9 | 10 | actual fun permissionsGranted() { 11 | 12 | } 13 | } -------------------------------------------------------------------------------- /common/src/jvmMain/kotlin/com/blockstream/common/managers/LocaleManager.jvm.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.common.managers 2 | 3 | import java.util.Locale 4 | 5 | actual class LocaleManager { 6 | 7 | actual fun getLocale(): String? { 8 | return null 9 | } 10 | 11 | actual fun setLocale(locale: String?) { 12 | } 13 | 14 | actual fun getCountry() = Locale.getDefault().country 15 | } -------------------------------------------------------------------------------- /common/src/nativeInterop/cinterop/gdk.def: -------------------------------------------------------------------------------- 1 | headers = gdk.h wally_wrapper.h 2 | package = gdk 3 | staticLibraries = libgreen_gdk_full.a 4 | libraryPaths.ios_arm64 = src/libs/ios_arm64 5 | libraryPaths.ios_simulator_arm64 = src/libs/ios_simulator_arm64 6 | libraryPaths.ios_x64 = src/libs/ios_simulator_x86 7 | -------------------------------------------------------------------------------- /compose/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /compose/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/components/Banner.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.components 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.data.Banner 6 | import com.blockstream.compose.GreenPreview 7 | import com.blockstream.ui.components.GreenColumn 8 | 9 | @Composable 10 | @Preview 11 | fun BannerPreview() { 12 | GreenPreview { 13 | GreenColumn { 14 | Banner(Banner.preview1) 15 | Banner(Banner.preview2) 16 | Banner(Banner.preview3) 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/components/GreenArrow.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.components 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.ui.components.GreenArrow 6 | import com.blockstream.ui.components.GreenColumn 7 | import com.blockstream.compose.theme.GreenChromePreview 8 | 9 | 10 | @Composable 11 | @Preview 12 | fun GreenArrowPreview() { 13 | GreenChromePreview { 14 | GreenColumn { 15 | GreenArrow() 16 | GreenArrow(enabled = false) 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/dialogs/ArchivedAccountsDialog.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.dialogs 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.archived.ArchivedAccountsViewModelPreview 6 | import com.blockstream.compose.theme.GreenChromePreview 7 | 8 | 9 | @Composable 10 | @Preview 11 | fun ArchivedAccountsDialogPreview() { 12 | GreenChromePreview { 13 | ArchivedAccountsDialog( 14 | viewModel = ArchivedAccountsViewModelPreview.preview() 15 | ) { 16 | 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/dialogs/DenominationExchangeDialog.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.dialogs 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.settings.DenominationExchangeRateViewModelPreview 6 | import com.blockstream.compose.theme.GreenChromePreview 7 | 8 | 9 | @Composable 10 | @Preview 11 | fun DenominationExchangeDialogPreview() { 12 | GreenChromePreview { 13 | DenominationExchangeDialog( 14 | viewModel = DenominationExchangeRateViewModelPreview.preview() 15 | ) { 16 | 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/dialogs/TwoFactorCodeDialog.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.dialogs 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.gdk.data.AuthHandlerStatus 6 | import com.blockstream.compose.theme.GreenChromePreview 7 | 8 | @Composable 9 | @Preview 10 | fun TwoFactorCodeDialoggPreview() { 11 | GreenChromePreview { 12 | TwoFactorCodeDialog( 13 | AuthHandlerStatus(action = "tes", method = "sms", status = "", attemptsRemaining = 2) 14 | ) { _, _ -> 15 | 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/HomeScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.home.HomeViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Composable 9 | @Preview 10 | fun HomeScreenPreview() { 11 | GreenAndroidPreview { 12 | HomeScreen(viewModel = HomeViewModelPreview.previewEmpty()) 13 | } 14 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/LockScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.compose.GreenAndroidPreview 6 | 7 | 8 | @Composable 9 | @Preview 10 | fun LockScreenPreview() { 11 | GreenAndroidPreview { 12 | LockScreen() 13 | } 14 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/about/AboutScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.about 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.about.AboutViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Composable 9 | @Preview 10 | fun AboutScreenPreview() { 11 | GreenAndroidPreview { 12 | AboutScreen(viewModel = AboutViewModelPreview.preview()) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/add/Account2of3Screen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.add 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.add.Account2of3ViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Composable 9 | @Preview 10 | fun Account2of3ScreenPreview() { 11 | GreenAndroidPreview { 12 | Account2of3Screen(viewModel = Account2of3ViewModelPreview.preview()) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/add/ReviewAddAccountScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.add 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.add.ReviewAddAccountViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Composable 9 | @Preview 10 | fun ReviewAddAccountScreenPreview() { 11 | GreenAndroidPreview { 12 | ReviewAddAccountScreen(viewModel = ReviewAddAccountViewModelPreview.preview()) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/add/XpubScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.add 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.add.XpubViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Composable 9 | @Preview 10 | fun XpubScreenPreview() { 11 | GreenAndroidPreview { 12 | XpubScreen(viewModel = XpubViewModelPreview.preview()) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/archived/ArchivedAccountsScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.archived 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.archived.ArchivedAccountsViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | 9 | @Composable 10 | @Preview 11 | fun ArchivedAccountsScreenPreview() { 12 | GreenAndroidPreview { 13 | ArchivedAccountsScreen(viewModel = ArchivedAccountsViewModelPreview.preview()) 14 | } 15 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/devices/DeviceInfoScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.devices 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.devices.DeviceInfoViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | 9 | @Composable 10 | @Preview 11 | fun DeviceInfoScreenPreview() { 12 | GreenAndroidPreview { 13 | DeviceInfoScreen(DeviceInfoViewModelPreview.preview()) 14 | } 15 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/devices/DeviceListScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.devices 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.devices.DeviceListViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | 9 | @Composable 10 | @Preview 11 | fun DeviceListScreenPreview() { 12 | GreenAndroidPreview { 13 | DeviceListScreen(DeviceListViewModelPreview.preview()) 14 | } 15 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/devices/DeviceScanScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.devices 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.devices.DeviceScanViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | 9 | @Composable 10 | @Preview 11 | fun DeviceScanScreenPreview() { 12 | GreenAndroidPreview { 13 | DeviceScanScreen(DeviceScanViewModelPreview.preview()) 14 | } 15 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/devices/ImportPubKeyScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.devices 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.devices.ImportPubKeyViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | 9 | @Composable 10 | @Preview 11 | fun ImportPubKeyScreenPreview() { 12 | GreenAndroidPreview { 13 | ImportPubKeyScreen(ImportPubKeyViewModelPreview()) 14 | } 15 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/devices/JadeGenuineCheckScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.devices 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.devices.JadeGenuineCheckViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | 9 | @Composable 10 | @Preview 11 | fun JadeGenuineCheckScreenPreview() { 12 | GreenAndroidPreview { 13 | JadeGenuineCheckScreen(JadeGenuineCheckViewModelPreview.preview()) 14 | } 15 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/exchange/AccountExchangeScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.exchange 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.exchange.AccountExchangeViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Composable 9 | @Preview 10 | fun ExchangeScreenPreview() { 11 | GreenAndroidPreview { 12 | AccountExchangeScreen(viewModel = AccountExchangeViewModelPreview.preview()) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/exchange/BuyScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.exchange 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.exchange.BuyViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Composable 9 | @Preview 10 | fun BuyScreenPreview() { 11 | GreenAndroidPreview { 12 | BuyScreen(viewModel = BuyViewModelPreview.preview()) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/exchange/OnOffRampsScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.exchange 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.exchange.AccountExchangeViewModelPreview 6 | import com.blockstream.common.models.exchange.OnOffRampsViewModelPreview 7 | import com.blockstream.compose.GreenAndroidPreview 8 | 9 | @Composable 10 | @Preview 11 | fun OnOffRampsScreenPreview() { 12 | GreenAndroidPreview { 13 | OnOffRampsScreen(viewModel = OnOffRampsViewModelPreview.preview()) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/jade/JadePinViaQRScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.jade 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.SimpleGreenViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | 9 | @Composable 10 | @Preview 11 | fun JadePinViaQRScreenPreview() { 12 | GreenAndroidPreview { 13 | JadePinUnlockScreen(SimpleGreenViewModelPreview()) 14 | } 15 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/jade/JadeQRScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.jade 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.jade.JadeQRViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | 9 | @Composable 10 | @Preview 11 | fun QrPinUnlockScreenPreview() { 12 | GreenAndroidPreview { 13 | JadeQRScreen(JadeQRViewModelPreview.previewLightning()) 14 | } 15 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/lightning/LnUrlAuthScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.lightning 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.lightning.LnUrlAuthViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Composable 9 | @Preview 10 | fun LnUrlAuthScreenPreview() { 11 | GreenAndroidPreview { 12 | LnUrlAuthScreen(viewModel = LnUrlAuthViewModelPreview.preview()) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/lightning/LnUrlWithdrawScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.lightning 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.lightning.LnUrlWithdrawViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Composable 9 | @Preview 10 | fun LnUrlWithdrawScreenPreview() { 11 | GreenAndroidPreview { 12 | LnUrlWithdrawScreen(viewModel = LnUrlWithdrawViewModelPreview.preview()) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/lightning/RecoverFundsScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.lightning 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.lightning.RecoverFundsViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | 9 | @Composable 10 | @Preview 11 | fun RecoverFundsScreenPreview() { 12 | GreenAndroidPreview { 13 | RecoverFundsScreen(viewModel = RecoverFundsViewModelPreview.preview()) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/onboarding/SetupNewWalletScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.onboarding 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.onboarding.SetupNewWalletViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | 9 | @Composable 10 | @Preview 11 | fun SetupNewWalletScreenPreview() { 12 | GreenAndroidPreview { 13 | SetupNewWalletScreen(viewModel = SetupNewWalletViewModelPreview.preview()) 14 | } 15 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/onboarding/hardware/UseHardwareDeviceScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.onboarding.hardware 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.onboarding.hardware.UseHardwareDeviceViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Composable 9 | @Preview 10 | fun UseHardwareDeviceScreenPreview() { 11 | GreenAndroidPreview { 12 | UseHardwareDeviceScreen(viewModel = UseHardwareDeviceViewModelPreview.preview()) 13 | } 14 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/onboarding/watchonly/WatchOnlyNetworkScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.onboarding.watchonly 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.onboarding.watchonly.WatchOnlyNetworkViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Composable 9 | @Preview 10 | fun WatchOnlyNetworkScreenPreview() { 11 | GreenAndroidPreview { 12 | WatchOnlyNetworkScreen(viewModel = WatchOnlyNetworkViewModelPreview.preview()) 13 | } 14 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/onboarding/watchonly/WatchOnlyPolicyScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.onboarding.watchonly 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.onboarding.watchonly.WatchOnlyPolicyViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | 9 | @Composable 10 | @Preview 11 | fun WatchOnlyPolicyScreenPreview() { 12 | GreenAndroidPreview { 13 | WatchOnlyPolicyScreen(viewModel = WatchOnlyPolicyViewModelPreview.preview()) 14 | } 15 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/overview/AccountOverviewScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.overview 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.overview.AccountOverviewViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | 9 | @Composable 10 | @Preview 11 | fun AccountOverviewPreview() { 12 | GreenAndroidPreview { 13 | AccountOverviewScreen(viewModel = AccountOverviewViewModelPreview.create()) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/overview/SecurityScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.overview 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.overview.SecurityViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Preview 9 | @Composable 10 | fun PreviewSecurityScreen() { 11 | GreenAndroidPreview { 12 | SecurityScreen(viewModel = SecurityViewModelPreview.preview(isHardware = true)) 13 | } 14 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/overview/TransactScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.overview 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.overview.TransactViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Preview 9 | @Composable 10 | fun PreviewTransactScreen() { 11 | GreenAndroidPreview { 12 | TransactScreen(viewModel = TransactViewModelPreview.create()) 13 | } 14 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/promo/PromoScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.promo 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.promo.PromoViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Composable 9 | @Preview 10 | fun PromoScreenPreview() { 11 | GreenAndroidPreview { 12 | PromoScreen(viewModel = PromoViewModelPreview()) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/receive/ReceiveScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.receive 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.receive.ReceiveViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | 9 | @Composable 10 | @Preview 11 | fun ReceiveScreenPreview() { 12 | GreenAndroidPreview { 13 | ReceiveScreen(viewModel = ReceiveViewModelPreview.preview()) 14 | } 15 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/recovery/RecoveryCheckScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.recovery 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.recovery.RecoveryCheckViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | 9 | @Composable 10 | @Preview 11 | fun RecoveryCheckScreenPreview() { 12 | GreenAndroidPreview { 13 | RecoveryCheckScreen(viewModel = RecoveryCheckViewModelPreview.preview()) 14 | } 15 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/send/BumpScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.send 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.send.BumpViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | 9 | @Composable 10 | @Preview 11 | fun BumpScreenPreview() { 12 | GreenAndroidPreview { 13 | BumpScreen(viewModel = BumpViewModelPreview.preview()) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/send/RedepositScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.send 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.send.RedepositViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Composable 9 | @Preview 10 | fun RedepositScreenPreview() { 11 | GreenAndroidPreview { 12 | RedepositScreen(viewModel = RedepositViewModelPreview.preview()) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/send/SendScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.send 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.send.SendViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Composable 9 | @Preview 10 | fun SendScreenPreview() { 11 | GreenAndroidPreview { 12 | SendScreen(viewModel = SendViewModelPreview.preview(isLightning = true)) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/send/SweepScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.send 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.send.SweepViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Composable 9 | @Preview 10 | fun SweepScreenPreview() { 11 | GreenAndroidPreview { 12 | SweepScreen(viewModel = SweepViewModelPreview.preview()) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/settings/AppSettingsScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.settings 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.settings.AppSettingsViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Composable 9 | @Preview 10 | fun AppSettingsScreenPreview() { 11 | GreenAndroidPreview { 12 | AppSettingsScreen( 13 | viewModel = AppSettingsViewModelPreview.preview( 14 | true 15 | ) 16 | ) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/settings/WatchOnlyScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.settings 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.settings.WatchOnlyViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | 9 | @Composable 10 | @Preview 11 | fun WatchOnlyScreenAndroidPreview() { 12 | GreenAndroidPreview { 13 | WatchOnlyScreen(viewModel = WatchOnlyViewModelPreview.preview()) 14 | } 15 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/support/SupportScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.support 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.support.SupportViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | 9 | @Composable 10 | @Preview 11 | fun SupportScreenPreview() { 12 | GreenAndroidPreview { 13 | SupportScreen(viewModel = SupportViewModelPreview.preview()) 14 | } 15 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/screens/twofactor/ReEnable2FAScreen.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.screens.twofactor 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.twofactor.ReEnable2FAViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | 9 | @Composable 10 | @Preview 11 | fun ReEnable2FAScreenPreview() { 12 | GreenAndroidPreview { 13 | ReEnable2FAScreen(viewModel = ReEnable2FAViewModelPreview.preview()) 14 | } 15 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/sheets/AnalyticsBottomSheet.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.sheets 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.sheets.AnalyticsViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Composable 9 | @Preview 10 | fun AnalyticsBottomSheetPreview() { 11 | GreenAndroidPreview { 12 | AnalyticsBottomSheet( 13 | viewModel = AnalyticsViewModelPreview.preview(), 14 | onDismissRequest = { } 15 | ) 16 | } 17 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/sheets/AssetDetailsBottomSheet.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.sheets 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.sheets.AssetDetailsViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Composable 9 | @Preview 10 | fun AssetDetailsBottomSheetPreview() { 11 | GreenAndroidPreview { 12 | AssetDetailsBottomSheet( 13 | viewModel = AssetDetailsViewModelPreview.preview(), 14 | onDismissRequest = { } 15 | ) 16 | } 17 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/sheets/JadeFirmwareUpdateBottomSheet.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.sheets 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.sheets.JadeFirmwareUpdateViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Composable 9 | @Preview 10 | fun JadeFirmwareUpdateBottomSheetPreview() { 11 | GreenAndroidPreview { 12 | JadeFirmwareUpdateBottomSheet( 13 | viewModel = JadeFirmwareUpdateViewModelPreview.preview(), 14 | onDismissRequest = { } 15 | ) 16 | } 17 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/sheets/LightningNodeBottomSheet.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.sheets 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.sheets.LightningNodeViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Composable 9 | @Preview 10 | fun LightningNodeBottomSheetPreview() { 11 | GreenAndroidPreview { 12 | LightningNodeBottomSheet( 13 | viewModel = LightningNodeViewModelPreview.preview(), 14 | onDismissRequest = { } 15 | ) 16 | } 17 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/sheets/NewJadeConnectedBottomSheet.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.sheets 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.SimpleGreenViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | 9 | @Composable 10 | @Preview 11 | fun NewJadeConnectedBottomSheetPreview() { 12 | GreenAndroidPreview { 13 | NewJadeConnectedBottomSheet( 14 | viewModel = SimpleGreenViewModelPreview(), 15 | onDismissRequest = { } 16 | ) 17 | } 18 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/sheets/NoteBottomSheet.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.sheets 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.sheets.NoteViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Composable 9 | @Preview 10 | fun NoteBottomSheetPreview() { 11 | GreenAndroidPreview { 12 | NoteBottomSheet( 13 | viewModel = NoteViewModelPreview.preview(), 14 | onDismissRequest = {} 15 | ) 16 | } 17 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/sheets/PassphraseBottomSheet.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.sheets 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.SimpleGreenViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | 9 | @Composable 10 | @Preview 11 | fun PassphraseSheetPreview() { 12 | GreenAndroidPreview { 13 | PassphraseBottomSheet( 14 | viewModel = SimpleGreenViewModelPreview(), 15 | onDismissRequest = { } 16 | ) 17 | } 18 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/sheets/PinMatrixBottomSheet.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.sheets 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.SimpleGreenViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | 9 | @Composable 10 | @Preview 11 | fun PinMatrixSheetPreview() { 12 | GreenAndroidPreview { 13 | PinMatrixBottomSheet( 14 | viewModel = SimpleGreenViewModelPreview(), 15 | onDismissRequest = { } 16 | ) 17 | } 18 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/sheets/SecurityLevelBottomSheet.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.sheets 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.onboarding.SetupNewWalletViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Composable 9 | @Preview 10 | fun SecurityLevelBottomSheetPreview() { 11 | GreenAndroidPreview { 12 | SecurityLevelBottomSheet( 13 | viewModel = SetupNewWalletViewModelPreview(), 14 | onDismissRequest = { } 15 | ) 16 | } 17 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/sheets/TransactionDetailsBottomSheet.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.sheets 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.blockstream.common.models.sheets.TransactionDetailsViewModelPreview 6 | import com.blockstream.compose.GreenAndroidPreview 7 | 8 | @Composable 9 | @Preview 10 | fun TransactionDetailsBottomSheetPreview() { 11 | GreenAndroidPreview { 12 | TransactionDetailsBottomSheet( 13 | viewModel = TransactionDetailsViewModelPreview.preview(), 14 | onDismissRequest = { } 15 | ) 16 | } 17 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/utils/Resources.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.utils 2 | 3 | import android.graphics.BitmapFactory 4 | import androidx.compose.ui.graphics.asImageBitmap 5 | import androidx.compose.ui.graphics.painter.BitmapPainter 6 | import androidx.compose.ui.graphics.painter.Painter 7 | 8 | actual fun ByteArray?.toPainter(): Painter? { 9 | if(this != null) { 10 | try { 11 | return BitmapPainter(BitmapFactory.decodeByteArray(this, 0, this.size).asImageBitmap()) 12 | } catch (e: Exception) { 13 | e.printStackTrace() 14 | } 15 | } 16 | return null 17 | } -------------------------------------------------------------------------------- /compose/src/androidMain/kotlin/com/blockstream/compose/utils/Semantics.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.utils 2 | 3 | import androidx.compose.ui.ExperimentalComposeUiApi 4 | import androidx.compose.ui.Modifier 5 | import androidx.compose.ui.semantics.semantics 6 | import androidx.compose.ui.semantics.testTagsAsResourceId 7 | 8 | @OptIn(ExperimentalComposeUiApi::class) 9 | actual fun Modifier.compatTestTagsAsResourceId(): Modifier = semantics { 10 | testTagsAsResourceId = true 11 | } 12 | -------------------------------------------------------------------------------- /compose/src/androidMain/res/layout/rive.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /compose/src/androidMain/res/raw/rive_empty.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/compose/src/androidMain/res/raw/rive_empty.riv -------------------------------------------------------------------------------- /compose/src/commonMain/kotlin/com/blockstream/compose/components/CameraView.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.components 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.Modifier 5 | import com.blockstream.common.models.abstract.AbstractScannerViewModel 6 | 7 | 8 | @Composable 9 | expect fun CameraView( 10 | modifier: Modifier = Modifier, 11 | isFlashOn: Boolean = false, 12 | isDecodeContinuous: Boolean = true, 13 | showScanFromImage: Boolean = true, 14 | viewModel: AbstractScannerViewModel 15 | ) -------------------------------------------------------------------------------- /compose/src/commonMain/kotlin/com/blockstream/compose/components/Rive.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.components 2 | 3 | import androidx.compose.runtime.Composable 4 | 5 | enum class RiveAnimation { 6 | NONE, ROCKET, LIGHTNING_TRANSACTION, ACCOUNT_ARCHIVED, CHECKMARK, WALLET, RECOVERY_PHRASE, 7 | GREEN_TO_BLOCKSTREAM, CREATE_WALLET, JADE_BUTTON, JADE_SCROLL, JADE_POWER, JADE_UPDATE, JADE_PLUS_BUTTON, 8 | JADE_PLUS_SCROLL, JADE_PLUS_POWER, JADE_PLUS_UPDATE; 9 | } 10 | 11 | @Composable 12 | expect fun Rive(riveAnimation: RiveAnimation) -------------------------------------------------------------------------------- /compose/src/commonMain/kotlin/com/blockstream/compose/components/VideoSurface.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.components 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.Modifier 5 | 6 | 7 | @Composable 8 | expect fun VideoSurface(modifier: Modifier, videoUri: String) -------------------------------------------------------------------------------- /compose/src/commonMain/kotlin/com/blockstream/compose/dialogs/AppRateDialog.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.dialogs 2 | 3 | import androidx.compose.runtime.Composable 4 | import com.blockstream.common.models.GreenViewModel 5 | 6 | @Composable 7 | expect fun AppRateDialog(viewModel: GreenViewModel, onDismissRequest: () -> Unit) 8 | -------------------------------------------------------------------------------- /compose/src/commonMain/kotlin/com/blockstream/compose/utils/Resources.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.utils 2 | 3 | import androidx.compose.ui.graphics.painter.Painter 4 | 5 | expect fun ByteArray?.toPainter(): Painter? 6 | -------------------------------------------------------------------------------- /compose/src/commonMain/kotlin/com/blockstream/compose/utils/ScreenSizeInfo.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.utils 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.unit.Dp 5 | 6 | /** Getting screen size info for UI-related calculations */ 7 | data class ScreenSizeInfo(val heightPx: Int, val widthPx: Int, val heightDp: Dp, val widthDp: Dp) 8 | 9 | @Composable 10 | expect fun getScreenSizeInfo(): ScreenSizeInfo -------------------------------------------------------------------------------- /compose/src/commonMain/kotlin/com/blockstream/compose/utils/Semantics.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.utils 2 | 3 | import androidx.compose.ui.Modifier 4 | 5 | expect fun Modifier.compatTestTagsAsResourceId(): Modifier -------------------------------------------------------------------------------- /compose/src/desktopMain/kotlin/com/blockstream/compose/components/CameraView.desktop.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.components 2 | 3 | import androidx.compose.material3.Text 4 | import androidx.compose.runtime.Composable 5 | import androidx.compose.ui.Modifier 6 | import com.blockstream.common.models.abstract.AbstractScannerViewModel 7 | 8 | @Composable 9 | actual fun CameraView( 10 | modifier: Modifier, 11 | isFlashOn: Boolean, 12 | isDecodeContinuous: Boolean, 13 | showScanFromImage: Boolean, 14 | viewModel: AbstractScannerViewModel 15 | ) { 16 | Text("Not yet implemented") 17 | } -------------------------------------------------------------------------------- /compose/src/desktopMain/kotlin/com/blockstream/compose/components/Rive.desktop.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.components 2 | 3 | import androidx.compose.material3.Text 4 | import androidx.compose.runtime.Composable 5 | 6 | @Composable 7 | actual fun Rive(riveAnimation: RiveAnimation) { 8 | Text("Rive Not yet implemented") 9 | } -------------------------------------------------------------------------------- /compose/src/desktopMain/kotlin/com/blockstream/compose/components/VideoSurface.desktop.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.components 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.Modifier 5 | 6 | @Composable 7 | actual fun VideoSurface(modifier: Modifier, videoUri: String) { 8 | } -------------------------------------------------------------------------------- /compose/src/desktopMain/kotlin/com/blockstream/compose/dialogs/AppRateDialog.desktop.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.dialogs 2 | 3 | import androidx.compose.material3.Text 4 | import androidx.compose.runtime.Composable 5 | import com.blockstream.common.models.GreenViewModel 6 | 7 | @Composable 8 | actual fun AppRateDialog( 9 | viewModel: GreenViewModel, 10 | onDismissRequest: () -> Unit 11 | ) { 12 | Text("AppRateDialog Not yet implemented") 13 | } -------------------------------------------------------------------------------- /compose/src/desktopMain/kotlin/com/blockstream/compose/theme/Theme.desktop.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.theme 2 | 3 | import androidx.compose.runtime.Composable 4 | 5 | @Composable 6 | actual fun GreenChrome(isLight: Boolean) { 7 | 8 | } -------------------------------------------------------------------------------- /compose/src/desktopMain/kotlin/com/blockstream/compose/utils/Resources.desktop.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.utils 2 | 3 | import androidx.compose.ui.graphics.painter.Painter 4 | 5 | actual fun ByteArray?.toPainter(): Painter? { 6 | return null 7 | } 8 | -------------------------------------------------------------------------------- /compose/src/desktopMain/kotlin/com/blockstream/compose/utils/Semantics.desktop.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.utils 2 | 3 | import androidx.compose.ui.Modifier 4 | 5 | actual fun Modifier.compatTestTagsAsResourceId(): Modifier = this -------------------------------------------------------------------------------- /compose/src/iosMain/kotlin/com/blockstream/compose/components/Rive.ios.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.components 2 | 3 | import androidx.compose.material3.Text 4 | import androidx.compose.runtime.Composable 5 | 6 | @Composable 7 | actual fun Rive(riveAnimation: RiveAnimation) { 8 | Text("Rive") 9 | } -------------------------------------------------------------------------------- /compose/src/iosMain/kotlin/com/blockstream/compose/components/VideoSurface.ios.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.components 2 | 3 | import androidx.compose.material3.Text 4 | import androidx.compose.runtime.Composable 5 | import androidx.compose.ui.Modifier 6 | 7 | @Composable 8 | actual fun VideoSurface(modifier: Modifier, videoUri: String) { 9 | Text("VideoSurface") 10 | } -------------------------------------------------------------------------------- /compose/src/iosMain/kotlin/com/blockstream/compose/dialogs/AppRateDialog.ios.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.dialogs 2 | 3 | import androidx.compose.material3.Text 4 | import androidx.compose.runtime.Composable 5 | import com.blockstream.common.models.GreenViewModel 6 | 7 | @Composable 8 | actual fun AppRateDialog( 9 | viewModel: GreenViewModel, 10 | onDismissRequest: () -> Unit 11 | ) { 12 | Text("AppRateDialog Not yet implemented") 13 | } -------------------------------------------------------------------------------- /compose/src/iosMain/kotlin/com/blockstream/compose/utils/Resources.ios.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.utils 2 | 3 | import androidx.compose.ui.graphics.painter.BitmapPainter 4 | import androidx.compose.ui.graphics.painter.Painter 5 | import androidx.compose.ui.graphics.toComposeImageBitmap 6 | import org.jetbrains.skia.Image 7 | 8 | actual fun ByteArray?.toPainter(): Painter? { 9 | if(this != null) { 10 | return BitmapPainter(Image.makeFromEncoded(this).toComposeImageBitmap()) 11 | } 12 | return null 13 | } -------------------------------------------------------------------------------- /compose/src/iosMain/kotlin/com/blockstream/compose/utils/Semantics.ios.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.compose.utils 2 | 3 | import androidx.compose.ui.Modifier 4 | 5 | actual fun Modifier.compatTestTagsAsResourceId(): Modifier = this -------------------------------------------------------------------------------- /contrib/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:bullseye@sha256:e8c184b56a94db0947a9d51ec68f42ef5584442f20547fa3bd8cbd00203b2e7a 2 | 3 | # Deps 4 | COPY bullseye_deps.sh /deps.sh 5 | RUN /deps.sh && rm /deps.sh 6 | 7 | # Volume 8 | VOLUME /ga 9 | 10 | # Env 11 | ENV JAVA_HOME=/usr/lib/jvm/java-1.17.0-openjdk-amd64 12 | ENV ANDROID_HOME=/opt 13 | 14 | # Cache Gradle 15 | COPY gradle /gradle 16 | COPY gradlew /gradlew 17 | RUN ./gradlew --version && rm -rf /gradle* 18 | 19 | # Entrypoint 20 | COPY entrypoint.sh /entrypoint.sh 21 | ENTRYPOINT ["/entrypoint.sh"] 22 | -------------------------------------------------------------------------------- /contrib/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/contrib/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /contrib/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip 4 | networkTimeout=10000 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /data/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /data/src/androidHostTest/kotlin/com/blockstream/green/data/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.data 2 | 3 | import kotlin.test.Test 4 | import kotlin.test.assertEquals 5 | 6 | /** 7 | * Example local unit test, which will execute on the development machine (host). 8 | * 9 | * See [testing documentation](http://d.android.com/tools/testing). 10 | */ 11 | class ExampleUnitTest { 12 | @Test 13 | fun addition_isCorrect() { 14 | assertEquals(4, 2 + 2) 15 | } 16 | } -------------------------------------------------------------------------------- /data/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /data/src/commonMain/kotlin/com/blockstream/green/data/DataModule.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.data 2 | 3 | import com.blockstream.green.data.meld.meldModule 4 | import com.blockstream.green.data.notifications.notificationsDataModule 5 | import org.koin.dsl.module 6 | 7 | //expect val platformDataModule: Module 8 | 9 | val dataModule = module { 10 | single { GreenWebooksHttpClient(get()) } 11 | 12 | includes(meldModule) 13 | includes(notificationsDataModule) 14 | 15 | } -------------------------------------------------------------------------------- /data/src/commonMain/kotlin/com/blockstream/green/data/config/AppInfo.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.data.config 2 | 3 | class AppInfo constructor( 4 | val userAgent: String, 5 | val version: String, 6 | val isDebug: Boolean, 7 | val isDevelopment: Boolean, 8 | val isTest: Boolean = false 9 | ){ 10 | val type 11 | get() = if(isDebug) "debug" else "release" 12 | 13 | val isProduction = !isDevelopment 14 | 15 | val isDevelopmentOrDebug = isDevelopment || isDebug 16 | 17 | val versionFlavorDebug 18 | get() = "$version ${if(isDevelopment) "(Development)" else ""}${if(isDebug) "[Debug]" else ""}" 19 | } -------------------------------------------------------------------------------- /data/src/commonMain/kotlin/com/blockstream/green/data/json/DefaultJson.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.data.json 2 | 3 | import kotlinx.serialization.json.Json 4 | 5 | public val DefaultJson: Json = Json { 6 | encodeDefaults = true 7 | isLenient = true 8 | allowStructuredMapKeys = true 9 | useArrayPolymorphism = false 10 | } -------------------------------------------------------------------------------- /data/src/commonMain/kotlin/com/blockstream/green/data/meld/MeldModule.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.data.meld 2 | 3 | import org.koin.dsl.module 4 | 5 | val meldModule = module { 6 | single { 7 | MeldHttpClient(get()) 8 | } 9 | single { 10 | MeldRepository(get()) 11 | } 12 | } -------------------------------------------------------------------------------- /data/src/commonMain/kotlin/com/blockstream/green/data/meld/data/BuyDefaultValues.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.data.meld.data 2 | 3 | import kotlinx.serialization.SerialName 4 | import kotlinx.serialization.Serializable 5 | 6 | 7 | @Serializable 8 | data class BuyDefaultValues( 9 | @SerialName("buy_default_values") 10 | val buyDefaultValues: Map>, 11 | ) -------------------------------------------------------------------------------- /data/src/commonMain/kotlin/com/blockstream/green/data/meld/data/CryptoQuoteRequest.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.data.meld.data 2 | 3 | import kotlinx.serialization.Serializable 4 | 5 | @Serializable 6 | data class CryptoQuoteRequest( 7 | val countryCode: String = "US", 8 | val sourceAmount: String = "200", 9 | val sourceCurrencyCode: String = "USD", 10 | val destinationCurrencyCode: String = "BTC", 11 | val externalCustomerId: String? = null 12 | ) -------------------------------------------------------------------------------- /data/src/commonMain/kotlin/com/blockstream/green/data/meld/data/CryptoWidget.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.data.meld.data 2 | 3 | import kotlinx.serialization.Serializable 4 | 5 | @Serializable 6 | data class CryptoWidget( 7 | val id: String, 8 | val externalSessionId: String? = null, 9 | val externalCustomerId: String? = null, 10 | val customerId: String, 11 | val widgetUrl: String, 12 | val token: String 13 | ) -------------------------------------------------------------------------------- /data/src/commonMain/kotlin/com/blockstream/green/data/meld/data/CryptoWidgetRequest.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.data.meld.data 2 | 3 | import kotlinx.serialization.Serializable 4 | 5 | @Serializable 6 | data class CryptoWidgetRequest( 7 | val sessionType: String = "BUY", 8 | val externalCustomerId: String? = null, 9 | val sessionData: SessionData 10 | ) -------------------------------------------------------------------------------- /data/src/commonMain/kotlin/com/blockstream/green/data/meld/data/LimitsResponse.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.data.meld.data 2 | 3 | import kotlinx.serialization.Serializable 4 | 5 | @Serializable 6 | data class LimitsResponse( 7 | val currencyCode: String, 8 | val defaultAmount: Double? = null, 9 | val minAmount: Double = 0.0, 10 | val maxAmount: Double = 0.0 11 | ) -------------------------------------------------------------------------------- /data/src/commonMain/kotlin/com/blockstream/green/data/meld/data/QuotesResponse.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.data.meld.data 2 | 3 | import kotlinx.serialization.Serializable 4 | 5 | @Serializable 6 | data class QuotesResponse( 7 | val quotes: List? = null, 8 | val message: String? = null, 9 | val error: String? = null 10 | ) -------------------------------------------------------------------------------- /data/src/commonMain/kotlin/com/blockstream/green/data/meld/data/SessionData.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.data.meld.data 2 | 3 | import kotlinx.serialization.Serializable 4 | 5 | @Serializable 6 | data class SessionData( 7 | val countryCode: String = "US", 8 | val sourceAmount: String = "200", 9 | val sourceCurrencyCode: String = "USD", 10 | val destinationCurrencyCode: String = "BTC", 11 | val walletAddress: String, 12 | val serviceProvider: String, 13 | val redirectUrl: String = "https://blockstream.com/ramps/redirect", 14 | ) -------------------------------------------------------------------------------- /data/src/commonMain/kotlin/com/blockstream/green/data/meld/data/TransactionsResponse.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.data.meld.data 2 | 3 | import kotlinx.serialization.Serializable 4 | import kotlinx.serialization.json.JsonElement 5 | 6 | @Serializable 7 | data class TransactionsResponse( 8 | val count: Long, 9 | val remaining: Long, 10 | val totalCount: Long, 11 | val transactions: List 12 | ) -------------------------------------------------------------------------------- /data/src/commonMain/kotlin/com/blockstream/green/data/notifications/NotificationsModule.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.data.notifications 2 | 3 | import com.blockstream.green.data.notifications.datasource.NotificationsRemoteDataSource 4 | import org.koin.dsl.module 5 | 6 | val notificationsDataModule = module { 7 | single { NotificationsRemoteDataSource(get()) } 8 | single { NotificationsRepository(get()) } 9 | } -------------------------------------------------------------------------------- /data/src/commonMain/kotlin/com/blockstream/green/data/notifications/datasource/NotificationsRemoteDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.data.notifications.datasource 2 | 3 | import com.blockstream.green.data.GreenWebooksHttpClient 4 | import com.blockstream.green.data.notifications.models.RegisterDeviceRequest 5 | import com.blockstream.green.network.NetworkResponse 6 | 7 | class NotificationsRemoteDataSource( 8 | private val client: GreenWebooksHttpClient 9 | ) { 10 | suspend fun registerDevice(request: RegisterDeviceRequest): NetworkResponse { 11 | return client.post("/register-device", request) 12 | } 13 | } -------------------------------------------------------------------------------- /data/src/commonMain/kotlin/com/blockstream/green/data/notifications/models/NotificationType.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.data.notifications.models 2 | 3 | enum class NotificationType { 4 | MELD_TRANSACTION, UNKNOWN; 5 | 6 | companion object { 7 | fun valueOfOrUnknown(value: String?): NotificationType { 8 | return when (value) { 9 | "MELD_TRANSACTION" -> MELD_TRANSACTION 10 | else -> UNKNOWN 11 | } 12 | } 13 | 14 | 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /data/src/commonMain/kotlin/com/blockstream/green/data/notifications/models/RegisterDeviceRequest.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.data.notifications.models 2 | 3 | import kotlinx.serialization.SerialName 4 | import kotlinx.serialization.Serializable 5 | 6 | @Serializable 7 | data class RegisterDeviceRequest( 8 | val externalCustomerId: String, 9 | val fcmToken: String, 10 | val platform: String, 11 | ) -------------------------------------------------------------------------------- /desktopApp/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /docs/QATester.md: -------------------------------------------------------------------------------- 1 | # QA Tester 2 | #### A useful utility for QA 3 | --- 4 | 5 | QA Tester helps QA engineers to validate application behaviour the easy way. 6 | 7 | > QA Tester is not available in production builds 8 | 9 | ## How to use 10 | 11 | With QA Tester you can do the following emulations: 12 | 13 | - Corrupt Anti-Exfil commitments 14 | - Disable various Asset Registry caches 15 | - Inject GDK network notifications 16 | 17 | -------------------------------------------------------------------------------- /domain/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /domain/src/androidHostTest/kotlin/com/blockstream/green/utils/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.utils 2 | 3 | import kotlin.test.Test 4 | import kotlin.test.assertEquals 5 | 6 | /** 7 | * Example local unit test, which will execute on the development machine (host). 8 | * 9 | * See [testing documentation](http://d.android.com/tools/testing). 10 | */ 11 | class ExampleUnitTest { 12 | @Test 13 | fun addition_isCorrect() { 14 | assertEquals(4, 2 + 2) 15 | } 16 | } -------------------------------------------------------------------------------- /domain/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /domain/src/commonMain/kotlin/com/blockstream/green/domain/DomainModule.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.domain 2 | 3 | import com.blockstream.green.domain.notifications.notificationsDomainModule 4 | import org.koin.dsl.module 5 | 6 | val domainModule = module { 7 | includes(notificationsDomainModule) 8 | } -------------------------------------------------------------------------------- /domain/src/commonMain/kotlin/com/blockstream/green/domain/base/NetworkBoundInMemoryUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.domain.base 2 | 3 | import kotlinx.coroutines.flow.Flow 4 | import kotlinx.coroutines.flow.MutableStateFlow 5 | 6 | /** 7 | * Similar to NetworkBoundUseCase, but this one is used for in-memory data. 8 | */ 9 | abstract class NetworkBoundInMemoryUseCase : NetworkBoundUseCase() { 10 | private val dataState = MutableStateFlow(null) 11 | 12 | fun set(data: R) { 13 | dataState.value = data 14 | } 15 | 16 | fun get(): Flow { 17 | return dataState 18 | } 19 | 20 | } 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /domain/src/commonMain/kotlin/com/blockstream/green/domain/base/Result.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.domain.base 2 | 3 | sealed interface Result { 4 | data class Loading(val data: T? = null) : Result 5 | data class Success(val data: T) : Result 6 | data class Error(val exception: Throwable) : Result 7 | } 8 | -------------------------------------------------------------------------------- /domain/src/commonMain/kotlin/com/blockstream/green/domain/notifications/NotificationModule.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.domain.notifications 2 | 3 | import org.koin.dsl.module 4 | 5 | val notificationsDomainModule = module { 6 | factory { RegisterFCMToken(get()) } 7 | } -------------------------------------------------------------------------------- /fastlane/Appfile: -------------------------------------------------------------------------------- 1 | # app_identifier("io.blockstream.green") # The bundle identifier of your app 2 | 3 | itc_team_id("118542870") # App Store Connect Team ID 4 | team_id("D9W37S9468") # Developer Portal Team ID 5 | 6 | # For more information about the Appfile, see: 7 | # https://docs.fastlane.tools/advanced/#appfile 8 | -------------------------------------------------------------------------------- /fastlane/Matchfile: -------------------------------------------------------------------------------- 1 | gitlab_project("blockstream/green/green_android") 2 | gitlab_host("https://gl.blockstream.io") 3 | 4 | storage_mode("gitlab_secure_files") 5 | 6 | type("development") # The default type, can be: appstore, adhoc, enterprise or development 7 | 8 | # app_identifier(["tools.fastlane.app", "tools.fastlane.app2"]) 9 | # username("user@fastlane.tools") # Your Apple Developer Portal username 10 | 11 | # For all available options run `fastlane match --help` 12 | # Remove the # in the beginning of the line to enable the other options 13 | 14 | # The docs are available on https://docs.fastlane.tools/actions/match 15 | -------------------------------------------------------------------------------- /fastlane/Pluginfile: -------------------------------------------------------------------------------- 1 | # Autogenerated by fastlane 2 | # 3 | # Ensure this file is checked in to source control! 4 | 5 | gem 'fastlane-plugin-firebase_app_distribution' 6 | -------------------------------------------------------------------------------- /gdk/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /src/main/res/drawable/asset_* 3 | /src/main/jniLibs -------------------------------------------------------------------------------- /gdk/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | 2 | -keep class com.blockstream.green_gdk.** {*;} 3 | -keep class com.blockstream.libwally.** {*;} -------------------------------------------------------------------------------- /gdk/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /gms/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /gms/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -keep class zendesk.** { *; } 2 | -keepnames class zendesk.** { *; } -------------------------------------------------------------------------------- /gms/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /hardware/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /hardware/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | # BEGIN for protobuf in trezor: 2 | -keep class com.satoshilabs.trezor.** { *; } 3 | -keepattributes InnerClasses,EnclosingMethod 4 | # END for protobuf in trezor -------------------------------------------------------------------------------- /hardware/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /hardware/src/main/java/com/blockstream/Extensions.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream 2 | 3 | import kotlinx.coroutines.flow.MutableStateFlow 4 | 5 | fun createDisconnectEvent(): MutableStateFlow { 6 | return MutableStateFlow(false) 7 | } -------------------------------------------------------------------------------- /iosApp/Configuration/Config.xcconfig: -------------------------------------------------------------------------------- 1 | TEAM_ID= 2 | BUNDLE_ID=io.blockstream.greendev 3 | APP_NAME=Green 4 | -------------------------------------------------------------------------------- /iosApp/Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem "fastlane" 4 | 5 | plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') 6 | eval_gemfile(plugins_path) if File.exist?(plugins_path) 7 | -------------------------------------------------------------------------------- /iosApp/iosApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iosApp/iosApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /iosApp/iosApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "originHash" : "6f7f935927c2b58f9c78f2db5b3773a08722ddb48fcea675ab67d99aeabc789d", 3 | "pins" : [ 4 | { 5 | "identity" : "countly-sdk-ios", 6 | "kind" : "remoteSourceControl", 7 | "location" : "https://github.com/angelix/countly-sdk-ios", 8 | "state" : { 9 | "revision" : "1892410d13fceccd7cf91f803f06f110efc215b3" 10 | } 11 | } 12 | ], 13 | "version" : 3 14 | } 15 | -------------------------------------------------------------------------------- /iosApp/iosApp/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } -------------------------------------------------------------------------------- /iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "app-icon-1024.png", 5 | "idiom" : "universal", 6 | "platform" : "ios", 7 | "size" : "1024x1024" 8 | } 9 | ], 10 | "info" : { 11 | "author" : "xcode", 12 | "version" : 1 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024.png -------------------------------------------------------------------------------- /iosApp/iosApp/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iosApp/iosApp/ContentView.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import SwiftUI 3 | import ComposeApp 4 | 5 | struct ComposeView: UIViewControllerRepresentable { 6 | func makeUIViewController(context: Context) -> UIViewController { 7 | MainViewControllerKt.MainViewController() 8 | } 9 | 10 | func updateUIViewController(_ uiViewController: UIViewController, context: Context) {} 11 | } 12 | 13 | struct ContentView: View { 14 | var body: some View { 15 | ComposeView() 16 | .ignoresSafeArea(.keyboard) // Compose has own keyboard handler 17 | } 18 | } 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /iosApp/iosApp/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } -------------------------------------------------------------------------------- /iosApp/iosApp/iOSApp.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | //import ComposeApp 3 | //import Common 4 | 5 | @main 6 | struct iOSApp: App { 7 | var body: some Scene { 8 | WindowGroup { 9 | ContentView() 10 | .background(Color("background")) 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /jade/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /jade/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -keep class com.blockstream.jade.entities** {*;} -------------------------------------------------------------------------------- /jade/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /jade/src/androidMain/kotlin/com/blockstream/jade/JadeApi.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.jade 2 | 3 | import android.hardware.usb.UsbDevice 4 | import android.hardware.usb.UsbManager 5 | 6 | fun JadeAPI.Companion.fromUsb( 7 | usbDevice: UsbDevice, 8 | usbManager: UsbManager, 9 | httpRequestHandler: HttpRequestHandler 10 | ): JadeAPI { 11 | val jade = JadeInterface.fromUsb( 12 | usbDevice = usbDevice, 13 | usbManager = usbManager 14 | ) 15 | return JadeAPI(jade, httpRequestHandler) 16 | } -------------------------------------------------------------------------------- /jade/src/androidMain/kotlin/com/blockstream/jade/JadeInterface.android.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.jade 2 | 3 | import android.hardware.usb.UsbDevice 4 | import android.hardware.usb.UsbManager 5 | import com.blockstream.jade.connection.JadeUsbConnection 6 | 7 | fun JadeInterface.Companion.fromUsb( 8 | usbDevice: UsbDevice, 9 | usbManager: UsbManager 10 | ): JadeInterface { 11 | return JadeInterface( 12 | JadeUsbConnection( 13 | usbDevice = usbDevice, 14 | usbManager = usbManager 15 | ) 16 | ) 17 | } -------------------------------------------------------------------------------- /jade/src/commonMain/kotlin/com/blockstream/jade/Constants.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.jade 2 | 3 | 4 | // Timeouts for autonomous calls that should return quickly, calls that require user confirmation, 5 | // and calls that need arbitrarily long (eg. entering a mnemonic) and should not timeout at all. 6 | const val TIMEOUT_AUTONOMOUS: Int = 6_000 // 6 secs 7 | const val TIMEOUT_AUTONOMOUS_LONG: Int = 10_000 // 10 secs 8 | const val TIMEOUT_USER_INTERACTION = 120_000 // 2 mins 9 | const val TIMEOUT_NONE = -1 -------------------------------------------------------------------------------- /jade/src/commonMain/kotlin/com/blockstream/jade/HttpRequestHandler.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.jade 2 | 3 | import kotlinx.serialization.json.JsonElement 4 | 5 | // HttpRequestHandler is used for network calls during pinserver handshake 6 | // useful on TOR enabled sessions 7 | interface HttpRequestHandler { 8 | suspend fun httpRequest(details: JsonElement): JsonElement 9 | 10 | suspend fun httpRequest( 11 | method: String, 12 | urls: List?, 13 | data: String?, 14 | accept: String?, 15 | certs: List? 16 | ): JsonElement 17 | } -------------------------------------------------------------------------------- /jade/src/commonMain/kotlin/com/blockstream/jade/Loggable.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.jade 2 | 3 | import co.touchlab.kermit.Logger 4 | 5 | abstract class Loggable { 6 | protected val logger by lazy { 7 | Logger.withTag( 8 | this::class.qualifiedName?.removeSuffix(".Companion")?.splitToSequence('.')?.lastOrNull() ?: "GreenLoggable" 9 | ) 10 | } 11 | } -------------------------------------------------------------------------------- /jade/src/commonMain/kotlin/com/blockstream/jade/api/Commitment.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.jade.api 2 | 3 | import kotlinx.serialization.SerialName 4 | import kotlinx.serialization.Serializable 5 | 6 | @Serializable 7 | data class Commitment( 8 | @SerialName("asset_id") 9 | val assetId: ByteArray, 10 | val value: Long?, 11 | val abf: ByteArray?, 12 | val vbf: ByteArray?, 13 | @SerialName("blinding_key") 14 | val blindingKey: ByteArray 15 | ) : JadeSerializer() { 16 | override fun kSerializer() = serializer() 17 | override fun encodeDefaultsValues() = false 18 | } 19 | -------------------------------------------------------------------------------- /jade/src/commonMain/kotlin/com/blockstream/jade/api/Error.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.jade.api 2 | 3 | import kotlinx.serialization.KSerializer 4 | import kotlinx.serialization.Serializable 5 | 6 | @Serializable 7 | data class Error( 8 | val code: Int, 9 | val message: String, 10 | val data: ByteArray? = null 11 | ) : JadeSerializer() { 12 | override fun kSerializer(): KSerializer = kotlinx.serialization.serializer() 13 | } 14 | -------------------------------------------------------------------------------- /jade/src/commonMain/kotlin/com/blockstream/jade/api/Log.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.jade.api 2 | 3 | import kotlinx.serialization.KSerializer 4 | import kotlinx.serialization.Serializable 5 | 6 | 7 | 8 | @Serializable 9 | class LogResponse(val log: String) : JadeSerializer() { 10 | override fun kSerializer(): KSerializer = kotlinx.serialization.serializer() 11 | } -------------------------------------------------------------------------------- /jade/src/commonMain/kotlin/com/blockstream/jade/api/Logout.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.jade.api 2 | 3 | import kotlinx.serialization.KSerializer 4 | import kotlinx.serialization.Serializable 5 | 6 | 7 | @Serializable 8 | data class LogoutRequest( 9 | override val id: String = jadeId(), 10 | override val method: String = "logout", 11 | override val params: Unit = Unit 12 | ) : Request() { 13 | override fun kSerializer(): KSerializer = kotlinx.serialization.serializer() 14 | } 15 | -------------------------------------------------------------------------------- /jade/src/commonMain/kotlin/com/blockstream/jade/api/OtaData.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.jade.api 2 | 3 | import com.blockstream.jade.TIMEOUT_USER_INTERACTION 4 | import kotlinx.serialization.KSerializer 5 | import kotlinx.serialization.Serializable 6 | 7 | 8 | @Serializable 9 | data class OtaDataRequest( 10 | override val id: String = jadeId(), 11 | override val method: String = "ota_data", 12 | override val params: ByteArray 13 | ) : Request() { 14 | override fun timeout(): Int = TIMEOUT_USER_INTERACTION 15 | override fun kSerializer(): KSerializer = kotlinx.serialization.serializer() 16 | } -------------------------------------------------------------------------------- /jade/src/commonMain/kotlin/com/blockstream/jade/api/Request.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.jade.api 2 | 3 | import com.blockstream.jade.TIMEOUT_AUTONOMOUS 4 | import kotlinx.serialization.Serializable 5 | 6 | @Serializable 7 | sealed class Request : JadeSerializer() { 8 | abstract val id: String 9 | abstract val method: String 10 | abstract val params: P? 11 | 12 | open fun timeout(): Int = TIMEOUT_AUTONOMOUS 13 | } -------------------------------------------------------------------------------- /jade/src/commonMain/kotlin/com/blockstream/jade/data/JadeNetworks.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.jade.data 2 | 3 | enum class JadeNetworks { 4 | MAIN, TEST, ALL; 5 | } -------------------------------------------------------------------------------- /jade/src/commonMain/kotlin/com/blockstream/jade/data/JadeState.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.jade.data 2 | 3 | enum class JadeState { 4 | LOCKED, UNSAVED, UNINIT, TEMP, READY; 5 | } -------------------------------------------------------------------------------- /jade/src/commonMain/kotlin/com/blockstream/jade/data/SignedTransactionInputs.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.jade.data 2 | 3 | @OptIn(ExperimentalStdlibApi::class) 4 | class SignedTransactionInputs( 5 | val signatures: List, 6 | val signerCommitments: List? = null 7 | ) { 8 | companion object { 9 | fun create( 10 | signatures: List, 11 | signerCommitments: List 12 | ) = SignedTransactionInputs( 13 | signatures = signatures.map { it.toHexString() }, 14 | signerCommitments = signerCommitments.map { it.toHexString() } 15 | ) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /jade/src/commonMain/kotlin/com/blockstream/jade/firmware/HardwareQATester.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.jade.firmware; 2 | 3 | interface HardwareQATester{ 4 | fun getAntiExfilCorruptionForMessageSign() : Boolean 5 | fun getAntiExfilCorruptionForTxSign() : Boolean 6 | fun getFirmwareCorruption() : Boolean 7 | } 8 | -------------------------------------------------------------------------------- /keystore.properties.template: -------------------------------------------------------------------------------- 1 | storeFile=~/.android/debug.keystore 2 | storePassword=android 3 | keyAlias=androiddebugkey 4 | keyPassword=android -------------------------------------------------------------------------------- /metadata/en-US/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/metadata/en-US/images/icon.png -------------------------------------------------------------------------------- /metadata/en-US/images/phoneScreenshots/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/metadata/en-US/images/phoneScreenshots/1.png -------------------------------------------------------------------------------- /metadata/en-US/images/phoneScreenshots/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/metadata/en-US/images/phoneScreenshots/2.png -------------------------------------------------------------------------------- /metadata/en-US/images/phoneScreenshots/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/metadata/en-US/images/phoneScreenshots/3.png -------------------------------------------------------------------------------- /metadata/en-US/images/phoneScreenshots/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/metadata/en-US/images/phoneScreenshots/4.png -------------------------------------------------------------------------------- /metadata/en-US/images/phoneScreenshots/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/metadata/en-US/images/phoneScreenshots/5.png -------------------------------------------------------------------------------- /metadata/en-US/images/phoneScreenshots/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockstream/green_android/186215d0cd7c6bf948f7ee9931ea819500344e3f/metadata/en-US/images/phoneScreenshots/6.png -------------------------------------------------------------------------------- /metadata/en-US/short_description.txt: -------------------------------------------------------------------------------- 1 | Bitcoin - secure and easy -------------------------------------------------------------------------------- /metadata/en-US/title.txt: -------------------------------------------------------------------------------- 1 | Green: Bitcoin Wallet -------------------------------------------------------------------------------- /network/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /network/src/androidHostTest/kotlin/com/blockstream/green/network/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.network 2 | 3 | import kotlin.test.Test 4 | import kotlin.test.assertEquals 5 | 6 | /** 7 | * Example local unit test, which will execute on the development machine (host). 8 | * 9 | * See [testing documentation](http://d.android.com/tools/testing). 10 | */ 11 | class ExampleUnitTest { 12 | @Test 13 | fun addition_isCorrect() { 14 | assertEquals(4, 2 + 2) 15 | } 16 | } -------------------------------------------------------------------------------- /network/src/androidHostTest/kotlin/com/blockstream/green/utils/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.utils 2 | 3 | import kotlin.test.Test 4 | import kotlin.test.assertEquals 5 | 6 | /** 7 | * Example local unit test, which will execute on the development machine (host). 8 | * 9 | * See [testing documentation](http://d.android.com/tools/testing). 10 | */ 11 | class ExampleUnitTest { 12 | @Test 13 | fun addition_isCorrect() { 14 | assertEquals(4, 2 + 2) 15 | } 16 | } -------------------------------------------------------------------------------- /network/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /no-gms/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /no-gms/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.androidLibrary) 3 | alias(libs.plugins.kotlinAndroid) 4 | } 5 | 6 | android { 7 | namespace = "com.blockstream.gms" 8 | compileSdk = libs.versions.androidCompileSdk.get().toInt() 9 | 10 | defaultConfig { 11 | minSdk = libs.versions.androidMinSdk.get().toInt() 12 | } 13 | } 14 | 15 | kotlin { 16 | jvmToolchain(libs.versions.jvm.get().toInt()) 17 | } 18 | dependencies { 19 | implementation(project(":base-gms")) 20 | } 21 | 22 | -------------------------------------------------------------------------------- /no-gms/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /no-gms/src/main/java/com/blockstream/gms/di/GmsModule.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.gms.di 2 | 3 | import com.blockstream.base.GooglePlay 4 | import com.blockstream.base.InstallReferrer 5 | import com.blockstream.common.ZendeskSdk 6 | import com.blockstream.common.fcm.Firebase 7 | import org.koin.dsl.module 8 | 9 | val gmsModule = module { 10 | single { 11 | GooglePlay() 12 | } 13 | single { 14 | ZendeskSdk() 15 | } 16 | single { 17 | Firebase() 18 | } 19 | single { 20 | InstallReferrer() 21 | } 22 | } -------------------------------------------------------------------------------- /prepare_fdroid.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Changing Breez SDK dependency from KMP to Android" 4 | sed -i -e 's/api(libs.breez.sdk.kmp)/\/\/ api(libs.breez.sdk.kmp)/g' common/build.gradle.kts 5 | sed -i -e 's/\/\/ api(libs.breez.sdk.android/api(libs.breez.sdk.android/g' common/build.gradle.kts 6 | sed -i -e 's/\/\/ implementation("${libs.jna/implementation("${libs.jna/g' common/build.gradle.kts 7 | -------------------------------------------------------------------------------- /ui-common/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /ui-common/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ui-common/src/commonMain/kotlin/com/blockstream/ui/components/GreenSpacer.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.ui.components 2 | 3 | import androidx.compose.foundation.layout.Spacer 4 | import androidx.compose.foundation.layout.size 5 | import androidx.compose.runtime.Composable 6 | import androidx.compose.runtime.NonRestartableComposable 7 | import androidx.compose.ui.Modifier 8 | import androidx.compose.ui.unit.dp 9 | 10 | 11 | @Composable 12 | @NonRestartableComposable 13 | fun GreenSpacer(space: Int = 16) { 14 | Spacer( 15 | modifier = Modifier 16 | .size(space.dp) 17 | ) 18 | } -------------------------------------------------------------------------------- /ui-common/src/commonMain/kotlin/com/blockstream/ui/events/Event.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.ui.events 2 | 3 | interface Event -------------------------------------------------------------------------------- /ui-common/src/commonMain/kotlin/com/blockstream/ui/navigation/bottomsheet/ModalBottomSheetLayout.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.ui.navigation.bottomsheet 2 | 3 | import androidx.compose.runtime.Composable 4 | 5 | 6 | @Composable 7 | fun ModalBottomSheetLayout( 8 | bottomSheetNavigator: BottomSheetNavigator, 9 | ) { 10 | bottomSheetNavigator.sheetInitializer() 11 | 12 | if (bottomSheetNavigator.sheetEnabled) { 13 | bottomSheetNavigator.sheetContent() 14 | } 15 | } -------------------------------------------------------------------------------- /ui-common/src/commonMain/kotlin/com/blockstream/ui/sideeffects/SideEffect.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.ui.sideeffects 2 | 3 | interface SideEffect -------------------------------------------------------------------------------- /utils/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /utils/src/androidHostTest/kotlin/com/blockstream/green/utils/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.utils 2 | 3 | import kotlin.test.Test 4 | import kotlin.test.assertEquals 5 | 6 | /** 7 | * Example local unit test, which will execute on the development machine (host). 8 | * 9 | * See [testing documentation](http://d.android.com/tools/testing). 10 | */ 11 | class ExampleUnitTest { 12 | @Test 13 | fun addition_isCorrect() { 14 | assertEquals(4, 2 + 2) 15 | } 16 | } -------------------------------------------------------------------------------- /utils/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /utils/src/commonMain/kotlin/com/blockstream/green/utils/Loggable.kt: -------------------------------------------------------------------------------- 1 | package com.blockstream.green.utils 2 | 3 | import co.touchlab.kermit.Logger 4 | 5 | abstract class Loggable { 6 | protected val logger by lazy { 7 | Logger.withTag( 8 | this::class.qualifiedName?.removeSuffix(".Companion")?.splitToSequence('.')?.lastOrNull() ?: "Loggable" 9 | ) 10 | } 11 | } --------------------------------------------------------------------------------