treezor packages and native configs adapted to main app
This commit is contained in:
BIN
.dart_tool/pub/bin/melos/melos.dart-3.9.2.snapshot
Normal file
BIN
.dart_tool/pub/bin/melos/melos.dart-3.9.2.snapshot
Normal file
Binary file not shown.
3
.idea/modules.xml
generated
3
.idea/modules.xml
generated
@@ -5,6 +5,8 @@
|
||||
<module fileurl="file://$PROJECT_DIR$/modules/auth/melos_auth.iml" filepath="$PROJECT_DIR$/modules/auth/melos_auth.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/modules/dashboard_shell/melos_dashboard_shell.iml" filepath="$PROJECT_DIR$/modules/dashboard_shell/melos_dashboard_shell.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/packages/design_system/melos_design_system.iml" filepath="$PROJECT_DIR$/packages/design_system/melos_design_system.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/packages/flutter_treezor_entrust_sdk_bridge/melos_flutter_treezor_entrust_sdk_bridge.iml" filepath="$PROJECT_DIR$/packages/flutter_treezor_entrust_sdk_bridge/melos_flutter_treezor_entrust_sdk_bridge.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/packages/flutter_treezor_entrust_sdk_bridge/example/melos_flutter_treezor_entrust_sdk_bridge_example.iml" filepath="$PROJECT_DIR$/packages/flutter_treezor_entrust_sdk_bridge/example/melos_flutter_treezor_entrust_sdk_bridge_example.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/packages/fonts/melos_fonts.iml" filepath="$PROJECT_DIR$/packages/fonts/melos_fonts.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/modules/home/melos_home.iml" filepath="$PROJECT_DIR$/modules/home/melos_home.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/packages/navigation/melos_navigation.iml" filepath="$PROJECT_DIR$/packages/navigation/melos_navigation.iml" />
|
||||
@@ -14,6 +16,7 @@
|
||||
<module fileurl="file://$PROJECT_DIR$/packages/sf_infrastructure/melos_sf_infrastructure.iml" filepath="$PROJECT_DIR$/packages/sf_infrastructure/melos_sf_infrastructure.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/packages/sf_localizations/melos_sf_localizations.iml" filepath="$PROJECT_DIR$/packages/sf_localizations/melos_sf_localizations.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/packages/sf_shared/melos_sf_shared.iml" filepath="$PROJECT_DIR$/packages/sf_shared/melos_sf_shared.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/modules/splash/melos_splash.iml" filepath="$PROJECT_DIR$/modules/splash/melos_splash.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/packages/utils/melos_utils.iml" filepath="$PROJECT_DIR$/packages/utils/melos_utils.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/melos_sf-app-platform.iml" filepath="$PROJECT_DIR$/melos_sf-app-platform.iml" />
|
||||
</modules>
|
||||
|
||||
6
.idea/runConfigurations/melos_flutter_run_flutter_treezor_entrust_sdk_bridge_example.xml
generated
Normal file
6
.idea/runConfigurations/melos_flutter_run_flutter_treezor_entrust_sdk_bridge_example.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Flutter Run -> 'flutter_treezor_entrust_sdk_bridge_example'" type="FlutterRunConfigurationType" factoryName="Flutter">
|
||||
<option name="filePath" value="$PROJECT_DIR$/packages/flutter_treezor_entrust_sdk_bridge/example/lib/main.dart" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
7
.idea/runConfigurations/melos_flutter_test_flutter_treezor_entrust_sdk_bridge.xml
generated
Normal file
7
.idea/runConfigurations/melos_flutter_test_flutter_treezor_entrust_sdk_bridge.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<!-- Generated by Melos -->
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Flutter Test -> 'flutter_treezor_entrust_sdk_bridge'" type="FlutterTestConfigType" factoryName="Flutter Test">
|
||||
<option name="testDir" value="$PROJECT_DIR$/packages/flutter_treezor_entrust_sdk_bridge/test" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
7
.idea/runConfigurations/melos_flutter_test_splash.xml
generated
Normal file
7
.idea/runConfigurations/melos_flutter_test_splash.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<!-- Generated by Melos -->
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Flutter Test -> 'splash'" type="FlutterTestConfigType" factoryName="Flutter Test">
|
||||
<option name="testDir" value="$PROJECT_DIR$/modules/splash/test" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
@@ -18,27 +18,32 @@ android {
|
||||
kotlinOptions {
|
||||
jvmTarget = JavaVersion.VERSION_11.toString()
|
||||
}
|
||||
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId = "com.savefamily.sf_payments"
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
||||
|
||||
minSdk = flutter.minSdkVersion
|
||||
|
||||
targetSdk = flutter.targetSdkVersion
|
||||
versionCode = flutter.versionCode
|
||||
versionName = flutter.versionName
|
||||
}
|
||||
|
||||
packaging {
|
||||
jniLibs {
|
||||
keepDebugSymbols.add("*/*/libscm.so")
|
||||
useLegacyPackaging = true
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
flutter {
|
||||
source = "../.."
|
||||
}
|
||||
|
||||
@@ -1,11 +1,22 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
|
||||
|
||||
<application
|
||||
android:label="SaveFamily"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
|
||||
<meta-data
|
||||
android:name="fr.antelop.application_id"
|
||||
android:value="4713640103500149457" />
|
||||
<meta-data
|
||||
android:name="fr.antelop.issuer_id"
|
||||
android:value="treezor" />
|
||||
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
@@ -15,25 +26,22 @@
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter ui initializes. After that, this theme continues
|
||||
to determine the Window background behind the Flutter ui. -->
|
||||
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme"
|
||||
/>
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme" />
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
</application>
|
||||
|
||||
<!-- Required to query activities that can process text, see:
|
||||
https://developer.android.com/training/package-visibility and
|
||||
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Uncomment this line to define a global platform for your project
|
||||
# platform :ios, '13.0'
|
||||
platform :ios, '13.4'
|
||||
|
||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||
|
||||
@@ -2,6 +2,8 @@ PODS:
|
||||
- Flutter (1.0.0)
|
||||
- flutter_native_splash (2.4.3):
|
||||
- Flutter
|
||||
- flutter_treezor_entrust_sdk_bridge (0.0.1):
|
||||
- Flutter
|
||||
- mobile_scanner (7.0.0):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
@@ -14,6 +16,7 @@ PODS:
|
||||
DEPENDENCIES:
|
||||
- Flutter (from `Flutter`)
|
||||
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
|
||||
- flutter_treezor_entrust_sdk_bridge (from `.symlinks/plugins/flutter_treezor_entrust_sdk_bridge/ios`)
|
||||
- mobile_scanner (from `.symlinks/plugins/mobile_scanner/darwin`)
|
||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
||||
@@ -23,6 +26,8 @@ EXTERNAL SOURCES:
|
||||
:path: Flutter
|
||||
flutter_native_splash:
|
||||
:path: ".symlinks/plugins/flutter_native_splash/ios"
|
||||
flutter_treezor_entrust_sdk_bridge:
|
||||
:path: ".symlinks/plugins/flutter_treezor_entrust_sdk_bridge/ios"
|
||||
mobile_scanner:
|
||||
:path: ".symlinks/plugins/mobile_scanner/darwin"
|
||||
path_provider_foundation:
|
||||
@@ -33,10 +38,11 @@ EXTERNAL SOURCES:
|
||||
SPEC CHECKSUMS:
|
||||
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
|
||||
flutter_native_splash: df59bb2e1421aa0282cb2e95618af4dcb0c56c29
|
||||
flutter_treezor_entrust_sdk_bridge: 4c2c94fb74ab57576e8d49f5f2a4b214e41141fe
|
||||
mobile_scanner: 77265f3dc8d580810e91849d4a0811a90467ed5e
|
||||
path_provider_foundation: 0b743cbb62d8e47eab856f09262bb8c1ddcfe6ba
|
||||
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
|
||||
|
||||
PODFILE CHECKSUM: 3c63482e143d1b91d2d2560aee9fb04ecc74ac7e
|
||||
PODFILE CHECKSUM: c828a38c253d5f47218258786de668d23a9f4505
|
||||
|
||||
COCOAPODS: 1.16.2
|
||||
|
||||
@@ -51,5 +51,7 @@
|
||||
<string>Necesitamos la cámara para escanear códigos QR</string>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
<key>NSFaceIDUsageDescription</key>
|
||||
<string>Usamos Face ID para verificar tu identidad y autorizar de forma segura operaciones sensibles dentro de la app.</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -413,6 +413,13 @@ packages:
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_treezor_entrust_sdk_bridge:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "../../packages/flutter_treezor_entrust_sdk_bridge"
|
||||
relative: true
|
||||
source: path
|
||||
version: "1.0.2"
|
||||
flutter_web_plugins:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
|
||||
@@ -62,6 +62,8 @@ dependencies:
|
||||
path: ../../packages/sf_infrastructure
|
||||
utils:
|
||||
path: ../../packages/utils
|
||||
flutter_treezor_entrust_sdk_bridge:
|
||||
path: ../../packages/flutter_treezor_entrust_sdk_bridge
|
||||
#dependencies go here
|
||||
cupertino_icons: ^1.0.8
|
||||
flutter_svg: ^2.2.1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# melos_managed_dependency_overrides: auth,dashboard_shell,design_system,home,navigation,notifications,profile,sf_shared,utils,sf_localizations,fonts,sf_infrastructure
|
||||
# melos_managed_dependency_overrides: auth,dashboard_shell,design_system,home,navigation,notifications,profile,sf_shared,utils,sf_localizations,fonts,sf_infrastructure,flutter_treezor_entrust_sdk_bridge,splash
|
||||
dependency_overrides:
|
||||
auth:
|
||||
path: ../../modules/auth
|
||||
@@ -6,6 +6,8 @@ dependency_overrides:
|
||||
path: ../../modules/dashboard_shell
|
||||
design_system:
|
||||
path: ../../packages/design_system
|
||||
flutter_treezor_entrust_sdk_bridge:
|
||||
path: ../../packages/flutter_treezor_entrust_sdk_bridge
|
||||
fonts:
|
||||
path: ../../packages/fonts
|
||||
home:
|
||||
@@ -22,5 +24,7 @@ dependency_overrides:
|
||||
path: ../../packages/sf_localizations
|
||||
sf_shared:
|
||||
path: ../../packages/sf_shared
|
||||
splash:
|
||||
path: ../../modules/splash
|
||||
utils:
|
||||
path: ../../packages/utils
|
||||
|
||||
4
modules/splash/pubspec_overrides.yaml
Normal file
4
modules/splash/pubspec_overrides.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
# melos_managed_dependency_overrides: navigation
|
||||
dependency_overrides:
|
||||
navigation:
|
||||
path: ../../packages/navigation
|
||||
BIN
packages/flutter_treezor_entrust_sdk_bridge/.DS_Store
vendored
Normal file
BIN
packages/flutter_treezor_entrust_sdk_bridge/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -0,0 +1,31 @@
|
||||
Extension Discovery Cache
|
||||
=========================
|
||||
|
||||
This folder is used by `package:extension_discovery` to cache lists of
|
||||
packages that contains extensions for other packages.
|
||||
|
||||
DO NOT USE THIS FOLDER
|
||||
----------------------
|
||||
|
||||
* Do not read (or rely) the contents of this folder.
|
||||
* Do write to this folder.
|
||||
|
||||
If you're interested in the lists of extensions stored in this folder use the
|
||||
API offered by package `extension_discovery` to get this information.
|
||||
|
||||
If this package doesn't work for your use-case, then don't try to read the
|
||||
contents of this folder. It may change, and will not remain stable.
|
||||
|
||||
Use package `extension_discovery`
|
||||
---------------------------------
|
||||
|
||||
If you want to access information from this folder.
|
||||
|
||||
Feel free to delete this folder
|
||||
-------------------------------
|
||||
|
||||
Files in this folder act as a cache, and the cache is discarded if the files
|
||||
are older than the modification time of `.dart_tool/package_config.json`.
|
||||
|
||||
Hence, it should never be necessary to clear this cache manually, if you find a
|
||||
need to do please file a bug.
|
||||
@@ -0,0 +1 @@
|
||||
{"version":2,"entries":[{"package":"flutter_treezor_entrust_sdk_bridge","rootUri":"../","packageUri":"lib/"}]}
|
||||
@@ -0,0 +1,178 @@
|
||||
{
|
||||
"configVersion": 2,
|
||||
"packages": [
|
||||
{
|
||||
"name": "async",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/async-2.11.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.18"
|
||||
},
|
||||
{
|
||||
"name": "boolean_selector",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.17"
|
||||
},
|
||||
{
|
||||
"name": "characters",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/characters-1.4.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "clock",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/clock-1.1.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "collection",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/collection-1.19.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "fake_async",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/fake_async-1.3.3",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "flutter",
|
||||
"rootUri": "file:///Users/juliandalcalaf/Development/flutter/packages/flutter",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "flutter_lints",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_lints-4.0.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.1"
|
||||
},
|
||||
{
|
||||
"name": "flutter_test",
|
||||
"rootUri": "file:///Users/juliandalcalaf/Development/flutter/packages/flutter_test",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "leak_tracker",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/leak_tracker-11.0.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.2"
|
||||
},
|
||||
{
|
||||
"name": "leak_tracker_flutter_testing",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.10",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.2"
|
||||
},
|
||||
{
|
||||
"name": "leak_tracker_testing",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.2"
|
||||
},
|
||||
{
|
||||
"name": "lints",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/lints-4.0.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.1"
|
||||
},
|
||||
{
|
||||
"name": "matcher",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/matcher-0.12.17",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "material_color_utilities",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.17"
|
||||
},
|
||||
{
|
||||
"name": "meta",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/meta-1.16.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path-1.9.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "plugin_platform_interface",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/plugin_platform_interface-2.1.8",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.0"
|
||||
},
|
||||
{
|
||||
"name": "sky_engine",
|
||||
"rootUri": "file:///Users/juliandalcalaf/Development/flutter/bin/cache/pkg/sky_engine",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "source_span",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/source_span-1.10.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.18"
|
||||
},
|
||||
{
|
||||
"name": "stack_trace",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/stack_trace-1.12.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "stream_channel",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/stream_channel-2.1.4",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "string_scanner",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/string_scanner-1.3.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.1"
|
||||
},
|
||||
{
|
||||
"name": "term_glyph",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/term_glyph-1.2.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "test_api",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/test_api-0.7.6",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.5"
|
||||
},
|
||||
{
|
||||
"name": "vector_math",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/vector_math-2.2.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.1"
|
||||
},
|
||||
{
|
||||
"name": "vm_service",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/vm_service-14.3.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "flutter_treezor_entrust_sdk_bridge",
|
||||
"rootUri": "../",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.5"
|
||||
}
|
||||
],
|
||||
"generator": "pub",
|
||||
"generatorVersion": "3.9.2",
|
||||
"flutterRoot": "file:///Users/juliandalcalaf/Development/flutter",
|
||||
"flutterVersion": "3.35.7",
|
||||
"pubCache": "file:///Users/juliandalcalaf/.pub-cache"
|
||||
}
|
||||
@@ -0,0 +1,232 @@
|
||||
{
|
||||
"roots": [
|
||||
"flutter_treezor_entrust_sdk_bridge"
|
||||
],
|
||||
"packages": [
|
||||
{
|
||||
"name": "flutter_treezor_entrust_sdk_bridge",
|
||||
"version": "1.0.2",
|
||||
"dependencies": [
|
||||
"flutter",
|
||||
"plugin_platform_interface"
|
||||
],
|
||||
"devDependencies": [
|
||||
"flutter_lints",
|
||||
"flutter_test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "flutter_lints",
|
||||
"version": "4.0.0",
|
||||
"dependencies": [
|
||||
"lints"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "flutter_test",
|
||||
"version": "0.0.0",
|
||||
"dependencies": [
|
||||
"clock",
|
||||
"collection",
|
||||
"fake_async",
|
||||
"flutter",
|
||||
"leak_tracker_flutter_testing",
|
||||
"matcher",
|
||||
"meta",
|
||||
"path",
|
||||
"stack_trace",
|
||||
"stream_channel",
|
||||
"test_api",
|
||||
"vector_math"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "plugin_platform_interface",
|
||||
"version": "2.1.8",
|
||||
"dependencies": [
|
||||
"meta"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "flutter",
|
||||
"version": "0.0.0",
|
||||
"dependencies": [
|
||||
"characters",
|
||||
"collection",
|
||||
"material_color_utilities",
|
||||
"meta",
|
||||
"sky_engine",
|
||||
"vector_math"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "lints",
|
||||
"version": "4.0.0",
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"name": "stream_channel",
|
||||
"version": "2.1.4",
|
||||
"dependencies": [
|
||||
"async"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "meta",
|
||||
"version": "1.16.0",
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"name": "collection",
|
||||
"version": "1.19.1",
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"name": "leak_tracker_flutter_testing",
|
||||
"version": "3.0.10",
|
||||
"dependencies": [
|
||||
"flutter",
|
||||
"leak_tracker",
|
||||
"leak_tracker_testing",
|
||||
"matcher",
|
||||
"meta"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "vector_math",
|
||||
"version": "2.2.0",
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"name": "stack_trace",
|
||||
"version": "1.12.1",
|
||||
"dependencies": [
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "clock",
|
||||
"version": "1.1.2",
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"name": "fake_async",
|
||||
"version": "1.3.3",
|
||||
"dependencies": [
|
||||
"clock",
|
||||
"collection"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
"version": "1.9.1",
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"name": "matcher",
|
||||
"version": "0.12.17",
|
||||
"dependencies": [
|
||||
"async",
|
||||
"meta",
|
||||
"stack_trace",
|
||||
"term_glyph",
|
||||
"test_api"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "test_api",
|
||||
"version": "0.7.6",
|
||||
"dependencies": [
|
||||
"async",
|
||||
"boolean_selector",
|
||||
"collection",
|
||||
"meta",
|
||||
"source_span",
|
||||
"stack_trace",
|
||||
"stream_channel",
|
||||
"string_scanner",
|
||||
"term_glyph"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "sky_engine",
|
||||
"version": "0.0.0",
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"name": "material_color_utilities",
|
||||
"version": "0.11.1",
|
||||
"dependencies": [
|
||||
"collection"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "characters",
|
||||
"version": "1.4.0",
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"name": "async",
|
||||
"version": "2.11.0",
|
||||
"dependencies": [
|
||||
"collection",
|
||||
"meta"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "leak_tracker_testing",
|
||||
"version": "3.0.2",
|
||||
"dependencies": [
|
||||
"leak_tracker",
|
||||
"matcher",
|
||||
"meta"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "leak_tracker",
|
||||
"version": "11.0.2",
|
||||
"dependencies": [
|
||||
"clock",
|
||||
"collection",
|
||||
"meta",
|
||||
"path",
|
||||
"vm_service"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "term_glyph",
|
||||
"version": "1.2.1",
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"name": "string_scanner",
|
||||
"version": "1.3.0",
|
||||
"dependencies": [
|
||||
"source_span"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "source_span",
|
||||
"version": "1.10.0",
|
||||
"dependencies": [
|
||||
"collection",
|
||||
"path",
|
||||
"term_glyph"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "boolean_selector",
|
||||
"version": "2.1.1",
|
||||
"dependencies": [
|
||||
"source_span",
|
||||
"string_scanner"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "vm_service",
|
||||
"version": "14.3.0",
|
||||
"dependencies": []
|
||||
}
|
||||
],
|
||||
"configVersion": 1
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
3.35.7
|
||||
3
packages/flutter_treezor_entrust_sdk_bridge/CHANGELOG.md
Normal file
3
packages/flutter_treezor_entrust_sdk_bridge/CHANGELOG.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## 0.0.1
|
||||
|
||||
* TODO: Describe initial release.
|
||||
1
packages/flutter_treezor_entrust_sdk_bridge/LICENSE
Normal file
1
packages/flutter_treezor_entrust_sdk_bridge/LICENSE
Normal file
@@ -0,0 +1 @@
|
||||
TODO: Add your license here.
|
||||
184
packages/flutter_treezor_entrust_sdk_bridge/README.md
Normal file
184
packages/flutter_treezor_entrust_sdk_bridge/README.md
Normal file
@@ -0,0 +1,184 @@
|
||||
# flutter_treezor_entrust_sdk_bridge
|
||||
## Requirement
|
||||
|
||||
### For Android :
|
||||
|
||||
- Minimum android sdk version : 22
|
||||
- Maximum android sdk version : 34
|
||||
|
||||
### For IOS :
|
||||
- Xcode 13.0.0 or later
|
||||
|
||||
## Install
|
||||
|
||||
### On main project
|
||||
|
||||
```
|
||||
dependencies:
|
||||
....
|
||||
flutter:
|
||||
sdk: flutter
|
||||
|
||||
flutter_treezor_entrust_sdk_bridge:
|
||||
path: [pathToPluginFolder]/
|
||||
```
|
||||
|
||||
#### launch the exemple app
|
||||
|
||||
```
|
||||
flutter run
|
||||
```
|
||||
|
||||
## Main app integration requirement
|
||||
|
||||
### Android
|
||||
Follow Android Entrust Documentation https://doc.antelop-solutions.com/latest/wallet/sdk/android_integration.html
|
||||
|
||||
### Ios
|
||||
Follow Ios Entrust Documentation https://doc.antelop-solutions.com/latest/wallet/sdk/ios_integration.html
|
||||
|
||||
You can check the example app for some ios configuration
|
||||
|
||||
## How to use the SDK
|
||||
|
||||
### register
|
||||
|
||||
```
|
||||
Future<void> connectSDK() async {
|
||||
WalletManagerModule walletManagerModule = _flutterTreezorEntrustSdkBridgePlugin.getWalletManagerModule();
|
||||
|
||||
WalletManagerCallbacks walletManagerCallbacks = WalletManagerCallbacks(
|
||||
onProvisioningRequired:() => {
|
||||
onWalletManagerProvisioningRequired(walletManagerModule)
|
||||
},
|
||||
onCredentialsRequired:(reason, error) => {
|
||||
onWalletManageronCredentialsRequired(reason, error, walletManagerModule)
|
||||
},
|
||||
onConnectionError:(error) => {
|
||||
debugPrint("onConnectionError error: $error")
|
||||
},
|
||||
onConnectionSuccess:() => {
|
||||
onWalletManagerOnConnectionSuccess()
|
||||
}
|
||||
);
|
||||
await walletManagerModule.initialize(walletManagerCallbacks);
|
||||
walletManagerModule.connect(null, null);
|
||||
}
|
||||
|
||||
void onWalletManagerProvisioningRequired(WalletManagerModule walletManagerModule) async {
|
||||
debugPrint("onProvisioningRequired");
|
||||
String activationCode = await getWalletActivationCode();
|
||||
debugPrint("onWalletManagerProvisioningRequired activationCode: $activationCode");
|
||||
|
||||
WalletProvisioningModule walletProvisioningModule = _flutterTreezorEntrustSdkBridgePlugin.getWalletProvisioningModule();
|
||||
|
||||
WalletProvisioningCallbacks walletProvisioningCallbacks = WalletProvisioningCallbacks(
|
||||
onInitializationSuccess:() => {
|
||||
debugPrint("onInitializationSuccess"),
|
||||
walletProvisioningModule.checkEligibility(false)
|
||||
},
|
||||
onInitializationError:(error) => {
|
||||
debugPrint("onInitializationError")
|
||||
},
|
||||
onPermissionNotGranted:(permissions) => {
|
||||
debugPrint("onPermissionNotGranted")
|
||||
},
|
||||
onDeviceEligible:(fingerprintAllowed) => {
|
||||
debugPrint("onDeviceEligible"),
|
||||
walletProvisioningModule.launch(activationCode.substring(2))
|
||||
},
|
||||
onDeviceNotEligible:(reason, denialReference) => {
|
||||
debugPrint("onDeviceNotEligible")
|
||||
},
|
||||
onCheckEligibilityError:(error) => {
|
||||
debugPrint("onCheckEligibilityError")
|
||||
},
|
||||
onProvisioningPending:() => {
|
||||
debugPrint("onProvisioningPending")
|
||||
},
|
||||
onProvisioningSuccess:() => {
|
||||
debugPrint("onProvisioningSuccess"),
|
||||
walletManagerModule.connect(null, null)
|
||||
},
|
||||
onProvisioningError:(error) => {
|
||||
debugPrint("onProvisioningError")
|
||||
}
|
||||
);
|
||||
await walletProvisioningModule.initialize(walletProvisioningCallbacks);
|
||||
}
|
||||
|
||||
void onWalletManageronCredentialsRequired(String reason, AntelopError? error, WalletManagerModule walletManagerModule) async {
|
||||
debugPrint("onCredentialsRequired reason : $reason error: $error");
|
||||
switch (reason.toLowerCase()) {
|
||||
case "notset":
|
||||
walletManagerModule.connect(null, newPasscode);
|
||||
break;
|
||||
case "tobechanged":
|
||||
walletManagerModule.connect(passcode, null);
|
||||
break;
|
||||
case "validationneeded":
|
||||
walletManagerModule.connect(passcode, newPasscode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### generate siganture
|
||||
|
||||
Auth
|
||||
|
||||
```
|
||||
void _startSignatureProcess(String patternAuth) async {
|
||||
debugPrint("Starting signature process with $patternAuth");
|
||||
|
||||
CustomerAuthenticatedSignatureModule customerAuthenticatedSignatureModule =
|
||||
_flutterTreezorEntrustSdkBridgePlugin.getCustomerAuthenticatedSignatureModule(patternAuth, "", [payloadString]);
|
||||
|
||||
CustomCustomerAuthenticatedProcessCallback customCustomerAuthenticatedProcessCallback =
|
||||
CustomCustomerAuthenticatedProcessCallback(
|
||||
onCustomerCredentialsRequired: () => {
|
||||
_signatureOnCustomerCredentialsRequired(patternAuth, customerAuthenticatedSignatureModule)
|
||||
},
|
||||
onCustomerCredentialsInvalid: (reason) => {
|
||||
debugPrint("onCustomerCredentialsInvalid")
|
||||
},
|
||||
onProcessStart: () => {
|
||||
debugPrint("onProcessStart")
|
||||
},
|
||||
onProcessSuccess: () => {
|
||||
_signatureOnProcessSuccess(customerAuthenticatedSignatureModule)
|
||||
},
|
||||
onError: (error) => {
|
||||
debugPrint("onError: $error")
|
||||
},
|
||||
onAuthenticationDeclined: () => {
|
||||
debugPrint("onAuthenticationDeclined")
|
||||
},
|
||||
);
|
||||
customerAuthenticatedSignatureModule.signWithCustomAuthentication(customCustomerAuthenticatedProcessCallback);
|
||||
}
|
||||
|
||||
// Handle onCustomerCredentialsRequired based on patternAuth
|
||||
void _signatureOnCustomerCredentialsRequired(String patternAuth, CustomerAuthenticatedSignatureModule customerAuthenticatedSignatureModule) {
|
||||
debugPrint("onCustomerCredentialsRequired");
|
||||
switch (patternAuth) {
|
||||
case "PIN":
|
||||
customerAuthenticatedSignatureModule.setPinCustomerCredentials(newPasscode);
|
||||
break;
|
||||
case "BIO":
|
||||
customerAuthenticatedSignatureModule.setBioCustomerCredentials("Title", "SubTitle");
|
||||
break;
|
||||
case "NONE":
|
||||
default:
|
||||
customerAuthenticatedSignatureModule.setPinCustomerCredentials(newPasscode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Handle onProcessSuccess
|
||||
void _signatureOnProcessSuccess(CustomerAuthenticatedSignatureModule customerAuthenticatedSignatureModule) async {
|
||||
debugPrint("onProcessSuccess");
|
||||
String? scaResult = await customerAuthenticatedSignatureModule.getResult();
|
||||
}
|
||||
```
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
include: package:flutter_lints/flutter.yaml
|
||||
|
||||
# Additional information about this file can be found at
|
||||
# https://dart.dev/guides/language/analysis-options
|
||||
BIN
packages/flutter_treezor_entrust_sdk_bridge/android/.DS_Store
vendored
Normal file
BIN
packages/flutter_treezor_entrust_sdk_bridge/android/.DS_Store
vendored
Normal file
Binary file not shown.
223
packages/flutter_treezor_entrust_sdk_bridge/android/build.gradle
Normal file
223
packages/flutter_treezor_entrust_sdk_bridge/android/build.gradle
Normal file
@@ -0,0 +1,223 @@
|
||||
import java.security.MessageDigest
|
||||
import java.security.NoSuchAlgorithmException
|
||||
group = "com.treezor.flutter_treezor_entrust_sdk_bridge"
|
||||
version = "1.0"
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle:8.1.0")
|
||||
}
|
||||
}
|
||||
|
||||
String localMavenPath = project.mkdir("build").absolutePath
|
||||
|
||||
rootProject.allprojects {
|
||||
repositories {
|
||||
maven { url "file://$localMavenPath" }
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: "com.android.library"
|
||||
|
||||
android {
|
||||
if (project.android.hasProperty("namespace")) {
|
||||
namespace = "com.treezor.flutter_treezor_entrust_sdk_bridge"
|
||||
}
|
||||
|
||||
compileSdk = 34
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdk = 21
|
||||
}
|
||||
|
||||
packagingOptions{
|
||||
jniLibs {
|
||||
keepDebugSymbols += "*/*/libscm.so"
|
||||
useLegacyPackaging = true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'androidx.work:work-runtime:2.7.1'
|
||||
implementation 'com.google.firebase:firebase-messaging:23.0.0'
|
||||
implementation 'com.google.android.gms:play-services-auth:17.0.0'
|
||||
implementation "androidx.appcompat:appcompat:1.4.0"
|
||||
implementation "com.google.android.material:material:1.5.0"
|
||||
implementation "androidx.biometric:biometric:1.1.0"
|
||||
|
||||
testImplementation 'org.jetbrains.kotlin:kotlin-test'
|
||||
testImplementation 'org.mockito:mockito-core:5.0.0'
|
||||
}
|
||||
|
||||
testOptions {
|
||||
unitTests.all {
|
||||
testLogging {
|
||||
events "passed", "skipped", "failed", "standardOut", "standardError"
|
||||
outputs.upToDateWhen {false}
|
||||
showStandardStreams = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String aarPath = localMavenPath
|
||||
task useAar {
|
||||
File file = project.file("libs")
|
||||
if (file.exists() && file.isDirectory()) {
|
||||
file.listFiles(new FileFilter() {
|
||||
@Override
|
||||
boolean accept(File pathname) {
|
||||
return pathname.name.endsWith(".aar")
|
||||
}
|
||||
}).each { item ->
|
||||
String aarName = item.name.substring(0, item.name.length() - 4)
|
||||
String[] aarInfo = aarName.split("-")
|
||||
String sha1 = getFileSha1(item)
|
||||
String md5 = getFileMD5(item)
|
||||
println("aar: " + aarInfo + " file sha1:" + sha1 + " md5:" + md5)
|
||||
String fromStr = item.path
|
||||
|
||||
String intoStr = aarPath + "/" + aarInfo[0].replace(".", "/") + "/" + aarInfo[1] + "/" + aarInfo[2]
|
||||
|
||||
String newName = aarInfo[1] + "-" + aarInfo[2] + ".aar"
|
||||
|
||||
project.copy {
|
||||
from fromStr
|
||||
into intoStr
|
||||
rename(item.name, newName)
|
||||
}
|
||||
|
||||
project.file(intoStr + "/" + newName + ".md5").write(md5)
|
||||
project.file(intoStr + "/" + newName + ".sha1").write(sha1)
|
||||
|
||||
String pomPath = intoStr + "/" + newName.substring(0, newName.length() - 4) + ".pom"
|
||||
project.file(pomPath).write(createPomStr(aarInfo[0], aarInfo[1], aarInfo[2]))
|
||||
project.file(pomPath + ".md5").write(getFileMD5(project.file(pomPath)))
|
||||
project.file(pomPath + ".sha1").write(getFileSha1(project.file(pomPath)))
|
||||
|
||||
String metadataPath = project.file(intoStr).getParentFile().path + "/maven-metadata.xml"
|
||||
project.file(metadataPath).write(createMetadataStr(aarInfo[0], aarInfo[1], aarInfo[2]))
|
||||
project.file(metadataPath + ".md5").write(getFileMD5(project.file(metadataPath)))
|
||||
project.file(metadataPath + ".sha1").write(getFileSha1(project.file(metadataPath)))
|
||||
dependencies {
|
||||
implementation "${aarInfo[0]}:${aarInfo[1]}:${aarInfo[2]}"
|
||||
compileOnly fileTree(dir: "libs", includes: ['*.jar'])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static String createMetadataStr(String groupId, String artifactId, String version) {
|
||||
return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
|
||||
"<metadata>\n" +
|
||||
" <groupId>$groupId</groupId>\n" +
|
||||
" <artifactId>$artifactId</artifactId>\n" +
|
||||
" <versioning>\n" +
|
||||
" <release>$version</release>\n" +
|
||||
" <versions>\n" +
|
||||
" <version>$version</version>\n" +
|
||||
" </versions>\n" +
|
||||
" <lastUpdated>${new Date().format('yyyyMMdd')}000000</lastUpdated>\n" +
|
||||
" </versioning>\n" +
|
||||
"</metadata>\n"
|
||||
}
|
||||
|
||||
static String createPomStr(String groupId, String artifactId, String version) {
|
||||
return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
|
||||
"<project xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n" +
|
||||
" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n" +
|
||||
" <modelVersion>4.0.0</modelVersion>\n" +
|
||||
" <groupId>$groupId</groupId>\n" +
|
||||
" <artifactId>$artifactId</artifactId>\n" +
|
||||
" <version>$version</version>\n" +
|
||||
" <packaging>aar</packaging>\n" +
|
||||
"</project>\n"
|
||||
}
|
||||
|
||||
static String getFileSha1(File file) {
|
||||
FileInputStream input = null;
|
||||
try {
|
||||
input = new FileInputStream(file);
|
||||
MessageDigest digest = MessageDigest.getInstance("SHA-1");
|
||||
byte[] buffer = new byte[1024 * 1024 * 10];
|
||||
|
||||
int len = 0;
|
||||
while ((len = input.read(buffer)) > 0) {
|
||||
digest.update(buffer, 0, len);
|
||||
}
|
||||
String sha1 = new BigInteger(1, digest.digest()).toString(16);
|
||||
int length = 40 - sha1.length();
|
||||
if (length > 0) {
|
||||
for (int i = 0; i < length; i++) {
|
||||
sha1 = "0" + sha1;
|
||||
}
|
||||
}
|
||||
return sha1;
|
||||
}
|
||||
catch (IOException e) {
|
||||
System.out.println(e);
|
||||
}
|
||||
catch (NoSuchAlgorithmException e) {
|
||||
System.out.println(e);
|
||||
}
|
||||
finally {
|
||||
try {
|
||||
if (input != null) {
|
||||
input.close();
|
||||
}
|
||||
}
|
||||
catch (IOException e) {
|
||||
System.out.println(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static String getFileMD5(File file) {
|
||||
FileInputStream input = null;
|
||||
try {
|
||||
input = new FileInputStream(file);
|
||||
MessageDigest digest = MessageDigest.getInstance("MD5");
|
||||
byte[] buffer = new byte[1024 * 1024 * 10];
|
||||
|
||||
int len = 0;
|
||||
while ((len = input.read(buffer)) > 0) {
|
||||
digest.update(buffer, 0, len);
|
||||
}
|
||||
String md5 = new BigInteger(1, digest.digest()).toString(16);
|
||||
int length = 32 - md5.length();
|
||||
if (length > 0) {
|
||||
for (int i = 0; i < length; i++) {
|
||||
md5 = "0" + md5;
|
||||
}
|
||||
}
|
||||
return md5;
|
||||
}
|
||||
catch (IOException e) {
|
||||
System.out.println(e);
|
||||
}
|
||||
catch (NoSuchAlgorithmException e) {
|
||||
System.out.println(e);
|
||||
}
|
||||
finally {
|
||||
try {
|
||||
if (input != null) {
|
||||
input.close();
|
||||
}
|
||||
}
|
||||
catch (IOException e) {
|
||||
System.out.println(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
a997390d9ff195d347c7babfcb3c40eb
|
||||
@@ -0,0 +1 @@
|
||||
1876ddcc5d9e9ac1925e2b72c0dc648ee711d7a3
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.entrust.antelop</groupId>
|
||||
<artifactId>antelop</artifactId>
|
||||
<version>2.6.4</version>
|
||||
<packaging>aar</packaging>
|
||||
</project>
|
||||
@@ -0,0 +1 @@
|
||||
7d1d617ace01a32802a824f8a906b1c8
|
||||
@@ -0,0 +1 @@
|
||||
87a33be94497ce90c9bcd1b6d7d37bbcedcd0d61
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<metadata>
|
||||
<groupId>com.entrust.antelop</groupId>
|
||||
<artifactId>antelop</artifactId>
|
||||
<versioning>
|
||||
<release>2.6.4</release>
|
||||
<versions>
|
||||
<version>2.6.4</version>
|
||||
</versions>
|
||||
<lastUpdated>20260121000000</lastUpdated>
|
||||
</versioning>
|
||||
</metadata>
|
||||
@@ -0,0 +1 @@
|
||||
2b14702afabf7dabc6ee436857156114
|
||||
@@ -0,0 +1 @@
|
||||
238e2d82008afe02e0766c6273b14984c94b9375
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="android" name="Android">
|
||||
<configuration>
|
||||
<option name="ALLOW_USER_CONFIGURATION" value="false" />
|
||||
<option name="GEN_FOLDER_RELATIVE_PATH_APT" value="/gen" />
|
||||
<option name="GEN_FOLDER_RELATIVE_PATH_AIDL" value="/gen" />
|
||||
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
|
||||
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
|
||||
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
|
||||
<option name="LIBS_FOLDER_RELATIVE_PATH" value="/src/main/libs" />
|
||||
<option name="PROGUARD_LOGS_FOLDER_RELATIVE_PATH" value="/src/main/proguard_logs" />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="17" jdkType="JavaSDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Flutter for Android" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
BIN
packages/flutter_treezor_entrust_sdk_bridge/android/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
packages/flutter_treezor_entrust_sdk_bridge/android/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
7
packages/flutter_treezor_entrust_sdk_bridge/android/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
7
packages/flutter_treezor_entrust_sdk_bridge/android/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
249
packages/flutter_treezor_entrust_sdk_bridge/android/gradlew
vendored
Executable file
249
packages/flutter_treezor_entrust_sdk_bridge/android/gradlew
vendored
Executable file
@@ -0,0 +1,249 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
92
packages/flutter_treezor_entrust_sdk_bridge/android/gradlew.bat
vendored
Normal file
92
packages/flutter_treezor_entrust_sdk_bridge/android/gradlew.bat
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
sdk.dir=/Users/salah.aldemachki/Library/Android/sdk
|
||||
flutter.sdk=/Users/salah.aldemachki/flutterSdk/flutter
|
||||
@@ -0,0 +1 @@
|
||||
rootProject.name = 'flutter_treezor_entrust_sdk_bridge'
|
||||
@@ -0,0 +1,9 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.treezor.flutter_treezor_entrust_sdk_bridge">
|
||||
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
|
||||
<application>
|
||||
<meta-data
|
||||
android:name="fr.antelop.notificationService"
|
||||
android:value="com.treezor.flutter_treezor_entrust_sdk_bridge.WalletNotificationServiceModule" />
|
||||
</application>
|
||||
</manifest>
|
||||
BIN
packages/flutter_treezor_entrust_sdk_bridge/android/src/main/java/com/.DS_Store
vendored
Normal file
BIN
packages/flutter_treezor_entrust_sdk_bridge/android/src/main/java/com/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
packages/flutter_treezor_entrust_sdk_bridge/android/src/main/java/com/treezor/.DS_Store
vendored
Normal file
BIN
packages/flutter_treezor_entrust_sdk_bridge/android/src/main/java/com/treezor/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -0,0 +1,31 @@
|
||||
package com.treezor;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import fr.antelop.sdk.AntelopError;
|
||||
import fr.antelop.sdk.exception.WalletValidationException;
|
||||
|
||||
public class NativeModuleBase {
|
||||
|
||||
/** Helpers **/
|
||||
public static Map<String, Object> serializeAntelopError(AntelopError error) {
|
||||
Map<String, Object> errorMap = new HashMap<>();
|
||||
errorMap.put("message", error.getMessage());
|
||||
errorMap.put("reason", error.getReason());
|
||||
errorMap.put("code", error.getCode().toString());
|
||||
errorMap.put("type", "AntelopError");
|
||||
return errorMap;
|
||||
}
|
||||
|
||||
public static Map<String, Object> serializeWalletValidationException (WalletValidationException error) {
|
||||
Map<String, Object> errorMap = new HashMap<>();
|
||||
errorMap.put("domain", error.getDomain());
|
||||
errorMap.put("code", error.getCode().toString());
|
||||
errorMap.put("message", error.getMessage());
|
||||
errorMap.put("type", "WalletValidationException");
|
||||
return errorMap;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.treezor.flutter_treezor_entrust_sdk_bridge;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.treezor.flutter_treezor_entrust_sdk_bridge.WalletNotificationServiceModule;
|
||||
import com.treezor.sca.CustomerAuthenticatedSignatureModule;
|
||||
import com.treezor.wallet.WalletManagerModule;
|
||||
import com.treezor.wallet.WalletProvisioningModule;
|
||||
|
||||
import io.flutter.embedding.engine.plugins.FlutterPlugin;
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
|
||||
import io.flutter.plugin.common.MethodChannel.Result;
|
||||
|
||||
/** FlutterTreezorEntrustSdkBridgePlugin */
|
||||
public class FlutterTreezorEntrustSdkBridgePlugin implements FlutterPlugin, MethodCallHandler {
|
||||
private static final String WALLET_MANAGER_CHANNEL = "WalletManager";
|
||||
private static final String WALLET_PROVISIONING_CHANNEL = "WalletProvisioning";
|
||||
private static final String CUSTOMER_AUTHENTICATED_SIGNATURE_CHANNEL = "CustomerAuthenticatedSignature";
|
||||
private static final String WALLET_NOTIFICATION_SERVICE_CHANNEL = "WalletNotificationService";
|
||||
|
||||
private MethodChannel walletManagerChannel;
|
||||
private MethodChannel walletProvisioningChannel;
|
||||
private MethodChannel customerAuthenticatedSignatureChannel;
|
||||
private MethodChannel walletNotificationServiceChannel;
|
||||
|
||||
private WalletManagerModule walletManagerModule;
|
||||
private WalletProvisioningModule walletProvisioningModule;
|
||||
private CustomerAuthenticatedSignatureModule customerAuthenticatedSignatureModule;
|
||||
private WalletNotificationServiceModule walletNotificationServiceModule;
|
||||
|
||||
@Override
|
||||
public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) {
|
||||
Context context = flutterPluginBinding.getApplicationContext();
|
||||
|
||||
// Initialize channels for each module
|
||||
walletManagerChannel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), WALLET_MANAGER_CHANNEL);
|
||||
walletProvisioningChannel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), WALLET_PROVISIONING_CHANNEL);
|
||||
customerAuthenticatedSignatureChannel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), CUSTOMER_AUTHENTICATED_SIGNATURE_CHANNEL);
|
||||
walletNotificationServiceChannel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), WALLET_NOTIFICATION_SERVICE_CHANNEL);
|
||||
|
||||
// Set handlers for each module's channel
|
||||
walletManagerModule = new WalletManagerModule(context, walletManagerChannel, flutterPluginBinding);
|
||||
walletProvisioningModule = new WalletProvisioningModule(context, walletProvisioningChannel, flutterPluginBinding);
|
||||
customerAuthenticatedSignatureModule = new CustomerAuthenticatedSignatureModule(context, customerAuthenticatedSignatureChannel, flutterPluginBinding);
|
||||
walletNotificationServiceModule = new WalletNotificationServiceModule(context, walletNotificationServiceChannel, flutterPluginBinding);
|
||||
|
||||
walletManagerChannel.setMethodCallHandler(walletManagerModule);
|
||||
walletProvisioningChannel.setMethodCallHandler(walletProvisioningModule);
|
||||
customerAuthenticatedSignatureChannel.setMethodCallHandler(customerAuthenticatedSignatureModule);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
|
||||
result.notImplemented();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
|
||||
walletManagerChannel.setMethodCallHandler(null);
|
||||
walletProvisioningChannel.setMethodCallHandler(null);
|
||||
customerAuthenticatedSignatureChannel.setMethodCallHandler(null);
|
||||
walletNotificationServiceChannel.setMethodCallHandler(null);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
package com.treezor.flutter_treezor_entrust_sdk_bridge;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
|
||||
import io.flutter.embedding.engine.plugins.FlutterPlugin;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.flutter.plugin.common.EventChannel;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import fr.antelop.sdk.WalletLockReason;
|
||||
import fr.antelop.sdk.WalletNotificationServiceCallback;
|
||||
import fr.antelop.sdk.card.EmvApplicationActivationMethod;
|
||||
|
||||
public class WalletNotificationServiceModule implements WalletNotificationServiceCallback {
|
||||
static final String TAG = "WalletNotificationServiceModule";
|
||||
static final String EVENT_CHANNEL_NAME = "wallet_notification_service_events";
|
||||
|
||||
private Context context;
|
||||
private MethodChannel channel;
|
||||
private static EventChannel eventChannel;
|
||||
private static EventChannel.EventSink eventSink;
|
||||
private final Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||
|
||||
private static WalletNotificationServiceModule instance = null;
|
||||
|
||||
public WalletNotificationServiceModule() {
|
||||
// This will be called by Antelop via reflection.
|
||||
// You can initialize lazy values later if needed.
|
||||
Log.d(TAG, "WalletNotificationServiceModule instantiated by Antelop SDK");
|
||||
}
|
||||
|
||||
public WalletNotificationServiceModule(Context context, MethodChannel channel, @NonNull FlutterPlugin.FlutterPluginBinding flutterPluginBinding) {
|
||||
this.context = context;
|
||||
this.channel = channel;
|
||||
|
||||
eventChannel = new EventChannel(flutterPluginBinding.getBinaryMessenger(), EVENT_CHANNEL_NAME);
|
||||
eventChannel.setStreamHandler(new EventChannel.StreamHandler() {
|
||||
@Override
|
||||
public void onListen(Object arguments, EventChannel.EventSink events) {
|
||||
eventSink = events;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel(Object arguments) {
|
||||
eventSink = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static synchronized WalletNotificationServiceModule getInstance(Context context, MethodChannel channel, @NonNull FlutterPlugin.FlutterPluginBinding flutterPluginBinding) {
|
||||
if (instance == null) {
|
||||
instance = new WalletNotificationServiceModule(context, channel, flutterPluginBinding);
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEmvApplicationActivationRequired(Context context, String emvAppId, List<EmvApplicationActivationMethod> methods) {
|
||||
sendEvent("onEmvApplicationActivationRequired", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEmvApplicationCredentialsUpdated(Context context) {
|
||||
sendEvent("onEmvApplicationCredentialsUpdated", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCardsUpdated(Context context) {
|
||||
sendEvent("onCardsUpdated", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWalletLoaded(@NonNull Context context) {
|
||||
Log.d(TAG, "WalletNotificationServiceModule onWalletLoaded");
|
||||
sendEvent("onWalletLoaded", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWalletLocked(@NonNull Context context, @NonNull WalletLockReason reason) {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("reason", reason.name());
|
||||
sendEvent("onWalletLocked", params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWalletUnlocked(@NonNull Context context) {
|
||||
sendEvent("onWalletUnlocked", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLogout(@NonNull Context context) {
|
||||
sendEvent("onLogout", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWalletDeleted(@NonNull Context context) {
|
||||
Log.d(TAG, "WalletNotificationServiceModule onWalletDeleted");
|
||||
sendEvent("onWalletDeleted", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSettingsUpdated(@NonNull Context context) {
|
||||
sendEvent("onSettingsUpdated", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCountersUpdated(Context context) {
|
||||
sendEvent("onCountersUpdated", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCustomerCredentialsReset(Context context) {
|
||||
sendEvent("onCustomerCredentialsReset", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSunsetScheduled(@NonNull Context context, @NonNull Date sunsetDate) {
|
||||
sendEvent("onSunsetScheduled", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLostEligibility(@NonNull Context context) {
|
||||
sendEvent("onLostEligibility", null);
|
||||
}
|
||||
|
||||
private void sendEvent(String eventName, Map<String, Object> params) {
|
||||
if (eventSink == null) {
|
||||
Log.w(TAG, "EventSink is not initialized. Dropping event: " + eventName);
|
||||
return;
|
||||
}
|
||||
|
||||
Map<String, Object> event = new HashMap<>();
|
||||
event.put("event", eventName);
|
||||
event.put("params", params != null ? params : null);
|
||||
|
||||
mainHandler.post(() -> {
|
||||
try {
|
||||
eventSink.success(event);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Failed to send event: " + eventName, e);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
package com.treezor.globals;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.Base64;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class Utils {
|
||||
static public byte[] parseHexFormattedBinary(String s) {
|
||||
if (s == null || s.length() == 0 || (s.length() % 2 != 0)) {
|
||||
throw new IllegalArgumentException("Hex String is not properly formatted : " + s);
|
||||
}
|
||||
|
||||
int len = s.length();
|
||||
byte[] out = new byte[len / 2];
|
||||
|
||||
for (int i = 0; i < len; i += 2) {
|
||||
int h = hexToBin(s.charAt(i));
|
||||
int l = hexToBin(s.charAt(i + 1));
|
||||
if (h == -1 || l == -1) {
|
||||
throw new IllegalArgumentException("Hex String contains illegal character " + s);
|
||||
}
|
||||
out[i / 2] = (byte) (h * 16 + l);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
static public byte[] parseStringToBin(String str) {
|
||||
int len = str.length();
|
||||
byte[] out = new byte[len / 2];
|
||||
int endIndx;
|
||||
int i = 0;
|
||||
|
||||
while (i < len) {
|
||||
endIndx = i + 2;
|
||||
if (endIndx > len) {
|
||||
endIndx = len - 1;
|
||||
}
|
||||
out[i / 2] = (byte) Integer.parseInt(str.substring(i, endIndx), 16);
|
||||
i += 2;
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
private static int hexToBin(char ch) {
|
||||
if ('0' <= ch && ch <= '9')
|
||||
return ch - '0';
|
||||
if ('A' <= ch && ch <= 'F')
|
||||
return ch - 'A' + 10;
|
||||
if ('a' <= ch && ch <= 'f')
|
||||
return ch - 'a' + 10;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*public static byte[] readableNumbersArrayToBytes(ReadableArray bytesArray) {
|
||||
int size = bytesArray.size();
|
||||
byte[] bytes = new byte[size];
|
||||
for (int i = 0; i < size; i++) {
|
||||
bytes[i] = (byte)bytesArray.getInt(i);
|
||||
}
|
||||
return bytes;
|
||||
}*/
|
||||
|
||||
public static byte[] stringNumbersArrayToBytes(String bytesString) {
|
||||
int size = bytesString.length();
|
||||
byte[] bytes = new byte[size];
|
||||
|
||||
for (int i = 0; i < size; i++) {
|
||||
bytes[i] = (byte) (bytesString.charAt(i) - '0'); // Convert each char to its byte value
|
||||
}
|
||||
|
||||
return bytes;
|
||||
}
|
||||
|
||||
/*public static byte[] readableNumbersArrayToBytes(ReadableArray bytesArray) {
|
||||
int size = bytesArray.size();
|
||||
byte[] bytes = new byte[size];
|
||||
for (int i = 0; i < size; i++) {
|
||||
bytes[i] = (byte)bytesArray.getInt(i);
|
||||
}
|
||||
return bytes;
|
||||
}*/
|
||||
|
||||
public static byte[] stringToBytes(String numbersString) {
|
||||
// Split the string by commas to get individual number strings
|
||||
String[] numberStrings = numbersString.split(",");
|
||||
|
||||
// Initialize byte array with the size of the split array
|
||||
byte[] bytes = new byte[numberStrings.length];
|
||||
|
||||
// Convert each number in the string array to a byte
|
||||
for (int i = 0; i < numberStrings.length; i++) {
|
||||
try {
|
||||
bytes[i] = (byte) Integer.parseInt(numberStrings[i].trim());
|
||||
} catch (NumberFormatException e) {
|
||||
// Handle the case where the string can't be converted to an integer
|
||||
throw new IllegalArgumentException("Invalid number format in input string: " + numbersString, e);
|
||||
}
|
||||
}
|
||||
return bytes;
|
||||
}
|
||||
|
||||
/*public static WritableArray BytesToWritableArray(byte[] bytes) {
|
||||
int size = bytes.length;
|
||||
WritableArray bytesArray = new WritableNativeArray();
|
||||
for (byte aByte : bytes) {
|
||||
bytesArray.pushInt(aByte);
|
||||
}
|
||||
return bytesArray;
|
||||
}*/
|
||||
|
||||
public static boolean stringValueIsNull (String value) {
|
||||
if(value == null || value == "null") {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
////////
|
||||
// SCA Helpers
|
||||
//////
|
||||
static public Drawable getImageDrawable(Context c, String i) throws IOException {
|
||||
try {
|
||||
byte[] imageBytes = Base64.decode(i, Base64.DEFAULT);
|
||||
Bitmap bitmap = BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.length);
|
||||
Drawable d = new BitmapDrawable(bitmap);
|
||||
return d;
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
static public boolean isBase64Encoded(String input) throws IOException {
|
||||
try {
|
||||
String pattern = "^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$";
|
||||
Pattern r = Pattern.compile(pattern);
|
||||
Matcher m = r.matcher(input);
|
||||
return m.find();
|
||||
}
|
||||
catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,407 @@
|
||||
package com.treezor.sca;
|
||||
|
||||
import static com.treezor.NativeModuleBase.serializeAntelopError;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import fr.antelop.sdk.AntelopError;
|
||||
import fr.antelop.sdk.authentication.CustomCustomerAuthenticatedProcessCallback;
|
||||
import fr.antelop.sdk.authentication.CustomerAuthenticatedProcess;
|
||||
import fr.antelop.sdk.authentication.CustomerAuthenticationCredentials;
|
||||
import fr.antelop.sdk.authentication.CustomerAuthenticationMethod;
|
||||
import fr.antelop.sdk.authentication.CustomerAuthenticationMethodType;
|
||||
import fr.antelop.sdk.authentication.CustomerAuthenticationPasscode;
|
||||
import fr.antelop.sdk.authentication.DefaultCustomerAuthenticatedProcessCallback;
|
||||
import fr.antelop.sdk.authentication.LocalAuthenticationErrorReason;
|
||||
import fr.antelop.sdk.authentication.prompt.CustomerAuthenticationFailureReason;
|
||||
import fr.antelop.sdk.authentication.prompt.CustomerAuthenticationPrompt;
|
||||
import fr.antelop.sdk.authentication.prompt.CustomerAuthenticationPromptBuilder;
|
||||
import fr.antelop.sdk.authentication.prompt.CustomerAuthenticationPromptCallback;
|
||||
import fr.antelop.sdk.authentication.prompt.DeviceBiometricCustomerAuthenticationPrompt;
|
||||
import fr.antelop.sdk.authentication.prompt.DeviceBiometricCustomerAuthenticationPromptBuilder;
|
||||
import fr.antelop.sdk.exception.WalletValidationException;
|
||||
import fr.antelop.sdk.sca.CustomerAuthenticatedSignature;
|
||||
|
||||
import fr.antelop.sdk.settings.WalletSettings;
|
||||
import io.flutter.embedding.engine.plugins.FlutterPlugin;
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.flutter.plugin.common.EventChannel;
|
||||
import io.flutter.plugin.common.MethodChannel.Result;
|
||||
import io.flutter.plugin.common.EventChannel;
|
||||
|
||||
public class CustomerAuthenticatedSignatureModule implements MethodChannel.MethodCallHandler {
|
||||
static final String TAG = "CustomerAuthenticatedSignatureModule";
|
||||
static final String EVENT_CHANNEL_NAME = "customer_authenticated_signature_callback";
|
||||
private final Context context;
|
||||
|
||||
private EventChannel eventChannel;
|
||||
private EventChannel.EventSink eventSink;
|
||||
|
||||
private static CustomerAuthenticatedSignature instance = null;
|
||||
private static List<CustomerAuthenticationMethod> currentCustomerAuthenticationMethod = null;
|
||||
|
||||
public CustomerAuthenticatedSignatureModule(Context context, MethodChannel channel, @NonNull FlutterPlugin.FlutterPluginBinding flutterPluginBinding) {
|
||||
this.context = context;
|
||||
|
||||
eventChannel = new EventChannel(flutterPluginBinding.getBinaryMessenger(), EVENT_CHANNEL_NAME);
|
||||
eventChannel.setStreamHandler(new EventChannel.StreamHandler() {
|
||||
@Override
|
||||
public void onListen(Object arguments, EventChannel.EventSink events) {
|
||||
eventSink = events;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel(Object arguments) {
|
||||
eventSink = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
|
||||
switch (call.method) {
|
||||
case "_initialize":
|
||||
_initialize(call, result);
|
||||
break;
|
||||
case "signWithDefaultAuthentication":
|
||||
signWithDefaultAuthentication(result);
|
||||
break;
|
||||
case "signWithCustomAuthentication":
|
||||
signWithCustomAuthentication(result);
|
||||
break;
|
||||
/*case "getAuthenticatedMethods":
|
||||
getAuthenticatedMethods(result);
|
||||
break;*/
|
||||
case "setPinCustomerCredentials":
|
||||
setPinCustomerCredentials(
|
||||
call.argument("passcode"),
|
||||
result
|
||||
);
|
||||
break;
|
||||
case "setBioCustomerCredentials":
|
||||
setBioCustomerCredentials(
|
||||
call.argument("title"),
|
||||
call.argument("subTitle"),
|
||||
result);
|
||||
break;
|
||||
case "getAuthenticationPatternName":
|
||||
getAuthenticationPatternName(result);
|
||||
break;
|
||||
case "isOnline":
|
||||
isOnline(result);
|
||||
break;
|
||||
case "getMessage":
|
||||
getMessage(result);
|
||||
break;
|
||||
case "getType":
|
||||
getType(result);
|
||||
break;
|
||||
case "getResult":
|
||||
getResult(result);
|
||||
break;
|
||||
case "getInputData":
|
||||
getInputData(result);
|
||||
break;
|
||||
case "clean":
|
||||
clean(result);
|
||||
break;
|
||||
default:
|
||||
result.notImplemented();
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void _initialize(MethodCall call, MethodChannel.Result result) {
|
||||
String patternName = call.argument("patternName");
|
||||
String message = call.argument("message");
|
||||
String input = call.argument("input"); // assumed to be byte array here
|
||||
|
||||
byte[] inputBytes = input.getBytes(StandardCharsets.UTF_8);
|
||||
try {
|
||||
CustomerAuthenticatedSignature.SignatureType type = CustomerAuthenticatedSignature.SignatureType.LocalJws;
|
||||
instance = new CustomerAuthenticatedSignature(patternName, message, type, inputBytes);
|
||||
result.success(null);
|
||||
} catch (Exception e) {
|
||||
result.error("INIT_ERROR", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void signWithDefaultAuthentication(MethodChannel.Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
Context context = this.context;
|
||||
instance.sign(context, new DefaultCustomerAuthenticatedProcessCallback() {
|
||||
@NonNull
|
||||
@Override
|
||||
public CustomerAuthenticationPrompt buildCustomerAuthenticationPrompt(@NonNull CustomerAuthenticationMethodType customerAuthenticationMethodType, @NonNull CustomerAuthenticationPromptBuilder customerAuthenticationPromptBuilder) {
|
||||
|
||||
return customerAuthenticationPromptBuilder.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProcessStart(@NonNull CustomerAuthenticatedProcess customerAuthenticatedProcess) {
|
||||
sendEvent("onProcessStart", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProcessSuccess(@NonNull CustomerAuthenticatedProcess customerAuthenticatedProcess) {
|
||||
sendEvent("onProcessSuccess", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull AntelopError antelopError, @NonNull CustomerAuthenticatedProcess customerAuthenticatedProcess) {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("error", serializeAntelopError(antelopError));
|
||||
sendEvent("onError", params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAuthenticationDeclined(@NonNull CustomerAuthenticatedProcess customerAuthenticatedProcess) {
|
||||
sendEvent("onAuthenticationDeclined", null);
|
||||
}
|
||||
});
|
||||
result.success(null);
|
||||
} catch (WalletValidationException e) {
|
||||
result.error("SIGN_ERROR", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void signWithCustomAuthentication(MethodChannel.Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
instance.sign(context, new CustomCustomerAuthenticatedProcessCallback() {
|
||||
@Override
|
||||
public void onCustomerCredentialsRequired(@NonNull List<CustomerAuthenticationMethod> list, @NonNull CustomerAuthenticatedProcess customerAuthenticatedProcess) {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
/*List<String> methods = new ArrayList<>();
|
||||
for (CustomerAuthenticationMethod e : list) {
|
||||
listCustomerAuthenticationMethod.add(e.)
|
||||
}*/
|
||||
currentCustomerAuthenticationMethod = list;
|
||||
sendEvent("onCustomerCredentialsRequired", params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCustomerCredentialsInvalid(@NonNull LocalAuthenticationErrorReason localAuthenticationErrorReason, @NonNull CustomerAuthenticatedProcess customerAuthenticatedProcess) {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("reason", localAuthenticationErrorReason.name());
|
||||
sendEvent("onCustomerCredentialsInvalid", params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProcessStart(@NonNull CustomerAuthenticatedProcess customerAuthenticatedProcess) {
|
||||
sendEvent("onProcessStart", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProcessSuccess(@NonNull CustomerAuthenticatedProcess customerAuthenticatedProcess) {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("signature", instance.getResult());
|
||||
sendEvent("onProcessSuccess", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull AntelopError antelopError, @NonNull CustomerAuthenticatedProcess customerAuthenticatedProcess) {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("error", serializeAntelopError(antelopError));
|
||||
sendEvent("onError", params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAuthenticationDeclined(@NonNull CustomerAuthenticatedProcess customerAuthenticatedProcess) {
|
||||
sendEvent("onAuthenticationDeclined", null);
|
||||
}
|
||||
});
|
||||
result.success(null);
|
||||
} catch (WalletValidationException e) {
|
||||
result.error("SIGN_ERROR", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
/*private synchronized void getAuthenticatedMethods(MethodChannel.Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
List<CustomerAuthenticationMethodType> methods = instance.getAuthenticatedMethods();
|
||||
List<String> methodNames = methods.stream().map(Enum::name).collect(Collectors.toList());
|
||||
result.success(methodNames);
|
||||
} catch (Exception e) {
|
||||
result.error("METHODS_ERROR", e.getMessage(), null);
|
||||
}
|
||||
}*/
|
||||
|
||||
private synchronized void setPinCustomerCredentials(String passcode, MethodChannel.Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
CustomerAuthenticationPasscode cred = new CustomerAuthenticationPasscode(passcode.getBytes());
|
||||
instance.setCustomerCredentials(context, cred);
|
||||
result.success(null);
|
||||
} catch (Exception e) {
|
||||
result.error("SET_CREDENTIALS_ERROR", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void setBioCustomerCredentials(String title, String subTitle, MethodChannel.Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
DeviceBiometricCustomerAuthenticationPromptBuilder deviceBioCustom = new DeviceBiometricCustomerAuthenticationPromptBuilder();
|
||||
deviceBioCustom.setTitle(title);
|
||||
deviceBioCustom.setSubtitle(subTitle);
|
||||
DeviceBiometricCustomerAuthenticationPrompt promptIK = deviceBioCustom.build();
|
||||
|
||||
CustomerAuthenticationMethod bioCustomerAuthenticationMethod = null;
|
||||
for(CustomerAuthenticationMethod customerAuthenticationMethod : currentCustomerAuthenticationMethod) {
|
||||
if (customerAuthenticationMethod.getType().equals(CustomerAuthenticationMethodType.DeviceBiometric)) {
|
||||
bioCustomerAuthenticationMethod = customerAuthenticationMethod;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
bioCustomerAuthenticationMethod.promptCustomer(context, promptIK, new CustomerAuthenticationPromptCallback() {
|
||||
|
||||
@Override
|
||||
public void onAuthenticationSuccess(@NonNull CustomerAuthenticationCredentials customerAuthenticationCredentials) {
|
||||
try {
|
||||
instance.setCustomerCredentials(context, customerAuthenticationCredentials);
|
||||
} catch (WalletValidationException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
result.success(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAuthenticationFailure(@NonNull CustomerAuthenticationFailureReason customerAuthenticationFailureReason) {
|
||||
result.error("SET_CREDENTIALS_ERROR", "reason: " + customerAuthenticationFailureReason, null);
|
||||
}
|
||||
});
|
||||
|
||||
result.success(null);
|
||||
} catch (Exception e) {
|
||||
result.error("SET_CREDENTIALS_ERROR", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private synchronized void getAuthenticationPatternName(MethodChannel.Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
result.success(instance.getCustomerAuthenticationPatternName());
|
||||
} catch (Exception e) {
|
||||
result.error("GET_PATTERN_ERROR", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void isOnline(MethodChannel.Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
result.success(instance.isOnline());
|
||||
} catch (Exception e) {
|
||||
result.error("ONLINE_ERROR", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void getMessage(MethodChannel.Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
result.success(instance.getMessage());
|
||||
} catch (Exception e) {
|
||||
result.error("GET_MESSAGE_ERROR", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void getType(MethodChannel.Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
result.success(instance.getType().name());
|
||||
} catch (Exception e) {
|
||||
result.error("GET_TYPE_ERROR", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void getResult(MethodChannel.Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
result.success(instance.getResult());
|
||||
} catch (Exception e) {
|
||||
result.error("GET_RESULT_ERROR", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void getInputData(MethodChannel.Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
byte[] inputData = instance.getInputData();
|
||||
result.success(inputData);
|
||||
} catch (Exception e) {
|
||||
result.error("INPUT_DATA_ERROR", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void clean(MethodChannel.Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
instance = null;
|
||||
result.success(null);
|
||||
}
|
||||
|
||||
private void sendEvent(String eventName, Map<String, Object> params) {
|
||||
Map<String, Object> event = new HashMap<>();
|
||||
|
||||
// Add the event name under the "event" key
|
||||
event.put("event", eventName);
|
||||
|
||||
// Add the params under the "params" key
|
||||
if (params != null) {
|
||||
event.put("params", params);
|
||||
} else {
|
||||
event.put("params", null); // Explicitly handle the case when params is null
|
||||
}
|
||||
|
||||
// Pass the structured map to eventSink.success
|
||||
eventSink.success(event);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,419 @@
|
||||
package com.treezor.wallet;
|
||||
import static com.treezor.NativeModuleBase.serializeAntelopError;
|
||||
import static com.treezor.NativeModuleBase.serializeWalletValidationException;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import fr.antelop.sdk.AntelopError;
|
||||
import fr.antelop.sdk.AsyncRequestType;
|
||||
import fr.antelop.sdk.Wallet;
|
||||
import fr.antelop.sdk.WalletLockReason;
|
||||
import fr.antelop.sdk.WalletManager;
|
||||
import fr.antelop.sdk.WalletManagerCallback;
|
||||
import fr.antelop.sdk.authentication.CustomerAuthenticationCredentials;
|
||||
import fr.antelop.sdk.authentication.CustomerAuthenticationMethodType;
|
||||
import fr.antelop.sdk.authentication.CustomerAuthenticationPasscode;
|
||||
import fr.antelop.sdk.authentication.CustomerAuthenticationPattern;
|
||||
import fr.antelop.sdk.authentication.CustomerCredentialsRequiredReason;
|
||||
import fr.antelop.sdk.authentication.LocalAuthenticationErrorReason;
|
||||
import fr.antelop.sdk.exception.WalletValidationException;
|
||||
import io.flutter.embedding.engine.plugins.FlutterPlugin;
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.flutter.plugin.common.EventChannel;
|
||||
import io.flutter.plugin.common.MethodChannel.Result;
|
||||
|
||||
public class WalletManagerModule implements MethodChannel.MethodCallHandler {
|
||||
static final String TAG = "WalletManagerModule";
|
||||
static final String EVENT_CHANNEL_NAME = "wallet_manager_callback";
|
||||
private final Context context;
|
||||
|
||||
private EventChannel eventChannel;
|
||||
private EventChannel.EventSink eventSink;
|
||||
|
||||
private static WalletManager instance = null;
|
||||
|
||||
public WalletManagerModule(Context context, MethodChannel channel, @NonNull FlutterPlugin.FlutterPluginBinding flutterPluginBinding) {
|
||||
this.context = context;
|
||||
|
||||
eventChannel = new EventChannel(flutterPluginBinding.getBinaryMessenger(), EVENT_CHANNEL_NAME);
|
||||
eventChannel.setStreamHandler(new EventChannel.StreamHandler() {
|
||||
@Override
|
||||
public void onListen(Object arguments, EventChannel.EventSink events) {
|
||||
eventSink = events;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel(Object arguments) {
|
||||
eventSink = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static synchronized WalletManager getInstance(Context context, WalletManagerCallback callback) throws WalletValidationException {
|
||||
if (instance == null) {
|
||||
instance = new WalletManager(context, callback, null);
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
|
||||
switch (call.method) {
|
||||
case "_initialize":
|
||||
this._initialize(result);
|
||||
break;
|
||||
case "connect":
|
||||
this.connect(
|
||||
call.argument("loginCreds"),
|
||||
call.argument("newCreds"),
|
||||
result
|
||||
);
|
||||
break;
|
||||
case "logout":
|
||||
this.logout(result);
|
||||
break;
|
||||
case "lock":
|
||||
this.lock(call.argument("reason"), result);
|
||||
break;
|
||||
case "disconnect":
|
||||
this.disconnect(result);
|
||||
break;
|
||||
case "delete":
|
||||
this.delete(result);
|
||||
break;
|
||||
case "checkCredentials":
|
||||
this.checkCredentials(call.argument("credentials"), result);
|
||||
break;
|
||||
case "changeCredentials":
|
||||
this.changeCredentials(call.argument("currentCredentials"), call.argument("newCredentials"), result);
|
||||
break;
|
||||
case "activateAuthenticationMethod":
|
||||
this.activateAuthenticationMethod(call.argument("methodToActivated"), result);
|
||||
break;
|
||||
case "clean":
|
||||
this.clean(result);
|
||||
break;
|
||||
default:
|
||||
result.notImplemented();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void _initialize(Result result) {
|
||||
try {
|
||||
WalletManagerCallback walletManagerCallback = new WalletManagerCallback() {
|
||||
@Override
|
||||
public void onProvisioningRequired(@Nullable Object callbackData) {
|
||||
sendEvent("onProvisioningRequired", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCredentialsRequired(@NonNull CustomerCredentialsRequiredReason reason, @Nullable AntelopError error, @Nullable Object callbackData) {
|
||||
Log.d(TAG, "Android onCredentialsRequired - reason: " + reason + ", error: " + error);
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("reason", reason.name());
|
||||
if (error != null) {
|
||||
params.put("error", serializeAntelopError(error));
|
||||
}
|
||||
sendEvent("onCredentialsRequired", params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConnectionError(@NonNull AntelopError error, @Nullable Object callbackData) {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("error", serializeAntelopError(error));
|
||||
sendEvent("onConnectionError", params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConnectionSuccess(@NonNull Wallet wallet, @Nullable Object callbackData) {// Adjust as needed
|
||||
sendEvent("onConnectionSuccess", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAsyncRequestSuccess(@NonNull AsyncRequestType asyncRequestType, @Nullable Object callbackData) {
|
||||
/*Map<String, Object> params = new HashMap<>();
|
||||
params.put("asyncRequestCode", asyncRequestType.name());
|
||||
sendEvent("onAsyncRequestSuccess", params);*/
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAsyncRequestError(@NonNull AsyncRequestType asyncRequestType, @NonNull AntelopError error, @Nullable Object callbackData) {
|
||||
/*Map<String, Object> params = new HashMap<>();
|
||||
params.put("asyncRequestCode", asyncRequestType.name());
|
||||
params.put("error", serializeAntelopError(error));
|
||||
sendEvent("onAsyncRequestError", params);*/
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLocalAuthenticationSuccess(@NonNull CustomerAuthenticationMethodType type, @Nullable Object callbackData) {
|
||||
/*Map<String, Object> params = new HashMap<>();
|
||||
params.put("methodType", type.name());
|
||||
sendEvent("onLocalAuthenticationSuccess", params);*/
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLocalAuthenticationError(@NonNull CustomerAuthenticationMethodType type, @NonNull LocalAuthenticationErrorReason reason, @Nullable String message, @Nullable Object callbackData) {
|
||||
/*Map<String, Object> params = new HashMap<>();
|
||||
params.put("reason", reason.name());
|
||||
params.put("methodType", type.name());
|
||||
sendEvent("onLocalAuthenticationError", params);*/
|
||||
}
|
||||
};
|
||||
|
||||
instance = new WalletManager(context, walletManagerCallback, null);
|
||||
result.success(null);
|
||||
} catch (WalletValidationException e) {
|
||||
result.error("INIT_ERROR", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void connect(String loginCreds, String newCreds, Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
Log.d(TAG, "Android connect - loginCreds: " + loginCreds + ", newCreds: " + newCreds);
|
||||
CustomerAuthenticationCredentials customerLoginCreds = null;
|
||||
CustomerAuthenticationCredentials customerNewCreds = null;
|
||||
|
||||
if (loginCreds != null) {
|
||||
customerLoginCreds = new CustomerAuthenticationPasscode(loginCreds.getBytes());
|
||||
}
|
||||
if (newCreds != null) {
|
||||
customerNewCreds = new CustomerAuthenticationPasscode(newCreds.getBytes());
|
||||
}
|
||||
|
||||
Log.d(TAG, "Android connect - customerLoginCreds: " + customerLoginCreds + ", customerNewCreds: " + customerNewCreds);
|
||||
|
||||
instance.connect(customerLoginCreds, customerNewCreds);
|
||||
result.success(null);
|
||||
} catch (WalletValidationException e) {
|
||||
result.error("CONNECT_ERROR", e.getMessage(), null);
|
||||
} catch (Exception e) {
|
||||
result.error("UNKNOWN_ERROR", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void logout(MethodChannel.Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
instance.logout();
|
||||
result.success(null);
|
||||
} catch (WalletValidationException e) {
|
||||
result.error("LOGOUT_ERROR", e.getMessage(), null);
|
||||
} catch (Exception e) {
|
||||
result.error("UNKNOWN_ERROR", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void lock(String reason, MethodChannel.Result result) {
|
||||
Log.d(TAG, "lock: " + reason);
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
WalletLockReason _reason = WalletLockReason.OtherReason;
|
||||
if (reason.equalsIgnoreCase("FraudulentUseSuspected")) {
|
||||
_reason = WalletLockReason.FraudulentUseSuspected;
|
||||
} else if (reason.equalsIgnoreCase("StopService")) {
|
||||
_reason = WalletLockReason.StopService;
|
||||
} else if (reason.equalsIgnoreCase("StrongestCvmAttemptCountExceeded")) {
|
||||
_reason = WalletLockReason.StrongestCvmAttemptCountExceeded;
|
||||
}
|
||||
Log.d("AntolopModule", "lock: _reason" + _reason.name());
|
||||
instance.lock(_reason);
|
||||
} catch (WalletValidationException e) {
|
||||
result.error("Error", e.getMessage(), null);
|
||||
} catch (Exception e) {
|
||||
Log.d("AntolopModule", "lock error: " + e.getMessage());
|
||||
result.error("Error", e.getMessage(), null);
|
||||
}
|
||||
result.success(null);
|
||||
}
|
||||
|
||||
public synchronized void disconnect(MethodChannel.Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
instance.disconnect();
|
||||
result.success(null);
|
||||
} catch (Exception e) {
|
||||
result.error("Error", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void delete(MethodChannel.Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
instance.delete();
|
||||
result.success(null);
|
||||
} catch (Exception e) {
|
||||
result.error("Error", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void checkCredentials(String credentials, MethodChannel.Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
CustomerAuthenticationPasscode _credentials = new CustomerAuthenticationPasscode(credentials.getBytes());
|
||||
try {
|
||||
instance.checkCredentials(_credentials);
|
||||
result.success(null);
|
||||
} catch (WalletValidationException walletValidationException) {
|
||||
result.error("Error", walletValidationException.getMessage(), null);
|
||||
} catch (Exception e) {
|
||||
result.error("Error", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void changeCredentials(String currentCredentials, String newCredentials, MethodChannel.Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
CustomerAuthenticationPasscode _currentCredentials = new CustomerAuthenticationPasscode(currentCredentials.getBytes());
|
||||
CustomerAuthenticationPasscode _newCredentials = new CustomerAuthenticationPasscode(newCredentials.getBytes());
|
||||
try {
|
||||
instance.changeCredentials(_currentCredentials, _newCredentials);
|
||||
result.success(null);
|
||||
} catch (WalletValidationException walletValidationException) {
|
||||
result.error("Error", walletValidationException.getMessage(), null);
|
||||
} catch (Exception e) {
|
||||
result.error("Error", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void activateAuthenticationMethod(String methodToActivated, MethodChannel.Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
CustomerAuthenticationMethodType _type = CustomerAuthenticationMethodType.None;
|
||||
|
||||
if (methodToActivated.equals("BIO")) {
|
||||
_type = CustomerAuthenticationMethodType.DeviceBiometric;
|
||||
} else if (methodToActivated.equals("PIN")) {
|
||||
_type = CustomerAuthenticationMethodType.Pin;
|
||||
}
|
||||
|
||||
instance.activateAuthenticationMethod(_type, null);
|
||||
result.success(null);
|
||||
} catch (WalletValidationException walletValidationException) {
|
||||
result.error("Error", walletValidationException.getMessage(), null);
|
||||
} catch (Exception e) {
|
||||
result.error("Error", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
/*public synchronized void deactivateAuthenticationMethod(String type, @Nullable String credentialsInstanceKey, MethodChannel.Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
CustomerAuthenticationMethodType _type = CustomerAuthenticationMethodType.valueOf(type);
|
||||
CustomerAuthenticationCredentials credentials = null;
|
||||
|
||||
if(credentialsInstanceKey != null)
|
||||
credentials = Utils.getCustomerAuthenticationCredentialsFromInstanceKey(credentialsInstanceKey);
|
||||
|
||||
instance.deactivateAuthenticationMethod(_type, credentials);
|
||||
result.success(null);
|
||||
} catch (WalletValidationException walletValidationException) {
|
||||
result.error("Error", serializeWalletValidationException(walletValidationException));
|
||||
} catch (Exception e) {
|
||||
result.error("Error", e);
|
||||
}
|
||||
}*/
|
||||
|
||||
/*public synchronized void setCustomerCredentialsForTransaction(String credentialsInstanceKey, MethodChannel.Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
CustomerAuthenticationCredentials credentials = Utils.getCustomerAuthenticationCredentialsFromInstanceKey(credentialsInstanceKey);
|
||||
instance.setCustomerCredentialsForTransaction(credentials);
|
||||
result.success(null);
|
||||
} catch (WalletValidationException walletValidationException) {
|
||||
result.error("Error", serializeWalletValidationException(walletValidationException));
|
||||
} catch (Exception e) {
|
||||
result.error("Error", e);
|
||||
}
|
||||
}*/
|
||||
|
||||
/*public synchronized void synchronizeAuthenticationMethod(String type, @Nullable String credentialsInstanceKey, MethodChannel.Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
CustomerAuthenticationMethodType _type = CustomerAuthenticationMethodType.valueOf(type);
|
||||
CustomerAuthenticationCredentials credentials = null;
|
||||
|
||||
if(credentialsInstanceKey != null)
|
||||
credentials = Utils.getCustomerAuthenticationCredentialsFromInstanceKey(credentialsInstanceKey);
|
||||
|
||||
instance.synchronizeAuthenticationMethod(_type, credentials);
|
||||
result.success(null);
|
||||
} catch (WalletValidationException walletValidationException) {
|
||||
result.error("Error", serializeWalletValidationException(walletValidationException));
|
||||
} catch (Exception e) {
|
||||
result.error("Error", e);
|
||||
}
|
||||
}*/
|
||||
|
||||
public synchronized void clean(MethodChannel.Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
instance.clean();
|
||||
instance = null;
|
||||
result.success(null);
|
||||
} catch (Exception e) {
|
||||
result.error("Error", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
private void sendEvent(String eventName, Map<String, Object> params) {
|
||||
Map<String, Object> event = new HashMap<>();
|
||||
|
||||
// Add the event name under the "event" key
|
||||
event.put("event", eventName);
|
||||
|
||||
// Add the params under the "params" key
|
||||
if (params != null) {
|
||||
event.put("params", params);
|
||||
} else {
|
||||
event.put("params", null); // Explicitly handle the case when params is null
|
||||
}
|
||||
|
||||
eventSink.success(event);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
/*package com.treezor.wallet;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import io.flutter.embedding.engine.plugins.FlutterPlugin;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.flutter.plugin.common.EventChannel;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import fr.antelop.sdk.WalletLockReason;
|
||||
import fr.antelop.sdk.WalletNotificationServiceCallback;
|
||||
import fr.antelop.sdk.card.EmvApplicationActivationMethod;
|
||||
|
||||
public class WalletNotificationServiceModule implements WalletNotificationServiceCallback {
|
||||
static final String TAG = "WalletNotificationServiceModule";
|
||||
static final String EVENT_CHANNEL_NAME = "wallet_notification_service_events";
|
||||
|
||||
private final Context context;
|
||||
private final MethodChannel channel;
|
||||
private static EventChannel eventChannel;
|
||||
private static EventChannel.EventSink eventSink;
|
||||
|
||||
private static WalletNotificationServiceModule instance = null;
|
||||
|
||||
public WalletNotificationServiceModule(Context context, MethodChannel channel, @NonNull FlutterPlugin.FlutterPluginBinding flutterPluginBinding) {
|
||||
this.context = context;
|
||||
this.channel = channel;
|
||||
|
||||
eventChannel = new EventChannel(flutterPluginBinding.getBinaryMessenger(), EVENT_CHANNEL_NAME);
|
||||
eventChannel.setStreamHandler(new EventChannel.StreamHandler() {
|
||||
@Override
|
||||
public void onListen(Object arguments, EventChannel.EventSink events) {
|
||||
eventSink = events;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel(Object arguments) {
|
||||
eventSink = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static synchronized WalletNotificationServiceModule getInstance(Context context, MethodChannel channel, @NonNull FlutterPlugin.FlutterPluginBinding flutterPluginBinding) {
|
||||
if (instance == null) {
|
||||
instance = new WalletNotificationServiceModule(context, channel, flutterPluginBinding);
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEmvApplicationActivationRequired(Context context, String emvAppId, List<EmvApplicationActivationMethod> methods) {
|
||||
sendEvent("onEmvApplicationActivationRequired", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEmvApplicationCredentialsUpdated(Context context) {
|
||||
sendEvent("onEmvApplicationCredentialsUpdated", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCardsUpdated(Context context) {
|
||||
sendEvent("onCardsUpdated", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWalletLoaded(@NonNull Context context) {
|
||||
sendEvent("onWalletLoaded", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWalletLocked(@NonNull Context context, @NonNull WalletLockReason reason) {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("reason", reason.name());
|
||||
sendEvent("onWalletLocked", params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWalletUnlocked(@NonNull Context context) {
|
||||
sendEvent("onWalletUnlocked", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLogout(@NonNull Context context) {
|
||||
sendEvent("onLogout", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWalletDeleted(@NonNull Context context) {
|
||||
sendEvent("onWalletDeleted", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSettingsUpdated(@NonNull Context context) {
|
||||
sendEvent("onSettingsUpdated", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCountersUpdated(Context context) {
|
||||
sendEvent("onCountersUpdated", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCustomerCredentialsReset(Context context) {
|
||||
sendEvent("onCustomerCredentialsReset", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSunsetScheduled(@NonNull Context context, @NonNull Date sunsetDate) {
|
||||
sendEvent("onSunsetScheduled", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLostEligibility(@NonNull Context context) {
|
||||
sendEvent("onLostEligibility", null);
|
||||
}
|
||||
|
||||
private void sendEvent(String eventName, Map<String, Object> params) {
|
||||
Map<String, Object> event = new HashMap<>();
|
||||
|
||||
// Add the event name under the "event" key
|
||||
event.put("event", eventName);
|
||||
|
||||
// Add the params under the "params" key
|
||||
if (params != null) {
|
||||
event.put("params", params);
|
||||
} else {
|
||||
event.put("params", null); // Explicitly handle the case when params is null
|
||||
}
|
||||
|
||||
// Pass the structured map to eventSink.success
|
||||
eventSink.success(event);
|
||||
}
|
||||
}*/
|
||||
@@ -0,0 +1,260 @@
|
||||
package com.treezor.wallet;
|
||||
|
||||
import static com.treezor.globals.Utils.parseHexFormattedBinary;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import androidx.annotation.NonNull;
|
||||
import fr.antelop.sdk.AntelopError;
|
||||
import fr.antelop.sdk.EligibilityDenialReason;
|
||||
import fr.antelop.sdk.Product;
|
||||
import fr.antelop.sdk.WalletProvisioning;
|
||||
import fr.antelop.sdk.WalletProvisioningCallback;
|
||||
import fr.antelop.sdk.exception.WalletValidationException;
|
||||
import io.flutter.embedding.engine.plugins.FlutterPlugin;
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.flutter.plugin.common.EventChannel;
|
||||
import io.flutter.plugin.common.MethodChannel.Result;
|
||||
import io.flutter.plugin.common.EventChannel;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public class WalletProvisioningModule implements MethodChannel.MethodCallHandler {
|
||||
static final String TAG = "WProvisioningModule";
|
||||
static final String EVENT_CHANNEL_NAME = "wallet_provisioning_callback";
|
||||
private final Context context;
|
||||
|
||||
private EventChannel eventChannel;
|
||||
private EventChannel.EventSink eventSink;
|
||||
|
||||
private static WalletProvisioning instance = null;
|
||||
|
||||
public WalletProvisioningModule(Context context, MethodChannel channel, @NonNull FlutterPlugin.FlutterPluginBinding flutterPluginBinding) {
|
||||
this.context = context;
|
||||
|
||||
eventChannel = new EventChannel(flutterPluginBinding.getBinaryMessenger(), EVENT_CHANNEL_NAME);
|
||||
eventChannel.setStreamHandler(new EventChannel.StreamHandler() {
|
||||
@Override
|
||||
public void onListen(Object arguments, EventChannel.EventSink events) {
|
||||
eventSink = events;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel(Object arguments) {
|
||||
eventSink = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
|
||||
switch (call.method) {
|
||||
case "_initialize":
|
||||
this._initialize(result);
|
||||
break;
|
||||
case "initialize":
|
||||
this.initialize(result);
|
||||
break;
|
||||
case "checkEligibility":
|
||||
this.checkEligibility(call.argument("rootedDeviceForbidden"), result);
|
||||
break;
|
||||
case "launch":
|
||||
this.launch(call.argument("activationCode"), result);
|
||||
break;
|
||||
case "clean":
|
||||
this.clean(result);
|
||||
break;
|
||||
default:
|
||||
result.notImplemented();
|
||||
}
|
||||
}
|
||||
|
||||
private void _initialize(Result result) {
|
||||
Log.d(TAG, "_initialize start");
|
||||
|
||||
WalletProvisioningCallback walletProvisioningCallback = new WalletProvisioningCallback() {
|
||||
@Override
|
||||
public void onInitializationSuccess(Object callbackData) {
|
||||
Log.d(TAG, "onInitializationSuccess");
|
||||
sendEvent("onInitializationSuccess", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInitializationError(AntelopError error, Object callbackData) {
|
||||
Log.d(TAG, "onInitializationError: " + error.getCode().toString() + " - " + error.getMessage());
|
||||
Map<String, Object> errorData = new HashMap<>();
|
||||
errorData.put("message", error.getMessage());
|
||||
errorData.put("code", error.getCode().toString());
|
||||
sendEvent("onInitializationError", errorData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPermissionNotGranted(String[] permissions, Object callbackData) {
|
||||
Log.d(TAG, "onPermissionNotGranted");
|
||||
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
List<String> permissionsList = Arrays.asList(permissions);
|
||||
params.put("permissions", permissionsList);
|
||||
|
||||
// Send the event to Flutter using invokeMethod
|
||||
sendEvent("onPermissionNotGranted", params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeviceEligible(boolean fingerprintAllowed, List<Product> eligibleProducts, Object callbackData) {
|
||||
Log.d(TAG, "onDeviceEligible");
|
||||
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("fingerprintAllowed", fingerprintAllowed);
|
||||
|
||||
// Send the event to Flutter using invokeMethod
|
||||
sendEvent("onDeviceEligible", params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeviceNotEligible(EligibilityDenialReason reason, Object callbackData, @Nullable String denialReference) {
|
||||
Log.d(TAG, "onDeviceNotEligible: " + reason.toString() + " - " + denialReference);
|
||||
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("reason", reason.toString());
|
||||
params.put("denialReference", denialReference);
|
||||
|
||||
// Send the event to Flutter using invokeMethod
|
||||
sendEvent("onDeviceNotEligible", params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCheckEligibilityError(AntelopError error, Object callbackData) {
|
||||
Log.d(TAG, "onCheckEligibilityError: " + error.getCode().toString() + " - " + error.getMessage());
|
||||
|
||||
Map<String, Object> errorMap = new HashMap<>();
|
||||
errorMap.put("message", error.getMessage());
|
||||
errorMap.put("code", error.getCode().toString());
|
||||
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("error", errorMap);
|
||||
|
||||
// Send the event to Flutter using invokeMethod
|
||||
sendEvent("onCheckEligibilityError", params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProvisioningPending(Object callbackData) {
|
||||
Log.d(TAG, "onProvisioningPending");
|
||||
|
||||
// Send the event to Flutter using invokeMethod
|
||||
sendEvent("onProvisioningPending", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProvisioningSuccess(Object callbackData) {
|
||||
Log.d(TAG, "onProvisioningSuccess");
|
||||
|
||||
// Send the event to Flutter using invokeMethod
|
||||
sendEvent("onProvisioningSuccess", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProvisioningError(AntelopError error, Object callbackData) {
|
||||
Log.d(TAG, "onProvisioningError: " + error.getCode().toString() + " - " + error.getMessage());
|
||||
|
||||
Map<String, Object> errorMap = new HashMap<>();
|
||||
errorMap.put("message", error.getMessage());
|
||||
errorMap.put("code", error.getCode().toString());
|
||||
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("error", errorMap);
|
||||
|
||||
// Send the event to Flutter using invokeMethod
|
||||
sendEvent("onProvisioningError", params);
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
instance = new WalletProvisioning(context, walletProvisioningCallback);
|
||||
result.success(null);
|
||||
} catch (WalletValidationException e) {
|
||||
result.error("INIT_ERROR", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void initialize(Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletProvisioning instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
instance.initialize();
|
||||
result.success(null);
|
||||
} catch (Exception e) {
|
||||
result.error("INIT_ERROR", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void checkEligibility(boolean rootedDeviceForbidden, Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
instance.checkEligibility(rootedDeviceForbidden);
|
||||
result.success(null);
|
||||
} catch (Exception e) {
|
||||
result.error("CHECK_ELIGIBILITY_ERROR", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void launch(String activationCode, Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
Log.d(TAG, "launch activationCode: " + activationCode);
|
||||
instance.launch(parseHexFormattedBinary(activationCode), null);
|
||||
result.success(null);
|
||||
} catch (Exception e) {
|
||||
result.error("CHECK_ELIGIBILITY_ERROR", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void clean(Result result) {
|
||||
if (instance == null) {
|
||||
result.error("INSTANCE_ERROR", "WalletManager instance is not initialized", null);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
instance.clean();
|
||||
instance = null;
|
||||
result.success(null);
|
||||
} catch (Exception e) {
|
||||
result.error("CLEAN_ERROR", e.getMessage(), null);
|
||||
}
|
||||
}
|
||||
|
||||
private void sendEvent(String eventName, Map<String, Object> params) {
|
||||
Map<String, Object> event = new HashMap<>();
|
||||
|
||||
// Add the event name under the "event" key
|
||||
event.put("event", eventName);
|
||||
|
||||
// Add the params under the "params" key
|
||||
if (params != null) {
|
||||
event.put("params", params);
|
||||
} else {
|
||||
event.put("params", null); // Explicitly handle the case when params is null
|
||||
}
|
||||
|
||||
// Pass the structured map to eventSink.success
|
||||
eventSink.success(event);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.treezor.flutter_treezor_entrust_sdk_bridge;
|
||||
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* This demonstrates a simple unit test of the Java portion of this plugin's implementation.
|
||||
*
|
||||
* Once you have built the plugin's example app, you can run these tests from the command
|
||||
* line by running `./gradlew testDebugUnitTest` in the `example/android/` directory, or
|
||||
* you can run them directly from IDEs that support JUnit such as Android Studio.
|
||||
*/
|
||||
|
||||
public class FlutterTreezorEntrustSdkBridgePluginTest {
|
||||
@Test
|
||||
public void onMethodCall_getPlatformVersion_returnsExpectedValue() {
|
||||
FlutterTreezorEntrustSdkBridgePlugin plugin = new FlutterTreezorEntrustSdkBridgePlugin();
|
||||
|
||||
final MethodCall call = new MethodCall("getPlatformVersion", null);
|
||||
MethodChannel.Result mockResult = mock(MethodChannel.Result.class);
|
||||
plugin.onMethodCall(call, mockResult);
|
||||
|
||||
verify(mockResult).success("Android " + android.os.Build.VERSION.RELEASE);
|
||||
}
|
||||
}
|
||||
BIN
packages/flutter_treezor_entrust_sdk_bridge/example/.DS_Store
vendored
Normal file
BIN
packages/flutter_treezor_entrust_sdk_bridge/example/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -0,0 +1,31 @@
|
||||
Extension Discovery Cache
|
||||
=========================
|
||||
|
||||
This folder is used by `package:extension_discovery` to cache lists of
|
||||
packages that contains extensions for other packages.
|
||||
|
||||
DO NOT USE THIS FOLDER
|
||||
----------------------
|
||||
|
||||
* Do not read (or rely) the contents of this folder.
|
||||
* Do write to this folder.
|
||||
|
||||
If you're interested in the lists of extensions stored in this folder use the
|
||||
API offered by package `extension_discovery` to get this information.
|
||||
|
||||
If this package doesn't work for your use-case, then don't try to read the
|
||||
contents of this folder. It may change, and will not remain stable.
|
||||
|
||||
Use package `extension_discovery`
|
||||
---------------------------------
|
||||
|
||||
If you want to access information from this folder.
|
||||
|
||||
Feel free to delete this folder
|
||||
-------------------------------
|
||||
|
||||
Files in this folder act as a cache, and the cache is discarded if the files
|
||||
are older than the modification time of `.dart_tool/package_config.json`.
|
||||
|
||||
Hence, it should never be necessary to clear this cache manually, if you find a
|
||||
need to do please file a bug.
|
||||
@@ -0,0 +1 @@
|
||||
{"version":2,"entries":[{"package":"flutter_treezor_entrust_sdk_bridge","rootUri":"../../","packageUri":"lib/"},{"package":"flutter_treezor_entrust_sdk_bridge_example","rootUri":"../","packageUri":"lib/"}]}
|
||||
@@ -0,0 +1,274 @@
|
||||
{
|
||||
"configVersion": 2,
|
||||
"packages": [
|
||||
{
|
||||
"name": "async",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/async-2.11.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.18"
|
||||
},
|
||||
{
|
||||
"name": "boolean_selector",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.17"
|
||||
},
|
||||
{
|
||||
"name": "characters",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/characters-1.4.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "clock",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/clock-1.1.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "collection",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/collection-1.19.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "crypto",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/crypto-3.0.6",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "cupertino_icons",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.8",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.1"
|
||||
},
|
||||
{
|
||||
"name": "dio",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/dio-5.7.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.18"
|
||||
},
|
||||
{
|
||||
"name": "dio_web_adapter",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/dio_web_adapter-2.0.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "fake_async",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/fake_async-1.3.3",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "file",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/file-7.0.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.0"
|
||||
},
|
||||
{
|
||||
"name": "flutter",
|
||||
"rootUri": "file:///Users/juliandalcalaf/Development/flutter/packages/flutter",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "flutter_driver",
|
||||
"rootUri": "file:///Users/juliandalcalaf/Development/flutter/packages/flutter_driver",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "flutter_lints",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_lints-4.0.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.1"
|
||||
},
|
||||
{
|
||||
"name": "flutter_test",
|
||||
"rootUri": "file:///Users/juliandalcalaf/Development/flutter/packages/flutter_test",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "flutter_treezor_entrust_sdk_bridge",
|
||||
"rootUri": "../../",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.5"
|
||||
},
|
||||
{
|
||||
"name": "fuchsia_remote_debug_protocol",
|
||||
"rootUri": "file:///Users/juliandalcalaf/Development/flutter/packages/fuchsia_remote_debug_protocol",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "http_parser",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/http_parser-4.0.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "integration_test",
|
||||
"rootUri": "file:///Users/juliandalcalaf/Development/flutter/packages/integration_test",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "leak_tracker",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/leak_tracker-11.0.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.2"
|
||||
},
|
||||
{
|
||||
"name": "leak_tracker_flutter_testing",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.10",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.2"
|
||||
},
|
||||
{
|
||||
"name": "leak_tracker_testing",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.2"
|
||||
},
|
||||
{
|
||||
"name": "lints",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/lints-4.0.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.1"
|
||||
},
|
||||
{
|
||||
"name": "matcher",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/matcher-0.12.17",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "material_color_utilities",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.17"
|
||||
},
|
||||
{
|
||||
"name": "meta",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/meta-1.16.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path-1.9.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "platform",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/platform-3.1.5",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.2"
|
||||
},
|
||||
{
|
||||
"name": "plugin_platform_interface",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/plugin_platform_interface-2.1.8",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.0"
|
||||
},
|
||||
{
|
||||
"name": "process",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/process-5.0.2",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.0"
|
||||
},
|
||||
{
|
||||
"name": "sky_engine",
|
||||
"rootUri": "file:///Users/juliandalcalaf/Development/flutter/bin/cache/pkg/sky_engine",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.8"
|
||||
},
|
||||
{
|
||||
"name": "source_span",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/source_span-1.10.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.18"
|
||||
},
|
||||
{
|
||||
"name": "stack_trace",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/stack_trace-1.12.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "stream_channel",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/stream_channel-2.1.4",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "string_scanner",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/string_scanner-1.3.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.1"
|
||||
},
|
||||
{
|
||||
"name": "sync_http",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/sync_http-0.3.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "term_glyph",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/term_glyph-1.2.1",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "2.12"
|
||||
},
|
||||
{
|
||||
"name": "test_api",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/test_api-0.7.6",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.5"
|
||||
},
|
||||
{
|
||||
"name": "typed_data",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/typed_data-1.4.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.5"
|
||||
},
|
||||
{
|
||||
"name": "vector_math",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/vector_math-2.2.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.1"
|
||||
},
|
||||
{
|
||||
"name": "vm_service",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/vm_service-14.3.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.3"
|
||||
},
|
||||
{
|
||||
"name": "web",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/web-1.1.0",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.4"
|
||||
},
|
||||
{
|
||||
"name": "webdriver",
|
||||
"rootUri": "file:///Users/juliandalcalaf/.pub-cache/hosted/pub.dev/webdriver-3.0.4",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.1"
|
||||
},
|
||||
{
|
||||
"name": "flutter_treezor_entrust_sdk_bridge_example",
|
||||
"rootUri": "../",
|
||||
"packageUri": "lib/",
|
||||
"languageVersion": "3.5"
|
||||
}
|
||||
],
|
||||
"generator": "pub",
|
||||
"generatorVersion": "3.9.2",
|
||||
"flutterRoot": "file:///Users/juliandalcalaf/Development/flutter",
|
||||
"flutterVersion": "3.35.7",
|
||||
"pubCache": "file:///Users/juliandalcalaf/.pub-cache"
|
||||
}
|
||||
@@ -0,0 +1,371 @@
|
||||
{
|
||||
"roots": [
|
||||
"flutter_treezor_entrust_sdk_bridge_example"
|
||||
],
|
||||
"packages": [
|
||||
{
|
||||
"name": "flutter_treezor_entrust_sdk_bridge_example",
|
||||
"version": "0.0.0",
|
||||
"dependencies": [
|
||||
"crypto",
|
||||
"cupertino_icons",
|
||||
"dio",
|
||||
"flutter",
|
||||
"flutter_treezor_entrust_sdk_bridge"
|
||||
],
|
||||
"devDependencies": [
|
||||
"flutter_lints",
|
||||
"flutter_test",
|
||||
"integration_test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "flutter_treezor_entrust_sdk_bridge",
|
||||
"version": "1.0.2",
|
||||
"dependencies": [
|
||||
"flutter",
|
||||
"plugin_platform_interface"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "flutter_lints",
|
||||
"version": "4.0.0",
|
||||
"dependencies": [
|
||||
"lints"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "flutter_test",
|
||||
"version": "0.0.0",
|
||||
"dependencies": [
|
||||
"clock",
|
||||
"collection",
|
||||
"fake_async",
|
||||
"flutter",
|
||||
"leak_tracker_flutter_testing",
|
||||
"matcher",
|
||||
"meta",
|
||||
"path",
|
||||
"stack_trace",
|
||||
"stream_channel",
|
||||
"test_api",
|
||||
"vector_math"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "integration_test",
|
||||
"version": "0.0.0",
|
||||
"dependencies": [
|
||||
"flutter",
|
||||
"flutter_driver",
|
||||
"flutter_test",
|
||||
"path",
|
||||
"vm_service"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "cupertino_icons",
|
||||
"version": "1.0.8",
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"name": "flutter",
|
||||
"version": "0.0.0",
|
||||
"dependencies": [
|
||||
"characters",
|
||||
"collection",
|
||||
"material_color_utilities",
|
||||
"meta",
|
||||
"sky_engine",
|
||||
"vector_math"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "dio",
|
||||
"version": "5.7.0",
|
||||
"dependencies": [
|
||||
"async",
|
||||
"dio_web_adapter",
|
||||
"http_parser",
|
||||
"meta",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "crypto",
|
||||
"version": "3.0.6",
|
||||
"dependencies": [
|
||||
"typed_data"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "plugin_platform_interface",
|
||||
"version": "2.1.8",
|
||||
"dependencies": [
|
||||
"meta"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "lints",
|
||||
"version": "4.0.0",
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"name": "stream_channel",
|
||||
"version": "2.1.4",
|
||||
"dependencies": [
|
||||
"async"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "meta",
|
||||
"version": "1.16.0",
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"name": "collection",
|
||||
"version": "1.19.1",
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"name": "leak_tracker_flutter_testing",
|
||||
"version": "3.0.10",
|
||||
"dependencies": [
|
||||
"flutter",
|
||||
"leak_tracker",
|
||||
"leak_tracker_testing",
|
||||
"matcher",
|
||||
"meta"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "vector_math",
|
||||
"version": "2.2.0",
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"name": "stack_trace",
|
||||
"version": "1.12.1",
|
||||
"dependencies": [
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "clock",
|
||||
"version": "1.1.2",
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"name": "fake_async",
|
||||
"version": "1.3.3",
|
||||
"dependencies": [
|
||||
"clock",
|
||||
"collection"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
"version": "1.9.1",
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"name": "matcher",
|
||||
"version": "0.12.17",
|
||||
"dependencies": [
|
||||
"async",
|
||||
"meta",
|
||||
"stack_trace",
|
||||
"term_glyph",
|
||||
"test_api"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "test_api",
|
||||
"version": "0.7.6",
|
||||
"dependencies": [
|
||||
"async",
|
||||
"boolean_selector",
|
||||
"collection",
|
||||
"meta",
|
||||
"source_span",
|
||||
"stack_trace",
|
||||
"stream_channel",
|
||||
"string_scanner",
|
||||
"term_glyph"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "vm_service",
|
||||
"version": "14.3.0",
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"name": "flutter_driver",
|
||||
"version": "0.0.0",
|
||||
"dependencies": [
|
||||
"file",
|
||||
"flutter",
|
||||
"flutter_test",
|
||||
"fuchsia_remote_debug_protocol",
|
||||
"matcher",
|
||||
"meta",
|
||||
"path",
|
||||
"vm_service",
|
||||
"webdriver"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "sky_engine",
|
||||
"version": "0.0.0",
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"name": "material_color_utilities",
|
||||
"version": "0.11.1",
|
||||
"dependencies": [
|
||||
"collection"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "characters",
|
||||
"version": "1.4.0",
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"name": "dio_web_adapter",
|
||||
"version": "2.0.0",
|
||||
"dependencies": [
|
||||
"dio",
|
||||
"http_parser",
|
||||
"meta",
|
||||
"web"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "http_parser",
|
||||
"version": "4.0.2",
|
||||
"dependencies": [
|
||||
"collection",
|
||||
"source_span",
|
||||
"string_scanner",
|
||||
"typed_data"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "async",
|
||||
"version": "2.11.0",
|
||||
"dependencies": [
|
||||
"collection",
|
||||
"meta"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "typed_data",
|
||||
"version": "1.4.0",
|
||||
"dependencies": [
|
||||
"collection"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "leak_tracker_testing",
|
||||
"version": "3.0.2",
|
||||
"dependencies": [
|
||||
"leak_tracker",
|
||||
"matcher",
|
||||
"meta"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "leak_tracker",
|
||||
"version": "11.0.2",
|
||||
"dependencies": [
|
||||
"clock",
|
||||
"collection",
|
||||
"meta",
|
||||
"path",
|
||||
"vm_service"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "term_glyph",
|
||||
"version": "1.2.1",
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"name": "string_scanner",
|
||||
"version": "1.3.0",
|
||||
"dependencies": [
|
||||
"source_span"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "source_span",
|
||||
"version": "1.10.0",
|
||||
"dependencies": [
|
||||
"collection",
|
||||
"path",
|
||||
"term_glyph"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "boolean_selector",
|
||||
"version": "2.1.1",
|
||||
"dependencies": [
|
||||
"source_span",
|
||||
"string_scanner"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "webdriver",
|
||||
"version": "3.0.4",
|
||||
"dependencies": [
|
||||
"matcher",
|
||||
"path",
|
||||
"stack_trace",
|
||||
"sync_http"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "fuchsia_remote_debug_protocol",
|
||||
"version": "0.0.0",
|
||||
"dependencies": [
|
||||
"meta",
|
||||
"process",
|
||||
"vm_service"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "file",
|
||||
"version": "7.0.0",
|
||||
"dependencies": [
|
||||
"meta",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "web",
|
||||
"version": "1.1.0",
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"name": "sync_http",
|
||||
"version": "0.3.1",
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"name": "process",
|
||||
"version": "5.0.2",
|
||||
"dependencies": [
|
||||
"file",
|
||||
"path",
|
||||
"platform"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "platform",
|
||||
"version": "3.1.5",
|
||||
"dependencies": []
|
||||
}
|
||||
],
|
||||
"configVersion": 1
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
3.35.7
|
||||
@@ -0,0 +1 @@
|
||||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_treezor_entrust_sdk_bridge","path":"/Users/juliandalcalaf/Desktop/sf-app-platform/packages/flutter_treezor_entrust_sdk_bridge/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"integration_test","path":"/Users/juliandalcalaf/Development/flutter/packages/integration_test/","native_build":true,"dependencies":[],"dev_dependency":true}],"android":[{"name":"flutter_treezor_entrust_sdk_bridge","path":"/Users/juliandalcalaf/Desktop/sf-app-platform/packages/flutter_treezor_entrust_sdk_bridge/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"integration_test","path":"/Users/juliandalcalaf/Development/flutter/packages/integration_test/","native_build":true,"dependencies":[],"dev_dependency":true}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_treezor_entrust_sdk_bridge","dependencies":[]},{"name":"integration_test","dependencies":[]}],"date_created":"2026-01-21 11:38:45.748694","version":"3.35.7","swift_package_manager_enabled":{"ios":false,"macos":false}}
|
||||
@@ -0,0 +1,16 @@
|
||||
# flutter_treezor_entrust_sdk_bridge_example
|
||||
|
||||
Demonstrates how to use the flutter_treezor_entrust_sdk_bridge plugin.
|
||||
|
||||
## Getting Started
|
||||
|
||||
This project is a starting point for a Flutter application.
|
||||
|
||||
A few resources to get you started if this is your first Flutter project:
|
||||
|
||||
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
|
||||
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
|
||||
|
||||
For help getting started with Flutter development, view the
|
||||
[online documentation](https://docs.flutter.dev/), which offers tutorials,
|
||||
samples, guidance on mobile development, and a full API reference.
|
||||
@@ -0,0 +1,28 @@
|
||||
# This file configures the analyzer, which statically analyzes Dart code to
|
||||
# check for errors, warnings, and lints.
|
||||
#
|
||||
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
|
||||
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
|
||||
# invoked from the command line by running `flutter analyze`.
|
||||
|
||||
# The following line activates a set of recommended lints for Flutter apps,
|
||||
# packages, and plugins designed to encourage good coding practices.
|
||||
include: package:flutter_lints/flutter.yaml
|
||||
|
||||
linter:
|
||||
# The lint rules applied to this project can be customized in the
|
||||
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
|
||||
# included above or to enable additional rules. A list of all available lints
|
||||
# and their documentation is published at https://dart.dev/lints.
|
||||
#
|
||||
# Instead of disabling a lint rule for the entire project in the
|
||||
# section below, it can also be suppressed for a single line of code
|
||||
# or a specific dart file by using the `// ignore: name_of_lint` and
|
||||
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
|
||||
# producing the lint.
|
||||
rules:
|
||||
# avoid_print: false # Uncomment to disable the `avoid_print` rule
|
||||
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
|
||||
|
||||
# Additional information about this file can be found at
|
||||
# https://dart.dev/guides/language/analysis-options
|
||||
BIN
packages/flutter_treezor_entrust_sdk_bridge/example/android/.DS_Store
vendored
Normal file
BIN
packages/flutter_treezor_entrust_sdk_bridge/example/android/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -0,0 +1,50 @@
|
||||
plugins {
|
||||
id "com.android.application"
|
||||
id "kotlin-android"
|
||||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||||
id "dev.flutter.flutter-gradle-plugin"
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.treezor.flutter_treezor_entrust_sdk_bridge_example"
|
||||
compileSdk = flutter.compileSdkVersion
|
||||
ndkVersion = flutter.ndkVersion
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId = "com.treezor.flutter_treezor_entrust_sdk_bridge_example"
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
||||
minSdk = flutter.minSdkVersion
|
||||
targetSdk = flutter.targetSdkVersion
|
||||
versionCode = flutter.versionCode
|
||||
versionName = flutter.versionName
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig = signingConfigs.debug
|
||||
}
|
||||
}
|
||||
packagingOptions {
|
||||
jniLibs {
|
||||
keepDebugSymbols += "*/*/libscm.so"
|
||||
useLegacyPackaging = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
source = "../.."
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
||||
@@ -0,0 +1,57 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
|
||||
<application
|
||||
android:label="flutter_treezor_entrust_sdk_bridge_example"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop"
|
||||
android:taskAffinity=""
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
to determine the Window background behind the Flutter UI. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme"
|
||||
/>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
|
||||
<meta-data
|
||||
android:name="fr.antelop.application_id"
|
||||
android:value="\4713640103500149457" />
|
||||
|
||||
<meta-data
|
||||
android:name="fr.antelop.issuer_id"
|
||||
android:value="treezor" />
|
||||
</application>
|
||||
<!-- Required to query activities that can process text, see:
|
||||
https://developer.android.com/training/package-visibility and
|
||||
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
|
||||
|
||||
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
|
||||
<queries>
|
||||
<intent>
|
||||
<action android:name="android.intent.action.PROCESS_TEXT"/>
|
||||
<data android:mimeType="text/plain"/>
|
||||
</intent>
|
||||
</queries>
|
||||
</manifest>
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.treezor.flutter_treezor_entrust_sdk_bridge_example;
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity;
|
||||
|
||||
public class MainActivity extends FlutterActivity {
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package io.flutter.plugins;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
import androidx.annotation.NonNull;
|
||||
import io.flutter.Log;
|
||||
|
||||
import io.flutter.embedding.engine.FlutterEngine;
|
||||
|
||||
/**
|
||||
* Generated file. Do not edit.
|
||||
* This file is generated by the Flutter tool based on the
|
||||
* plugins that support the Android platform.
|
||||
*/
|
||||
@Keep
|
||||
public final class GeneratedPluginRegistrant {
|
||||
private static final String TAG = "GeneratedPluginRegistrant";
|
||||
public static void registerWith(@NonNull FlutterEngine flutterEngine) {
|
||||
try {
|
||||
flutterEngine.getPlugins().add(new com.treezor.flutter_treezor_entrust_sdk_bridge.FlutterTreezorEntrustSdkBridgePlugin());
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Error registering plugin flutter_treezor_entrust_sdk_bridge, com.treezor.flutter_treezor_entrust_sdk_bridge.FlutterTreezorEntrustSdkBridgePlugin", e);
|
||||
}
|
||||
try {
|
||||
flutterEngine.getPlugins().add(new dev.flutter.plugins.integration_test.IntegrationTestPlugin());
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Error registering plugin integration_test, dev.flutter.plugins.integration_test.IntegrationTestPlugin", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="?android:colorBackground" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@android:color/white" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 544 B |
Binary file not shown.
|
After Width: | Height: | Size: 442 B |
Binary file not shown.
|
After Width: | Height: | Size: 721 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -0,0 +1,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
||||
@@ -0,0 +1,18 @@
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.buildDir = "../build"
|
||||
subprojects {
|
||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||
}
|
||||
subprojects {
|
||||
project.evaluationDependsOn(":app")
|
||||
}
|
||||
|
||||
tasks.register("clean", Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="android" name="Android">
|
||||
<configuration>
|
||||
<option name="ALLOW_USER_CONFIGURATION" value="false" />
|
||||
<option name="GEN_FOLDER_RELATIVE_PATH_APT" value="/gen" />
|
||||
<option name="GEN_FOLDER_RELATIVE_PATH_AIDL" value="/gen" />
|
||||
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/app/src/main/AndroidManifest.xml" />
|
||||
<option name="RES_FOLDER_RELATIVE_PATH" value="/app/src/main/res" />
|
||||
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/app/src/main/assets" />
|
||||
<option name="LIBS_FOLDER_RELATIVE_PATH" value="/app/src/main/libs" />
|
||||
<option name="PROGUARD_LOGS_FOLDER_RELATIVE_PATH" value="/app/src/main/proguard_logs" />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/app/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Android API 29 Platform" jdkType="Android SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Flutter for Android" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -0,0 +1,3 @@
|
||||
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
BIN
packages/flutter_treezor_entrust_sdk_bridge/example/android/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
packages/flutter_treezor_entrust_sdk_bridge/example/android/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
|
||||
160
packages/flutter_treezor_entrust_sdk_bridge/example/android/gradlew
vendored
Executable file
160
packages/flutter_treezor_entrust_sdk_bridge/example/android/gradlew
vendored
Executable file
@@ -0,0 +1,160 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn ( ) {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die ( ) {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
esac
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||
function splitJvmOpts() {
|
||||
JVM_OPTS=("$@")
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
90
packages/flutter_treezor_entrust_sdk_bridge/example/android/gradlew.bat
vendored
Normal file
90
packages/flutter_treezor_entrust_sdk_bridge/example/android/gradlew.bat
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@@ -0,0 +1,3 @@
|
||||
sdk.dir=/Users/juliandalcalaf/Library/Android/sdk
|
||||
flutter.sdk=/Users/juliandalcalaf/Development/flutter
|
||||
flutter.buildMode=debug
|
||||
@@ -0,0 +1,25 @@
|
||||
pluginManagement {
|
||||
def flutterSdkPath = {
|
||||
def properties = new Properties()
|
||||
file("local.properties").withInputStream { properties.load(it) }
|
||||
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
||||
return flutterSdkPath
|
||||
}()
|
||||
|
||||
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||
id "com.android.application" version "8.1.0" apply false
|
||||
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
|
||||
}
|
||||
|
||||
include ":app"
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.idea" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.pub" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/ios/.symlinks/plugins/integration_test/.dart_tool" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/ios/.symlinks/plugins/integration_test/.pub" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/ios/.symlinks/plugins/integration_test/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/ios/.symlinks/plugins/integration_test/example/.dart_tool" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/ios/.symlinks/plugins/integration_test/example/.pub" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/ios/.symlinks/plugins/integration_test/example/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/ios/.symlinks/plugins/integration_test/integration_test_macos/.dart_tool" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/ios/.symlinks/plugins/integration_test/integration_test_macos/.pub" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/ios/.symlinks/plugins/integration_test/integration_test_macos/build" />
|
||||
</content>
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Dart SDK" level="project" />
|
||||
<orderEntry type="library" name="Flutter Plugins" level="project" />
|
||||
<orderEntry type="library" name="Dart Packages" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -0,0 +1,23 @@
|
||||
// This is a basic Flutter integration test.
|
||||
//
|
||||
// Since integration tests run in a full Flutter application, they can interact
|
||||
// with the host side of a plugin implementation, unlike Dart unit tests.
|
||||
//
|
||||
// For more information about Flutter integration tests, please see
|
||||
// https://flutter.dev/to/integration-testing
|
||||
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:integration_test/integration_test.dart';
|
||||
|
||||
import 'package:flutter_treezor_entrust_sdk_bridge/flutter_treezor_entrust_sdk_bridge.dart';
|
||||
|
||||
void main() {
|
||||
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
testWidgets('getPlatformVersion test', (WidgetTester tester) async {
|
||||
final FlutterTreezorEntrustSdkBridge plugin = FlutterTreezorEntrustSdkBridge();
|
||||
// The version string depends on the host platform running the test, so
|
||||
// just assert that some non-empty string is returned.
|
||||
});
|
||||
}
|
||||
BIN
packages/flutter_treezor_entrust_sdk_bridge/example/ios/.DS_Store
vendored
Normal file
BIN
packages/flutter_treezor_entrust_sdk_bridge/example/ios/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>App</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.flutter.flutter.app</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>App</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>12.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,2 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
@@ -0,0 +1,14 @@
|
||||
// This is a generated file; do not edit or check into version control.
|
||||
FLUTTER_ROOT=/Users/juliandalcalaf/Development/flutter
|
||||
FLUTTER_APPLICATION_PATH=/Users/juliandalcalaf/Downloads/flutter_treezor_entrust_sdk_bridge/example
|
||||
COCOAPODS_PARALLEL_CODE_SIGN=true
|
||||
FLUTTER_TARGET=lib/main.dart
|
||||
FLUTTER_BUILD_DIR=build
|
||||
FLUTTER_BUILD_NAME=1.0.0
|
||||
FLUTTER_BUILD_NUMBER=1
|
||||
EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386
|
||||
EXCLUDED_ARCHS[sdk=iphoneos*]=armv7
|
||||
DART_OBFUSCATION=false
|
||||
TRACK_WIDGET_CREATION=true
|
||||
TREE_SHAKE_ICONS=false
|
||||
PACKAGE_CONFIG=.dart_tool/package_config.json
|
||||
@@ -0,0 +1,2 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
@@ -0,0 +1,32 @@
|
||||
#
|
||||
# Generated file, do not edit.
|
||||
#
|
||||
|
||||
import lldb
|
||||
|
||||
def handle_new_rx_page(frame: lldb.SBFrame, bp_loc, extra_args, intern_dict):
|
||||
"""Intercept NOTIFY_DEBUGGER_ABOUT_RX_PAGES and touch the pages."""
|
||||
base = frame.register["x0"].GetValueAsAddress()
|
||||
page_len = frame.register["x1"].GetValueAsUnsigned()
|
||||
|
||||
# Note: NOTIFY_DEBUGGER_ABOUT_RX_PAGES will check contents of the
|
||||
# first page to see if handled it correctly. This makes diagnosing
|
||||
# misconfiguration (e.g. missing breakpoint) easier.
|
||||
data = bytearray(page_len)
|
||||
data[0:8] = b'IHELPED!'
|
||||
|
||||
error = lldb.SBError()
|
||||
frame.GetThread().GetProcess().WriteMemory(base, data, error)
|
||||
if not error.Success():
|
||||
print(f'Failed to write into {base}[+{page_len}]', error)
|
||||
return
|
||||
|
||||
def __lldb_init_module(debugger: lldb.SBDebugger, _):
|
||||
target = debugger.GetDummyTarget()
|
||||
# Caveat: must use BreakpointCreateByRegEx here and not
|
||||
# BreakpointCreateByName. For some reasons callback function does not
|
||||
# get carried over from dummy target for the later.
|
||||
bp = target.BreakpointCreateByRegex("^NOTIFY_DEBUGGER_ABOUT_RX_PAGES$")
|
||||
bp.SetScriptCallbackFunction('{}.handle_new_rx_page'.format(__name__))
|
||||
bp.SetAutoContinue(True)
|
||||
print("-- LLDB integration loaded --")
|
||||
@@ -0,0 +1,5 @@
|
||||
#
|
||||
# Generated file, do not edit.
|
||||
#
|
||||
|
||||
command script import --relative-to-command-file flutter_lldb_helper.py
|
||||
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
# This is a generated file; do not edit or check into version control.
|
||||
export "FLUTTER_ROOT=/Users/juliandalcalaf/Development/flutter"
|
||||
export "FLUTTER_APPLICATION_PATH=/Users/juliandalcalaf/Downloads/flutter_treezor_entrust_sdk_bridge/example"
|
||||
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
|
||||
export "FLUTTER_TARGET=lib/main.dart"
|
||||
export "FLUTTER_BUILD_DIR=build"
|
||||
export "FLUTTER_BUILD_NAME=1.0.0"
|
||||
export "FLUTTER_BUILD_NUMBER=1"
|
||||
export "DART_OBFUSCATION=false"
|
||||
export "TRACK_WIDGET_CREATION=true"
|
||||
export "TREE_SHAKE_ICONS=false"
|
||||
export "PACKAGE_CONFIG=.dart_tool/package_config.json"
|
||||
@@ -0,0 +1,44 @@
|
||||
# Uncomment this line to define a global platform for your project
|
||||
# platform :ios, '12.0'
|
||||
|
||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||
|
||||
project 'Runner', {
|
||||
'Debug' => :debug,
|
||||
'Profile' => :release,
|
||||
'Release' => :release,
|
||||
}
|
||||
|
||||
def flutter_root
|
||||
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
|
||||
unless File.exist?(generated_xcode_build_settings_path)
|
||||
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
|
||||
end
|
||||
|
||||
File.foreach(generated_xcode_build_settings_path) do |line|
|
||||
matches = line.match(/FLUTTER_ROOT\=(.*)/)
|
||||
return matches[1].strip if matches
|
||||
end
|
||||
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
|
||||
end
|
||||
|
||||
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
|
||||
|
||||
flutter_ios_podfile_setup
|
||||
|
||||
target 'Runner' do
|
||||
use_frameworks!
|
||||
use_modular_headers!
|
||||
|
||||
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
|
||||
target 'RunnerTests' do
|
||||
inherit! :search_paths
|
||||
end
|
||||
end
|
||||
|
||||
post_install do |installer|
|
||||
installer.pods_project.targets.each do |target|
|
||||
flutter_additional_ios_build_settings(target)
|
||||
end
|
||||
end
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user