├── .github ├── apply_signing.sh ├── build_custom_gecko.sh ├── build_maskbook.sh ├── fetch_maskbook.sh └── workflows │ ├── build.yml │ └── release.yml ├── .gitignore ├── .idea └── codeStyles │ ├── Project.xml │ └── codeStyleConfig.xml ├── .tool-versions ├── LICENSE ├── README.md ├── app ├── .gitignore ├── build.gradle.kts ├── proguard-rules.pro └── src │ ├── main │ ├── AndroidManifest.xml │ ├── ic_launcher-web.png │ ├── java │ │ └── com │ │ │ └── dimension │ │ │ └── maskbook │ │ │ ├── ComposeActivity.kt │ │ │ └── MaskApp.kt │ └── res │ │ ├── drawable │ │ └── ic_splash.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── dimension │ └── maskbook │ └── ExampleUnitTest.kt ├── build.gradle.kts ├── buildSrc ├── .gitignore ├── build.gradle.kts └── src │ └── main │ └── kotlin │ ├── Config.kt │ ├── Package.kt │ └── Versions.kt ├── common ├── bigDecimal │ ├── build.gradle.kts │ ├── consumer-rules.pro │ ├── proguard-rules.pro │ └── src │ │ ├── androidMain │ │ ├── AndroidManifest.xml │ │ └── kotlin │ │ │ └── com │ │ │ └── dimension │ │ │ └── maskbook │ │ │ └── common │ │ │ └── bigDecimal │ │ │ └── BigDecimal.kt │ │ ├── commonMain │ │ └── kotlin │ │ │ └── com │ │ │ └── dimension │ │ │ └── maskbook │ │ │ └── common │ │ │ └── bigDecimal │ │ │ └── BigDecimal.kt │ │ └── jvmMain │ │ └── kotlin │ │ └── com │ │ └── dimension │ │ └── maskbook │ │ └── common │ │ └── bigDecimal │ │ └── BigDecimal.kt ├── build.gradle.kts ├── consumer-rules.pro ├── gecko │ ├── build.gradle.kts │ ├── consumer-rules.pro │ ├── proguard-rules.pro │ ├── sample │ │ ├── .gitignore │ │ ├── build.gradle.kts │ │ ├── proguard-rules.pro │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── assets │ │ │ └── extensions │ │ │ │ ├── borderify │ │ │ │ ├── borderify.js │ │ │ │ ├── manifest.json │ │ │ │ └── manifest.template.json │ │ │ │ └── test │ │ │ │ ├── background.js │ │ │ │ ├── icon.png │ │ │ │ ├── manifest.template.json │ │ │ │ └── popup.html │ │ │ ├── ic_launcher-playstore.png │ │ │ ├── java │ │ │ └── com │ │ │ │ └── dimension │ │ │ │ └── maskbook │ │ │ │ └── common │ │ │ │ └── gecko │ │ │ │ └── sample │ │ │ │ └── MainActivity.kt │ │ │ └── res │ │ │ ├── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── drawable │ │ │ └── ic_launcher_background.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ └── strings.xml │ └── src │ │ └── androidMain │ │ ├── AndroidManifest.xml │ │ └── kotlin │ │ └── com │ │ └── dimension │ │ └── maskbook │ │ └── common │ │ └── gecko │ │ ├── GeckoContent.kt │ │ ├── PromptFeatureDelegate.kt │ │ ├── WebContent.kt │ │ ├── WebContentController.kt │ │ └── WebContentViewController.kt ├── okhttp │ ├── build.gradle.kts │ ├── consumer-rules.pro │ ├── proguard-rules.pro │ └── src │ │ └── androidMain │ │ ├── AndroidManifest.xml │ │ └── kotlin │ │ └── com │ │ └── dimension │ │ └── maskbook │ │ └── common │ │ └── okhttp │ │ └── Okhttp.kt ├── proguard-rules.pro ├── retrofit │ ├── build.gradle.kts │ ├── consumer-rules.pro │ ├── proguard-rules.pro │ └── src │ │ └── androidMain │ │ ├── AndroidManifest.xml │ │ └── kotlin │ │ └── com │ │ └── dimension │ │ └── maskbook │ │ └── common │ │ └── retrofit │ │ └── Retrofit.kt ├── routeProcessor │ ├── annotations │ │ ├── build.gradle.kts │ │ ├── consumer-rules.pro │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── androidMain │ │ │ └── AndroidManifest.xml │ │ │ └── commonMain │ │ │ └── kotlin │ │ │ └── com │ │ │ └── dimension │ │ │ └── maskbook │ │ │ └── common │ │ │ └── routeProcessor │ │ │ └── annotations │ │ │ └── Route.kt │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── dimension │ │ │ └── maskbook │ │ │ └── common │ │ │ └── routeProcessor │ │ │ ├── RouteDefinition.kt │ │ │ ├── RouteGraphProcessor.kt │ │ │ ├── RouteGraphProcessorProvider.kt │ │ │ ├── RouteProcessor.kt │ │ │ └── RouteProcessorProvider.kt │ │ └── resources │ │ └── META-INF │ │ └── services │ │ └── com.google.devtools.ksp.processing.SymbolProcessorProvider └── src │ ├── androidAndroidTest │ └── kotlin │ │ └── com │ │ └── dimension │ │ └── maskbook │ │ └── common │ │ └── manager │ │ └── KeyStoreManagerTest.kt │ ├── androidMain │ ├── AndroidManifest.xml │ ├── kotlin │ │ └── com │ │ │ └── dimension │ │ │ └── maskbook │ │ │ └── common │ │ │ ├── CommonSetup.kt │ │ │ ├── Consts.kt │ │ │ ├── ModuleSetup.kt │ │ │ ├── exception │ │ │ └── NullTransactionReceiptException.kt │ │ │ ├── ext │ │ │ ├── Base64.kt │ │ │ ├── BigIntegerExt.kt │ │ │ ├── BitmapExt.kt │ │ │ ├── ChainTypeExt.kt │ │ │ ├── ContextExt.kt │ │ │ ├── ExtensionMessageExt.kt │ │ │ ├── ExtensionServicesExt.kt │ │ │ ├── FlowExt.kt │ │ │ ├── Json.kt │ │ │ ├── KoinExt.kt │ │ │ ├── MsgPack.kt │ │ │ ├── NavControllerExt.kt │ │ │ ├── NavControllerResult.kt │ │ │ ├── NumberExt.kt │ │ │ ├── PlatformTypeExt.kt │ │ │ ├── ResultExt.kt │ │ │ ├── SignatureDataExt.kt │ │ │ ├── StringExt.kt │ │ │ ├── TextExt.kt │ │ │ ├── URL.kt │ │ │ ├── Validator.kt │ │ │ └── Web3Ext.kt │ │ │ ├── manager │ │ │ ├── ImageLoaderManager.kt │ │ │ └── KeyStoreManager.kt │ │ │ ├── model │ │ │ ├── DateType.kt │ │ │ ├── EthResponses.kt │ │ │ ├── MnemonicWord.kt │ │ │ └── ResultEvent.kt │ │ │ ├── route │ │ │ ├── Consts.kt │ │ │ └── Navigator.kt │ │ │ ├── serializer │ │ │ └── BigDecimalSerializer.kt │ │ │ ├── ui │ │ │ ├── barcode │ │ │ │ ├── BarcodeBitmap.kt │ │ │ │ └── ScanQrCodeScene.kt │ │ │ ├── notification │ │ │ │ ├── Event.kt │ │ │ │ └── InAppNotification.kt │ │ │ ├── scene │ │ │ │ ├── LoadingScene.kt │ │ │ │ ├── SetupPaymentPassword.kt │ │ │ │ └── VerifyMnemonicWordsScene.kt │ │ │ ├── tab │ │ │ │ └── TabScreen.kt │ │ │ ├── theme │ │ │ │ ├── IsDarkTheme.kt │ │ │ │ ├── MoreColors.kt │ │ │ │ ├── MoreTypography.kt │ │ │ │ └── Theme.kt │ │ │ └── widget │ │ │ │ ├── BackMetaDisplay.kt │ │ │ │ ├── CircleCheckbox.kt │ │ │ │ ├── EmailModal.kt │ │ │ │ ├── GridLayout.kt │ │ │ │ ├── IosSwitch.kt │ │ │ │ ├── MaskAnimatedVisibility.kt │ │ │ │ ├── MaskBottomSheetNavigator.kt │ │ │ │ ├── MaskCard.kt │ │ │ │ ├── MaskDialog.kt │ │ │ │ ├── MaskInAppNotification.kt │ │ │ │ ├── MaskInputField.kt │ │ │ │ ├── MaskListItem.kt │ │ │ │ ├── MaskModal.kt │ │ │ │ ├── MaskPermissionRequired.kt │ │ │ │ ├── MaskScaffold.kt │ │ │ │ ├── MaskScene.kt │ │ │ │ ├── MaskSearchInput.kt │ │ │ │ ├── MaskSelection.kt │ │ │ │ ├── MaskSnackBar.kt │ │ │ │ ├── MaskTopAppBar.kt │ │ │ │ ├── MiddleEllipsisText.kt │ │ │ │ ├── NameImage.kt │ │ │ │ ├── PlatformInsets.kt │ │ │ │ ├── RouteHost.kt │ │ │ │ ├── SingleLineText.kt │ │ │ │ ├── TipMessageDialog.kt │ │ │ │ ├── TokenAddressText.kt │ │ │ │ ├── WalletTokenImage.kt │ │ │ │ └── button │ │ │ │ ├── BaseButton.kt │ │ │ │ ├── BaseTextButton.kt │ │ │ │ ├── ClickFlow.kt │ │ │ │ ├── MaskBackButton.kt │ │ │ │ ├── MaskButton.kt │ │ │ │ ├── MaskGridButton.kt │ │ │ │ ├── MaskIconButton.kt │ │ │ │ ├── MaskListButton.kt │ │ │ │ ├── MaskTextButton.kt │ │ │ │ ├── MaskTransparentButton.kt │ │ │ │ └── SecondaryButton.kt │ │ │ ├── util │ │ │ ├── AppCoroutineExceptionHandler.kt │ │ │ ├── BiometricAuthenticator.kt │ │ │ ├── CipherHelper.kt │ │ │ ├── DateUtils.kt │ │ │ ├── EthUtils.kt │ │ │ └── SignUtils.kt │ │ │ └── viewmodel │ │ │ ├── BaseMnemonicPhraseViewModel.kt │ │ │ ├── BiometricEnableViewModel.kt │ │ │ ├── BiometricViewModel.kt │ │ │ └── SetUpPaymentPasswordViewModel.kt │ └── res │ │ └── drawable │ │ ├── ic_eye_hide.xml │ │ └── ic_eye_show.xml │ ├── androidTest │ └── kotlin │ │ └── com │ │ └── dimension │ │ └── maskbook │ │ └── common │ │ ├── ext │ │ ├── SignatureDataExtTest.kt │ │ └── ValidatorTest.kt │ │ └── util │ │ ├── DateUtilsTest.kt │ │ └── SignUtilsTest.kt │ └── commonMain │ └── kotlin │ └── com │ └── dimension │ └── maskbook │ └── common │ ├── manager │ └── KeyStoreManager.kt │ └── route │ ├── CommonRoute.kt │ ├── Deeplinks.kt │ └── WebDeepLinks.kt ├── crowdin.yml ├── customGecko.patch ├── debankapi ├── .gitignore ├── build.gradle.kts └── src │ └── main │ └── java │ └── com │ └── dimension │ └── maskbook │ └── debankapi │ ├── api │ ├── ChainResources.kt │ ├── DebankResources.kt │ ├── TokenResources.kt │ ├── TransactionResources.kt │ └── UserResources.kt │ └── model │ ├── Chain.kt │ ├── ChainID.kt │ ├── NFTElement.kt │ ├── Protocol.kt │ ├── ProtocolID.kt │ ├── Token.kt │ ├── UserChainBalance.kt │ └── UserTotalBalance.kt ├── entry ├── build.gradle.kts ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidMain │ ├── AndroidManifest.xml │ ├── kotlin │ │ └── com │ │ │ └── dimension │ │ │ └── maskbook │ │ │ └── entry │ │ │ ├── EntrySetup.kt │ │ │ ├── data │ │ │ └── JSMethod.kt │ │ │ ├── repository │ │ │ └── EntryRepository.kt │ │ │ └── ui │ │ │ ├── App.kt │ │ │ ├── ComposeDebugTool.kt │ │ │ ├── Router.kt │ │ │ └── scene │ │ │ ├── IntroScene.kt │ │ │ ├── MainHost.kt │ │ │ └── Splash.kt │ └── res │ │ └── drawable │ │ ├── ic_intro_01.png │ │ ├── ic_intro_02.png │ │ ├── ic_intro_03.png │ │ ├── ic_intro_04.png │ │ └── ic_intro_grid.png │ └── commonMain │ └── kotlin │ └── com │ └── dimension │ └── maskbook │ └── entry │ └── route │ └── EntryRoute.kt ├── extension ├── build.gradle.kts ├── consumer-rules.pro ├── export │ ├── build.gradle.kts │ └── src │ │ └── commonMain │ │ └── kotlin │ │ └── com │ │ └── dimension │ │ └── maskbook │ │ └── extension │ │ └── export │ │ ├── ExtensionServices.kt │ │ └── model │ │ ├── ExtensionId.kt │ │ ├── ExtensionMessage.kt │ │ ├── ExtensionResponse.kt │ │ └── Site.kt ├── proguard-rules.pro └── src │ ├── androidMain │ ├── AndroidManifest.xml │ └── kotlin │ │ └── com │ │ └── dimension │ │ └── maskbook │ │ └── extension │ │ ├── ExtensionServicesImpl.kt │ │ ├── ExtensionSetup.kt │ │ ├── ext │ │ └── SiteExt.kt │ │ ├── repository │ │ └── ExtensionRepository.kt │ │ ├── ui │ │ ├── NestedScrollView.kt │ │ └── WebContentScene.kt │ │ └── utils │ │ └── MessageChannel.kt │ └── commonMain │ └── kotlin │ └── com │ └── dimension │ └── maskbook │ └── extension │ └── route │ └── ExtensionRoute.kt ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── labs ├── build.gradle.kts ├── consumer-rules.pro ├── export │ ├── build.gradle.kts │ └── src │ │ └── commonMain │ │ └── kotlin │ │ └── com │ │ └── dimension │ │ └── maskbook │ │ └── labs │ │ └── export │ │ ├── LabsServices.kt │ │ └── model │ │ ├── AppData.kt │ │ ├── AppKey.kt │ │ └── TransakConfig.kt ├── proguard-rules.pro ├── sampledata │ ├── HappyRedPacketV4.json │ └── red-packet.json └── src │ ├── androidMain │ ├── AndroidManifest.xml │ └── kotlin │ │ └── com │ │ └── dimension │ │ └── maskbook │ │ └── labs │ │ ├── LabsServicesImpl.kt │ │ ├── LabsSetup.kt │ │ ├── data │ │ ├── JSMethod.kt │ │ └── RedPacketMethod.kt │ │ ├── mapper │ │ └── RedPacket.kt │ │ ├── model │ │ ├── RedPacketState.kt │ │ ├── SendMethodRequest.kt │ │ ├── options │ │ │ └── RedPacketOptions.kt │ │ └── ui │ │ │ └── UiLuckyDropData.kt │ │ ├── repository │ │ ├── AppRepository.kt │ │ ├── IAppRepository.kt │ │ ├── IPreferenceRepository.kt │ │ └── PreferenceRepository.kt │ │ ├── ui │ │ ├── scenes │ │ │ ├── LabsScene.kt │ │ │ ├── LabsTransakScene.kt │ │ │ ├── PluginSettingsScene.kt │ │ │ └── redpacket │ │ │ │ ├── LuckyDropModal.kt │ │ │ │ └── LuckyDropResultDialog.kt │ │ ├── tab │ │ │ └── LabsTabScreen.kt │ │ └── widget │ │ │ ├── ClaimLoadingIndicator.kt │ │ │ ├── RedPacketClaimButton.kt │ │ │ └── RedPacketShareButton.kt │ │ ├── util │ │ └── RedPacketUtils.kt │ │ └── viewmodel │ │ ├── LabsViewModel.kt │ │ ├── LuckDropViewModel.kt │ │ └── PluginSettingsViewModel.kt │ ├── androidTest │ └── kotlin │ │ └── com │ │ └── dimension │ │ └── maskbook │ │ └── labs │ │ ├── model │ │ └── options │ │ │ └── RedPacketOptionsTest.kt │ │ └── util │ │ └── RedPacketFunctionsTest.kt │ └── commonMain │ └── kotlin │ └── com │ └── dimension │ └── maskbook │ └── labs │ └── route │ └── LabsRoute.kt ├── localization ├── build.gradle.kts ├── consumer-rules.pro ├── crowdin │ ├── app-ja_JP.json │ ├── app-ko_KR.json │ ├── app-qya_AA.json │ ├── app-zh_CN.json │ ├── app-zh_TW.json │ └── app.json ├── proguard-rules.pro └── src │ └── androidMain │ ├── AndroidManifest.xml │ └── res │ ├── drawable │ ├── _2.xml │ ├── _4.xml │ ├── _5.xml │ ├── _6.xml │ ├── _x.xml │ ├── alt.xml │ ├── approve.xml │ ├── artboard.xml │ ├── artboard_1.xml │ ├── bg_pdf.png │ ├── binance.xml │ ├── binance_1.xml │ ├── binance_2.xml │ ├── bitcoin.xml │ ├── bsc.xml │ ├── camera.xml │ ├── chart.xml │ ├── close_square.xml │ ├── coingecko.xml │ ├── coinmarketcap.xml │ ├── dai.xml │ ├── domains.xml │ ├── download.xml │ ├── download1.xml │ ├── edit_square.xml │ ├── en.xml │ ├── enable.xml │ ├── end.xml │ ├── ethereum_eth_logo.xml │ ├── ethereum_o.xml │ ├── ethereum_o1.xml │ ├── ethereum_o1_1.xml │ ├── ethereum_o1_2.xml │ ├── etherscan.xml │ ├── facebook.xml │ ├── filter.xml │ ├── filter1.xml │ ├── ic_a_8.xml │ ├── ic_add_social.png │ ├── ic_add_social_closed.png │ ├── ic_add_user.xml │ ├── ic_arrow_down.xml │ ├── ic_arrow_right.xml │ ├── ic_arrow_up.xml │ ├── ic_back_up.xml │ ├── ic_chain_arbitrum.xml │ ├── ic_chain_bsc.xml │ ├── ic_chain_eth.xml │ ├── ic_chain_matic.xml │ ├── ic_chain_optimism.xml │ ├── ic_chain_rinkeby.xml │ ├── ic_chain_ropsten.xml │ ├── ic_chain_xdai.xml │ ├── ic_clear.xml │ ├── ic_close_circle.xml │ ├── ic_close_square.xml │ ├── ic_connect_account_more.png │ ├── ic_contacts_search_empty.png │ ├── ic_copy.xml │ ├── ic_copy_ens.xml │ ├── ic_create_wallet.xml │ ├── ic_create_wallet_logo.xml │ ├── ic_delete_wallet.xml │ ├── ic_disconnect.xml │ ├── ic_doubt.xml │ ├── ic_download.xml │ ├── ic_edit.xml │ ├── ic_edit_social.xml │ ├── ic_edit_social_finish.xml │ ├── ic_empty_contact.png │ ├── ic_empty_persona.webp │ ├── ic_face_id_enable.png │ ├── ic_faceid_small.xml │ ├── ic_failed.xml │ ├── ic_group_132.xml │ ├── ic_icloud.xml │ ├── ic_import_wallet.xml │ ├── ic_info_circle.xml │ ├── ic_intersect.xml │ ├── ic_iphone.xml │ ├── ic_labs.xml │ ├── ic_labs_collectibles.xml │ ├── ic_labs_dhedge.xml │ ├── ic_labs_encrypted_file.xml │ ├── ic_labs_gitcoin.xml │ ├── ic_labs_ito.xml │ ├── ic_labs_packet.xml │ ├── ic_labs_snapshot.xml │ ├── ic_labs_swap.xml │ ├── ic_labs_transak.xml │ ├── ic_labs_union.xml │ ├── ic_legal.png │ ├── ic_loading.xml │ ├── ic_logout.xml │ ├── ic_mask1.xml │ ├── ic_mask_logo.xml │ ├── ic_mask_logo_small.xml │ ├── ic_more_circle.xml │ ├── ic_more_square.xml │ ├── ic_multi_chain_logo.xml │ ├── ic_note.xml │ ├── ic_opensea_1.xml │ ├── ic_paper_plus.xml │ ├── ic_password.xml │ ├── ic_persona.xml │ ├── ic_persona_default_avatar.xml │ ├── ic_persona_default_small_avatar.xml │ ├── ic_persona_empty_mind.xml │ ├── ic_post.png │ ├── ic_profile.xml │ ├── ic_qr_code_border.xml │ ├── ic_quickswap.png │ ├── ic_receive_redpacket_failed.png │ ├── ic_receive_redpacket_success.png │ ├── ic_recent_address.xml │ ├── ic_recovery_icloud_backup.xml │ ├── ic_recovery_identity.xml │ ├── ic_recovery_local_backup.xml │ ├── ic_recovery_private_key.xml │ ├── ic_rectangle_361.xml │ ├── ic_redpack_good_luck.png │ ├── ic_rename_wallet.xml │ ├── ic_restore.xml │ ├── ic_scan.xml │ ├── ic_scanner.xml │ ├── ic_scanner_line.xml │ ├── ic_search.xml │ ├── ic_search_big.xml │ ├── ic_select_left.xml │ ├── ic_select_right.xml │ ├── ic_setting.xml │ ├── ic_settings.xml │ ├── ic_settings_appearance.xml │ ├── ic_settings_backup_data.xml │ ├── ic_settings_backup_password.xml │ ├── ic_settings_change_payment_password.xml │ ├── ic_settings_datasource.xml │ ├── ic_settings_email.xml │ ├── ic_settings_face_id.xml │ ├── ic_settings_language.xml │ ├── ic_settings_phone_number.xml │ ├── ic_settings_restore_data.xml │ ├── ic_success.xml │ ├── ic_time_circle.xml │ ├── ic_time_circle_border.xml │ ├── ic_token_detail_empty.xml │ ├── ic_touch_id_enable.xml │ ├── ic_touchid_small.xml │ ├── ic_transaction_history.xml │ ├── ic_transaction_history_approve.xml │ ├── ic_transaction_history_receive.xml │ ├── ic_transaction_history_send.xml │ ├── ic_transaction_history_swap.xml │ ├── ic_twitter.xml │ ├── ic_upload_small.xml │ ├── ic_wallet.xml │ ├── ic_wallet_intro.png │ ├── ic_wallet_keystore.xml │ ├── ic_wallet_mnemonic.xml │ ├── ic_wallet_password.xml │ ├── ic_walletconnect.xml │ ├── ic_warn.xml │ ├── ic_warn_blue.xml │ ├── ic_xdai_off.xml │ ├── ic_xdai_on.xml │ ├── image.xml │ ├── import1.xml │ ├── import2.xml │ ├── import_img.xml │ ├── instagram.xml │ ├── keystore.xml │ ├── logos_and_symbols.xml │ ├── logos_and_symbols_1.xml │ ├── logout.xml │ ├── mask.xml │ ├── mask1.xml │ ├── mnemonic.xml │ ├── more.xml │ ├── op.xml │ ├── op_1.xml │ ├── pancakeswap.xml │ ├── password.xml │ ├── pdf_logo.png │ ├── pdf_tips.png │ ├── polkadot.xml │ ├── polygon.xml │ ├── polygon1.xml │ ├── polygon_2.xml │ ├── profile.xml │ ├── quickswap.xml │ ├── restore.xml │ ├── scan.xml │ ├── select.xml │ ├── share.xml │ ├── star2.xml │ ├── sushiswap.xml │ ├── swap.xml │ ├── swap_1.xml │ ├── time_out.xml │ ├── token.xml │ ├── touch_id.xml │ ├── transaction.xml │ ├── transaction_1.xml │ ├── transaction_2.xml │ ├── transmission.xml │ ├── twitter.xml │ ├── twitter_1.xml │ ├── uniswap.xml │ ├── upload.xml │ ├── upload1.xml │ ├── usd_cion.xml │ ├── usdt.xml │ ├── wallet.xml │ ├── wallet_1.xml │ ├── wallet_2.xml │ ├── wallet_3.xml │ ├── wallet_4.xml │ ├── wallet_5.xml │ ├── wallet_6.xml │ └── wallet_7.xml │ ├── values-qya-rAA │ └── strings.xml │ └── values │ └── strings.xml ├── persona ├── build.gradle.kts ├── consumer-rules.pro ├── export │ ├── build.gradle.kts │ └── src │ │ └── commonMain │ │ └── kotlin │ │ └── com │ │ └── dimension │ │ └── maskbook │ │ └── persona │ │ └── export │ │ ├── PersonaServices.kt │ │ ├── error │ │ └── PersonaAlreadyExitsError.kt │ │ └── model │ │ ├── ConnectAccountData.kt │ │ ├── IndexedDBPersona.kt │ │ ├── IndexedDBPost.kt │ │ ├── IndexedDBProfile.kt │ │ ├── IndexedDBRelation.kt │ │ ├── LinkedProfileDetailsState.kt │ │ ├── Network.kt │ │ ├── PersonaData.kt │ │ ├── PersonaQrCode.kt │ │ ├── PlatformType.kt │ │ ├── Profile.kt │ │ └── SocialData.kt ├── proguard-rules.pro ├── schemas │ └── com.dimension.maskbook.persona.db.PersonaDatabase │ │ └── 9.json └── src │ ├── androidAndroidTest │ └── kotlin │ │ └── com │ │ └── dimension │ │ └── maskbook │ │ └── persona │ │ ├── db │ │ ├── DbLinkedProfileRecordTest.kt │ │ ├── DbPersonaRecordTest.kt │ │ ├── DbProfileRecordTest.kt │ │ ├── DbRelationRecordTest.kt │ │ ├── base │ │ │ ├── BaseDaoTest.kt │ │ │ └── PersonaDatabaseTest.kt │ │ └── migrator │ │ │ ├── IndexedDBDataMigratorTest.kt │ │ │ └── mapper │ │ │ └── ProfileMapperTest.kt │ │ ├── mock │ │ └── model │ │ │ └── MockModels.kt │ │ └── model │ │ └── ParamOptionsTest.kt │ ├── androidMain │ ├── AndroidManifest.xml │ └── kotlin │ │ └── com │ │ └── dimension │ │ └── maskbook │ │ └── persona │ │ ├── PersonaServicesImpl.kt │ │ ├── PersonaSetup.kt │ │ ├── data │ │ ├── JSMethod.kt │ │ └── JSMethodV2.kt │ │ ├── datasource │ │ ├── DbPersonaDataSource.kt │ │ ├── DbPostDataSource.kt │ │ ├── DbProfileDataSource.kt │ │ ├── DbRelationDataSource.kt │ │ ├── JsPersonaDataSource.kt │ │ ├── JsPostDataSource.kt │ │ ├── JsProfileDataSource.kt │ │ └── JsRelationDataSource.kt │ │ ├── db │ │ ├── PersonaDatabase.kt │ │ ├── dao │ │ │ ├── LinkedProfileDao.kt │ │ │ ├── PersonaDao.kt │ │ │ ├── PostDao.kt │ │ │ ├── ProfileDao.kt │ │ │ └── RelationDao.kt │ │ ├── migrator │ │ │ ├── IndexedDBDataMigrator.kt │ │ │ └── mapper │ │ │ │ ├── Persona.kt │ │ │ │ ├── Post.kt │ │ │ │ ├── Profile.kt │ │ │ │ └── Relation.kt │ │ ├── model │ │ │ ├── DbLinkedProfileRecord.kt │ │ │ ├── DbPersonaRecord.kt │ │ │ ├── DbPostRecord.kt │ │ │ ├── DbProfileRecord.kt │ │ │ ├── DbRelationRecord.kt │ │ │ ├── PersonaPrivateKey.kt │ │ │ ├── PersonaWithLinkedProfile.kt │ │ │ ├── ProfileWithLinkedProfile.kt │ │ │ ├── RelationWithLinkedProfile.kt │ │ │ ├── ViewLinkedProfileWithKey.kt │ │ │ └── ViewRelationDetail.kt │ │ └── sql │ │ │ ├── Common.kt │ │ │ ├── DbPersonaRecord.kt │ │ │ ├── DbPostRecord.kt │ │ │ ├── DbProfileRecord.kt │ │ │ └── DbRelationRecord.kt │ │ ├── ext │ │ └── JWKExt.kt │ │ ├── model │ │ ├── ContactData.kt │ │ ├── NetworkExt.kt │ │ ├── PostData.kt │ │ ├── SocialProfile.kt │ │ ├── indexed │ │ │ └── IndexedDBAllRecord.kt │ │ └── options │ │ │ ├── Avatar.kt │ │ │ ├── PageOptions.kt │ │ │ ├── ParamOptions.kt │ │ │ ├── Persona.kt │ │ │ ├── Post.kt │ │ │ ├── Profile.kt │ │ │ └── Relation.kt │ │ ├── repository │ │ ├── IContactsRepository.kt │ │ ├── IPersonaRepository.kt │ │ ├── IPostRepository.kt │ │ ├── IPreferenceRepository.kt │ │ ├── ISocialsRepository.kt │ │ ├── PersonaRepository.kt │ │ ├── PostRepository.kt │ │ └── PreferenceRepository.kt │ │ ├── route │ │ ├── RegisterRoute.kt │ │ └── SynchronizationRoute.kt │ │ ├── ui │ │ ├── scenes │ │ │ ├── BackupPasswordScene.kt │ │ │ ├── DownloadQrCodeScene.kt │ │ │ ├── EmptyPersonaScene.kt │ │ │ ├── EmptySocialScene.kt │ │ │ ├── ExportPrivateKeyScene.kt │ │ │ ├── LogoutDialog.kt │ │ │ ├── PersonaInfoScene.kt │ │ │ ├── PersonaMenuScene.kt │ │ │ ├── PersonaScene.kt │ │ │ ├── RenamePersonaModal.kt │ │ │ ├── SwitchPersonaModal.kt │ │ │ ├── avatar │ │ │ │ ├── PersonaAvatarModal.kt │ │ │ │ └── SetAvatarScene.kt │ │ │ ├── contacts │ │ │ │ └── ContactsScene.kt │ │ │ ├── post │ │ │ │ └── PostScene.kt │ │ │ ├── register │ │ │ │ ├── BackUpPasswordModal.kt │ │ │ │ ├── CreatePersonaModal.kt │ │ │ │ ├── CreatePersonaScene.kt │ │ │ │ ├── RegisterScene.kt │ │ │ │ ├── createidentity │ │ │ │ │ ├── BackupIdentityScene.kt │ │ │ │ │ └── CreateIdentityHost.kt │ │ │ │ └── recovery │ │ │ │ │ ├── IdentityScene.kt │ │ │ │ │ ├── PersonaAlreadyExistsDialog.kt │ │ │ │ │ ├── PrivateKeyScene.kt │ │ │ │ │ ├── RecoveryHomeScene.kt │ │ │ │ │ ├── local │ │ │ │ │ ├── RecoveryLocalHost.kt │ │ │ │ │ └── VerifyPaymentPasswordModal.kt │ │ │ │ │ └── remote │ │ │ │ │ └── RemoteBackupRecoveryHost.kt │ │ │ └── social │ │ │ │ ├── ConnectAccountModal.kt │ │ │ │ ├── ConnectSocial.kt │ │ │ │ ├── DisconnectSocialDialog.kt │ │ │ │ ├── SelectPlatformModal.kt │ │ │ │ └── SocialScene.kt │ │ └── tab │ │ │ └── PersonasTabScreen.kt │ │ ├── utils │ │ └── ImagePicker.kt │ │ └── viewmodel │ │ ├── BackUpPasswordViewModel.kt │ │ ├── DownloadQrCodeViewModel.kt │ │ ├── ExportPrivateKeyViewModel.kt │ │ ├── PersonaLogoutViewModel.kt │ │ ├── PersonaMenuViewModel.kt │ │ ├── PersonaViewModel.kt │ │ ├── RenamePersonaViewModel.kt │ │ ├── SwitchPersonaViewModel.kt │ │ ├── VerifyPaymentPasswordViewModel.kt │ │ ├── avatar │ │ └── SetAvatarViewModel.kt │ │ ├── contacts │ │ └── ContactsViewModel.kt │ │ ├── post │ │ └── PostViewModel.kt │ │ ├── recovery │ │ ├── IdentityViewModel.kt │ │ ├── PrivateKeyViewModel.kt │ │ └── RecoveryLocalViewModel.kt │ │ ├── register │ │ ├── CreateIdentityViewModel.kt │ │ └── RemoteBackupRecoveryViewModel.kt │ │ └── social │ │ ├── DisconnectSocialViewModel.kt │ │ └── UserNameModalViewModel.kt │ ├── androidTest │ └── kotlin │ │ └── com │ │ └── dimension │ │ └── maskbook │ │ └── persona │ │ └── model │ │ ├── SocialProfileTest.kt │ │ └── options │ │ └── ProfileOptionsTest.kt │ └── commonMain │ └── kotlin │ └── com │ └── dimension │ └── maskbook │ └── persona │ └── route │ └── PersonaRoute.kt ├── setting ├── build.gradle.kts ├── consumer-rules.pro ├── export │ ├── build.gradle.kts │ └── src │ │ └── commonMain │ │ └── kotlin │ │ └── com │ │ └── dimension │ │ └── maskbook │ │ └── setting │ │ └── export │ │ ├── BackupServices.kt │ │ ├── SettingServices.kt │ │ └── model │ │ ├── Appearance.kt │ │ ├── BackupActions.kt │ │ ├── BackupFileMeta.kt │ │ ├── BackupMeta.kt │ │ ├── BackupMetaFile.kt │ │ ├── BackupPreview.kt │ │ ├── DataProvider.kt │ │ ├── Language.kt │ │ ├── MsgPackType.kt │ │ └── NetworkType.kt ├── proguard-rules.pro └── src │ ├── androidAndroidTest │ └── kotlin │ │ └── com │ │ └── dimension │ │ └── maskbook │ │ └── setting │ │ └── util │ │ └── EncryptUtilsTest.kt │ ├── androidMain │ ├── AndroidManifest.xml │ └── kotlin │ │ └── com │ │ └── dimension │ │ └── maskbook │ │ └── setting │ │ ├── Consts.kt │ │ ├── SettingServicesImpl.kt │ │ ├── SettingSetup.kt │ │ ├── data │ │ ├── JSDataSource.kt │ │ ├── JSMethod.kt │ │ └── SettingDataSource.kt │ │ ├── ext │ │ ├── BackupMetaFile.kt │ │ └── JWK.kt │ │ ├── model │ │ ├── RemoteBackupData.kt │ │ └── mapping │ │ │ └── Profile.kt │ │ ├── repository │ │ ├── BackupRepository.kt │ │ ├── ISettingsRepository.kt │ │ └── SettingsRepository.kt │ │ ├── route │ │ ├── BackupRoute.kt │ │ └── SettingsRoute.kt │ │ ├── services │ │ ├── BackupServices.kt │ │ └── model │ │ │ └── Model.kt │ │ ├── ui │ │ ├── scenes │ │ │ ├── AppearanceSettings.kt │ │ │ ├── ChangeBackUpPasswordModal.kt │ │ │ ├── ChangePaymentPasswordModal.kt │ │ │ ├── DataSourceSettings.kt │ │ │ ├── LanguageSettings.kt │ │ │ ├── PhoneCodeInputModal.kt │ │ │ ├── PhoneModal.kt │ │ │ ├── SettingsScene.kt │ │ │ └── backup │ │ │ │ ├── BackupCloudScene.kt │ │ │ │ ├── BackupLocalScene.kt │ │ │ │ ├── BackupPasswordInputModal.kt │ │ │ │ └── BackupSelectionModal.kt │ │ └── tab │ │ │ └── SettingsTabScreen.kt │ │ ├── util │ │ └── EncryptUtils.kt │ │ └── viewmodel │ │ ├── AppearanceSettingsViewModel.kt │ │ ├── BackupCloudExecuteViewModel.kt │ │ ├── BackupCloudViewModel.kt │ │ ├── BackupLocalViewModel.kt │ │ ├── BackupMergeConfirmViewModel.kt │ │ ├── BackupPasswordSettingsViewModel.kt │ │ ├── DataSourceSettingsViewModel.kt │ │ ├── EmailBackupViewModel.kt │ │ ├── EmailSetupViewModel.kt │ │ ├── LanguageSettingsViewModel.kt │ │ ├── PaymentPasswordSettingsViewModel.kt │ │ └── base │ │ └── RemoteBackupRecoveryViewModelBase.kt │ └── commonMain │ └── kotlin │ └── com │ └── dimension │ └── maskbook │ └── setting │ └── route │ └── SettingRoute.kt ├── settings.gradle.kts ├── spotless └── license └── wallet ├── .gitignore ├── build.gradle.kts ├── consumer-rules.pro ├── export ├── build.gradle.kts └── src │ └── commonMain │ └── kotlin │ └── com │ └── dimension │ └── maskbook │ └── wallet │ └── export │ ├── WalletServices.kt │ └── model │ ├── BackupWalletData.kt │ ├── ChainData.kt │ ├── ChainType.kt │ ├── CollectibleContractSchema.kt │ ├── DbWalletBalanceType.kt │ ├── SendTransactionData.kt │ ├── TokenData.kt │ ├── TradableData.kt │ ├── WalletCollectibleData.kt │ ├── WalletData.kt │ └── WalletTokenData.kt ├── proguard-rules.pro └── src ├── androidMain ├── AndroidManifest.xml ├── assets │ └── wallet_connect.json └── kotlin │ └── com │ └── dimension │ └── maskbook │ └── wallet │ ├── WalletServicesImpl.kt │ ├── WalletSetup.kt │ ├── data │ └── JSMethod.kt │ ├── db │ ├── AppDatabase.kt │ ├── RoomMigrations.kt │ ├── dao │ │ ├── ChainDao.kt │ │ ├── CollectibleDao.kt │ │ ├── SendHistoryDao.kt │ │ ├── StoredKeyDao.kt │ │ ├── TokenDao.kt │ │ ├── TransactionDao.kt │ │ ├── WCWalletDao.kt │ │ ├── WalletBalanceDao.kt │ │ ├── WalletContactDao.kt │ │ ├── WalletDao.kt │ │ └── WalletTokenDao.kt │ └── model │ │ ├── DbChainData.kt │ │ ├── DbCollectible.kt │ │ ├── DbSendHistory.kt │ │ ├── DbToken.kt │ │ ├── DbTransactionData.kt │ │ ├── DbWCWallet.kt │ │ ├── DbWallet.kt │ │ ├── DbWalletBalance.kt │ │ ├── DbWalletContact.kt │ │ └── DbWalletToken.kt │ ├── ext │ ├── ChainTypeExt.kt │ └── EthExtensions.kt │ ├── handler │ ├── Web3MessageHandler.kt │ └── Web3SendResponse.kt │ ├── model │ └── SendTokenRequest.kt │ ├── paging │ └── mediator │ │ ├── BaseCollectibleMediator.kt │ │ ├── CollectibleCollectionMediator.kt │ │ └── CollectibleMediator.kt │ ├── repository │ ├── CollectibleRepository.kt │ ├── ICollectibleRepository.kt │ ├── ISendHistoryRepository.kt │ ├── ITokenRepository.kt │ ├── ITransactionRepository.kt │ ├── IWalletConnectRepository.kt │ ├── IWalletRepository.kt │ ├── WalletContactRepository.kt │ ├── WalletRepository.kt │ └── model │ │ └── DerivationPath.kt │ ├── route │ └── WalletsRoute.kt │ ├── services │ ├── EtherscanServices.kt │ ├── GasServices.kt │ ├── OpenSeaServices.kt │ ├── WalletConnectServices.kt │ ├── WalletServices.kt │ └── model │ │ ├── Etherscan.kt │ │ ├── GasFeeResponse.kt │ │ ├── OpenSea.kt │ │ └── WCSupportedWalletResponse.kt │ ├── ui │ ├── scenes │ │ └── wallets │ │ │ ├── UnlockWalletDialog.kt │ │ │ ├── WalletQrcodeScene.kt │ │ │ ├── collectible │ │ │ └── CollectibleDetailScene.kt │ │ │ ├── common │ │ │ ├── CreateOrImportResult.kt │ │ │ └── MultiChainWalletDialog.kt │ │ │ ├── create │ │ │ ├── CreateOrImportWalletScene.kt │ │ │ ├── create │ │ │ │ ├── CreateWalletHost.kt │ │ │ │ ├── MnemonicPhraseScene.kt │ │ │ │ └── MnemonicWarningDialog.kt │ │ │ └── import │ │ │ │ ├── ImportWalletDerivationPathScene.kt │ │ │ │ ├── ImportWalletKeystoreScene.kt │ │ │ │ ├── ImportWalletMnemonicScene.kt │ │ │ │ ├── ImportWalletPrivateKeyScene.kt │ │ │ │ └── ImportWalletScene.kt │ │ │ ├── intro │ │ │ ├── LegalScene.kt │ │ │ ├── WalletIntroHost.kt │ │ │ ├── WalletIntroScene.kt │ │ │ └── password │ │ │ │ ├── BiometricsEnableScene.kt │ │ │ │ └── TouchIdEnableScene.kt │ │ │ ├── management │ │ │ ├── BackupWalletScene.kt │ │ │ ├── TransactionDetailModal.kt │ │ │ ├── WalletBalancesScene.kt │ │ │ ├── WalletDeleteDialog.kt │ │ │ ├── WalletManagementModal.kt │ │ │ ├── WalletNetworkSwitchWarningDialog.kt │ │ │ ├── WalletRenameModal.kt │ │ │ ├── WalletSwitchAddModal.kt │ │ │ ├── WalletSwitchEditModal.kt │ │ │ ├── WalletSwitchModal.kt │ │ │ └── WalletTransactionHistoryScene.kt │ │ │ ├── send │ │ │ ├── AddContactSheet.kt │ │ │ ├── ConfirmSheets.kt │ │ │ ├── EditGasPriceSheet.kt │ │ │ ├── EmptyTokenDialog.kt │ │ │ ├── SearchAddressScene.kt │ │ │ ├── SearchCollectibleScene.kt │ │ │ ├── SearchTokenScene.kt │ │ │ ├── SendTokenConfirmModal.kt │ │ │ ├── TranserHost.kt │ │ │ ├── TransferDetailScene.kt │ │ │ └── UnlockWalletDialog.kt │ │ │ ├── token │ │ │ └── TokenDetailScene.kt │ │ │ ├── transactions │ │ │ └── SpeedUpTransactionModal.kt │ │ │ └── walletconnect │ │ │ ├── DAppConnectedModal.kt │ │ │ ├── WalletConnectApproveModal.kt │ │ │ └── WalletConnectModal.kt │ ├── tab │ │ └── WalletTabScreen.kt │ └── widget │ │ ├── CollectibleCard.kt │ │ ├── CollectibleCollectionCard.kt │ │ ├── TransactionHistoryList.kt │ │ ├── WalletCard.kt │ │ └── WalletConnectFloatingButton.kt │ ├── usecase │ ├── AddressUseCases.kt │ ├── CollectibleUseCases.kt │ ├── GasUseCases.kt │ ├── RefreshWalletUseCase.kt │ ├── SetCurrentChainUseCase.kt │ ├── TokenUseCases.kt │ └── VerifyPaymentPasswordUseCase.kt │ ├── viewmodel │ ├── WelcomeViewModel.kt │ └── wallets │ │ ├── TokenDetailViewModel.kt │ │ ├── TouchIdEnableViewModel.kt │ │ ├── UnlockWalletViewModel.kt │ │ ├── WalletBalancesViewModel.kt │ │ ├── WalletConnectManagementViewModel.kt │ │ ├── WalletManagementModalViewModel.kt │ │ ├── collectible │ │ ├── CollectibleDetailViewModel.kt │ │ └── CollectiblesViewModel.kt │ │ ├── create │ │ └── CreateWalletRecoveryKeyViewModel.kt │ │ ├── import │ │ ├── ImportWalletDerivationPathViewModel.kt │ │ ├── ImportWalletKeystoreViewModel.kt │ │ ├── ImportWalletMnemonicViewModel.kt │ │ └── ImportWalletPrivateKeyViewModel.kt │ │ ├── management │ │ ├── WalletBackupViewModel.kt │ │ ├── WalletDeleteViewModel.kt │ │ ├── WalletRenameViewModel.kt │ │ ├── WalletSwitchEditViewModel.kt │ │ ├── WalletSwitchViewModel.kt │ │ └── WalletTransactionHistoryViewModel.kt │ │ ├── send │ │ ├── AddContactViewModel.kt │ │ ├── GasFeeViewModel.kt │ │ ├── SearchAddressViewModel.kt │ │ ├── SearchTradableViewModel.kt │ │ ├── SendConfirmViewModel.kt │ │ ├── TransferDetailViewModel.kt │ │ └── Web3TransactionConfirmViewModel.kt │ │ └── walletconnect │ │ ├── DAppConnectedViewModel.kt │ │ ├── WalletConnectServerViewModel.kt │ │ └── WalletConnectViewModel.kt │ └── walletconnect │ ├── WCSupportedWallet.kt │ ├── WalletConnectClientManager.kt │ ├── WalletConnectServerManager.kt │ └── v1 │ ├── BaseWalletConnectManager.kt │ ├── WCSessionV1.kt │ ├── client │ └── WalletConnectClientManagerV1.kt │ └── server │ ├── WalletConnectServerManagerV1.kt │ └── WalletConnectServerRequest.kt └── commonMain └── kotlin └── com └── dimension └── maskbook └── wallet └── route └── WalletRoute.kt /.github/apply_signing.sh: -------------------------------------------------------------------------------- 1 | echo $SIGNING_KEY | base64 -d > key.jks 2 | echo $GOOGLE_SERVICES | base64 -d > app/google-services.json 3 | echo "storeFile=key.jks 4 | storePassword=$KEY_STORE_PASSWORD 5 | keyAlias=$ALIAS 6 | keyPassword=$KEY_PASSWORD" >signing.properties -------------------------------------------------------------------------------- /.github/build_custom_gecko.sh: -------------------------------------------------------------------------------- 1 | hg clone https://hg.mozilla.org/mozilla-central 2 | hg up -C FIREFOX_BETA_87_BASE 3 | hg import ./customGecko.patch --no-commit 4 | cd mozilla-central 5 | echo 'ac_add_options --enable-application=mobile/android 6 | ac_add_options --enable-artifact-builds 7 | ac_add_options --enable-update-channel=beta 8 | ac_add_options --target=aarch64-linux-android 9 | mk_add_options MOZ_OBJDIR=./objdir-frontend' >mozconfig 10 | ./mach bootstrap --application-choice mobile_android_artifact_mode --no-interactive 11 | ./mach build 12 | # maven output under ./objdir-frontend/gradle/build/mobile/android/geckoview/maven/ -------------------------------------------------------------------------------- /.github/build_maskbook.sh: -------------------------------------------------------------------------------- 1 | mkdir build 2 | cd build 3 | git clone https://github.com/DimensionDev/Maskbook.git 4 | cd Maskbook 5 | git reset --hard 361cd64d69e6bea94b1f7a8be2f5937a1fa2d278 6 | pnpm install 7 | npx gulp build-ci 8 | mkdir -p ../../extension/src/androidMain/assets/web_extensions/Maskbook 9 | unzip -o ./MaskNetwork.gecko.zip -d ../../extension/src/androidMain/assets/web_extensions/Maskbook -------------------------------------------------------------------------------- /.github/fetch_maskbook.sh: -------------------------------------------------------------------------------- 1 | wget -O ./Maskbook.zip https://output.circle-artifacts.com/output/job/6c11fa90-a0e4-4a79-aa43-68b5df85c643/artifacts/0/MaskNetwork.gecko.zip --header "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3829.0 Safari/537.36 Edg/77.0.197.1" 2 | mkdir -p ./extension/src/androidMain/assets/web_extensions/Maskbook 3 | unzip -o ./Maskbook.zip -d ./extension/src/androidMain/assets/web_extensions/Maskbook 4 | rm ./Maskbook.zip -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea 5 | .DS_Store 6 | build/ 7 | /captures 8 | .externalNativeBuild 9 | mozilla-central 10 | \.settings/ 11 | 12 | **/assets/web_extensions/Maskbook/ 13 | Maskbook.zip 14 | 15 | setting/src/androidAndroidTest/assets/backup -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.tool-versions: -------------------------------------------------------------------------------- 1 | java openjdk-11.0.2 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Mask-Android 2 | 3 | # Build guide 4 | Run the script `./.github/fetch_maskbook.sh` to fetch the asset of Mask 5 | `./gradlew build` to build the application 6 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/app/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_splash.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | @color/colorPrimary 4 | #1C68F3 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Mask 4 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 17 | 18 | 19 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/test/java/com/dimension/maskbook/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook 22 | 23 | import org.junit.Test 24 | 25 | /** 26 | * Example local unit test, which will execute on the development machine (host). 27 | * 28 | * See [testing documentation](http://d.android.com/tools/testing). 29 | */ 30 | class ExampleUnitTest { 31 | @Test 32 | fun addition_isCorrect() { 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.android.application").apply(false) 3 | id("com.android.library").apply(false) 4 | kotlin("android").apply(false) 5 | id("com.diffplug.spotless").version(Versions.spotless) 6 | } 7 | 8 | allprojects { 9 | tasks.withType { 10 | kotlinOptions { 11 | jvmTarget = Versions.Java.jvmTarget 12 | allWarningsAsErrors = true 13 | freeCompilerArgs = listOf( 14 | "-opt-in=kotlin.RequiresOptIn", 15 | "-Xcontext-receivers", 16 | ) 17 | } 18 | } 19 | 20 | apply(plugin = "com.diffplug.spotless") 21 | spotless { 22 | kotlin { 23 | target("**/*.kt") 24 | targetExclude("$buildDir/**/*.kt", "bin/**/*.kt", "buildSrc/**/*.kt") 25 | ktlint(Versions.ktlint) 26 | licenseHeaderFile(rootProject.file("spotless/license")) 27 | } 28 | kotlinGradle { 29 | target("*.gradle.kts") 30 | ktlint(Versions.ktlint) 31 | } 32 | java { 33 | target("**/*.java") 34 | targetExclude("$buildDir/**/*.java", "bin/**/*.java") 35 | licenseHeaderFile(rootProject.file("spotless/license")) 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /buildSrc/.gitignore: -------------------------------------------------------------------------------- 1 | build -------------------------------------------------------------------------------- /buildSrc/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | `kotlin-dsl` 3 | } 4 | 5 | repositories { 6 | mavenCentral() 7 | google() 8 | } 9 | 10 | dependencies { 11 | implementation("com.android.tools.build:gradle:7.0.4") 12 | api(kotlin("gradle-plugin", version = "1.6.21")) 13 | } -------------------------------------------------------------------------------- /buildSrc/src/main/kotlin/Package.kt: -------------------------------------------------------------------------------- 1 | object Package { 2 | const val group = "com.dimension" 3 | const val name = "Mask" 4 | const val id = "$group.maskbook" 5 | val versionName = 6 | "${Version.main}.${Version.mirror}.${Version.patch}${if (Version.revision.isNotEmpty()) "-${Version.revision}" else ""}" 7 | const val versionCode = Version.build 8 | 9 | object Version { 10 | const val main = "2" 11 | const val mirror = "9" 12 | const val patch = "0" 13 | const val revision = "" 14 | const val build = 72 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /common/bigDecimal/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | id("com.android.library") 4 | } 5 | 6 | kotlin { 7 | android() 8 | jvm() 9 | } 10 | 11 | android { 12 | setupLibrary() 13 | } 14 | -------------------------------------------------------------------------------- /common/bigDecimal/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/common/bigDecimal/consumer-rules.pro -------------------------------------------------------------------------------- /common/bigDecimal/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /common/bigDecimal/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /common/bigDecimal/src/androidMain/kotlin/com/dimension/maskbook/common/bigDecimal/BigDecimal.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.common.bigDecimal 22 | 23 | actual typealias BigDecimal = java.math.BigDecimal 24 | -------------------------------------------------------------------------------- /common/bigDecimal/src/commonMain/kotlin/com/dimension/maskbook/common/bigDecimal/BigDecimal.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.common.bigDecimal 22 | 23 | expect class BigDecimal 24 | -------------------------------------------------------------------------------- /common/bigDecimal/src/jvmMain/kotlin/com/dimension/maskbook/common/bigDecimal/BigDecimal.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.common.bigDecimal 22 | 23 | actual typealias BigDecimal = java.math.BigDecimal 24 | -------------------------------------------------------------------------------- /common/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/common/consumer-rules.pro -------------------------------------------------------------------------------- /common/gecko/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/common/gecko/consumer-rules.pro -------------------------------------------------------------------------------- /common/gecko/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /common/gecko/sample/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /common/gecko/sample/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /common/gecko/sample/src/main/assets/extensions/borderify/borderify.js: -------------------------------------------------------------------------------- 1 | document.body.style.border = "5px solid red"; -------------------------------------------------------------------------------- /common/gecko/sample/src/main/assets/extensions/borderify/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "applications": { 4 | "gecko": { 5 | "id": "borderify@mozac.org" 6 | } 7 | }, 8 | "name": "Mozilla Android Components - Borderify", 9 | "version": "${version}", 10 | "content_scripts": [ 11 | { 12 | "matches": ["*://www.mozilla.org/*"], 13 | "js": ["borderify.js"] 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /common/gecko/sample/src/main/assets/extensions/borderify/manifest.template.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "applications": { 4 | "gecko": { 5 | "id": "borderify@mozac.org" 6 | } 7 | }, 8 | "name": "Mozilla Android Components - Borderify", 9 | "version": "${version}", 10 | "content_scripts": [ 11 | { 12 | "matches": ["*://www.mozilla.org/*"], 13 | "js": ["borderify.js"] 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /common/gecko/sample/src/main/assets/extensions/test/background.js: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this file, 3 | * You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 | 5 | /* Avoid adding ID selector rules in this style sheet, since they could 6 | * inadvertently match elements in the article content. */ 7 | 8 | // Counts to three and sends a greeting via the browser action of a newly created tab. 9 | browser.tabs.onCreated.addListener((tab) => { 10 | let counter = 0; 11 | let intervalId = setInterval(() => { 12 | var message; 13 | if (++counter <= 3) { 14 | message = "" + counter; 15 | } else { 16 | message = "Hi!"; 17 | clearInterval(intervalId); 18 | } 19 | browser.browserAction.setBadgeTextColor({tabId: tab.id, color: "#FFFFFF"}); 20 | browser.browserAction.setBadgeText({tabId: tab.id, text: message}); 21 | }, 1000); 22 | }); 23 | 24 | browser.browserAction.setBadgeBackgroundColor({color: "#AAAAAA"}); -------------------------------------------------------------------------------- /common/gecko/sample/src/main/assets/extensions/test/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/common/gecko/sample/src/main/assets/extensions/test/icon.png -------------------------------------------------------------------------------- /common/gecko/sample/src/main/assets/extensions/test/manifest.template.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "applications": { 4 | "gecko": { 5 | "id": "testext@mozac.org" 6 | } 7 | }, 8 | "name": "Mozilla Android Components - Test extension", 9 | "description": "This extension is used for testing web extension functionality in Android Components", 10 | "version": "${version}", 11 | "background": { 12 | "scripts": ["background.js"] 13 | }, 14 | "browser_action": { 15 | "default_icon": "icon.png", 16 | "default_title": "Test", 17 | "default_popup": "popup.html" 18 | }, 19 | "permissions": [ 20 | "tabs" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /common/gecko/sample/src/main/assets/extensions/test/popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 |

Hello world!

11 |

This is a browser action default popup.

12 | 13 | -------------------------------------------------------------------------------- /common/gecko/sample/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/common/gecko/sample/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /common/gecko/sample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /common/gecko/sample/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /common/gecko/sample/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/common/gecko/sample/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /common/gecko/sample/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/common/gecko/sample/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /common/gecko/sample/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/common/gecko/sample/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /common/gecko/sample/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/common/gecko/sample/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /common/gecko/sample/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/common/gecko/sample/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /common/gecko/sample/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/common/gecko/sample/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /common/gecko/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/common/gecko/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /common/gecko/sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/common/gecko/sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /common/gecko/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/common/gecko/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /common/gecko/sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/common/gecko/sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /common/gecko/sample/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | GeckoSample 4 | -------------------------------------------------------------------------------- /common/gecko/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /common/okhttp/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | id("com.android.library") 4 | } 5 | 6 | kotlin { 7 | android() 8 | sourceSets { 9 | val androidMain by getting { 10 | dependencies { 11 | api("com.squareup.okhttp3:okhttp:${Versions.okhttp}") 12 | api("com.squareup.okhttp3:logging-interceptor:${Versions.okhttp}") 13 | implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:${Versions.Kotlin.coroutines}") 14 | } 15 | } 16 | val androidTest by getting { 17 | dependencies { 18 | } 19 | } 20 | } 21 | } 22 | 23 | android { 24 | setupLibrary() 25 | } 26 | -------------------------------------------------------------------------------- /common/okhttp/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/common/okhttp/consumer-rules.pro -------------------------------------------------------------------------------- /common/okhttp/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /common/okhttp/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /common/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /common/retrofit/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | id("com.android.library") 4 | kotlin("plugin.serialization") 5 | } 6 | 7 | kotlin { 8 | android() 9 | sourceSets { 10 | val androidMain by getting { 11 | dependencies { 12 | api(projects.common.okhttp) 13 | api("com.squareup.retrofit2:retrofit:${Versions.retrofit}") 14 | api("com.squareup.retrofit2:converter-scalars:${Versions.retrofit}") 15 | api("com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:${Versions.retrofitSerialization}") 16 | api("org.jetbrains.kotlinx:kotlinx-serialization-json:${Versions.Kotlin.serialization}") 17 | } 18 | } 19 | val androidTest by getting { 20 | dependencies { 21 | } 22 | } 23 | } 24 | } 25 | 26 | android { 27 | setupLibrary() 28 | } 29 | -------------------------------------------------------------------------------- /common/retrofit/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/common/retrofit/consumer-rules.pro -------------------------------------------------------------------------------- /common/retrofit/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /common/retrofit/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /common/routeProcessor/annotations/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | id("com.android.library") 4 | } 5 | 6 | kotlin { 7 | android() 8 | jvm() 9 | } 10 | 11 | android { 12 | setupLibrary() 13 | } 14 | -------------------------------------------------------------------------------- /common/routeProcessor/annotations/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/common/routeProcessor/annotations/consumer-rules.pro -------------------------------------------------------------------------------- /common/routeProcessor/annotations/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /common/routeProcessor/annotations/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /common/routeProcessor/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("jvm") 3 | } 4 | 5 | dependencies { 6 | implementation(projects.common.routeProcessor.annotations) 7 | implementation("com.google.devtools.ksp:symbol-processing-api:${Versions.ksp}") 8 | implementation("com.squareup:kotlinpoet:${Versions.kotlinpoet}") 9 | implementation("com.squareup:kotlinpoet-ksp:${Versions.kotlinpoet}") 10 | } 11 | -------------------------------------------------------------------------------- /common/routeProcessor/src/main/resources/META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider: -------------------------------------------------------------------------------- 1 | com.dimension.maskbook.common.routeProcessor.RouteProcessorProvider 2 | com.dimension.maskbook.common.routeProcessor.RouteGraphProcessorProvider -------------------------------------------------------------------------------- /common/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /common/src/androidMain/kotlin/com/dimension/maskbook/common/Consts.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.common 22 | 23 | const val IoScopeName = "IoScope" 24 | 25 | const val LocalBackupAccount = "" 26 | -------------------------------------------------------------------------------- /common/src/androidMain/kotlin/com/dimension/maskbook/common/exception/NullTransactionReceiptException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.common.exception 22 | 23 | class NullTransactionReceiptException : Exception("transactionReceipt is null") 24 | -------------------------------------------------------------------------------- /common/src/androidMain/kotlin/com/dimension/maskbook/common/ext/BigIntegerExt.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.common.ext 22 | 23 | import org.web3j.utils.Numeric 24 | import java.math.BigInteger 25 | 26 | fun BigInteger.toHexString(): String { 27 | return Numeric.toHexStringWithPrefix(this) 28 | } 29 | -------------------------------------------------------------------------------- /common/src/androidMain/kotlin/com/dimension/maskbook/common/ext/BitmapExt.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.common.ext 22 | 23 | import android.graphics.Bitmap 24 | import java.io.ByteArrayOutputStream 25 | 26 | fun Bitmap.toByteArray(): ByteArray { 27 | return ByteArrayOutputStream().use { 28 | compress(Bitmap.CompressFormat.PNG, 90, it) 29 | it.toByteArray() 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /common/src/androidMain/kotlin/com/dimension/maskbook/common/ext/StringExt.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.common.ext 22 | 23 | inline fun C?.ifNullOrEmpty(defaultValue: () -> R): R = 24 | if (isNullOrEmpty()) defaultValue() else this 25 | 26 | val String.isHexStrict: Boolean 27 | get() = matches("^(0x)?([0-9a-fA-F]{2})+$".toRegex()) 28 | -------------------------------------------------------------------------------- /common/src/androidMain/kotlin/com/dimension/maskbook/common/ext/URL.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.common.ext 22 | 23 | import java.net.URLDecoder 24 | import java.net.URLEncoder 25 | 26 | fun String.decodeUrl(): String = URLDecoder.decode(this, "UTF-8") 27 | fun String.encodeUrl(): String = URLEncoder.encode(this, "UTF-8") 28 | -------------------------------------------------------------------------------- /common/src/androidMain/kotlin/com/dimension/maskbook/common/model/DateType.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.common.model 22 | 23 | sealed class DateType { 24 | object Today : DateType() 25 | object Yesterday : DateType() 26 | object ThisMonth : DateType() 27 | object ThisYear : DateType() 28 | object OlderDate : DateType() 29 | } 30 | -------------------------------------------------------------------------------- /common/src/androidMain/kotlin/com/dimension/maskbook/common/model/MnemonicWord.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.common.model 22 | 23 | data class MnemonicWord( 24 | val id: Int, 25 | val word: String 26 | ) 27 | -------------------------------------------------------------------------------- /common/src/androidMain/kotlin/com/dimension/maskbook/common/model/ResultEvent.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.common.model 22 | 23 | sealed class ResultEvent { 24 | 25 | internal object None : ResultEvent() 26 | 27 | data class TokenConfirm(val transactionHash: String?) : ResultEvent() 28 | } 29 | -------------------------------------------------------------------------------- /common/src/androidMain/kotlin/com/dimension/maskbook/common/ui/tab/TabScreen.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.common.ui.tab 22 | 23 | import androidx.compose.runtime.Composable 24 | import androidx.navigation.NavController 25 | 26 | interface TabScreen { 27 | 28 | val route: String 29 | 30 | val title: Int 31 | 32 | val icon: Int 33 | 34 | @Composable 35 | fun Content(navController: NavController) 36 | } 37 | -------------------------------------------------------------------------------- /common/src/androidMain/kotlin/com/dimension/maskbook/common/util/AppCoroutineExceptionHandler.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.common.util 22 | 23 | import android.util.Log 24 | import kotlinx.coroutines.CoroutineExceptionHandler 25 | 26 | internal val coroutineExceptionHandler = CoroutineExceptionHandler { _, throwable -> 27 | Log.w("CoroutineError", throwable) 28 | } 29 | -------------------------------------------------------------------------------- /common/src/androidMain/res/drawable/ic_eye_show.xml: -------------------------------------------------------------------------------- 1 | 6 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /common/src/commonMain/kotlin/com/dimension/maskbook/common/manager/KeyStoreManager.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.common.manager 22 | 23 | expect class KeyStoreManager { 24 | 25 | fun encryptData(plainText: ByteArray): ByteArray 26 | 27 | fun decryptData(cipherText: ByteArray): ByteArray 28 | } 29 | -------------------------------------------------------------------------------- /crowdin.yml: -------------------------------------------------------------------------------- 1 | files: 2 | - source: /localization/crowdin/app.json 3 | translation: /localization/crowdin/%file_name%-%locale_with_underscore%.json -------------------------------------------------------------------------------- /debankapi/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /debankapi/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("jvm") 3 | kotlin("plugin.serialization") version Versions.Kotlin.lang 4 | } 5 | 6 | java { 7 | sourceCompatibility = Versions.Java.java 8 | targetCompatibility = Versions.Java.java 9 | } 10 | 11 | dependencies { 12 | implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.Kotlin.coroutines}") 13 | implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:${Versions.Kotlin.serialization}") 14 | implementation("com.squareup.retrofit2:retrofit:${Versions.retrofit}") 15 | implementation("com.squareup.retrofit2:converter-scalars:${Versions.retrofit}") 16 | implementation("com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:${Versions.retrofitSerialization}") 17 | implementation("com.squareup.okhttp3:okhttp:${Versions.okhttp}") 18 | implementation("com.squareup.okhttp3:logging-interceptor:${Versions.okhttp}") 19 | } 20 | -------------------------------------------------------------------------------- /debankapi/src/main/java/com/dimension/maskbook/debankapi/api/DebankResources.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.debankapi.api 22 | 23 | interface DebankResources : ChainResources, TokenResources, UserResources, TransactionResources 24 | -------------------------------------------------------------------------------- /debankapi/src/main/java/com/dimension/maskbook/debankapi/model/UserChainBalance.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.debankapi.model 22 | 23 | import kotlinx.serialization.SerialName 24 | import kotlinx.serialization.Serializable 25 | 26 | @Serializable 27 | data class UserChainBalance( 28 | @SerialName("usd_value") 29 | val usdValue: Double? = null 30 | ) 31 | -------------------------------------------------------------------------------- /debankapi/src/main/java/com/dimension/maskbook/debankapi/model/UserTotalBalance.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.debankapi.model 22 | 23 | import kotlinx.serialization.SerialName 24 | import kotlinx.serialization.Serializable 25 | 26 | @Serializable 27 | data class UserTotalBalance( 28 | @SerialName("total_usd_value") 29 | val totalUsdValue: Double? = null, 30 | 31 | @SerialName("chain_list") 32 | val chainList: List? = null 33 | ) 34 | -------------------------------------------------------------------------------- /entry/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | id("com.android.library") 4 | id("org.jetbrains.compose").version(Versions.compose_jb) 5 | id("com.google.devtools.ksp").version(Versions.ksp) 6 | } 7 | 8 | kotlin { 9 | android() 10 | sourceSets { 11 | val commonMain by getting { 12 | dependencies { 13 | api(projects.common) 14 | api(projects.wallet) 15 | api(projects.persona) 16 | api(projects.labs) 17 | api(projects.setting) 18 | api(projects.extension) 19 | implementation(projects.common.routeProcessor.annotations) 20 | kspAndroid(projects.common.routeProcessor) 21 | } 22 | } 23 | 24 | val androidMain by getting { 25 | dependencies { 26 | } 27 | } 28 | val androidTest by getting { 29 | dependencies { 30 | } 31 | } 32 | } 33 | } 34 | 35 | android { 36 | setupLibrary() 37 | } 38 | -------------------------------------------------------------------------------- /entry/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/entry/consumer-rules.pro -------------------------------------------------------------------------------- /entry/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /entry/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /entry/src/androidMain/res/drawable/ic_intro_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/entry/src/androidMain/res/drawable/ic_intro_01.png -------------------------------------------------------------------------------- /entry/src/androidMain/res/drawable/ic_intro_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/entry/src/androidMain/res/drawable/ic_intro_02.png -------------------------------------------------------------------------------- /entry/src/androidMain/res/drawable/ic_intro_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/entry/src/androidMain/res/drawable/ic_intro_03.png -------------------------------------------------------------------------------- /entry/src/androidMain/res/drawable/ic_intro_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/entry/src/androidMain/res/drawable/ic_intro_04.png -------------------------------------------------------------------------------- /entry/src/androidMain/res/drawable/ic_intro_grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/entry/src/androidMain/res/drawable/ic_intro_grid.png -------------------------------------------------------------------------------- /entry/src/commonMain/kotlin/com/dimension/maskbook/entry/route/EntryRoute.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.entry.route 22 | 23 | import com.dimension.maskbook.common.routeProcessor.annotations.Route 24 | 25 | @Suppress("CONST_VAL_WITHOUT_INITIALIZER") 26 | @Route 27 | expect object EntryRoute { 28 | const val Intro: String 29 | const val Splash: String 30 | } 31 | -------------------------------------------------------------------------------- /extension/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | id("com.android.library") 4 | kotlin("plugin.serialization").version(Versions.Kotlin.lang) 5 | id("org.jetbrains.compose").version(Versions.compose_jb) 6 | id("com.google.devtools.ksp").version(Versions.ksp) 7 | } 8 | 9 | kotlin { 10 | android() 11 | sourceSets { 12 | val commonMain by getting { 13 | dependencies { 14 | implementation(projects.common.routeProcessor.annotations) 15 | kspAndroid(projects.common.routeProcessor) 16 | } 17 | } 18 | 19 | val androidMain by getting { 20 | dependencies { 21 | implementation(projects.common) 22 | implementation(projects.common.gecko) 23 | } 24 | } 25 | val androidTest by getting { 26 | dependencies { 27 | } 28 | } 29 | } 30 | } 31 | 32 | android { 33 | setupLibrary() 34 | } 35 | -------------------------------------------------------------------------------- /extension/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/extension/consumer-rules.pro -------------------------------------------------------------------------------- /extension/export/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | kotlin("plugin.serialization") 4 | } 5 | 6 | kotlin { 7 | jvm() 8 | sourceSets { 9 | val commonMain by getting { 10 | dependencies { 11 | implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.Kotlin.coroutines}") 12 | implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:${Versions.Kotlin.serialization}") 13 | } 14 | } 15 | val commonTest by getting { 16 | dependencies { 17 | } 18 | } 19 | } 20 | } 21 | 22 | java { 23 | sourceCompatibility = Versions.Java.java 24 | targetCompatibility = Versions.Java.java 25 | } 26 | -------------------------------------------------------------------------------- /extension/export/src/commonMain/kotlin/com/dimension/maskbook/extension/export/model/ExtensionResponse.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.extension.export.model 22 | 23 | inline fun buildExtensionResponse( 24 | id: ExtensionId, 25 | jsonrpc: String, 26 | result: T?, 27 | ): Map = mapOf( 28 | "id" to id.value, 29 | "jsonrpc" to jsonrpc, 30 | "result" to result 31 | ).map { it.key to it.value }.toMap() 32 | -------------------------------------------------------------------------------- /extension/export/src/commonMain/kotlin/com/dimension/maskbook/extension/export/model/Site.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.extension.export.model 22 | 23 | enum class Site { 24 | Twitter, 25 | TwitterSign, 26 | Facebook, 27 | FacebookSign, 28 | } 29 | -------------------------------------------------------------------------------- /extension/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /extension/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /extension/src/commonMain/kotlin/com/dimension/maskbook/extension/route/ExtensionRoute.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.extension.route 22 | 23 | import com.dimension.maskbook.common.routeProcessor.annotations.Route 24 | 25 | @Suppress("CONST_VAL_WITHOUT_INITIALIZER") 26 | @Route 27 | expect object ExtensionRoute { 28 | object WebContent { 29 | operator fun invoke(site: String?): String 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Gradle 2 | org.gradle.jvmargs=-Xmx3072m 3 | org.gradle.daemon=true 4 | org.gradle.parallel=true 5 | org.gradle.caching=true 6 | 7 | # Kotlin 8 | kotlin.code.style=official 9 | 10 | # Android 11 | android.useAndroidX=true 12 | android.enableJetifier=true 13 | 14 | # KMP 15 | kotlin.mpp.enableGranularSourceSetsMetadata=true 16 | kotlin.native.enableDependencyPropagation=false 17 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/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-7.4-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /labs/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/labs/consumer-rules.pro -------------------------------------------------------------------------------- /labs/export/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | } 4 | 5 | kotlin { 6 | jvm() 7 | sourceSets { 8 | val commonMain by getting { 9 | dependencies { 10 | } 11 | } 12 | val commonTest by getting { 13 | dependencies { 14 | } 15 | } 16 | } 17 | } 18 | 19 | java { 20 | sourceCompatibility = Versions.Java.java 21 | targetCompatibility = Versions.Java.java 22 | } 23 | -------------------------------------------------------------------------------- /labs/export/src/commonMain/kotlin/com/dimension/maskbook/labs/export/LabsServices.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.labs.export 22 | 23 | interface LabsServices 24 | -------------------------------------------------------------------------------- /labs/export/src/commonMain/kotlin/com/dimension/maskbook/labs/export/model/AppData.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.labs.export.model 22 | 23 | data class AppData( 24 | val key: AppKey, 25 | val enabled: Boolean, 26 | ) 27 | -------------------------------------------------------------------------------- /labs/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /labs/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /labs/src/androidMain/kotlin/com/dimension/maskbook/labs/LabsServicesImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.labs 22 | 23 | import com.dimension.maskbook.labs.export.LabsServices 24 | 25 | class LabsServicesImpl : LabsServices 26 | -------------------------------------------------------------------------------- /labs/src/androidMain/kotlin/com/dimension/maskbook/labs/model/SendMethodRequest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.labs.model 22 | 23 | import com.dimension.maskbook.extension.export.model.ExtensionId 24 | import kotlinx.serialization.Serializable 25 | 26 | @Serializable 27 | data class SendMethodRequest( 28 | val id: ExtensionId, 29 | val jsonrpc: String, 30 | val method: String, 31 | ) 32 | -------------------------------------------------------------------------------- /labs/src/androidMain/kotlin/com/dimension/maskbook/labs/repository/IAppRepository.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.labs.repository 22 | 23 | import com.dimension.maskbook.labs.export.model.AppData 24 | import com.dimension.maskbook.labs.export.model.AppKey 25 | import kotlinx.coroutines.flow.Flow 26 | 27 | interface IAppRepository { 28 | val apps: Flow> 29 | fun setEnabled(appKey: AppKey, enabled: Boolean) 30 | fun init() 31 | } 32 | -------------------------------------------------------------------------------- /labs/src/androidMain/kotlin/com/dimension/maskbook/labs/repository/IPreferenceRepository.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.labs.repository 22 | 23 | import kotlinx.coroutines.flow.Flow 24 | 25 | interface IPreferenceRepository { 26 | val shouldShowPluginSettingsTipDialog: Flow 27 | fun setShowPluginSettingsTipDialog(bool: Boolean) 28 | } 29 | -------------------------------------------------------------------------------- /localization/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/localization/consumer-rules.pro -------------------------------------------------------------------------------- /localization/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /localization/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/_2.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/_4.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/_5.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/_6.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/approve.xml: -------------------------------------------------------------------------------- 1 | 6 | 11 | 12 | 14 | 21 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/artboard.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 14 | 18 | 22 | 26 | 27 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/artboard_1.xml: -------------------------------------------------------------------------------- 1 | 6 | 11 | 15 | 19 | 23 | 27 | 28 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/bg_pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/localization/src/androidMain/res/drawable/bg_pdf.png -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/close_square.xml: -------------------------------------------------------------------------------- 1 | 6 | 13 | 20 | 21 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/domains.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 13 | 17 | 18 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/download.xml: -------------------------------------------------------------------------------- 1 | 6 | 13 | 20 | 27 | 28 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/download1.xml: -------------------------------------------------------------------------------- 1 | 6 | 11 | 14 | 15 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/edit_square.xml: -------------------------------------------------------------------------------- 1 | 6 | 11 | 14 | 15 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ethereum_eth_logo.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 15 | 18 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ethereum_o.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 15 | 18 | 21 | 24 | 27 | 28 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ethereum_o1.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 15 | 18 | 21 | 24 | 27 | 28 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/etherscan.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/facebook.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 9 | 12 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_a_8.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 14 | 15 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_add_social.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/localization/src/androidMain/res/drawable/ic_add_social.png -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_add_social_closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/localization/src/androidMain/res/drawable/ic_add_social_closed.png -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_add_user.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_arrow_down.xml: -------------------------------------------------------------------------------- 1 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_arrow_right.xml: -------------------------------------------------------------------------------- 1 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_arrow_up.xml: -------------------------------------------------------------------------------- 1 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_back_up.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 13 | 16 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_chain_rinkeby.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_chain_ropsten.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_clear.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_close_square.xml: -------------------------------------------------------------------------------- 1 | 6 | 13 | 20 | 21 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_connect_account_more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/localization/src/androidMain/res/drawable/ic_connect_account_more.png -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_contacts_search_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/localization/src/androidMain/res/drawable/ic_contacts_search_empty.png -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_create_wallet_logo.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_edit_social_finish.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 14 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_empty_contact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/localization/src/androidMain/res/drawable/ic_empty_contact.png -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_empty_persona.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/localization/src/androidMain/res/drawable/ic_empty_persona.webp -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_face_id_enable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/localization/src/androidMain/res/drawable/ic_face_id_enable.png -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_failed.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_info_circle.xml: -------------------------------------------------------------------------------- 1 | 6 | 11 | 15 | 16 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_iphone.xml: -------------------------------------------------------------------------------- 1 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_labs_dhedge.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 13 | 16 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_labs_snapshot.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_labs_union.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_legal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/localization/src/androidMain/res/drawable/ic_legal.png -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_more_circle.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_more_square.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_note.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 13 | 16 | 17 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_paper_plus.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 13 | 16 | 17 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_persona.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_persona_default_avatar.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_post.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/localization/src/androidMain/res/drawable/ic_post.png -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_profile.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 13 | 16 | 19 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_qr_code_border.xml: -------------------------------------------------------------------------------- 1 | 6 | 13 | 20 | 27 | 34 | 35 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_quickswap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/localization/src/androidMain/res/drawable/ic_quickswap.png -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_receive_redpacket_failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/localization/src/androidMain/res/drawable/ic_receive_redpacket_failed.png -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_receive_redpacket_success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/localization/src/androidMain/res/drawable/ic_receive_redpacket_success.png -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_redpack_good_luck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/localization/src/androidMain/res/drawable/ic_redpack_good_luck.png -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_restore.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 9 | 14 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_scanner_line.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_search.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_select_left.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_select_right.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_settings_backup_password.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 14 | 15 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_settings_restore_data.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 14 | 15 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_success.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_time_circle.xml: -------------------------------------------------------------------------------- 1 | 6 | 11 | 14 | 15 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_time_circle_border.xml: -------------------------------------------------------------------------------- 1 | 6 | 14 | 21 | 22 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_transaction_history_approve.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_upload_small.xml: -------------------------------------------------------------------------------- 1 | 6 | 13 | 20 | 27 | 28 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_wallet_intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/localization/src/androidMain/res/drawable/ic_wallet_intro.png -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_warn.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 13 | 16 | 17 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/ic_warn_blue.xml: -------------------------------------------------------------------------------- 1 | 6 | 11 | 15 | 16 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/logos_and_symbols_1.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/mnemonic.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/password.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 14 | 15 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/pdf_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/localization/src/androidMain/res/drawable/pdf_logo.png -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/pdf_tips.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/localization/src/androidMain/res/drawable/pdf_tips.png -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/profile.xml: -------------------------------------------------------------------------------- 1 | 6 | 11 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/quickswap.xml: -------------------------------------------------------------------------------- 1 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/restore.xml: -------------------------------------------------------------------------------- 1 | 6 | 11 | 14 | 15 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/share.xml: -------------------------------------------------------------------------------- 1 | 6 | 11 | 14 | 15 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/time_out.xml: -------------------------------------------------------------------------------- 1 | 6 | 11 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/twitter_1.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/upload.xml: -------------------------------------------------------------------------------- 1 | 6 | 13 | 20 | 27 | 28 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/upload1.xml: -------------------------------------------------------------------------------- 1 | 6 | 11 | 14 | 15 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/wallet_4.xml: -------------------------------------------------------------------------------- 1 | 6 | 12 | 13 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/wallet_5.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 9 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/wallet_6.xml: -------------------------------------------------------------------------------- 1 | 6 | 12 | 13 | -------------------------------------------------------------------------------- /localization/src/androidMain/res/drawable/wallet_7.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 9 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /persona/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/persona/consumer-rules.pro -------------------------------------------------------------------------------- /persona/export/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | kotlin("plugin.serialization") 4 | } 5 | 6 | kotlin { 7 | jvm() 8 | sourceSets { 9 | val commonMain by getting { 10 | dependencies { 11 | implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.Kotlin.coroutines}") 12 | implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:${Versions.Kotlin.serialization}") 13 | } 14 | } 15 | val commonTest by getting { 16 | dependencies { 17 | } 18 | } 19 | } 20 | } 21 | 22 | java { 23 | sourceCompatibility = Versions.Java.java 24 | targetCompatibility = Versions.Java.java 25 | } 26 | -------------------------------------------------------------------------------- /persona/export/src/commonMain/kotlin/com/dimension/maskbook/persona/export/error/PersonaAlreadyExitsError.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.persona.export.error 22 | 23 | class PersonaAlreadyExitsError : Error() 24 | -------------------------------------------------------------------------------- /persona/export/src/commonMain/kotlin/com/dimension/maskbook/persona/export/model/ConnectAccountData.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.persona.export.model 22 | 23 | data class ConnectAccountData( 24 | val personaId: String, 25 | val profile: SocialData, 26 | ) 27 | -------------------------------------------------------------------------------- /persona/export/src/commonMain/kotlin/com/dimension/maskbook/persona/export/model/PersonaData.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.persona.export.model 22 | 23 | data class PersonaData( 24 | val identifier: String, 25 | val name: String, 26 | val avatar: String?, 27 | val owned: Boolean, 28 | ) 29 | -------------------------------------------------------------------------------- /persona/export/src/commonMain/kotlin/com/dimension/maskbook/persona/export/model/PersonaQrCode.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.persona.export.model 22 | 23 | data class PersonaQrCode( 24 | val nickName: String, 25 | val identifier: String, 26 | val privateKeyBase64: String, 27 | val identityWords: String, 28 | val avatar: String?, 29 | ) 30 | -------------------------------------------------------------------------------- /persona/export/src/commonMain/kotlin/com/dimension/maskbook/persona/export/model/PlatformType.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.persona.export.model 22 | 23 | enum class PlatformType { 24 | Twitter, 25 | Facebook 26 | } 27 | -------------------------------------------------------------------------------- /persona/export/src/commonMain/kotlin/com/dimension/maskbook/persona/export/model/Profile.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.persona.export.model 22 | 23 | import kotlinx.serialization.Serializable 24 | 25 | @Serializable 26 | data class Profile( 27 | val identifier: String, 28 | val nickname: String?, 29 | val linkedPersona: Boolean, 30 | val createdAt: Long, 31 | val updatedAt: Long, 32 | ) 33 | -------------------------------------------------------------------------------- /persona/export/src/commonMain/kotlin/com/dimension/maskbook/persona/export/model/SocialData.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.persona.export.model 22 | 23 | data class SocialData( 24 | val id: String, 25 | val name: String, 26 | val avatar: String, 27 | val network: Network, 28 | val personaId: String? = null, 29 | val linkedPersona: Boolean = false, 30 | ) 31 | -------------------------------------------------------------------------------- /persona/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /persona/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /persona/src/androidMain/kotlin/com/dimension/maskbook/persona/model/ContactData.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.persona.model 22 | 23 | import com.dimension.maskbook.persona.export.model.Network 24 | 25 | data class ContactData( 26 | val id: String, 27 | val name: String, 28 | val personaId: String, 29 | val avatar: String, 30 | val linkedPersona: Boolean, 31 | val network: Network, 32 | ) 33 | -------------------------------------------------------------------------------- /persona/src/androidMain/kotlin/com/dimension/maskbook/persona/model/PostData.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.persona.model 22 | 23 | data class PostData( 24 | val id: String, 25 | val title: String, 26 | val personaId: String, 27 | ) 28 | -------------------------------------------------------------------------------- /persona/src/androidMain/kotlin/com/dimension/maskbook/persona/model/options/PageOptions.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.persona.model.options 22 | 23 | import kotlinx.serialization.Serializable 24 | 25 | @Serializable 26 | data class PageOptions( 27 | val pageSize: Int, 28 | val pageOffset: Int, 29 | ) { 30 | companion object { 31 | val ONE = PageOptions(1, 0) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /persona/src/androidMain/kotlin/com/dimension/maskbook/persona/model/options/ParamOptions.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.persona.model.options 22 | 23 | import kotlinx.serialization.Serializable 24 | 25 | @Serializable 26 | data class ParamOptions( 27 | val options: T?, 28 | ) 29 | -------------------------------------------------------------------------------- /persona/src/androidMain/kotlin/com/dimension/maskbook/persona/repository/IContactsRepository.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.persona.repository 22 | 23 | import com.dimension.maskbook.persona.model.ContactData 24 | import kotlinx.coroutines.flow.Flow 25 | 26 | interface IContactsRepository { 27 | val contacts: Flow> 28 | } 29 | -------------------------------------------------------------------------------- /persona/src/androidMain/kotlin/com/dimension/maskbook/persona/repository/IPostRepository.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.persona.repository 22 | 23 | import com.dimension.maskbook.persona.model.PostData 24 | import kotlinx.coroutines.flow.Flow 25 | 26 | interface IPostRepository { 27 | val posts: Flow> 28 | } 29 | -------------------------------------------------------------------------------- /persona/src/androidMain/kotlin/com/dimension/maskbook/persona/repository/ISocialsRepository.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.persona.repository 22 | 23 | import com.dimension.maskbook.persona.export.model.SocialData 24 | import kotlinx.coroutines.flow.Flow 25 | 26 | interface ISocialsRepository { 27 | val socials: Flow> 28 | } 29 | -------------------------------------------------------------------------------- /persona/src/androidMain/kotlin/com/dimension/maskbook/persona/repository/PostRepository.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.persona.repository 22 | 23 | import com.dimension.maskbook.persona.model.PostData 24 | import kotlinx.coroutines.flow.Flow 25 | 26 | class PostRepository : IPostRepository { 27 | override val posts: Flow> 28 | get() = TODO("Not yet implemented") 29 | } 30 | -------------------------------------------------------------------------------- /setting/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/setting/consumer-rules.pro -------------------------------------------------------------------------------- /setting/export/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | kotlin("plugin.serialization") 4 | } 5 | 6 | kotlin { 7 | jvm() 8 | sourceSets { 9 | val commonMain by getting { 10 | dependencies { 11 | implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.Kotlin.coroutines}") 12 | implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:${Versions.Kotlin.serialization}") 13 | implementation("com.ensarsarajcic.kotlinx:serialization-msgpack:${Versions.kotlinxSerializationMsgPackVersion}") 14 | } 15 | } 16 | val commonTest by getting { 17 | dependencies { 18 | } 19 | } 20 | } 21 | } 22 | 23 | java { 24 | sourceCompatibility = Versions.Java.java 25 | targetCompatibility = Versions.Java.java 26 | } 27 | -------------------------------------------------------------------------------- /setting/export/src/commonMain/kotlin/com/dimension/maskbook/setting/export/model/Appearance.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.setting.export.model 22 | 23 | enum class Appearance { 24 | default, 25 | light, 26 | dark, 27 | } 28 | -------------------------------------------------------------------------------- /setting/export/src/commonMain/kotlin/com/dimension/maskbook/setting/export/model/BackupActions.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.setting.export.model 22 | 23 | enum class BackupActions { 24 | ExportPrivateKey, 25 | BackUp, 26 | DownloadQrCode, 27 | } 28 | -------------------------------------------------------------------------------- /setting/export/src/commonMain/kotlin/com/dimension/maskbook/setting/export/model/BackupFileMeta.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.setting.export.model 22 | 23 | data class BackupFileMeta( 24 | val url: String, 25 | val size: Long?, 26 | val uploaded_at: Long?, 27 | val abstract: String?, 28 | ) 29 | -------------------------------------------------------------------------------- /setting/export/src/commonMain/kotlin/com/dimension/maskbook/setting/export/model/BackupMeta.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.setting.export.model 22 | 23 | data class BackupMeta( 24 | val account: String, 25 | val personas: Int, 26 | val associatedAccount: Int, 27 | val encryptedPost: Int, 28 | val contacts: Int, 29 | val file: Int, 30 | val wallet: Int, 31 | ) 32 | -------------------------------------------------------------------------------- /setting/export/src/commonMain/kotlin/com/dimension/maskbook/setting/export/model/BackupPreview.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.setting.export.model 22 | 23 | import kotlinx.serialization.Serializable 24 | 25 | @Serializable 26 | data class BackupPreview( 27 | val personas: Int, 28 | val accounts: Int, 29 | val posts: Int, 30 | val contacts: Int, 31 | val files: Int, 32 | val wallets: Int, 33 | val createdAt: Long, 34 | ) 35 | -------------------------------------------------------------------------------- /setting/export/src/commonMain/kotlin/com/dimension/maskbook/setting/export/model/DataProvider.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.setting.export.model 22 | 23 | enum class DataProvider(val value: Int) { 24 | COIN_GECKO(0), COIN_MARKET_CAP(1), UNISWAP_INFO(2) 25 | } 26 | -------------------------------------------------------------------------------- /setting/export/src/commonMain/kotlin/com/dimension/maskbook/setting/export/model/NetworkType.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.setting.export.model 22 | 23 | enum class NetworkType { 24 | Ethereum, 25 | Binance, 26 | Polygon, 27 | Arbitrum, 28 | } 29 | -------------------------------------------------------------------------------- /setting/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /setting/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /setting/src/androidMain/kotlin/com/dimension/maskbook/setting/Consts.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.setting 22 | 23 | internal const val defaultRegionCode = "+86" 24 | internal const val defaultCountDownTime = 60 25 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | google() 5 | mavenCentral() 6 | maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") 7 | } 8 | } 9 | 10 | dependencyResolutionManagement { 11 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 12 | repositories { 13 | google() 14 | mavenCentral() 15 | maven("https://maven.mozilla.org/maven2/") 16 | maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") 17 | maven("https://jitpack.io") 18 | } 19 | } 20 | 21 | rootProject.name = "Mask" 22 | 23 | include( 24 | ":app", 25 | ":common", 26 | ":common:gecko", 27 | ":common:gecko:sample", 28 | ":common:okhttp", 29 | ":common:retrofit", 30 | ":common:routeProcessor", 31 | ":common:routeProcessor:annotations", 32 | ":common:bigDecimal", 33 | ":localization", 34 | ":wallet", 35 | ":wallet:export", 36 | ":debankapi", 37 | ":labs", 38 | ":labs:export", 39 | ":persona", 40 | ":persona:export", 41 | ":setting", 42 | ":setting:export", 43 | ":extension", 44 | ":extension:export", 45 | ":entry", 46 | ) 47 | 48 | enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") 49 | -------------------------------------------------------------------------------- /spotless/license: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | -------------------------------------------------------------------------------- /wallet/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /wallet/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimensionDev/Mask-Android/b24d51929e1b855ec9688225a401997b2f0942e2/wallet/consumer-rules.pro -------------------------------------------------------------------------------- /wallet/export/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | kotlin("plugin.serialization") 4 | } 5 | 6 | kotlin { 7 | jvm() 8 | sourceSets { 9 | val commonMain by getting { 10 | dependencies { 11 | implementation(projects.common.bigDecimal) 12 | implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.Kotlin.coroutines}") 13 | implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:${Versions.Kotlin.serialization}") 14 | } 15 | } 16 | val commonTest by getting { 17 | dependencies { 18 | } 19 | } 20 | } 21 | } 22 | 23 | java { 24 | sourceCompatibility = Versions.Java.java 25 | targetCompatibility = Versions.Java.java 26 | } 27 | -------------------------------------------------------------------------------- /wallet/export/src/commonMain/kotlin/com/dimension/maskbook/wallet/export/model/ChainData.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.wallet.export.model 22 | 23 | data class ChainData( 24 | val chainId: Long, 25 | val name: String, 26 | val fullName: String, 27 | val nativeTokenID: String, 28 | val logoURL: String, 29 | val nativeToken: TokenData?, 30 | val chainType: ChainType 31 | ) 32 | -------------------------------------------------------------------------------- /wallet/export/src/commonMain/kotlin/com/dimension/maskbook/wallet/export/model/CollectibleContractSchema.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.wallet.export.model 22 | 23 | import kotlinx.serialization.Serializable 24 | 25 | @Serializable 26 | enum class CollectibleContractSchema { 27 | ERC721, 28 | ERC1155 29 | } 30 | -------------------------------------------------------------------------------- /wallet/export/src/commonMain/kotlin/com/dimension/maskbook/wallet/export/model/DbWalletBalanceType.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.wallet.export.model 22 | 23 | enum class DbWalletBalanceType { 24 | all, 25 | eth, 26 | rinkeby, 27 | bsc, 28 | polygon, 29 | arbitrum, 30 | xdai, 31 | optimism, 32 | polka, 33 | } 34 | -------------------------------------------------------------------------------- /wallet/export/src/commonMain/kotlin/com/dimension/maskbook/wallet/export/model/TradableData.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.wallet.export.model 22 | 23 | sealed interface TradableData { 24 | fun tradableId(): String 25 | 26 | fun network(): ChainType 27 | } 28 | -------------------------------------------------------------------------------- /wallet/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /wallet/src/androidMain/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /wallet/src/androidMain/kotlin/com/dimension/maskbook/wallet/model/SendTokenRequest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.wallet.model 22 | 23 | import com.dimension.maskbook.extension.export.model.ExtensionId 24 | import kotlinx.serialization.Serializable 25 | 26 | @Serializable 27 | data class SendTokenRequest( 28 | val messageId: ExtensionId, 29 | val payloadId: ExtensionId, 30 | val jsonrpc: String, 31 | ) 32 | -------------------------------------------------------------------------------- /wallet/src/androidMain/kotlin/com/dimension/maskbook/wallet/usecase/RefreshWalletUseCase.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.wallet.usecase 22 | 23 | import com.dimension.maskbook.wallet.repository.IWalletRepository 24 | 25 | class RefreshWalletUseCase( 26 | private val repository: IWalletRepository 27 | ) { 28 | suspend operator fun invoke() = runCatching { repository.refreshWallet() } 29 | } 30 | -------------------------------------------------------------------------------- /wallet/src/androidMain/kotlin/com/dimension/maskbook/wallet/viewmodel/wallets/TouchIdEnableViewModel.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Mask-Android 3 | * 4 | * Copyright (C) 2022 DimensionDev and Contributors 5 | * 6 | * This file is part of Mask-Android. 7 | * 8 | * Mask-Android is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mask-Android is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with Mask-Android. If not, see . 20 | */ 21 | package com.dimension.maskbook.wallet.viewmodel.wallets 22 | 23 | import androidx.lifecycle.ViewModel 24 | 25 | class TouchIdEnableViewModel : ViewModel() { 26 | fun enable(onEnable: () -> Unit) { 27 | /*TODO Logic: enable touch id unlock*/ 28 | onEnable.invoke() 29 | } 30 | } 31 | --------------------------------------------------------------------------------