├── ostsdk ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── drawable-hdpi │ │ │ │ ├── ost_back.png │ │ │ │ ├── ost_close.png │ │ │ │ ├── ost_device_icon.png │ │ │ │ ├── ost_empty_drawer.png │ │ │ │ ├── ost_nav_bar_logo.png │ │ │ │ ├── ic_fingerprint_check.png │ │ │ │ ├── ic_fingerprint_error.png │ │ │ │ └── ic_fingerprint_success.png │ │ │ ├── drawable-mdpi │ │ │ │ ├── ost_back.png │ │ │ │ ├── ost_close.png │ │ │ │ ├── ost_device_icon.png │ │ │ │ ├── ost_empty_drawer.png │ │ │ │ ├── ost_nav_bar_logo.png │ │ │ │ ├── ic_fingerprint_check.png │ │ │ │ ├── ic_fingerprint_error.png │ │ │ │ └── ic_fingerprint_success.png │ │ │ ├── drawable-xhdpi │ │ │ │ ├── ost_back.png │ │ │ │ ├── ost_close.png │ │ │ │ ├── ost_device_icon.png │ │ │ │ ├── ost_empty_drawer.png │ │ │ │ ├── ost_nav_bar_logo.png │ │ │ │ ├── ic_fingerprint_check.png │ │ │ │ ├── ic_fingerprint_error.png │ │ │ │ └── ic_fingerprint_success.png │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── ost_back.png │ │ │ │ ├── ost_close.png │ │ │ │ ├── ost_device_icon.png │ │ │ │ ├── ost_empty_drawer.png │ │ │ │ ├── ost_nav_bar_logo.png │ │ │ │ ├── ic_fingerprint_check.png │ │ │ │ ├── ic_fingerprint_error.png │ │ │ │ └── ic_fingerprint_success.png │ │ │ ├── drawable-xxxhdpi │ │ │ │ ├── ost_back.png │ │ │ │ ├── ost_close.png │ │ │ │ ├── ost_device_icon.png │ │ │ │ ├── ost_empty_drawer.png │ │ │ │ ├── ost_nav_bar_logo.png │ │ │ │ ├── ic_fingerprint_check.png │ │ │ │ ├── ic_fingerprint_error.png │ │ │ │ └── ic_fingerprint_success.png │ │ │ ├── drawable │ │ │ │ ├── ost_rounded_corner_bg.xml │ │ │ │ ├── rounded_corner_edittext_bg.xml │ │ │ │ ├── red_rounded_rectangle.xml │ │ │ │ ├── blue_rounded_rectangle.xml │ │ │ │ ├── bg_data_view_grey.xml │ │ │ │ ├── ost_bg_button.xml │ │ │ │ ├── ic_home_black_24dp.xml │ │ │ │ ├── ic_arrow_forward_black_24dp.xml │ │ │ │ ├── ic_dashboard_black_24dp.xml │ │ │ │ ├── bg_pin_round_fill.xml │ │ │ │ ├── ic_close_black_24dp.xml │ │ │ │ ├── bg_secondary_button_disabled.xml │ │ │ │ ├── bg_pin_round_unfill.xml │ │ │ │ ├── bg_data_view.xml │ │ │ │ ├── ic_notifications_black_24dp.xml │ │ │ │ ├── bg_primary_button_disabled.xml │ │ │ │ └── secondary_button_text_color.xml │ │ │ ├── layout │ │ │ │ ├── activity_ost_work_flow.xml │ │ │ │ ├── content_ost_work_flow.xml │ │ │ │ ├── ost_fragment_workflow_holder.xml │ │ │ │ ├── fragment_web_view.xml │ │ │ │ ├── ost_fragment_base.xml │ │ │ │ ├── ost_app_bar.xml │ │ │ │ └── ost_empty_drawer.xml │ │ │ ├── values │ │ │ │ ├── ids.xml │ │ │ │ └── integers.xml │ │ │ ├── anim │ │ │ │ ├── bottom_out.xml │ │ │ │ ├── left_in.xml │ │ │ │ ├── left_out.xml │ │ │ │ ├── right_in.xml │ │ │ │ ├── right_out.xml │ │ │ │ └── top_out.xml │ │ │ └── xml │ │ │ │ └── ost_network_security_config.xml │ │ └── java │ │ │ └── com │ │ │ └── ost │ │ │ └── walletsdk │ │ │ ├── ui │ │ │ ├── ChildFragmentStack.java │ │ │ ├── interfaces │ │ │ │ ├── OstWalletUIListener.java │ │ │ │ ├── OstWorkflowUIDelegate.java │ │ │ │ ├── FlowCompleteListener.java │ │ │ │ ├── RequestAcknowledgedListener.java │ │ │ │ └── FlowInterruptListener.java │ │ │ ├── workflow │ │ │ │ └── OstLoaderCompletionDelegate.java │ │ │ ├── uicomponents │ │ │ │ ├── uiutils │ │ │ │ │ ├── content │ │ │ │ │ │ ├── Content.java │ │ │ │ │ │ ├── ContentDefault.java │ │ │ │ │ │ └── StringConfig.java │ │ │ │ │ ├── theme │ │ │ │ │ │ ├── NavigationConfig.java │ │ │ │ │ │ ├── PinViewConfig.java │ │ │ │ │ │ ├── EditTextUIConfig.java │ │ │ │ │ │ ├── Theme.java │ │ │ │ │ │ ├── DrawableConfig.java │ │ │ │ │ │ ├── ThemeDefault.java │ │ │ │ │ │ ├── PinDrawable.java │ │ │ │ │ │ └── ButtonDrawable.java │ │ │ │ │ ├── Font.java │ │ │ │ │ ├── FontFactory.java │ │ │ │ │ ├── SizeUtil.java │ │ │ │ │ ├── CustomFont.java │ │ │ │ │ └── FontCache.java │ │ │ │ ├── OstEditText.java │ │ │ │ ├── OstB2Label.java │ │ │ │ ├── OstC1Label.java │ │ │ │ ├── OstC2Label.java │ │ │ │ ├── OstH2Label.java │ │ │ │ ├── OstH3Label.java │ │ │ │ ├── OstB1Label.java │ │ │ │ ├── OstH1Label.java │ │ │ │ └── OstH4Label.java │ │ │ ├── OstPassphraseAcceptor.java │ │ │ ├── OstUiWorkFlowCallback.java │ │ │ ├── OstUserPassphraseCallback.java │ │ │ ├── loader │ │ │ │ ├── OstSdkLoaderManager.java │ │ │ │ ├── OstLoaderDelegate.java │ │ │ │ └── OstWorkflowLoader.java │ │ │ ├── managedevices │ │ │ │ └── DeviceListView.java │ │ │ ├── OstResourceProvider.java │ │ │ ├── entermnemonics │ │ │ │ └── EnterMnemonicsView.java │ │ │ ├── Presenter.java │ │ │ ├── recovery │ │ │ │ └── RecoveryView.java │ │ │ ├── BaseView.java │ │ │ ├── OstUIWorkflowContext.java │ │ │ ├── resetpin │ │ │ │ └── ResetPinView.java │ │ │ ├── walletsetup │ │ │ │ └── SetUpView.java │ │ │ └── util │ │ │ │ └── WrapLinearLayoutManager.java │ │ │ ├── network │ │ │ ├── polling │ │ │ │ └── interfaces │ │ │ │ │ ├── OstTransactionPollingCallback.java │ │ │ │ │ └── OstPollingCallback.java │ │ │ └── OstJsonApiCallback.java │ │ │ ├── workflows │ │ │ ├── interfaces │ │ │ │ ├── OstTransactionWorkflowCallback.java │ │ │ │ ├── OstBaseInterface.java │ │ │ │ ├── OstVerifyDataInterface.java │ │ │ │ ├── OstStartPollingInterface.java │ │ │ │ ├── OstDeviceRegisteredInterface.java │ │ │ │ ├── OstPinAcceptInterface.java │ │ │ │ └── OstWalletWordsAcceptInterface.java │ │ │ └── OstContextEntity.java │ │ │ ├── jni │ │ │ ├── UnsupportedPlatformException.java │ │ │ ├── NilLibraryLoader.java │ │ │ ├── LibraryLoader.java │ │ │ └── SysLibraryLoader.java │ │ │ ├── annotations │ │ │ ├── StringRes.java │ │ │ ├── NonNull.java │ │ │ ├── Nullable.java │ │ │ ├── IntRange.java │ │ │ └── RequiresApi.java │ │ │ ├── ecKeyInteracts │ │ │ ├── OstBiometricManager.java │ │ │ ├── structs │ │ │ │ ├── SignedLogoutSessionsStruct.java │ │ │ │ ├── SignedResetRecoveryStruct.java │ │ │ │ ├── SignedAddDeviceStruct.java │ │ │ │ ├── SignedRevokeDeviceStruct.java │ │ │ │ ├── SignedAddSessionStruct.java │ │ │ │ └── BaseRecoveryOperationStruct.java │ │ │ └── OstSecureStorage.java │ │ │ ├── models │ │ │ ├── OstTaskCallback.java │ │ │ ├── OstRuleModel.java │ │ │ ├── OstTokenModel.java │ │ │ ├── OstUserModel.java │ │ │ ├── OstDeviceModel.java │ │ │ ├── OstSessionModel.java │ │ │ ├── OstTokenHolderModel.java │ │ │ ├── OstTransactionModel.java │ │ │ ├── OstDeviceManagerModel.java │ │ │ ├── OstDeviceManagerOperationModel.java │ │ │ ├── OstSecureKeyModel.java │ │ │ ├── OstBaseModel.java │ │ │ └── OstSessionKeyModel.java │ │ │ ├── utils │ │ │ ├── EntitiesParser.java │ │ │ ├── DispatchAsync.java │ │ │ └── AsyncStatus.java │ │ │ └── database │ │ │ ├── daos │ │ │ ├── OstBaseDao.java │ │ │ └── OstSessionKeyDao.java │ │ │ └── Converters.java │ ├── scrypt │ │ └── include │ │ │ ├── config.h │ │ │ └── scrypt_platform.h │ ├── jni │ │ └── Android.mk │ ├── test │ │ ├── java │ │ │ └── com │ │ │ │ └── ost │ │ │ │ └── walletsdk │ │ │ │ ├── utils │ │ │ │ └── TokenHolderTest.java │ │ │ │ └── ExampleUnitTest.java │ │ └── resources │ │ │ └── testJSON.js │ └── androidTest │ │ └── java │ │ └── com │ │ └── ost │ │ └── walletsdk │ │ └── ExampleInstrumentedTest.java ├── proguard-android-optimize.txt └── proguard-rules.pro ├── ostwallet ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── drawable-hdpi │ │ │ │ ├── bg.png │ │ │ │ ├── qr_icon.png │ │ │ │ ├── icon_copy.png │ │ │ │ ├── icon_error.png │ │ │ │ ├── icon_view.png │ │ │ │ ├── users_icon.png │ │ │ │ ├── device_icon.png │ │ │ │ ├── ost_logo_blue.png │ │ │ │ ├── settings_icon.png │ │ │ │ ├── wallet_icon.png │ │ │ │ ├── ost_logo_small.png │ │ │ │ ├── token_sent_icon.png │ │ │ │ ├── wallet_bg_curve.png │ │ │ │ ├── token_receive_icon.png │ │ │ │ └── ost_kit_start_minting.png │ │ │ ├── drawable-mdpi │ │ │ │ ├── bg.png │ │ │ │ ├── qr_icon.png │ │ │ │ ├── icon_copy.png │ │ │ │ ├── icon_error.png │ │ │ │ ├── icon_view.png │ │ │ │ ├── users_icon.png │ │ │ │ ├── device_icon.png │ │ │ │ ├── ost_logo_blue.png │ │ │ │ ├── settings_icon.png │ │ │ │ ├── wallet_icon.png │ │ │ │ ├── ost_logo_small.png │ │ │ │ ├── token_sent_icon.png │ │ │ │ ├── wallet_bg_curve.png │ │ │ │ ├── token_receive_icon.png │ │ │ │ ├── ost_kit_start_minting.png │ │ │ │ └── ic_arrow_forward_grey_24dp.xml │ │ │ ├── drawable-xhdpi │ │ │ │ ├── bg.png │ │ │ │ ├── qr_icon.png │ │ │ │ ├── icon_copy.png │ │ │ │ ├── icon_view.png │ │ │ │ ├── device_icon.png │ │ │ │ ├── icon_error.png │ │ │ │ ├── users_icon.png │ │ │ │ ├── wallet_icon.png │ │ │ │ ├── ost_logo_blue.png │ │ │ │ ├── ost_logo_small.png │ │ │ │ ├── settings_icon.png │ │ │ │ ├── token_sent_icon.png │ │ │ │ ├── wallet_bg_curve.png │ │ │ │ ├── token_receive_icon.png │ │ │ │ └── ost_kit_start_minting.png │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── bg.png │ │ │ │ ├── qr_icon.png │ │ │ │ ├── device_icon.png │ │ │ │ ├── icon_copy.png │ │ │ │ ├── icon_error.png │ │ │ │ ├── icon_view.png │ │ │ │ ├── users_icon.png │ │ │ │ ├── wallet_icon.png │ │ │ │ ├── ost_logo_blue.png │ │ │ │ ├── settings_icon.png │ │ │ │ ├── ost_logo_small.png │ │ │ │ ├── token_sent_icon.png │ │ │ │ ├── wallet_bg_curve.png │ │ │ │ ├── token_receive_icon.png │ │ │ │ └── ost_kit_start_minting.png │ │ │ ├── drawable-xxxhdpi │ │ │ │ ├── bg.png │ │ │ │ ├── qr_icon.png │ │ │ │ ├── icon_copy.png │ │ │ │ ├── icon_error.png │ │ │ │ ├── icon_view.png │ │ │ │ ├── users_icon.png │ │ │ │ ├── device_icon.png │ │ │ │ ├── wallet_icon.png │ │ │ │ ├── ost_logo_blue.png │ │ │ │ ├── ost_logo_small.png │ │ │ │ ├── settings_icon.png │ │ │ │ ├── token_sent_icon.png │ │ │ │ ├── token_receive_icon.png │ │ │ │ └── ost_kit_start_minting.png │ │ │ ├── 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 │ │ │ │ └── wallet_bg_curve.png │ │ │ ├── drawable │ │ │ │ ├── rounded_corner_edittext_bg.xml │ │ │ │ ├── rounded_corner_bg.xml │ │ │ │ ├── red_rounded_rectangle.xml │ │ │ │ ├── blue_rounded_rectangle.xml │ │ │ │ ├── bg_data_view_grey.xml │ │ │ │ ├── ic_home_black_24dp.xml │ │ │ │ ├── ic_arrow_forward_black_24dp.xml │ │ │ │ ├── ic_dashboard_black_24dp.xml │ │ │ │ ├── ic_close_black_24dp.xml │ │ │ │ ├── bg_pin_round_fill.xml │ │ │ │ ├── bg_secondary_button_disabled.xml │ │ │ │ ├── bg_pin_round_unfill.xml │ │ │ │ ├── bg_data_view.xml │ │ │ │ ├── ic_notifications_black_24dp.xml │ │ │ │ ├── bg_primary_button_disabled.xml │ │ │ │ └── secondary_button_text_color.xml │ │ │ ├── values │ │ │ │ ├── ids.xml │ │ │ │ └── integers.xml │ │ │ ├── anim │ │ │ │ ├── left_in.xml │ │ │ │ ├── right_in.xml │ │ │ │ ├── top_out.xml │ │ │ │ ├── bottom_out.xml │ │ │ │ ├── left_out.xml │ │ │ │ └── right_out.xml │ │ │ └── layout │ │ │ │ ├── fragment_workflow_holder.xml │ │ │ │ ├── fragment_web_view.xml │ │ │ │ ├── spinner_item.xml │ │ │ │ ├── app_bar.xml │ │ │ │ ├── fragment_base.xml │ │ │ │ ├── fragment_login.xml │ │ │ │ └── activity_onboarding.xml │ │ ├── assets │ │ │ ├── fonts │ │ │ │ ├── Lato-Black.ttf │ │ │ │ ├── Lato-Bold.ttf │ │ │ │ ├── Lato-Light.ttf │ │ │ │ ├── Lato-Hairline.ttf │ │ │ │ ├── Lato-Italic.ttf │ │ │ │ ├── Lato-Regular.ttf │ │ │ │ ├── Lato-BoldItalic.ttf │ │ │ │ ├── Lato-BlackItalic.ttf │ │ │ │ ├── Lato-LightItalic.ttf │ │ │ │ └── Lato-HairlineItalic.ttf │ │ │ └── ost-mobilesdk.json │ │ └── java │ │ │ └── com │ │ │ └── ost │ │ │ └── ostwallet │ │ │ ├── ui │ │ │ ├── workflow │ │ │ │ ├── ChildFragmentStack.java │ │ │ │ ├── entermnemonics │ │ │ │ │ └── EnterMnemonicsView.java │ │ │ │ ├── createsession │ │ │ │ │ └── CreateSessionView.java │ │ │ │ ├── recovery │ │ │ │ │ └── RecoveryView.java │ │ │ │ ├── transactions │ │ │ │ │ └── TransactionsView.java │ │ │ │ ├── viewmnemonics │ │ │ │ │ └── ViewMnemonicsView.java │ │ │ │ ├── authrorizedeviceqr │ │ │ │ │ └── AuthorizeDeviceQRView.java │ │ │ │ ├── walletsetup │ │ │ │ │ └── SetUpView.java │ │ │ │ └── resetpin │ │ │ │ │ └── ResetPinView.java │ │ │ ├── dashboard │ │ │ │ ├── UserListView.java │ │ │ │ └── WalletView.java │ │ │ ├── managedevices │ │ │ │ └── DeviceListView.java │ │ │ ├── Presenter.java │ │ │ ├── auth │ │ │ │ └── OnBoardingView.java │ │ │ └── BaseView.java │ │ │ ├── uicomponents │ │ │ ├── uiutils │ │ │ │ ├── SizeUtil.java │ │ │ │ ├── Font.java │ │ │ │ ├── FontFactory.java │ │ │ │ └── FontCache.java │ │ │ └── OstListButton.java │ │ │ ├── util │ │ │ ├── DBLog.java │ │ │ └── WrapLinearLayoutManager.java │ │ │ ├── database │ │ │ └── daos │ │ │ │ └── OstLogEventDao.java │ │ │ └── network │ │ │ └── NetworkClient.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── ost │ │ └── ostwallet │ │ └── ExampleInstrumentedTest.java └── proguard-rules.pro ├── documentation └── images │ ├── Card.png │ ├── NavBar.png │ ├── ScanQR.png │ ├── ShowQR.png │ ├── PinView.png │ ├── TextField.png │ ├── VerifyTX.png │ ├── VerifyDevice.png │ ├── ProvideMnemonics.png │ ├── PinViewLabelTypes.png │ ├── DeviceListLabelTypes.png │ └── ViewMnemonicsLabelTypes.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── Samples └── customloader │ ├── res │ ├── drawable │ │ ├── ost_failure_icon.png │ │ ├── ost_success_icon.png │ │ └── ost_progress_image.gif │ └── values │ │ ├── colors.xml │ │ └── styles.xml │ └── src │ └── OstMockLoaderManager.java ├── settings.gradle ├── gradle.properties └── LICENSE /ostsdk/.gitignore: -------------------------------------------------------------------------------- 1 | build/ -------------------------------------------------------------------------------- /ostwallet/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /documentation/images/Card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/documentation/images/Card.png -------------------------------------------------------------------------------- /documentation/images/NavBar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/documentation/images/NavBar.png -------------------------------------------------------------------------------- /documentation/images/ScanQR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/documentation/images/ScanQR.png -------------------------------------------------------------------------------- /documentation/images/ShowQR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/documentation/images/ShowQR.png -------------------------------------------------------------------------------- /documentation/images/PinView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/documentation/images/PinView.png -------------------------------------------------------------------------------- /documentation/images/TextField.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/documentation/images/TextField.png -------------------------------------------------------------------------------- /documentation/images/VerifyTX.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/documentation/images/VerifyTX.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /documentation/images/VerifyDevice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/documentation/images/VerifyDevice.png -------------------------------------------------------------------------------- /documentation/images/ProvideMnemonics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/documentation/images/ProvideMnemonics.png -------------------------------------------------------------------------------- /documentation/images/PinViewLabelTypes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/documentation/images/PinViewLabelTypes.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-hdpi/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-hdpi/bg.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-mdpi/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-mdpi/bg.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xhdpi/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xhdpi/bg.png -------------------------------------------------------------------------------- /documentation/images/DeviceListLabelTypes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/documentation/images/DeviceListLabelTypes.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-hdpi/ost_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-hdpi/ost_back.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-mdpi/ost_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-mdpi/ost_back.png -------------------------------------------------------------------------------- /ostwallet/src/main/assets/fonts/Lato-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/assets/fonts/Lato-Black.ttf -------------------------------------------------------------------------------- /ostwallet/src/main/assets/fonts/Lato-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/assets/fonts/Lato-Bold.ttf -------------------------------------------------------------------------------- /ostwallet/src/main/assets/fonts/Lato-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/assets/fonts/Lato-Light.ttf -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxhdpi/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxhdpi/bg.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxxhdpi/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxxhdpi/bg.png -------------------------------------------------------------------------------- /documentation/images/ViewMnemonicsLabelTypes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/documentation/images/ViewMnemonicsLabelTypes.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-hdpi/ost_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-hdpi/ost_close.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-mdpi/ost_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-mdpi/ost_close.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xhdpi/ost_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xhdpi/ost_back.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xhdpi/ost_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xhdpi/ost_close.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xxhdpi/ost_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xxhdpi/ost_back.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xxhdpi/ost_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xxhdpi/ost_close.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xxxhdpi/ost_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xxxhdpi/ost_back.png -------------------------------------------------------------------------------- /ostwallet/src/main/assets/fonts/Lato-Hairline.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/assets/fonts/Lato-Hairline.ttf -------------------------------------------------------------------------------- /ostwallet/src/main/assets/fonts/Lato-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/assets/fonts/Lato-Italic.ttf -------------------------------------------------------------------------------- /ostwallet/src/main/assets/fonts/Lato-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/assets/fonts/Lato-Regular.ttf -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-hdpi/qr_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-hdpi/qr_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-mdpi/qr_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-mdpi/qr_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xhdpi/qr_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xhdpi/qr_icon.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xxxhdpi/ost_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xxxhdpi/ost_close.png -------------------------------------------------------------------------------- /ostwallet/src/main/assets/fonts/Lato-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/assets/fonts/Lato-BoldItalic.ttf -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-hdpi/icon_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-hdpi/icon_copy.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-hdpi/icon_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-hdpi/icon_error.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-hdpi/icon_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-hdpi/icon_view.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-hdpi/users_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-hdpi/users_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-mdpi/icon_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-mdpi/icon_copy.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-mdpi/icon_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-mdpi/icon_error.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-mdpi/icon_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-mdpi/icon_view.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-mdpi/users_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-mdpi/users_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xhdpi/icon_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xhdpi/icon_copy.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xhdpi/icon_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xhdpi/icon_view.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxhdpi/qr_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxhdpi/qr_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxxhdpi/qr_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxxhdpi/qr_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Samples/customloader/res/drawable/ost_failure_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/Samples/customloader/res/drawable/ost_failure_icon.png -------------------------------------------------------------------------------- /Samples/customloader/res/drawable/ost_success_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/Samples/customloader/res/drawable/ost_success_icon.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-hdpi/ost_device_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-hdpi/ost_device_icon.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-hdpi/ost_empty_drawer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-hdpi/ost_empty_drawer.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-hdpi/ost_nav_bar_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-hdpi/ost_nav_bar_logo.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-mdpi/ost_device_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-mdpi/ost_device_icon.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-mdpi/ost_empty_drawer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-mdpi/ost_empty_drawer.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-mdpi/ost_nav_bar_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-mdpi/ost_nav_bar_logo.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xhdpi/ost_device_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xhdpi/ost_device_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/assets/fonts/Lato-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/assets/fonts/Lato-BlackItalic.ttf -------------------------------------------------------------------------------- /ostwallet/src/main/assets/fonts/Lato-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/assets/fonts/Lato-LightItalic.ttf -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-hdpi/device_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-hdpi/device_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-hdpi/ost_logo_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-hdpi/ost_logo_blue.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-hdpi/settings_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-hdpi/settings_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-hdpi/wallet_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-hdpi/wallet_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-mdpi/device_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-mdpi/device_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-mdpi/ost_logo_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-mdpi/ost_logo_blue.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-mdpi/settings_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-mdpi/settings_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-mdpi/wallet_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-mdpi/wallet_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xhdpi/device_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xhdpi/device_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xhdpi/icon_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xhdpi/icon_error.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xhdpi/users_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xhdpi/users_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xhdpi/wallet_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xhdpi/wallet_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxhdpi/device_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxhdpi/device_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxhdpi/icon_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxhdpi/icon_copy.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxhdpi/icon_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxhdpi/icon_error.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxhdpi/icon_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxhdpi/icon_view.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxhdpi/users_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxhdpi/users_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxhdpi/wallet_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxhdpi/wallet_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxxhdpi/icon_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxxhdpi/icon_copy.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxxhdpi/icon_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxxhdpi/icon_error.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxxhdpi/icon_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxxhdpi/icon_view.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxxhdpi/users_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxxhdpi/users_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Samples/customloader/res/drawable/ost_progress_image.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/Samples/customloader/res/drawable/ost_progress_image.gif -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/ChildFragmentStack.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui; 2 | 3 | public interface ChildFragmentStack { 4 | boolean popBack(); 5 | } -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xhdpi/ost_empty_drawer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xhdpi/ost_empty_drawer.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xhdpi/ost_nav_bar_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xhdpi/ost_nav_bar_logo.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xxhdpi/ost_device_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xxhdpi/ost_device_icon.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xxhdpi/ost_empty_drawer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xxhdpi/ost_empty_drawer.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xxhdpi/ost_nav_bar_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xxhdpi/ost_nav_bar_logo.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xxxhdpi/ost_device_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xxxhdpi/ost_device_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/assets/fonts/Lato-HairlineItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/assets/fonts/Lato-HairlineItalic.ttf -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-hdpi/ost_logo_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-hdpi/ost_logo_small.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-hdpi/token_sent_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-hdpi/token_sent_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-hdpi/wallet_bg_curve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-hdpi/wallet_bg_curve.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-mdpi/ost_logo_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-mdpi/ost_logo_small.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-mdpi/token_sent_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-mdpi/token_sent_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-mdpi/wallet_bg_curve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-mdpi/wallet_bg_curve.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xhdpi/ost_logo_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xhdpi/ost_logo_blue.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xhdpi/ost_logo_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xhdpi/ost_logo_small.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xhdpi/settings_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xhdpi/settings_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxhdpi/ost_logo_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxhdpi/ost_logo_blue.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxhdpi/settings_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxhdpi/settings_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxxhdpi/device_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxxhdpi/device_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxxhdpi/wallet_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxxhdpi/wallet_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/interfaces/OstWalletUIListener.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui.interfaces; 2 | 3 | public interface OstWalletUIListener { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-hdpi/ic_fingerprint_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-hdpi/ic_fingerprint_check.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-hdpi/ic_fingerprint_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-hdpi/ic_fingerprint_error.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-mdpi/ic_fingerprint_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-mdpi/ic_fingerprint_check.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-mdpi/ic_fingerprint_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-mdpi/ic_fingerprint_error.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xhdpi/ic_fingerprint_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xhdpi/ic_fingerprint_check.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xhdpi/ic_fingerprint_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xhdpi/ic_fingerprint_error.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xxxhdpi/ost_empty_drawer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xxxhdpi/ost_empty_drawer.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xxxhdpi/ost_nav_bar_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xxxhdpi/ost_nav_bar_logo.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-hdpi/token_receive_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-hdpi/token_receive_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-mdpi/token_receive_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-mdpi/token_receive_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xhdpi/token_sent_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xhdpi/token_sent_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xhdpi/wallet_bg_curve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xhdpi/wallet_bg_curve.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxhdpi/ost_logo_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxhdpi/ost_logo_small.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxhdpi/token_sent_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxhdpi/token_sent_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxhdpi/wallet_bg_curve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxhdpi/wallet_bg_curve.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxxhdpi/ost_logo_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxxhdpi/ost_logo_blue.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxxhdpi/ost_logo_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxxhdpi/ost_logo_small.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxxhdpi/settings_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxxhdpi/settings_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxxhdpi/token_sent_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxxhdpi/token_sent_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/mipmap-xxxhdpi/wallet_bg_curve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/mipmap-xxxhdpi/wallet_bg_curve.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-hdpi/ic_fingerprint_success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-hdpi/ic_fingerprint_success.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-mdpi/ic_fingerprint_success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-mdpi/ic_fingerprint_success.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xhdpi/ic_fingerprint_success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xhdpi/ic_fingerprint_success.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xxhdpi/ic_fingerprint_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xxhdpi/ic_fingerprint_check.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xxhdpi/ic_fingerprint_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xxhdpi/ic_fingerprint_error.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xxxhdpi/ic_fingerprint_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xxxhdpi/ic_fingerprint_check.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xxxhdpi/ic_fingerprint_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xxxhdpi/ic_fingerprint_error.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xhdpi/token_receive_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xhdpi/token_receive_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxhdpi/token_receive_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxhdpi/token_receive_icon.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xxhdpi/ic_fingerprint_success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xxhdpi/ic_fingerprint_success.png -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable-xxxhdpi/ic_fingerprint_success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostsdk/src/main/res/drawable-xxxhdpi/ic_fingerprint_success.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-hdpi/ost_kit_start_minting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-hdpi/ost_kit_start_minting.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-mdpi/ost_kit_start_minting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-mdpi/ost_kit_start_minting.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xhdpi/ost_kit_start_minting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xhdpi/ost_kit_start_minting.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxhdpi/ost_kit_start_minting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxhdpi/ost_kit_start_minting.png -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxxhdpi/token_receive_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxxhdpi/token_receive_icon.png -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/ui/workflow/ChildFragmentStack.java: -------------------------------------------------------------------------------- 1 | package com.ost.ostwallet.ui.workflow; 2 | 3 | public interface ChildFragmentStack { 4 | boolean popBack(); 5 | } -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-xxxhdpi/ost_kit_start_minting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenST/ost-wallet-sdk-android/HEAD/ostwallet/src/main/res/drawable-xxxhdpi/ost_kit_start_minting.png -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/workflow/OstLoaderCompletionDelegate.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui.workflow; 2 | 3 | public interface OstLoaderCompletionDelegate { 4 | void dismissWorkflow(); 5 | } -------------------------------------------------------------------------------- /ostsdk/proguard-android-optimize.txt: -------------------------------------------------------------------------------- 1 | #Don't do arithmetic and variable simplification 2 | -optimizations !code/simplification/arithmetic,!code/allocation/variable 3 | #Number of Optimization passes 4 | -optimizationpasses 5 -------------------------------------------------------------------------------- /ostsdk/src/scrypt/include/config.h: -------------------------------------------------------------------------------- 1 | #define HAVE_DECL_BE64ENC 0 2 | #define HAVE_MMAP 1 3 | 4 | #ifndef __ANDROID__ 5 | #define HAVE_POSIX_MEMALIGN 1 6 | #endif 7 | 8 | #ifdef __ANDROID__ 9 | #include 10 | #endif 11 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/interfaces/OstWorkflowUIDelegate.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui.interfaces; 2 | 3 | public interface OstWorkflowUIDelegate extends FlowCompleteListener, FlowInterruptListener, RequestAcknowledgedListener { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /ostwallet/src/main/assets/ost-mobilesdk.json: -------------------------------------------------------------------------------- 1 | { 2 | "BLOCK_GENERATION_TIME": 3, 3 | "PIN_MAX_RETRY_COUNT": 3, 4 | "REQUEST_TIMEOUT_DURATION": 60, 5 | "SESSION_BUFFER_TIME": 3600, 6 | "PRICE_POINT_CURRENCY_SYMBOL": "USD", 7 | "USE_SEED_PASSWORD": true 8 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/uiutils/content/Content.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui.uicomponents.uiutils.content; 2 | 3 | import org.json.JSONObject; 4 | 5 | public interface Content { 6 | JSONObject getStringConfig(String name); 7 | } -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Dec 17 03:00:32 IST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip 7 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/OstPassphraseAcceptor.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui; 2 | 3 | import com.ost.walletsdk.workflows.interfaces.OstBaseInterface; 4 | 5 | public interface OstPassphraseAcceptor extends OstBaseInterface { 6 | void setPassphrase(String passphrase); 7 | } -------------------------------------------------------------------------------- /ostsdk/src/scrypt/include/scrypt_platform.h: -------------------------------------------------------------------------------- 1 | #ifndef _SCRYPT_PLATFORM_H_ 2 | #define _SCRYPT_PLATFORM_H_ 3 | 4 | #if defined(CONFIG_H_FILE) 5 | #include CONFIG_H_FILE 6 | #elif defined(HAVE_CONFIG_H) 7 | #include "config.h" 8 | #else 9 | #error Need either CONFIG_H_FILE or HAVE_CONFIG_H defined. 10 | #endif 11 | 12 | #endif /* !_SCRYPT_PLATFORM_H_ */ 13 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | include ':ostsdk', ':ostwallet' -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable/ost_rounded_corner_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable/rounded_corner_edittext_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable/rounded_corner_edittext_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/network/polling/interfaces/OstTransactionPollingCallback.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.network.polling.interfaces; 2 | 3 | import com.ost.walletsdk.annotations.NonNull; 4 | import com.ost.walletsdk.models.entities.OstTransaction; 5 | 6 | public interface OstTransactionPollingCallback extends OstPollingCallback { 7 | void onTransactionMined(@NonNull OstTransaction transaction); 8 | } 9 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable/red_rounded_rectangle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable/rounded_corner_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable/blue_rounded_rectangle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable/red_rounded_rectangle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable/blue_rounded_rectangle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/workflows/interfaces/OstTransactionWorkflowCallback.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.workflows.interfaces; 2 | 3 | import com.ost.walletsdk.workflows.OstContextEntity; 4 | import com.ost.walletsdk.workflows.OstWorkflowContext; 5 | 6 | public interface OstTransactionWorkflowCallback extends OstWorkFlowCallback { 7 | void transactionMined(OstWorkflowContext ostWorkflowContext, OstContextEntity ostContextEntity); 8 | } 9 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/jni/UnsupportedPlatformException.java: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2011 - Will Glozer. All rights reserved. 2 | 3 | package com.ost.walletsdk.jni; 4 | 5 | /** 6 | * Exception thrown when the current platform cannot be detected. 7 | * 8 | * @author Will Glozer 9 | */ 10 | public class UnsupportedPlatformException extends RuntimeException { 11 | public UnsupportedPlatformException(String s) { 12 | super(s); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/layout/activity_ost_work_flow.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | -------------------------------------------------------------------------------- /Samples/customloader/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | #33000000 13 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/uiutils/theme/NavigationConfig.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui.uicomponents.uiutils.theme; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class NavigationConfig { 6 | 7 | private final String tintColor; 8 | 9 | NavigationConfig(JSONObject navigationObject) { 10 | this.tintColor = navigationObject.optString("tint_color"); 11 | } 12 | 13 | public String getTintColor() { 14 | return this.tintColor; 15 | } 16 | } -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable/bg_data_view_grey.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable/bg_data_view_grey.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/network/OstJsonApiCallback.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.network; 2 | 3 | import com.ost.walletsdk.annotations.NonNull; 4 | import com.ost.walletsdk.annotations.Nullable; 5 | 6 | import com.ost.walletsdk.workflows.errors.OstError; 7 | 8 | import org.json.JSONObject; 9 | 10 | public interface OstJsonApiCallback { 11 | void onOstJsonApiSuccess(@Nullable JSONObject data); 12 | void onOstJsonApiError(@NonNull OstError err, @Nullable JSONObject response); 13 | } 14 | -------------------------------------------------------------------------------- /ostsdk/src/jni/Android.mk: -------------------------------------------------------------------------------- 1 | 2 | LOCAL_MODULE := libscrypt 3 | LOCAL_MODULE_FILENAME := libscrypt 4 | LOCAL_PATH := $(NDK_PROJECT_PATH) 5 | 6 | LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/scrypt/c/*.c) 7 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/scrypt/include/ 8 | 9 | LOCAL_CFLAGS := -std=c99 -Wall -O2 10 | 11 | LOCAL_LDFLAGS := -shared 12 | LOCAL_CFLAGS += -DHAVE_CONFIG_H -I $(LOCAL_PATH)/scrypt/include 13 | CC := arm-linux-androideabi-gcc 14 | LOCAL_CFLAGS += --sysroot=$(SYSROOT) 15 | 16 | include $(BUILD_SHARED_LIBRARY) -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/annotations/StringRes.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.annotations; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | @Documented 10 | @Retention(RetentionPolicy.CLASS) 11 | @Target({ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD, ElementType.LOCAL_VARIABLE}) 12 | public @interface StringRes { 13 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/OstUiWorkFlowCallback.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui; 2 | 3 | import com.ost.walletsdk.workflows.OstContextEntity; 4 | import com.ost.walletsdk.workflows.OstWorkflowContext; 5 | import com.ost.walletsdk.workflows.errors.OstError; 6 | 7 | public interface OstUiWorkFlowCallback { 8 | 9 | void onUiFlowComplete(OstWorkflowContext ostWorkflowContext, OstContextEntity ostContextEntity); 10 | 11 | void onUiFlowInterrupt(OstWorkflowContext ostWorkflowContext, OstError ostError); 12 | } 13 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/network/polling/interfaces/OstPollingCallback.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.network.polling.interfaces; 2 | 3 | import com.ost.walletsdk.annotations.Nullable; 4 | 5 | import com.ost.walletsdk.models.entities.OstBaseEntity; 6 | import com.ost.walletsdk.workflows.errors.OstError; 7 | 8 | import org.json.JSONObject; 9 | 10 | public interface OstPollingCallback { 11 | void onOstPollingSuccess(@Nullable OstBaseEntity entity, @Nullable JSONObject data); 12 | void onOstPollingFailed(OstError error); 13 | } 14 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/uiutils/Font.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ui.uicomponents.uiutils; 12 | 13 | import android.graphics.Typeface; 14 | 15 | public interface Font { 16 | Typeface getFont(String font); 17 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ecKeyInteracts/OstBiometricManager.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ecKeyInteracts; 2 | 3 | public class OstBiometricManager { 4 | 5 | private final String mUserId; 6 | 7 | public OstBiometricManager(String userId) { 8 | mUserId = userId; 9 | } 10 | 11 | public void enableBiometric() { 12 | new InternalKeyManager(mUserId).setBiometricPreference(true); 13 | } 14 | 15 | public void disableBiometric() { 16 | new InternalKeyManager(mUserId).setBiometricPreference(false); 17 | } 18 | } -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/ui/dashboard/UserListView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.ostwallet.ui.dashboard; 12 | 13 | import com.ost.ostwallet.ui.BaseView; 14 | 15 | interface UserListView extends BaseView { 16 | void notifyDataSetChanged(); 17 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/annotations/NonNull.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.annotations; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | @Documented 10 | @Retention(RetentionPolicy.CLASS) 11 | @Target({ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD, ElementType.LOCAL_VARIABLE, ElementType.ANNOTATION_TYPE, ElementType.PACKAGE}) 12 | public @interface NonNull { 13 | } 14 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/models/OstTaskCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.models; 12 | 13 | public class OstTaskCallback { 14 | public void onSuccess() { 15 | 16 | } 17 | 18 | public void onFailure() { 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/ui/workflow/entermnemonics/EnterMnemonicsView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.ostwallet.ui.workflow.entermnemonics; 12 | 13 | import com.ost.ostwallet.ui.BaseView; 14 | 15 | interface EnterMnemonicsView extends BaseView { 16 | 17 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/annotations/Nullable.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.annotations; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | @Documented 10 | @Retention(RetentionPolicy.CLASS) 11 | @Target({ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD, ElementType.LOCAL_VARIABLE, ElementType.ANNOTATION_TYPE, ElementType.PACKAGE}) 12 | public @interface Nullable { 13 | } 14 | -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/ui/managedevices/DeviceListView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.ostwallet.ui.managedevices; 12 | 13 | import com.ost.ostwallet.ui.BaseView; 14 | 15 | interface DeviceListView extends BaseView { 16 | void notifyDataSetChanged(); 17 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/OstUserPassphraseCallback.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui; 2 | 3 | import com.ost.walletsdk.workflows.OstWorkflowContext; 4 | 5 | public interface OstUserPassphraseCallback { 6 | /** 7 | * Get passphrase prefix from application 8 | * @param userId Ost user id 9 | * @param ostWorkflowContext Workflow context 10 | * @param ostPassphraseAcceptor Passphrase prefix accept callback 11 | */ 12 | void getPassphrase(String userId, OstWorkflowContext ostWorkflowContext, OstPassphraseAcceptor ostPassphraseAcceptor); 13 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/loader/OstSdkLoaderManager.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui.loader; 2 | 3 | import com.ost.walletsdk.workflows.OstWorkflowContext; 4 | 5 | public class OstSdkLoaderManager implements OstLoaderDelegate { 6 | 7 | @Override 8 | public OstLoaderFragment getLoader(OstWorkflowContext.WORKFLOW_TYPE workflowType) { 9 | return OstLoaderFragment.newInstance(workflowType); 10 | } 11 | 12 | @Override 13 | public boolean waitForFinalization(OstWorkflowContext.WORKFLOW_TYPE workflowType) { 14 | return false; 15 | } 16 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/annotations/IntRange.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.annotations; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Retention(RetentionPolicy.CLASS) 9 | @Target({ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD, ElementType.LOCAL_VARIABLE, ElementType.ANNOTATION_TYPE}) 10 | public @interface IntRange { 11 | long from() default -9223372036854775808L; 12 | 13 | long to() default 9223372036854775807L; 14 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/workflows/interfaces/OstBaseInterface.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.workflows.interfaces; 12 | 13 | /** 14 | * Base Interface having SDK's flows common methods 15 | */ 16 | public interface OstBaseInterface { 17 | void cancelFlow(); 18 | } -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/ui/workflow/createsession/CreateSessionView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.ostwallet.ui.workflow.createsession; 12 | 13 | import com.ost.ostwallet.ui.BaseView; 14 | 15 | interface CreateSessionView extends BaseView { 16 | void invalidSpendingLimit(); 17 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/utils/EntitiesParser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.utils; 12 | 13 | import org.json.JSONObject; 14 | 15 | public class EntitiesParser { 16 | public EntitiesParser() { 17 | } 18 | 19 | public void parse(JSONObject jsonObject) { 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /ostsdk/src/main/res/layout/content_ost_work_flow.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/values/integers.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 250 14 | 6 15 | 2 16 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/values/integers.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 250 14 | 6 15 | 2 16 | -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/ui/workflow/recovery/RecoveryView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.ostwallet.ui.workflow.recovery; 12 | 13 | import com.ost.ostwallet.ui.BaseView; 14 | 15 | interface RecoveryView extends BaseView { 16 | 17 | void showEnterPin(); 18 | 19 | void gotoDashboard(long workflowId); 20 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/uiutils/FontFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ui.uicomponents.uiutils; 12 | 13 | import android.content.Context; 14 | 15 | public class FontFactory { 16 | public static Font getInstance(Context context) { 17 | return new CustomFont(context); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/ui/workflow/transactions/TransactionsView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.ostwallet.ui.workflow.transactions; 12 | 13 | import com.ost.ostwallet.ui.BaseView; 14 | 15 | interface TransactionsView extends BaseView { 16 | void invalidTokenValue(String text); 17 | 18 | void insufficientBalance(); 19 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/managedevices/DeviceListView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ui.managedevices; 12 | 13 | import com.ost.walletsdk.ui.BaseView; 14 | 15 | interface DeviceListView extends BaseView { 16 | void notifyDataSetChanged(); 17 | void setRefreshing(boolean refreshing); 18 | void onInitialize(); 19 | } -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/ui/workflow/viewmnemonics/ViewMnemonicsView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.ostwallet.ui.workflow.viewmnemonics; 12 | 13 | import com.ost.ostwallet.ui.BaseView; 14 | 15 | interface ViewMnemonicsView extends BaseView { 16 | void showMnemonics(String string); 17 | 18 | void showError(String message); 19 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/annotations/RequiresApi.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.annotations; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Retention(RetentionPolicy.CLASS) 9 | @Target({ElementType.TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.PACKAGE}) 10 | public @interface RequiresApi { 11 | @IntRange( 12 | from = 1L 13 | ) 14 | int value() default 1; 15 | 16 | @IntRange( 17 | from = 1L 18 | ) 19 | int api() default 1; 20 | } -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/ui/workflow/authrorizedeviceqr/AuthorizeDeviceQRView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.ostwallet.ui.workflow.authrorizedeviceqr; 12 | 13 | import com.ost.ostwallet.ui.BaseView; 14 | 15 | interface AuthorizeDeviceQRView extends BaseView { 16 | void gotoDashboard(long workflowId); 17 | 18 | void launchQRScanner(); 19 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/OstResourceProvider.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui; 2 | 3 | import com.ost.walletsdk.ui.loader.OstLoaderDelegate; 4 | import com.ost.walletsdk.ui.loader.OstSdkLoaderManager; 5 | 6 | public class OstResourceProvider { 7 | 8 | private static OstLoaderDelegate mBaseWorkflowLoader = null; 9 | 10 | public static void setApplicationLoaderManager(OstLoaderDelegate ostLoaderDelegate) { 11 | mBaseWorkflowLoader = ostLoaderDelegate; 12 | } 13 | 14 | public static OstLoaderDelegate getLoaderManager() { 15 | return null == mBaseWorkflowLoader ? new OstSdkLoaderManager() : mBaseWorkflowLoader; 16 | } 17 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/jni/NilLibraryLoader.java: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013 - Will Glozer. All rights reserved. 2 | 3 | package com.ost.walletsdk.jni; 4 | 5 | /** 6 | * A native library loader that refuses to load libraries. 7 | * 8 | * @author Will Glozer 9 | */ 10 | public class NilLibraryLoader implements LibraryLoader { 11 | /** 12 | * Don't load a shared library. 13 | * 14 | * @param name Name of the library to load. 15 | * @param verify Ignored, no verification is done. 16 | * 17 | * @return false. 18 | */ 19 | public boolean load(String name, boolean verify) { 20 | return false; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/interfaces/FlowCompleteListener.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui.interfaces; 2 | 3 | import com.ost.walletsdk.workflows.OstContextEntity; 4 | import com.ost.walletsdk.workflows.OstWorkflowContext; 5 | 6 | public interface FlowCompleteListener extends OstWalletUIListener { 7 | /** 8 | * Inform SDK user the the flow is complete. 9 | * @param ostWorkflowContext A context that describes the workflow for which the callback was triggered with workflow id. 10 | * @param ostContextEntity Context Entity 11 | */ 12 | void flowComplete(OstWorkflowContext ostWorkflowContext, OstContextEntity ostContextEntity); 13 | } 14 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/models/OstRuleModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.models; 12 | 13 | import com.ost.walletsdk.models.entities.OstRule; 14 | 15 | public interface OstRuleModel extends OstBaseModel { 16 | @Override 17 | OstRule getEntityById(String id); 18 | 19 | @Override 20 | OstRule[] getEntitiesByParentId(String id); 21 | } 22 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/models/OstTokenModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.models; 12 | 13 | import com.ost.walletsdk.models.entities.OstToken; 14 | 15 | public interface OstTokenModel extends OstBaseModel { 16 | @Override 17 | OstToken getEntityById(String id); 18 | 19 | @Override 20 | OstToken[] getEntitiesByParentId(String id); 21 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/models/OstUserModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.models; 12 | 13 | import com.ost.walletsdk.models.entities.OstUser; 14 | 15 | public interface OstUserModel extends OstBaseModel { 16 | @Override 17 | OstUser getEntityById(String id); 18 | 19 | @Override 20 | OstUser[] getEntitiesByParentId(String id); 21 | } 22 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/models/OstDeviceModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.models; 12 | 13 | import com.ost.walletsdk.models.entities.OstDevice; 14 | 15 | public interface OstDeviceModel extends OstBaseModel { 16 | @Override 17 | OstDevice getEntityById(String id); 18 | 19 | @Override 20 | OstDevice[] getEntitiesByParentId(String id); 21 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/workflows/interfaces/OstVerifyDataInterface.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.workflows.interfaces; 12 | 13 | /** 14 | * Sub Interface of 15 | * 16 | * @see OstBaseInterface 17 | * It declares dataVerified api of Workflows. 18 | */ 19 | public interface OstVerifyDataInterface extends OstBaseInterface { 20 | void dataVerified(); 21 | } -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable/ost_bg_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/models/OstSessionModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.models; 12 | 13 | import com.ost.walletsdk.models.entities.OstSession; 14 | 15 | public interface OstSessionModel extends OstBaseModel { 16 | @Override 17 | OstSession getEntityById(String id); 18 | 19 | 20 | @Override 21 | OstSession[] getEntitiesByParentId(String id); 22 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/entermnemonics/EnterMnemonicsView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ui.entermnemonics; 12 | 13 | 14 | import com.ost.walletsdk.ui.BaseView; 15 | 16 | import org.json.JSONObject; 17 | 18 | interface EnterMnemonicsView extends BaseView { 19 | void showErrorMessage(boolean show); 20 | 21 | void onInitLoader(JSONObject contentConfig); 22 | } -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/uicomponents/uiutils/SizeUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.ostwallet.uicomponents.uiutils; 12 | 13 | import android.content.res.Resources; 14 | 15 | public class SizeUtil { 16 | 17 | public static float getTextSize(Resources res, int resPath) { 18 | return res.getDimension(resPath)/ res.getDisplayMetrics().density; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/uiutils/theme/PinViewConfig.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui.uicomponents.uiutils.theme; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class PinViewConfig { 6 | public String getEmptyColor() { 7 | return emptyColor; 8 | } 9 | 10 | public String getFilledColor() { 11 | return filledColor; 12 | } 13 | 14 | private final String emptyColor; 15 | private final String filledColor; 16 | 17 | public PinViewConfig(JSONObject navigationObject) { 18 | this.emptyColor = navigationObject.optString("empty_color"); 19 | this.filledColor = navigationObject.optString("filled_color"); 20 | } 21 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/Presenter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ui; 12 | 13 | /* 14 | * Every presenter in the app must either implement this interface or extend BasePresenter 15 | * indicating the MvpView type that wants to be attached with. 16 | */ 17 | public interface Presenter { 18 | 19 | void attachView(V mvpView); 20 | 21 | void detachView(); 22 | } 23 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/anim/bottom_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 14 | 18 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/anim/left_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 14 | 18 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/anim/left_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 14 | 18 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/anim/right_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 14 | 18 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/anim/right_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 14 | 18 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/anim/top_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 14 | 18 | -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/ui/Presenter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.ostwallet.ui; 12 | 13 | /* 14 | * Every presenter in the app must either implement this interface or extend BasePresenter 15 | * indicating the MvpView type that wants to be attached with. 16 | */ 17 | public interface Presenter { 18 | 19 | void attachView(V mvpView); 20 | 21 | void detachView(); 22 | } 23 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/anim/left_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 14 | 18 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/anim/right_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 14 | 18 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/anim/top_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 14 | 18 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/models/OstTokenHolderModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.models; 12 | 13 | import com.ost.walletsdk.models.entities.OstTokenHolder; 14 | 15 | public interface OstTokenHolderModel extends OstBaseModel { 16 | @Override 17 | OstTokenHolder getEntityById(String id); 18 | 19 | @Override 20 | OstTokenHolder[] getEntitiesByParentId(String id); 21 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/models/OstTransactionModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.models; 12 | 13 | import com.ost.walletsdk.models.entities.OstTransaction; 14 | 15 | public interface OstTransactionModel extends OstBaseModel { 16 | @Override 17 | OstTransaction getEntityById(String id); 18 | 19 | @Override 20 | OstTransaction[] getEntitiesByParentId(String id); 21 | } -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/ui/workflow/walletsetup/SetUpView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.ostwallet.ui.workflow.walletsetup; 12 | 13 | import com.ost.ostwallet.ui.BaseView; 14 | 15 | interface SetUpView extends BaseView { 16 | 17 | void showAddPin(); 18 | 19 | void showRetypePin(); 20 | 21 | void gotoDashboard(long workflowId); 22 | 23 | void showPinErrorDialog(); 24 | } 25 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/anim/bottom_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 14 | 18 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/anim/left_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 14 | 18 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/anim/right_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 14 | 18 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/jni/LibraryLoader.java: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2011 - Will Glozer. All rights reserved. 2 | 3 | package com.ost.walletsdk.jni; 4 | 5 | /** 6 | * A {@code LibraryLoader} attempts to load the appropriate native library 7 | * for the current platform. 8 | * 9 | * @author Will Glozer 10 | */ 11 | public interface LibraryLoader { 12 | /** 13 | * Load a native library, and optionally verify any signatures. 14 | * 15 | * @param name Name of the library to load. 16 | * @param verify Verify signatures if signed. 17 | * 18 | * @return true if the library was successfully loaded. 19 | */ 20 | boolean load(String name, boolean verify); 21 | } 22 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/recovery/RecoveryView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ui.recovery; 12 | 13 | import com.ost.walletsdk.ui.BaseView; 14 | 15 | import org.json.JSONObject; 16 | 17 | interface RecoveryView extends BaseView { 18 | 19 | void showEnterPin(); 20 | 21 | void gotoDashboard(String workflowId); 22 | 23 | void onPostAuthentication(JSONObject contentConfig); 24 | } -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable/ic_home_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | 19 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/models/OstDeviceManagerModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.models; 12 | 13 | import com.ost.walletsdk.models.entities.OstDeviceManager; 14 | 15 | public interface OstDeviceManagerModel extends OstBaseModel { 16 | @Override 17 | OstDeviceManager getEntityById(String id); 18 | 19 | @Override 20 | OstDeviceManager[] getEntitiesByParentId(String id); 21 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/interfaces/RequestAcknowledgedListener.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui.interfaces; 2 | 3 | import com.ost.walletsdk.workflows.OstContextEntity; 4 | import com.ost.walletsdk.workflows.OstWorkflowContext; 5 | 6 | public interface RequestAcknowledgedListener extends OstWalletUIListener { 7 | /** 8 | * Acknowledge user about the request which is going to make by SDK. 9 | * @param ostWorkflowContext A context that describes the workflow for which the callback was triggered with workflow id. 10 | * @param ostContextEntity Context Entity 11 | */ 12 | void requestAcknowledged(OstWorkflowContext ostWorkflowContext, OstContextEntity ostContextEntity); 13 | } 14 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable/ic_home_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | 19 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/loader/OstLoaderDelegate.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui.loader; 2 | 3 | import com.ost.walletsdk.workflows.OstWorkflowContext; 4 | 5 | public interface OstLoaderDelegate { 6 | 7 | /** 8 | * Get custom loader to show while workflow is in progress 9 | * @param workflowType OstWorkflowType 10 | * @return OstLoaderFragment 11 | */ 12 | OstLoaderFragment getLoader(OstWorkflowContext.WORKFLOW_TYPE workflowType); 13 | 14 | /** 15 | * Check whether workflow should wait till finalization 16 | * @param workflowType OstWorkflowType 17 | * @return boolean 18 | */ 19 | boolean waitForFinalization(OstWorkflowContext.WORKFLOW_TYPE workflowType); 20 | } -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/ui/dashboard/WalletView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.ostwallet.ui.dashboard; 12 | 13 | import com.ost.ostwallet.entity.Transaction; 14 | import com.ost.ostwallet.ui.BaseView; 15 | 16 | interface WalletView extends BaseView { 17 | void updateBalance(String balance, String usdBalance); 18 | void notifyDataSetChanged(); 19 | void openTransactionView(Transaction transaction); 20 | } -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/uicomponents/uiutils/Font.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.ostwallet.uicomponents.uiutils; 12 | 13 | import android.graphics.Typeface; 14 | 15 | public interface Font { 16 | Typeface getRegular(); 17 | 18 | Typeface getLightItalic(); 19 | 20 | Typeface getLight(); 21 | 22 | Typeface getItalic(); 23 | 24 | Typeface getBoldItalic(); 25 | 26 | Typeface getBold(); 27 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/interfaces/FlowInterruptListener.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui.interfaces; 2 | 3 | import com.ost.walletsdk.workflows.OstWorkflowContext; 4 | import com.ost.walletsdk.workflows.errors.OstError; 5 | 6 | public interface FlowInterruptListener extends OstWalletUIListener { 7 | /** 8 | * Inform SDK user that flow is interrupted with errorCode. 9 | * Developers should dismiss pin dialog (if open) on this callback. 10 | * @param ostWorkflowContext A context that describes the workflow for which the callback was triggered with workflow id. 11 | * @param ostError Error Entity 12 | */ 13 | void flowInterrupt(OstWorkflowContext ostWorkflowContext, OstError ostError); 14 | } 15 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/uiutils/theme/EditTextUIConfig.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui.uicomponents.uiutils.theme; 2 | 3 | import android.graphics.Color; 4 | import android.widget.TextView; 5 | 6 | import org.json.JSONObject; 7 | 8 | public class EditTextUIConfig extends UIConfig { 9 | private final UIConfig placeHolder; 10 | 11 | EditTextUIConfig(JSONObject jsonObject) { 12 | super(jsonObject); 13 | this.placeHolder = new UIConfig(jsonObject.optJSONObject("placeholder")); 14 | } 15 | 16 | @Override 17 | public void apply(TextView textView) { 18 | super.apply(textView); 19 | textView.setHintTextColor(Color.parseColor(placeHolder.getColor())); 20 | } 21 | } -------------------------------------------------------------------------------- /ostsdk/src/main/res/layout/ost_fragment_workflow_holder.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/layout/fragment_workflow_holder.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/ui/workflow/resetpin/ResetPinView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.ostwallet.ui.workflow.resetpin; 12 | 13 | import com.ost.ostwallet.ui.BaseView; 14 | 15 | interface ResetPinView extends BaseView { 16 | 17 | void showSetNewPin(); 18 | 19 | void showRetypePin(); 20 | 21 | void showEnterCurrentPin(); 22 | 23 | void gotoDashboard(long workflowId); 24 | 25 | void showPinErrorDialog(); 26 | } -------------------------------------------------------------------------------- /ostsdk/src/main/res/layout/fragment_web_view.xml: -------------------------------------------------------------------------------- 1 | 10 | 13 | 17 | 18 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/models/OstDeviceManagerOperationModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.models; 12 | 13 | import com.ost.walletsdk.models.entities.OstDeviceManagerOperation; 14 | 15 | public interface OstDeviceManagerOperationModel extends OstBaseModel { 16 | @Override 17 | OstDeviceManagerOperation getEntityById(String id); 18 | 19 | @Override 20 | OstDeviceManagerOperation[] getEntitiesByParentId(String id); 21 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/BaseView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ui; 12 | 13 | public interface BaseView { 14 | 15 | void showToastMessage(String text, Boolean isSuccess); 16 | 17 | void showToastMessage(int textRes, Boolean isSuccess); 18 | 19 | void goBack(); 20 | 21 | void close(); 22 | 23 | void showProgress(boolean show); 24 | 25 | void showProgress(boolean show, String progressString); 26 | } 27 | 28 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable/ic_arrow_forward_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | 19 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable/ic_dashboard_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | 19 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable/ic_arrow_forward_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | 19 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable/ic_dashboard_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | 19 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable-mdpi/ic_arrow_forward_grey_24dp.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | 19 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/layout/fragment_web_view.xml: -------------------------------------------------------------------------------- 1 | 10 | 13 | 17 | 18 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/layout/spinner_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/OstUIWorkflowContext.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui; 2 | 3 | import com.ost.walletsdk.annotations.NonNull; 4 | 5 | import com.ost.walletsdk.workflows.OstWorkflowContext; 6 | 7 | public class OstUIWorkflowContext extends OstWorkflowContext { 8 | private final String uiWorkflowId; 9 | public OstUIWorkflowContext(@NonNull OstWorkflowContext context, @NonNull String uiWorkflowId) { 10 | super(context.getWorkflowId(), context.getWorkflowType()); 11 | this.uiWorkflowId = uiWorkflowId; 12 | } 13 | 14 | @Override 15 | public String getWorkflowId() { 16 | return this.uiWorkflowId; 17 | } 18 | 19 | public String getBaseWorkflowId() { 20 | return super.getWorkflowId(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ecKeyInteracts/structs/SignedLogoutSessionsStruct.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ecKeyInteracts.structs; 12 | 13 | public class SignedLogoutSessionsStruct extends BaseDeviceManagerOperationStruct{ 14 | public String getTokenHolderAddress() { 15 | return getToAddress(); 16 | } 17 | 18 | public void setTokenHolderAddress(String tokenHolderAddress) { 19 | setToAddress(tokenHolderAddress); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/resetpin/ResetPinView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ui.resetpin; 12 | 13 | 14 | import com.ost.walletsdk.ui.BaseView; 15 | 16 | interface ResetPinView extends BaseView { 17 | 18 | void showSetNewPin(); 19 | 20 | void showRetypePin(); 21 | 22 | void showEnterCurrentPin(); 23 | 24 | void gotoDashboard(String workflowId); 25 | 26 | void showPinErrorDialog(); 27 | 28 | void onPostAuthentication(); 29 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/workflows/interfaces/OstStartPollingInterface.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.workflows.interfaces; 12 | 13 | /** 14 | * Sub Interface of 15 | * @see OstBaseInterface 16 | * It declares startPolling api of Workflows. 17 | */ 18 | public interface OstStartPollingInterface extends OstBaseInterface { 19 | /** 20 | * SDK user will make SDK to start polling for status from OST Platform. 21 | */ 22 | void startPolling(); 23 | } -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/ui/auth/OnBoardingView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.ostwallet.ui.auth; 12 | 13 | import com.ost.ostwallet.ui.BaseView; 14 | 15 | interface OnBoardingView extends BaseView { 16 | 17 | void refreshToken(); 18 | 19 | void goToDashBoard(); 20 | 21 | void scanForEconomy(); 22 | 23 | void showUsernameError(String errorString); 24 | 25 | void showPasswordError(String errorString); 26 | 27 | void showEconomyChangeDialog(); 28 | } 29 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable/bg_pin_round_fill.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable/ic_close_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | 19 | 20 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable/ic_close_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | 19 | 20 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable/bg_secondary_button_disabled.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/ui/BaseView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.ostwallet.ui; 12 | 13 | public interface BaseView { 14 | 15 | void showToastMessage(String text, Boolean isSuccess); 16 | 17 | void showToastMessage(int textRes, Boolean isSuccess); 18 | 19 | void goBack(); 20 | 21 | void close(); 22 | 23 | void showProgress(boolean show); 24 | 25 | void showProgress(boolean show, String progressString); 26 | 27 | void goToWalletDetails(); 28 | } 29 | 30 | -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/uicomponents/uiutils/FontFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.ostwallet.uicomponents.uiutils; 12 | 13 | import android.content.Context; 14 | 15 | public class FontFactory { 16 | public enum FONT { 17 | LATO 18 | } 19 | public static Font getInstance(Context context, FONT font) { 20 | if (FONT.LATO.equals(font)) { 21 | return new LatoFont(context); 22 | } 23 | return new LatoFont(context); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable/bg_pin_round_fill.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable/bg_secondary_button_disabled.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/walletsetup/SetUpView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ui.walletsetup; 12 | 13 | 14 | import android.app.Activity; 15 | 16 | import com.ost.walletsdk.ui.BaseView; 17 | 18 | interface SetUpView extends BaseView { 19 | 20 | void showAddPin(); 21 | 22 | void showRetypePin(); 23 | 24 | void gotoDashboard(String workflowId); 25 | 26 | void showPinErrorDialog(); 27 | 28 | Activity getCurrentActivity(); 29 | 30 | void onInitialize(); 31 | } 32 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable/bg_pin_round_unfill.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /ostsdk/src/test/java/com/ost/walletsdk/utils/TokenHolderTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.utils; 12 | 13 | import org.junit.Test; 14 | 15 | import static org.junit.Assert.assertEquals; 16 | 17 | public class TokenHolderTest { 18 | 19 | 20 | @Test 21 | public void testLogOutExecutableCallData() { 22 | String expectedOutput = "0x1f3c99c3"; 23 | 24 | String encodeMessage = new TokenHolder().getLogoutExecutableData(); 25 | assertEquals(expectedOutput, encodeMessage); 26 | } 27 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/uiutils/SizeUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ui.uicomponents.uiutils; 12 | 13 | import android.content.res.Resources; 14 | 15 | public class SizeUtil { 16 | 17 | public static float getTextSize(Resources res, int resPath) { 18 | return res.getDimension(resPath)/ res.getDisplayMetrics().density; 19 | } 20 | 21 | public int dpToPx(int dp) { 22 | return (int) (dp * Resources.getSystem().getDisplayMetrics().density); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable/bg_pin_round_unfill.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /ostsdk/src/test/java/com/ost/walletsdk/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk; 12 | 13 | import org.junit.Test; 14 | import org.web3j.utils.Numeric; 15 | 16 | /** 17 | * Example local unit test, which will execute on the development machine (host). 18 | * 19 | * @see Testing documentation 20 | */ 21 | public class ExampleUnitTest { 22 | @Test 23 | public void addition_isCorrect() { 24 | System.out.print(Numeric.toHexString("aniket".getBytes())); 25 | } 26 | } -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/util/DBLog.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.ostwallet.util; 12 | 13 | import com.ost.ostwallet.database.OstAppDatabase; 14 | import com.ost.ostwallet.entity.OstLogEvent; 15 | 16 | public class DBLog { 17 | public void log(OstLogEvent ostLogEvent) { 18 | OstAppDatabase.getDatabase().ostLogEvent().insert(ostLogEvent); 19 | } 20 | 21 | public OstLogEvent[] getWalletEvents(int noOfEvents) { 22 | return OstAppDatabase.getDatabase().ostLogEvent().getLogs(noOfEvents); 23 | } 24 | } -------------------------------------------------------------------------------- /ostsdk/src/main/res/layout/ost_fragment_base.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /ostwallet/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 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable/bg_data_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/layout/app_bar.xml: -------------------------------------------------------------------------------- 1 | 10 | 15 | 16 | 20 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/layout/fragment_base.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/database/daos/OstBaseDao.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.database.daos; 12 | 13 | import com.ost.walletsdk.models.entities.OstBaseEntity; 14 | 15 | public interface OstBaseDao { 16 | void insert(OstBaseEntity baseEntity); 17 | 18 | void insertAll(OstBaseEntity... baseEntity); 19 | 20 | void delete(String id); 21 | 22 | OstBaseEntity[] getByIds(String[] ids); 23 | 24 | OstBaseEntity getById(String id); 25 | 26 | void deleteAll(); 27 | 28 | OstBaseEntity[] getByParentId(String id); 29 | } -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable/bg_data_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/models/OstSecureKeyModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.models; 12 | 13 | import com.ost.walletsdk.models.entities.OstSecureKey; 14 | import com.ost.walletsdk.utils.AsyncStatus; 15 | 16 | import java.util.concurrent.Future; 17 | 18 | public interface OstSecureKeyModel { 19 | 20 | Future insertSecureKey(OstSecureKey ostSecureKey); 21 | 22 | OstSecureKey getByKey(String id); 23 | 24 | Future deleteAllSecureKeys(); 25 | 26 | OstSecureKey initSecureKey(String key, byte[] data); 27 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/uiutils/theme/Theme.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui.uicomponents.uiutils.theme; 2 | 3 | import org.json.JSONObject; 4 | 5 | public interface Theme { 6 | 7 | UIConfig H1(); 8 | 9 | UIConfig H2(); 10 | 11 | UIConfig H3(); 12 | 13 | UIConfig H4(); 14 | 15 | UIConfig C1(); 16 | 17 | UIConfig C2(); 18 | 19 | UIConfig B1(); 20 | 21 | UIConfig B2(); 22 | 23 | UIConfig B3(); 24 | 25 | UIConfig B4(); 26 | 27 | DrawableConfig getDrawableConfig(String imageName); 28 | 29 | DrawableConfig getIconConfig(String imageName); 30 | 31 | String getFontRelativePath(String font); 32 | 33 | NavigationConfig getNavigationBar(); 34 | 35 | PinViewConfig getPinViewConfig(); 36 | 37 | EditTextUIConfig getEditText(); 38 | 39 | JSONObject getThemeObject(); 40 | } 41 | -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/util/WrapLinearLayoutManager.java: -------------------------------------------------------------------------------- 1 | package com.ost.ostwallet.util; 2 | 3 | import android.content.Context; 4 | import android.support.v7.widget.LinearLayoutManager; 5 | import android.support.v7.widget.RecyclerView; 6 | import android.util.Log; 7 | 8 | public class WrapLinearLayoutManager extends LinearLayoutManager { 9 | private static final String LOG_TAG = "WrapLinearLayoutManager"; 10 | 11 | public WrapLinearLayoutManager(Context context) { 12 | super(context); 13 | } 14 | 15 | @Override 16 | public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) { 17 | try { 18 | super.onLayoutChildren(recycler, state); 19 | } catch (IndexOutOfBoundsException e) { 20 | Log.e(LOG_TAG, "IndexOutOfBoundsException"); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/util/WrapLinearLayoutManager.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui.util; 2 | 3 | import android.content.Context; 4 | import android.support.v7.widget.LinearLayoutManager; 5 | import android.support.v7.widget.RecyclerView; 6 | import android.util.Log; 7 | 8 | public class WrapLinearLayoutManager extends LinearLayoutManager { 9 | private static final String LOG_TAG = "WrapLinearLayoutManager"; 10 | 11 | public WrapLinearLayoutManager(Context context) { 12 | super(context); 13 | } 14 | 15 | @Override 16 | public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) { 17 | try { 18 | super.onLayoutChildren(recycler, state); 19 | } catch (IndexOutOfBoundsException e) { 20 | Log.e(LOG_TAG, "IndexOutOfBoundsException"); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable/ic_notifications_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | 19 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable/ic_notifications_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | 19 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable/bg_primary_button_disabled.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable/bg_primary_button_disabled.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/layout/ost_app_bar.xml: -------------------------------------------------------------------------------- 1 | 10 | 16 | 17 | 21 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/workflows/interfaces/OstDeviceRegisteredInterface.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.workflows.interfaces; 12 | 13 | import org.json.JSONObject; 14 | 15 | /** 16 | * Sub Interface of 17 | * @see OstBaseInterface 18 | * It declares deviceRegistered api of Workflows. 19 | */ 20 | public interface OstDeviceRegisteredInterface extends OstBaseInterface { 21 | /** 22 | * SDK user will use it to acknowledge device registration. 23 | * @param apiResponse OST Platform API response. 24 | */ 25 | void deviceRegistered(JSONObject apiResponse); 26 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/workflows/interfaces/OstPinAcceptInterface.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.workflows.interfaces; 12 | 13 | import com.ost.walletsdk.ecKeyInteracts.UserPassphrase; 14 | 15 | /** 16 | * Sub Interface of 17 | * @see OstBaseInterface 18 | * It declares pinEntered api of Workflows. 19 | */ 20 | public interface OstPinAcceptInterface extends OstBaseInterface { 21 | /** 22 | * SDK user will use it to pass user pin to SDK. 23 | * @param passphrase recovery passphrase of the user. 24 | */ 25 | void pinEntered(UserPassphrase passphrase); 26 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/workflows/interfaces/OstWalletWordsAcceptInterface.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.workflows.interfaces; 12 | 13 | import java.util.List; 14 | 15 | /** 16 | * Sub Interface of 17 | * @see OstBaseInterface 18 | * It declares walletWordsEntered api of Workflows. 19 | */ 20 | 21 | public interface OstWalletWordsAcceptInterface extends OstBaseInterface { 22 | /** 23 | * SDK user will use it to pass wallet 12 words to SDK. 24 | * @param wordList List of wallet 12 words 25 | */ 26 | void walletWordsEntered(List wordList); 27 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ecKeyInteracts/OstSecureStorage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ecKeyInteracts; 12 | 13 | public interface OstSecureStorage { 14 | 15 | /** 16 | * Stores a data and returns an id to decrypt the key again 17 | * @param data to store 18 | * @return byte array to decrypt key 19 | */ 20 | byte[] encrypt(byte[] data); 21 | 22 | /** 23 | * Retrieves a key by id from the storage 24 | * @param data to decrypt 25 | * @return byte array or null if no key for this id was stored 26 | */ 27 | byte[] decrypt(byte[] data); 28 | } 29 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ecKeyInteracts/structs/SignedResetRecoveryStruct.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ecKeyInteracts.structs; 12 | 13 | public class SignedResetRecoveryStruct extends BaseRecoveryOperationStruct { 14 | public SignedResetRecoveryStruct(String newRecoveryOwnerAddress) { 15 | this.newRecoveryOwnerAddress = newRecoveryOwnerAddress; 16 | setPrimaryType("ResetRecoveryOwnerStruct"); 17 | } 18 | 19 | public String getNewRecoveryOwnerAddress() { 20 | return newRecoveryOwnerAddress; 21 | } 22 | 23 | private String newRecoveryOwnerAddress; 24 | } 25 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/models/OstBaseModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.models; 12 | 13 | import com.ost.walletsdk.models.entities.OstBaseEntity; 14 | import com.ost.walletsdk.utils.AsyncStatus; 15 | 16 | import java.util.concurrent.Future; 17 | 18 | public interface OstBaseModel { 19 | Future insertOrUpdateEntity(OstBaseEntity ostBaseEntity); 20 | 21 | OstBaseEntity getEntityById(String id); 22 | 23 | OstBaseEntity[] getEntitiesByParentId(String id); 24 | 25 | Future deleteEntity(String id); 26 | 27 | Future deleteAllEntities(); 28 | } 29 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/loader/OstWorkflowLoader.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui.loader; 2 | 3 | import com.ost.walletsdk.ui.workflow.OstLoaderCompletionDelegate; 4 | import com.ost.walletsdk.workflows.OstContextEntity; 5 | import com.ost.walletsdk.workflows.OstWorkflowContext; 6 | import com.ost.walletsdk.workflows.errors.OstError; 7 | 8 | import org.json.JSONObject; 9 | 10 | public interface OstWorkflowLoader { 11 | void onInitLoader(JSONObject contentConfig); 12 | 13 | void onPostAuthentication(JSONObject contentConfig); 14 | 15 | void onAcknowledge(JSONObject contentConfig); 16 | 17 | void onSuccess(OstWorkflowContext ostWorkflowContext, OstContextEntity ostContextEntity, JSONObject contentConfig ,OstLoaderCompletionDelegate delegate); 18 | 19 | void onFailure(OstWorkflowContext ostWorkflowContext, OstError ostError, JSONObject contentConfig ,OstLoaderCompletionDelegate delegate); 20 | } 21 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/layout/fragment_login.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 17 | 18 | 19 | 23 | 24 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/models/OstSessionKeyModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.models; 12 | 13 | import com.ost.walletsdk.models.entities.OstSessionKey; 14 | import com.ost.walletsdk.utils.AsyncStatus; 15 | 16 | import java.util.concurrent.Future; 17 | 18 | public interface OstSessionKeyModel { 19 | 20 | Future insertSessionKey(OstSessionKey ostSessionKey); 21 | 22 | OstSessionKey getByKey(String key); 23 | 24 | Future deleteAllSessionKeys(); 25 | 26 | OstSessionKey initSessionKey(String key, byte[] data); 27 | 28 | Future deleteSessionKey(String key); 29 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ecKeyInteracts/structs/SignedAddDeviceStruct.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ecKeyInteracts.structs; 12 | 13 | public class SignedAddDeviceStruct extends BaseDeviceManagerOperationStruct { 14 | 15 | private String deviceToBeAdded; 16 | 17 | public SignedAddDeviceStruct(String deviceToBeAdded) { 18 | this.deviceToBeAdded = deviceToBeAdded; 19 | } 20 | 21 | public String getDeviceToBeAdded() { 22 | return toSafeCheckSumAddress(deviceToBeAdded); 23 | } 24 | 25 | public void setDeviceToBeAdded(String deviceToBeAdded) { 26 | this.deviceToBeAdded = deviceToBeAdded; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ostsdk/src/test/resources/testJSON.js: -------------------------------------------------------------------------------- 1 | { 2 | types: { 3 | EIP712Domain: [ 4 | { name: 'name', type: 'string' }, 5 | { name: 'version', type: 'string' }, 6 | { name: 'chainId', type: 'uint256' }, 7 | { name: 'verifyingContract', type: 'address' } 8 | ], 9 | Person: [{ name: 'name', type: 'string' }, { name: 'wallet', type: 'address' }], 10 | Mail: [{ name: 'from', type: 'Person' }, { name: 'to', type: 'Person' }, { name: 'contents', type: 'string' }] 11 | }, 12 | primaryType: 'Mail', 13 | domain: { 14 | name: 'Ether Mail', 15 | version: '1', 16 | chainId: 1, 17 | verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC' 18 | }, 19 | message: { 20 | from: { 21 | name: 'Cow', 22 | wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826' 23 | }, 24 | to: { 25 | name: 'Bob', 26 | wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB' 27 | }, 28 | contents: 'Hello, Bob!' 29 | } 30 | } -------------------------------------------------------------------------------- /ostwallet/src/main/res/layout/activity_onboarding.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 19 | 23 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/database/Converters.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.database; 12 | 13 | import android.arch.persistence.room.TypeConverter; 14 | 15 | import org.json.JSONObject; 16 | 17 | public class Converters { 18 | @TypeConverter 19 | public static JSONObject fromString(String string) { 20 | try { 21 | return new JSONObject(string); 22 | } catch (Exception e) { 23 | e.printStackTrace(); 24 | } 25 | return new JSONObject(); 26 | } 27 | 28 | @TypeConverter 29 | public static String jsonToString(JSONObject jsonObject) { 30 | return jsonObject.toString(); 31 | } 32 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ecKeyInteracts/structs/SignedRevokeDeviceStruct.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ecKeyInteracts.structs; 12 | 13 | public class SignedRevokeDeviceStruct extends BaseDeviceManagerOperationStruct { 14 | private String deviceToBeRevoked; 15 | 16 | public SignedRevokeDeviceStruct(String deviceTobeRevoked) { 17 | this.deviceToBeRevoked = deviceTobeRevoked; 18 | } 19 | 20 | public String getDeviceToBeRevoked() { 21 | return toSafeCheckSumAddress(deviceToBeRevoked); 22 | } 23 | 24 | public void setDeviceToBeRevoked(String deviceToBeRevoked) { 25 | this.deviceToBeRevoked = deviceToBeRevoked; 26 | } 27 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/jni/SysLibraryLoader.java: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2011 - Will Glozer. All rights reserved. 2 | 3 | package com.ost.walletsdk.jni; 4 | 5 | /** 6 | * A native library loader that simply invokes {@link System#loadLibrary}. The shared 7 | * library path and filename are platform specific. 8 | * 9 | * @author Will Glozer 10 | */ 11 | public class SysLibraryLoader implements LibraryLoader { 12 | /** 13 | * Load a shared library. 14 | * 15 | * @param name Name of the library to load. 16 | * @param verify Ignored, no verification is done. 17 | * 18 | * @return true if the library was successfully loaded. 19 | */ 20 | public boolean load(String name, boolean verify) { 21 | boolean loaded; 22 | 23 | try { 24 | System.loadLibrary(name); 25 | loaded = true; 26 | } catch (Throwable e) { 27 | loaded = false; 28 | } 29 | 30 | return loaded; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/OstEditText.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui.uicomponents; 2 | 3 | import android.content.Context; 4 | import android.support.v7.widget.AppCompatEditText; 5 | import android.util.AttributeSet; 6 | 7 | import com.ost.walletsdk.ui.uicomponents.uiutils.theme.ThemeConfig; 8 | 9 | public class OstEditText extends AppCompatEditText { 10 | public OstEditText(Context context) { 11 | super(context); 12 | defineUi(context, null, 0); 13 | } 14 | 15 | public OstEditText(Context context, AttributeSet attrs) { 16 | super(context, attrs); 17 | defineUi(context, attrs, 0); 18 | } 19 | 20 | public OstEditText(Context context, AttributeSet attrs, int defStyleAttr) { 21 | super(context, attrs, defStyleAttr); 22 | defineUi(context, attrs, defStyleAttr); 23 | } 24 | 25 | void defineUi(Context context, AttributeSet attrs, int defStyleAttr) { 26 | ThemeConfig.getInstance().getEditText().apply(this); 27 | } 28 | } -------------------------------------------------------------------------------- /Samples/customloader/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 25 | 26 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/uiutils/theme/DrawableConfig.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui.uicomponents.uiutils.theme; 2 | 3 | import android.content.Context; 4 | import android.content.res.Resources; 5 | import android.graphics.drawable.Drawable; 6 | 7 | import org.json.JSONObject; 8 | 9 | public class DrawableConfig { 10 | 11 | private final String name; 12 | private final String tintColor; 13 | 14 | DrawableConfig(JSONObject drawableObject) { 15 | this.name = drawableObject.optString("asset_name"); 16 | this.tintColor = drawableObject.optString("tint_color"); 17 | } 18 | 19 | public Drawable getDrawable(Context context) { 20 | Resources resources = context.getResources(); 21 | final int resourceId = resources.getIdentifier(name, "drawable", 22 | context.getPackageName()); 23 | return resources.getDrawable(resourceId, null); 24 | } 25 | 26 | public String getTintColor() { 27 | return this.tintColor; 28 | } 29 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/uiutils/theme/ThemeDefault.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui.uicomponents.uiutils.theme; 2 | 3 | import android.content.Context; 4 | 5 | import com.ost.walletsdk.workflows.errors.OstError; 6 | import com.ost.walletsdk.workflows.errors.OstErrors; 7 | 8 | import org.json.JSONObject; 9 | 10 | import java.io.InputStream; 11 | 12 | class ThemeDefault { 13 | 14 | static JSONObject getDefaultTheme(Context context) { 15 | try { 16 | InputStream configInputStream = context.getAssets().open("ost-theme-config.json"); 17 | int size = configInputStream.available(); 18 | byte[] buffer = new byte[size]; 19 | 20 | configInputStream.read(buffer); 21 | configInputStream.close(); 22 | 23 | String json = new String(buffer, "UTF-8"); 24 | return new JSONObject(json); 25 | 26 | } catch (Exception e) { 27 | throw new OstError("ost_config_rc_1", OstErrors.ErrorCode.CONFIG_READ_FAILED); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/utils/DispatchAsync.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.utils; 12 | 13 | import com.ost.walletsdk.OstConstants; 14 | 15 | import java.util.concurrent.Callable; 16 | import java.util.concurrent.Executors; 17 | import java.util.concurrent.Future; 18 | import java.util.concurrent.ThreadPoolExecutor; 19 | 20 | public class DispatchAsync { 21 | private final static ThreadPoolExecutor THREAD_POOL_EXECUTOR = (ThreadPoolExecutor) Executors.newFixedThreadPool(OstConstants.THREAD_POOL_SIZE); 22 | 23 | public static Future dispatch(Executor executor) { 24 | return THREAD_POOL_EXECUTOR.submit(executor); 25 | } 26 | 27 | public abstract static class Executor implements Callable { 28 | } 29 | } -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/database/daos/OstLogEventDao.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.ostwallet.database.daos; 12 | 13 | import android.arch.persistence.room.Dao; 14 | import android.arch.persistence.room.Insert; 15 | import android.arch.persistence.room.Query; 16 | 17 | import com.ost.ostwallet.entity.OstLogEvent; 18 | 19 | @Dao 20 | public interface OstLogEventDao { 21 | @Insert 22 | void insert(OstLogEvent ostLogEvent); 23 | 24 | @Query("SELECT * FROM log_events WHERE id > :timestamp") 25 | OstLogEvent[] getLogsAfter(long timestamp); 26 | 27 | @Query("DELETE FROM log_events") 28 | void deleteAll(); 29 | 30 | @Query("SELECT * FROM log_events order by id desc LIMIT :noOfEvents") 31 | OstLogEvent[] getLogs(int noOfEvents); 32 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/uiutils/content/ContentDefault.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui.uicomponents.uiutils.content; 2 | 3 | import android.content.Context; 4 | 5 | import com.ost.walletsdk.workflows.errors.OstError; 6 | import com.ost.walletsdk.workflows.errors.OstErrors; 7 | 8 | import org.json.JSONObject; 9 | 10 | import java.io.InputStream; 11 | 12 | public class ContentDefault { 13 | 14 | static JSONObject getDefaultContent(Context context) { 15 | try { 16 | InputStream configInputStream = context.getAssets().open("ost-content-config.json"); 17 | int size = configInputStream.available(); 18 | byte[] buffer = new byte[size]; 19 | 20 | configInputStream.read(buffer); 21 | configInputStream.close(); 22 | 23 | String json = new String(buffer, "UTF-8"); 24 | return new JSONObject(json); 25 | 26 | } catch (Exception e) { 27 | throw new OstError("ost_config_rc_1", OstErrors.ErrorCode.CONFIG_READ_FAILED); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/uiutils/content/StringConfig.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui.uicomponents.uiutils.content; 2 | 3 | import org.json.JSONObject; 4 | 5 | public class StringConfig { 6 | 7 | private final String name; 8 | private final String url; 9 | private final String color; 10 | private final String font; 11 | 12 | StringConfig(JSONObject stringObject) { 13 | this.name = stringObject.optString("text"); 14 | this.url = stringObject.optString("url"); 15 | this.color = stringObject.optString("color"); 16 | this.font = stringObject.optString("font"); 17 | } 18 | 19 | public static StringConfig instance(JSONObject jsonObject) { 20 | return new StringConfig(jsonObject); 21 | } 22 | 23 | public String getString() { 24 | return this.name; 25 | } 26 | 27 | public String getUrl() { 28 | return this.url; 29 | } 30 | 31 | public String getColor() { 32 | return color; 33 | } 34 | 35 | public String getFont() { 36 | return font; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/network/NetworkClient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.ostwallet.network; 12 | 13 | import android.content.Context; 14 | 15 | import com.android.volley.RequestQueue; 16 | import com.android.volley.toolbox.Volley; 17 | 18 | public class NetworkClient { 19 | private static RequestQueue mRequestQueue; 20 | 21 | /** 22 | * Nothing to see here. 23 | */ 24 | private NetworkClient() { 25 | // no instances 26 | } 27 | 28 | /** 29 | * @param context 30 | * application context 31 | */ 32 | public static void init(Context context) { 33 | mRequestQueue = Volley.newRequestQueue(context); 34 | } 35 | 36 | public static RequestQueue getRequestQueue() { 37 | return mRequestQueue; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/uiutils/CustomFont.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ui.uicomponents.uiutils; 12 | 13 | import android.content.Context; 14 | import android.graphics.Typeface; 15 | import android.text.TextUtils; 16 | 17 | import com.ost.walletsdk.ui.uicomponents.uiutils.theme.ThemeConfig; 18 | 19 | class CustomFont implements Font { 20 | 21 | private final Context mContext; 22 | 23 | CustomFont(Context context) { 24 | mContext = context; 25 | } 26 | 27 | @Override 28 | public Typeface getFont(String font) { 29 | String fontPath = ThemeConfig.getInstance().getFontRelativePath(font); 30 | if (TextUtils.isEmpty(fontPath)) { 31 | return null; 32 | } 33 | return FontCache.get(mContext, fontPath); 34 | } 35 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019 OST.com Inc 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | 11 | # Project-wide Gradle settings. 12 | # IDE (e.g. Android Studio) users: 13 | # Gradle settings configured through the IDE *will override* 14 | # any settings specified in this file. 15 | # For more details on how to configure your build environment visit 16 | # http://www.gradle.org/docs/current/userguide/build_environment.html 17 | # Specifies the JVM arguments used for the daemon process. 18 | # The setting is particularly useful for tweaking memory settings. 19 | org.gradle.jvmargs=-Xmx1536m 20 | # When configured, Gradle will run in incubating parallel mode. 21 | # This option should only be used with decoupled projects. More details, visit 22 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 23 | # org.gradle.parallel=true 24 | 25 | org.gradle.logging.level=debug -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/utils/AsyncStatus.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.utils; 12 | 13 | import com.ost.walletsdk.workflows.errors.OstError; 14 | 15 | public class AsyncStatus { 16 | 17 | private final String mMessage; 18 | private final boolean mSuccess; 19 | 20 | public AsyncStatus(boolean success, String message){ 21 | mSuccess = success; 22 | mMessage = message; 23 | } 24 | 25 | public AsyncStatus(OstError error) { 26 | mSuccess = false; 27 | mMessage = error.getMessage(); 28 | } 29 | 30 | public AsyncStatus(boolean success){ 31 | this(success,""); 32 | } 33 | 34 | public boolean isSuccess() { 35 | return mSuccess; 36 | } 37 | 38 | public String getMessage() { 39 | return mMessage; 40 | } 41 | } -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/uicomponents/uiutils/FontCache.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.ostwallet.uicomponents.uiutils; 12 | 13 | import android.content.Context; 14 | import android.graphics.Typeface; 15 | 16 | import java.util.Hashtable; 17 | 18 | public class FontCache { 19 | 20 | private static Hashtable fontCache = new Hashtable<>(); 21 | 22 | public static Typeface get(Context context, String name) { 23 | Typeface tf = fontCache.get(name); 24 | if(tf == null) { 25 | try { 26 | tf = Typeface.createFromAsset(context.getAssets(), name); 27 | } 28 | catch (Exception e) { 29 | return null; 30 | } 31 | fontCache.put(name, tf); 32 | } 33 | return tf; 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 OpenST 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/uiutils/FontCache.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ui.uicomponents.uiutils; 12 | 13 | import android.content.Context; 14 | import android.graphics.Typeface; 15 | 16 | import java.util.Hashtable; 17 | 18 | public class FontCache { 19 | 20 | private static Hashtable fontCache = new Hashtable<>(); 21 | 22 | public static Typeface get(Context context, String name) { 23 | Typeface tf = fontCache.get(name); 24 | if(tf == null) { 25 | try { 26 | tf = Typeface.createFromAsset(context.getAssets(), name); 27 | } 28 | catch (Exception e) { 29 | return null; 30 | } 31 | fontCache.put(name, tf); 32 | } 33 | return tf; 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /ostsdk/src/main/res/drawable/secondary_button_text_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 16 | 17 | 18 | 21 | 22 | 23 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /ostwallet/src/main/res/drawable/secondary_button_text_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 16 | 17 | 18 | 21 | 22 | 23 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ecKeyInteracts/structs/SignedAddSessionStruct.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ecKeyInteracts.structs; 12 | 13 | public class SignedAddSessionStruct extends BaseDeviceManagerOperationStruct { 14 | private String sessionAddress; 15 | private String spendingLimit; 16 | private String expiryHeight; 17 | 18 | public SignedAddSessionStruct(String sessionAddress, String spendingLimit, String expiryHeight) { 19 | this.sessionAddress = sessionAddress; 20 | this.spendingLimit = spendingLimit; 21 | this.expiryHeight = expiryHeight; 22 | } 23 | 24 | public String getTokenHolderAddress() { 25 | return getToAddress(); 26 | } 27 | 28 | public void setTokenHolderAddress(String tokenHolderAddress) { 29 | setToAddress(tokenHolderAddress); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /Samples/customloader/src/OstMockLoaderManager.java: -------------------------------------------------------------------------------- 1 | package customloader.src; 2 | 3 | import com.ost.walletsdk.ui.loader.OstLoaderDelegate; 4 | import com.ost.walletsdk.ui.loader.OstLoaderFragment; 5 | import com.ost.walletsdk.workflows.OstWorkflowContext; 6 | 7 | public class OstMockLoaderManager implements OstLoaderDelegate { 8 | 9 | static OstMockLoaderManager INSTANCE = new OstMockLoaderManager(); 10 | private OstMockLoaderManager(){ 11 | 12 | } 13 | 14 | public static OstLoaderDelegate getInstance() { 15 | return INSTANCE; 16 | } 17 | 18 | @Override 19 | public OstLoaderFragment getLoader(OstWorkflowContext.WORKFLOW_TYPE workflowType) { 20 | return customloader.src.OstMockLoaderFragment.newInstance(); 21 | } 22 | 23 | @Override 24 | public boolean waitForFinalization(OstWorkflowContext.WORKFLOW_TYPE workflowType) { 25 | if (OstWorkflowContext.WORKFLOW_TYPE.ACTIVATE_USER.equals(workflowType)) { 26 | return false; 27 | } 28 | if (OstWorkflowContext.WORKFLOW_TYPE.EXECUTE_TRANSACTION.equals(workflowType)) { 29 | return false; 30 | } 31 | return true; 32 | } 33 | } -------------------------------------------------------------------------------- /ostsdk/src/androidTest/java/com/ost/walletsdk/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk; 12 | 13 | import android.content.Context; 14 | import android.support.test.InstrumentationRegistry; 15 | import android.support.test.runner.AndroidJUnit4; 16 | 17 | import org.junit.Test; 18 | import org.junit.runner.RunWith; 19 | 20 | import static org.junit.Assert.assertEquals; 21 | 22 | /** 23 | * Instrumented test, which will execute on an Android device. 24 | * 25 | * @see Testing documentation 26 | */ 27 | @RunWith(AndroidJUnit4.class) 28 | public class ExampleInstrumentedTest { 29 | @Test 30 | public void useAppContext() { 31 | // Context of the app under test. 32 | Context appContext = InstrumentationRegistry.getTargetContext(); 33 | 34 | assertEquals(2 + 2, 4); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /ostsdk/src/main/res/xml/ost_network_security_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | api.ost.com 7 | 8 | 9 | s4vrk6by0cqKQ9p/mFOakoi0daivc7Le8q7fUuuo4/U= 10 | MvVeCJ2tAuJZmbqoXMqSNP2mKh+VjGiljvqWytjzasU= 11 | J+0IGhy08mkHR1Z1WbdrHEdHhXRohrdLHUYORlWGafA= 12 | aF+lKYb0WChlCTx5uPBw5ZWze/98vAXSzBBIrVSZWJE= 13 | efgWbb0q/zHFLub1SY5QpoQVlZp33QpLOj0EmhoK8tI= 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/uiutils/theme/PinDrawable.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui.uicomponents.uiutils.theme; 2 | 3 | import android.graphics.Canvas; 4 | import android.graphics.ColorFilter; 5 | import android.graphics.Paint; 6 | import android.graphics.PixelFormat; 7 | import android.graphics.RectF; 8 | import android.graphics.drawable.Drawable; 9 | 10 | public class PinDrawable extends Drawable { 11 | 12 | private Paint paint; 13 | 14 | public PinDrawable() { 15 | paint = new Paint(); 16 | paint.setAntiAlias(true); 17 | } 18 | 19 | @Override 20 | public void draw(Canvas canvas) { 21 | int height = getBounds().height(); 22 | int width = getBounds().width(); 23 | RectF rect = new RectF(0.0f, 0.0f, width, height); 24 | canvas.drawRoundRect(rect, 50, 50, paint); 25 | } 26 | 27 | @Override 28 | public void setAlpha(int alpha) { 29 | paint.setAlpha(alpha); 30 | } 31 | 32 | @Override 33 | public void setColorFilter(ColorFilter cf) { 34 | paint.setColorFilter(cf); 35 | } 36 | 37 | @Override 38 | public int getOpacity() { 39 | return PixelFormat.OPAQUE; 40 | } 41 | } -------------------------------------------------------------------------------- /ostwallet/src/androidTest/java/com/ost/ostwallet/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.ostwallet; 12 | 13 | import android.content.Context; 14 | import android.support.test.InstrumentationRegistry; 15 | import android.support.test.runner.AndroidJUnit4; 16 | 17 | import org.junit.Test; 18 | import org.junit.runner.RunWith; 19 | 20 | import static org.junit.Assert.*; 21 | 22 | /** 23 | * Instrumented test, which will execute on an Android device. 24 | * 25 | * @see Testing documentation 26 | */ 27 | @RunWith(AndroidJUnit4.class) 28 | public class ExampleInstrumentedTest { 29 | @Test 30 | public void useAppContext() { 31 | // Context of the app under test. 32 | Context appContext = InstrumentationRegistry.getTargetContext(); 33 | 34 | assertEquals("ost.com.demoapp", appContext.getPackageName()); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/OstB2Label.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ui.uicomponents; 12 | 13 | import android.content.Context; 14 | import android.util.AttributeSet; 15 | 16 | import com.ost.walletsdk.ui.uicomponents.uiutils.theme.ThemeConfig; 17 | 18 | 19 | public class OstB2Label extends OstButton { 20 | public OstB2Label(Context context) { 21 | super(context); 22 | } 23 | 24 | public OstB2Label(Context context, AttributeSet attrs) { 25 | super(context, attrs); 26 | } 27 | 28 | public OstB2Label(Context context, AttributeSet attrs, int defStyleAttr) { 29 | super(context, attrs, defStyleAttr); 30 | } 31 | 32 | @Override 33 | void defineUi(Context context, AttributeSet attrs, int defStyleAttr) { 34 | super.defineUi(context, attrs, defStyleAttr); 35 | ThemeConfig.getInstance().B2().apply(this); 36 | } 37 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/OstC1Label.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ui.uicomponents; 12 | 13 | import android.content.Context; 14 | import android.util.AttributeSet; 15 | 16 | import com.ost.walletsdk.ui.uicomponents.uiutils.theme.ThemeConfig; 17 | 18 | public class OstC1Label extends OstTextView { 19 | public OstC1Label(Context context) { 20 | super(context); 21 | } 22 | 23 | public OstC1Label(Context context, AttributeSet attrs) { 24 | super(context, attrs); 25 | } 26 | 27 | public OstC1Label(Context context, AttributeSet attrs, int defStyleAttr) { 28 | super(context, attrs, defStyleAttr); 29 | } 30 | 31 | @Override 32 | void defineUi(Context context, AttributeSet attrs, int defStyleAttr) { 33 | super.defineUi(context, attrs, defStyleAttr); 34 | ThemeConfig.getInstance().C1().apply(this); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/OstC2Label.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ui.uicomponents; 12 | 13 | import android.content.Context; 14 | import android.util.AttributeSet; 15 | 16 | import com.ost.walletsdk.ui.uicomponents.uiutils.theme.ThemeConfig; 17 | 18 | public class OstC2Label extends OstTextView { 19 | public OstC2Label(Context context) { 20 | super(context); 21 | } 22 | 23 | public OstC2Label(Context context, AttributeSet attrs) { 24 | super(context, attrs); 25 | } 26 | 27 | public OstC2Label(Context context, AttributeSet attrs, int defStyleAttr) { 28 | super(context, attrs, defStyleAttr); 29 | } 30 | 31 | @Override 32 | void defineUi(Context context, AttributeSet attrs, int defStyleAttr) { 33 | super.defineUi(context, attrs, defStyleAttr); 34 | ThemeConfig.getInstance().C2().apply(this); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/OstH2Label.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ui.uicomponents; 12 | 13 | import android.content.Context; 14 | import android.util.AttributeSet; 15 | 16 | import com.ost.walletsdk.ui.uicomponents.uiutils.theme.ThemeConfig; 17 | 18 | public class OstH2Label extends OstTextView { 19 | public OstH2Label(Context context) { 20 | super(context); 21 | } 22 | 23 | public OstH2Label(Context context, AttributeSet attrs) { 24 | super(context, attrs); 25 | } 26 | 27 | public OstH2Label(Context context, AttributeSet attrs, int defStyleAttr) { 28 | super(context, attrs, defStyleAttr); 29 | } 30 | 31 | @Override 32 | void defineUi(Context context, AttributeSet attrs, int defStyleAttr) { 33 | super.defineUi(context, attrs, defStyleAttr); 34 | ThemeConfig.getInstance().H2().apply(this); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/OstH3Label.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ui.uicomponents; 12 | 13 | import android.content.Context; 14 | import android.util.AttributeSet; 15 | 16 | import com.ost.walletsdk.ui.uicomponents.uiutils.theme.ThemeConfig; 17 | 18 | public class OstH3Label extends OstTextView { 19 | public OstH3Label(Context context) { 20 | super(context); 21 | } 22 | 23 | public OstH3Label(Context context, AttributeSet attrs) { 24 | super(context, attrs); 25 | } 26 | 27 | public OstH3Label(Context context, AttributeSet attrs, int defStyleAttr) { 28 | super(context, attrs, defStyleAttr); 29 | } 30 | 31 | @Override 32 | void defineUi(Context context, AttributeSet attrs, int defStyleAttr) { 33 | super.defineUi(context, attrs, defStyleAttr); 34 | ThemeConfig.getInstance().H3().apply(this); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/OstB1Label.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ui.uicomponents; 12 | 13 | import android.content.Context; 14 | import android.util.AttributeSet; 15 | 16 | import com.ost.walletsdk.ui.uicomponents.uiutils.theme.ThemeConfig; 17 | 18 | 19 | public class OstB1Label extends OstButton { 20 | public OstB1Label(Context context) { 21 | super(context); 22 | } 23 | 24 | public OstB1Label(Context context, AttributeSet attrs) { 25 | super(context, attrs); 26 | } 27 | 28 | public OstB1Label(Context context, AttributeSet attrs, int defStyleAttr) { 29 | super(context, attrs, defStyleAttr); 30 | } 31 | 32 | @Override 33 | void defineUi(Context context, AttributeSet attrs, int defStyleAttr) { 34 | super.defineUi(context, attrs, defStyleAttr); 35 | ThemeConfig.getInstance().B1().apply(this); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/OstH1Label.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ui.uicomponents; 12 | 13 | import android.content.Context; 14 | import android.util.AttributeSet; 15 | 16 | import com.ost.walletsdk.ui.uicomponents.uiutils.theme.ThemeConfig; 17 | 18 | 19 | public class OstH1Label extends OstTextView { 20 | public OstH1Label(Context context) { 21 | super(context); 22 | } 23 | 24 | public OstH1Label(Context context, AttributeSet attrs) { 25 | super(context, attrs); 26 | } 27 | 28 | public OstH1Label(Context context, AttributeSet attrs, int defStyleAttr) { 29 | super(context, attrs, defStyleAttr); 30 | } 31 | 32 | @Override 33 | void defineUi(Context context, AttributeSet attrs, int defStyleAttr) { 34 | super.defineUi(context, attrs, defStyleAttr); 35 | ThemeConfig.getInstance().H1().apply(this); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/OstH4Label.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ui.uicomponents; 12 | 13 | import android.content.Context; 14 | import android.util.AttributeSet; 15 | 16 | import com.ost.walletsdk.ui.uicomponents.uiutils.theme.ThemeConfig; 17 | 18 | 19 | public class OstH4Label extends OstTextView { 20 | public OstH4Label(Context context) { 21 | super(context); 22 | } 23 | 24 | public OstH4Label(Context context, AttributeSet attrs) { 25 | super(context, attrs); 26 | } 27 | 28 | public OstH4Label(Context context, AttributeSet attrs, int defStyleAttr) { 29 | super(context, attrs, defStyleAttr); 30 | } 31 | 32 | @Override 33 | void defineUi(Context context, AttributeSet attrs, int defStyleAttr) { 34 | super.defineUi(context, attrs, defStyleAttr); 35 | ThemeConfig.getInstance().H4().apply(this); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ui/uicomponents/uiutils/theme/ButtonDrawable.java: -------------------------------------------------------------------------------- 1 | package com.ost.walletsdk.ui.uicomponents.uiutils.theme; 2 | 3 | import android.graphics.Canvas; 4 | import android.graphics.ColorFilter; 5 | import android.graphics.Paint; 6 | import android.graphics.PixelFormat; 7 | import android.graphics.RectF; 8 | import android.graphics.drawable.Drawable; 9 | 10 | public class ButtonDrawable extends Drawable { 11 | 12 | private Paint paint; 13 | 14 | public ButtonDrawable() { 15 | paint = new Paint(); 16 | paint.setAntiAlias(true); 17 | } 18 | 19 | @Override 20 | public void draw(Canvas canvas) { 21 | int height = getBounds().height(); 22 | int width = getBounds().width(); 23 | RectF rect = new RectF(0.0f, 0.0f, width, height); 24 | canvas.drawRoundRect(rect, 15, 15, paint); 25 | } 26 | 27 | @Override 28 | public void setAlpha(int alpha) { 29 | paint.setAlpha(alpha); 30 | } 31 | 32 | @Override 33 | public void setColorFilter(ColorFilter cf) { 34 | paint.setColorFilter(cf); 35 | } 36 | 37 | @Override 38 | public int getOpacity() { 39 | return PixelFormat.OPAQUE; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/database/daos/OstSessionKeyDao.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.database.daos; 12 | 13 | import android.arch.persistence.room.Dao; 14 | import android.arch.persistence.room.Insert; 15 | import android.arch.persistence.room.Query; 16 | 17 | import com.ost.walletsdk.models.entities.OstSessionKey; 18 | 19 | 20 | @Dao 21 | public interface OstSessionKeyDao { 22 | 23 | @Insert 24 | void insert(OstSessionKey ostSessionKey); 25 | 26 | @Insert 27 | void insertAll(OstSessionKey... ostSessionKey); 28 | 29 | @Query("DELETE FROM session_key WHERE `key`=:key") 30 | void delete(String key); 31 | 32 | @Query("SELECT * FROM session_key WHERE `key` IN (:keys)") 33 | OstSessionKey[] getByIds(String[] keys); 34 | 35 | @Query("SELECT * FROM session_key WHERE `key`=:key") 36 | OstSessionKey getById(String key); 37 | 38 | @Query("DELETE FROM session_key") 39 | void deleteAll(); 40 | } -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/ecKeyInteracts/structs/BaseRecoveryOperationStruct.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.ecKeyInteracts.structs; 12 | 13 | public class BaseRecoveryOperationStruct extends SignedEIP712Struct { 14 | 15 | private String callData; 16 | 17 | public String getRecoveryOwnerAddress() { 18 | return getSignerAddress(); 19 | } 20 | 21 | public void setRecoveryOwnerAddress(String recoveryOwnerAddress) { 22 | setSignerAddress(recoveryOwnerAddress); 23 | } 24 | 25 | public String getRecoveryContractAddress() { 26 | return getVerifyingContract(); 27 | } 28 | 29 | public void setRecoveryContractAddress(String recoveryContractAddress) { 30 | setVerifyingContract(recoveryContractAddress); 31 | } 32 | 33 | public String getCallData() { 34 | return callData; 35 | } 36 | public void setCallData(String callData) { 37 | this.callData = callData; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /ostsdk/src/main/java/com/ost/walletsdk/workflows/OstContextEntity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.walletsdk.workflows; 12 | 13 | /** 14 | * Context Entity to hold entity associated in work flows 15 | */ 16 | public class OstContextEntity { 17 | private String message; 18 | private Object entity; 19 | private String entityType; 20 | 21 | public OstContextEntity(String message, Object entity, String entityType) { 22 | this.message = message; 23 | this.entity = entity; 24 | this.entityType = entityType; 25 | } 26 | 27 | public OstContextEntity(Object entity, String entityType) { 28 | this.message = ""; 29 | this.entity = entity; 30 | this.entityType = entityType; 31 | } 32 | 33 | 34 | public String getMessage() { 35 | return message; 36 | } 37 | 38 | public Object getEntity() { 39 | return entity; 40 | } 41 | 42 | public String getEntityType() { 43 | return entityType; 44 | } 45 | } -------------------------------------------------------------------------------- /ostsdk/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 | 23 | #Don't mix class names 24 | -dontusemixedcaseclassnames 25 | #Don't ignore non-public library classes. 26 | -dontskipnonpubliclibraryclasses 27 | -dontpreverify 28 | #show logs 29 | -verbose 30 | #Don't obfuscate the input class files. 31 | -keep class ** 32 | -keepclassmembers class *{*;} 33 | -keepattributes * 34 | #strip down debug and verbose logs 35 | -assumenosideeffects class android.util.Log { 36 | public static *** d(...); 37 | public static *** v(...); 38 | } -------------------------------------------------------------------------------- /ostsdk/src/main/res/layout/ost_empty_drawer.xml: -------------------------------------------------------------------------------- 1 | 10 | 16 | 17 | 23 | 24 | 31 | -------------------------------------------------------------------------------- /ostwallet/src/main/java/com/ost/ostwallet/uicomponents/OstListButton.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 OST.com Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package com.ost.ostwallet.uicomponents; 12 | 13 | import android.content.Context; 14 | import android.content.res.Resources; 15 | import android.util.AttributeSet; 16 | 17 | import com.ost.ostwallet.R; 18 | import com.ost.ostwallet.uicomponents.uiutils.SizeUtil; 19 | 20 | public class OstListButton extends OstSecondaryButton { 21 | public OstListButton(Context context) { 22 | super(context); 23 | } 24 | 25 | public OstListButton(Context context, AttributeSet attrs) { 26 | super(context, attrs); 27 | } 28 | 29 | public OstListButton(Context context, AttributeSet attrs, int defStyleAttr) { 30 | super(context, attrs, defStyleAttr); 31 | } 32 | 33 | @Override 34 | void defineUi(Context context, AttributeSet attrs, int defStyleAttr) { 35 | super.defineUi(context, attrs, defStyleAttr); 36 | Resources res = getResources(); 37 | setTextSize(SizeUtil.getTextSize(res, R.dimen.view_cell_sub_text)); 38 | } 39 | } --------------------------------------------------------------------------------