@animo-id/expo-mdoc-data-transfer 0.1.5 → 0.2.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MdocDataTransfer.podspec +14 -14
- package/android/build/.transforms/1b8378295914042bd56f454fccadf450/results.bin +1 -0
- package/android/build/.transforms/1b8378295914042bd56f454fccadf450/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/b1c7825c26ef74820bf1a2f9b0863b9c/results.bin +1 -0
- package/android/build/.transforms/b1c7825c26ef74820bf1a2f9b0863b9c/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/bd47d41628a1234539d52fed18dc00d8/results.bin +1 -0
- package/android/build/.transforms/bd47d41628a1234539d52fed18dc00d8/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/ca70f32e4c31dcc1e27ce5e573009a23/results.bin +1 -0
- package/android/build/.transforms/ca70f32e4c31dcc1e27ce5e573009a23/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/generated/source/buildConfig/debug/id/animo/mdoc/datatransfer/BuildConfig.java +10 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +7 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
- package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
- package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +3 -0
- package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/xml_nfc_engagement_apdu_service.xml.flat +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +2 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/merged.dir/values/values.xml +5 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
- package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/animo-id-expo-mdoc-data-transfer_debug.kotlin_module +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/id/animo/mdoc/datatransfer/BuildConfig.class +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +5 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +7 -0
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +7 -0
- package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
- package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
- package/android/build/intermediates/packaged_res/debug/packageDebugResources/values/values.xml +5 -0
- package/android/build/intermediates/packaged_res/debug/packageDebugResources/xml/nfc_engagement_apdu_service.xml +30 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +4 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +14 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/animo-id-expo-mdoc-data-transfer_debug.kotlin_module +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/TransferEvent$Connected.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/TransferEvent$Connecting.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/TransferEvent$Disconnected.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/TransferEvent$Error.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/TransferEvent$IntentToSend.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/TransferEvent$Listenable.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/TransferEvent$Listener.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/TransferEvent$QrEngagementReady.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/TransferEvent$Redirect.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/TransferEvent$RequestReceived.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/TransferEvent$ResponseSent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/TransferEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/TransferManager$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/TransferManager$DefaultImpls.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/TransferManager.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/TransferManagerImpl$Builder.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/TransferManagerImpl$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/TransferManagerImpl.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/engagement/BleRetrievalMethod.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/engagement/DeviceRetrievalMethod.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/engagement/NfcEngagementService$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/engagement/NfcEngagementService$deviceRetrievalHelperListener$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/engagement/NfcEngagementService$nfcEngagementListener$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/engagement/NfcEngagementService.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/engagement/RetrievalMethod.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/internal/DeviceRetrievalHelperExtKt.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/internal/DeviceRetrievalMethodExtKt.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/internal/EngagementToApp$presentationListener$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/internal/EngagementToApp.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/internal/ExtensionsKt.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/internal/QrEngagement$deviceRetrievalHelperListener$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/internal/QrEngagement$qrEngagementListener$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/eu/europa/ec/eudi/iso18013/transfer/internal/QrEngagement.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/id/animo/mdoc/datatransfer/MdocDataTransfer$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/id/animo/mdoc/datatransfer/MdocDataTransfer.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/id/animo/mdoc/datatransfer/MdocDataTransferEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/id/animo/mdoc/datatransfer/MdocDataTransferException$NotInitialized.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/id/animo/mdoc/datatransfer/MdocDataTransferException.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/id/animo/mdoc/datatransfer/MdocDataTransferManager.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/id/animo/mdoc/datatransfer/MdocDataTransferModule$definition$1$1$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/id/animo/mdoc/datatransfer/MdocDataTransferModule$definition$1$2$1$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/id/animo/mdoc/datatransfer/MdocDataTransferModule$definition$lambda$6$$inlined$AsyncFunction$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/id/animo/mdoc/datatransfer/MdocDataTransferModule$definition$lambda$6$$inlined$AsyncFunction$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/id/animo/mdoc/datatransfer/MdocDataTransferModule$definition$lambda$6$$inlined$AsyncFunction$3.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/id/animo/mdoc/datatransfer/MdocDataTransferModule$definition$lambda$6$$inlined$Function$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/id/animo/mdoc/datatransfer/MdocDataTransferModule$definition$lambda$6$$inlined$Function$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/id/animo/mdoc/datatransfer/MdocDataTransferModule$definition$lambda$6$$inlined$FunctionWithoutArgs$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/id/animo/mdoc/datatransfer/MdocDataTransferModule$definition$lambda$6$$inlined$FunctionWithoutArgs$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/id/animo/mdoc/datatransfer/MdocDataTransferModule$definition$lambda$6$$inlined$FunctionWithoutArgs$3.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/id/animo/mdoc/datatransfer/MdocDataTransferModule.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/id/animo/mdoc/datatransfer/NfcEngagementServiceImpl.class +0 -0
- package/android/build.gradle +17 -42
- package/android/src/main/java/eu/europa/ec/eudi/iso18013/transfer/TransferEvent.kt +39 -0
- package/android/src/main/java/eu/europa/ec/eudi/iso18013/transfer/TransferManager.kt +34 -0
- package/android/src/main/java/eu/europa/ec/eudi/iso18013/transfer/TransferManagerImpl.kt +258 -0
- package/android/src/main/java/eu/europa/ec/eudi/iso18013/transfer/engagement/BleRetrievalMethod.kt +23 -0
- package/android/src/main/java/eu/europa/ec/eudi/iso18013/transfer/engagement/DeviceRetrievalMethod.kt +19 -0
- package/android/src/main/java/eu/europa/ec/eudi/iso18013/transfer/engagement/NfcEngagementService.kt +198 -0
- package/android/src/main/java/eu/europa/ec/eudi/iso18013/transfer/engagement/RetrievalMethod.kt +19 -0
- package/android/src/main/java/eu/europa/ec/eudi/iso18013/transfer/internal/DeviceRetrievalHelperExt.kt +41 -0
- package/android/src/main/java/eu/europa/ec/eudi/iso18013/transfer/internal/DeviceRetrievalMethodExt.kt +55 -0
- package/android/src/main/java/eu/europa/ec/eudi/iso18013/transfer/internal/EngagementToApp.kt +97 -0
- package/android/src/main/java/eu/europa/ec/eudi/iso18013/transfer/internal/Extensions.kt +42 -0
- package/android/src/main/java/eu/europa/ec/eudi/iso18013/transfer/internal/QrEngagement.kt +141 -0
- package/android/src/main/java/id/animo/{mdocdatatransfer → mdoc/datatransfer}/MdocDataTransfer.kt +18 -11
- package/android/src/main/java/id/animo/{mdocdatatransfer → mdoc/datatransfer}/MdocDataTransferEvent.kt +2 -2
- package/android/src/main/java/id/animo/{mdocdatatransfer → mdoc/datatransfer}/MdocDataTransferException.kt +2 -2
- package/android/src/main/java/id/animo/{mdocdatatransfer → mdoc/datatransfer}/MdocDataTransferManager.kt +2 -16
- package/android/src/main/java/id/animo/{mdocdatatransfer → mdoc/datatransfer}/MdocDataTransferModule.kt +8 -9
- package/android/src/main/java/id/animo/{mdocdatatransfer → mdoc/datatransfer}/NfcEngagementServiceImpl.kt +2 -2
- package/android/src/main/res/values/strings.xml +20 -0
- package/android/src/main/res/xml/nfc_engagement_apdu_service.xml +30 -0
- package/build/MdocDataTransfer.d.ts +8 -4
- package/build/MdocDataTransfer.d.ts.map +1 -1
- package/build/MdocDataTransfer.js +26 -18
- package/build/MdocDataTransfer.js.map +1 -1
- package/build/MdocDataTransferError.d.ts +3 -0
- package/build/MdocDataTransferError.d.ts.map +1 -0
- package/build/MdocDataTransferError.js +3 -0
- package/build/MdocDataTransferError.js.map +1 -0
- package/build/MdocDataTransferEvent.d.ts +9 -5
- package/build/MdocDataTransferEvent.d.ts.map +1 -1
- package/build/MdocDataTransferEvent.js +1 -0
- package/build/MdocDataTransferEvent.js.map +1 -1
- package/build/NativeMdocDataTransfer.d.ts +16 -2
- package/build/NativeMdocDataTransfer.d.ts.map +1 -1
- package/build/NativeMdocDataTransfer.js +1 -1
- package/build/NativeMdocDataTransfer.js.map +1 -1
- package/build/specs/NativeMdocDataTransfer.d.ts +6 -4
- package/build/specs/NativeMdocDataTransfer.d.ts.map +1 -1
- package/build/specs/NativeMdocDataTransfer.js +2 -1
- package/build/specs/NativeMdocDataTransfer.js.map +1 -1
- package/expo-module.config.json +7 -5
- package/ios/MdocDataTransfer-Bridging-Header.h +1 -2
- package/ios/MdocDataTransfer.swift +186 -221
- package/ios/MdocDataTransferError.swift +36 -36
- package/ios/MdocDataTransferEvent.swift +12 -0
- package/ios/MdocDataTransferModule.swift +39 -0
- package/ios/eudi/BLETransfer/MdocGATTServer.swift +315 -0
- package/ios/eudi/BLETransfer/MdocOfflineDelegate.swift +15 -0
- package/ios/eudi/BLETransfer/ServiceCharacteristics.swift +48 -0
- package/ios/eudi/Enumerations.swift +67 -0
- package/ios/eudi/MdocDataTransfer18013.swift +21 -0
- package/ios/eudi/MdocHelpers.swift +94 -0
- package/package.json +14 -16
- package/plugin/build/withAndroid.js +16 -3
- package/plugin/src/index.ts +16 -0
- package/plugin/src/withAndroid.ts +199 -0
- package/plugin/src/withIos.ts +48 -0
- package/plugin/tsconfig.json +9 -0
- package/plugin/tsconfig.tsbuildinfo +1 -0
- package/src/MdocDataTransfer.ts +89 -0
- package/src/MdocDataTransferError.ts +1 -0
- package/src/MdocDataTransferEvent.ts +16 -0
- package/src/NativeMdocDataTransfer.ts +18 -0
- package/src/index.ts +2 -0
- package/src/useMdocDataTransferShutdownOnUnmount.ts +9 -0
- package/tsconfig.json +9 -0
- package/README.md +0 -41
- package/ios/MdocDataTransfer.mm +0 -23
- package/src/specs/NativeMdocDataTransfer.ts +0 -13
package/android/src/main/java/eu/europa/ec/eudi/iso18013/transfer/engagement/NfcEngagementService.kt
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2024 European Commission
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
package eu.europa.ec.eudi.iso18013.transfer.engagement
|
|
18
|
+
|
|
19
|
+
import android.content.ComponentName
|
|
20
|
+
import android.nfc.NfcAdapter
|
|
21
|
+
import android.nfc.cardemulation.CardEmulation
|
|
22
|
+
import android.nfc.cardemulation.HostApduService
|
|
23
|
+
import android.os.Bundle
|
|
24
|
+
import android.os.Handler
|
|
25
|
+
import android.os.Looper
|
|
26
|
+
import android.util.Log
|
|
27
|
+
import androidx.activity.ComponentActivity
|
|
28
|
+
import com.android.identity.android.mdoc.deviceretrieval.DeviceRetrievalHelper
|
|
29
|
+
import com.android.identity.android.mdoc.engagement.NfcEngagementHelper
|
|
30
|
+
import com.android.identity.android.mdoc.transport.DataTransport
|
|
31
|
+
import eu.europa.ec.eudi.iso18013.transfer.TransferManager
|
|
32
|
+
import eu.europa.ec.eudi.iso18013.transfer.internal.TAG
|
|
33
|
+
import eu.europa.ec.eudi.iso18013.transfer.internal.connectionMethods
|
|
34
|
+
import eu.europa.ec.eudi.iso18013.transfer.internal.mainExecutor
|
|
35
|
+
import eu.europa.ec.eudi.iso18013.transfer.internal.transportOptions
|
|
36
|
+
import org.multipaz.crypto.Crypto
|
|
37
|
+
import org.multipaz.crypto.EcCurve
|
|
38
|
+
import org.multipaz.crypto.EcPublicKey
|
|
39
|
+
|
|
40
|
+
abstract class NfcEngagementService : HostApduService() {
|
|
41
|
+
abstract val transferManager: TransferManager
|
|
42
|
+
|
|
43
|
+
internal lateinit var retrievalMethods: List<DeviceRetrievalMethod>
|
|
44
|
+
internal lateinit var onConnecting: () -> Unit
|
|
45
|
+
internal lateinit var onDeviceRetrievalHelperReady: (deviceRetrievalHelper: DeviceRetrievalHelper) -> Unit
|
|
46
|
+
internal lateinit var onNewDeviceRequest: (request: ByteArray) -> Unit
|
|
47
|
+
internal lateinit var onDisconnected: (transportSpecificTermination: Boolean) -> Unit
|
|
48
|
+
internal lateinit var onCommunicationError: (error: Throwable) -> Unit
|
|
49
|
+
|
|
50
|
+
private lateinit var nfcEngagement: NfcEngagementHelper
|
|
51
|
+
|
|
52
|
+
private var deviceRetrievalHelper: DeviceRetrievalHelper? = null
|
|
53
|
+
|
|
54
|
+
private val eDevicePrivateKey by lazy {
|
|
55
|
+
Crypto.createEcPrivateKey(EcCurve.P256)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
companion object {
|
|
59
|
+
@JvmStatic
|
|
60
|
+
fun enable(
|
|
61
|
+
activity: ComponentActivity,
|
|
62
|
+
preferredNfcEngSerCls: Class<out NfcEngagementService>? = null,
|
|
63
|
+
) {
|
|
64
|
+
// set preferred Nfc Engagement Service
|
|
65
|
+
preferredNfcEngSerCls?.let {
|
|
66
|
+
setAsPreferredNfcEngagementService(activity, preferredNfcEngSerCls)
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@JvmStatic
|
|
71
|
+
fun disable(activity: ComponentActivity) {
|
|
72
|
+
// unset preferred Nfc Engagement Service
|
|
73
|
+
unsetAsPreferredNfcEngagementService(activity)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@JvmStatic
|
|
77
|
+
private fun setAsPreferredNfcEngagementService(
|
|
78
|
+
activity: ComponentActivity,
|
|
79
|
+
nfcEngagementServiceClass: Class<out NfcEngagementService>,
|
|
80
|
+
) {
|
|
81
|
+
val cardEmulation = CardEmulation.getInstance(NfcAdapter.getDefaultAdapter(activity))
|
|
82
|
+
val allowsForeground =
|
|
83
|
+
cardEmulation.categoryAllowsForegroundPreference(CardEmulation.CATEGORY_OTHER)
|
|
84
|
+
if (allowsForeground) {
|
|
85
|
+
val hceComponentName = ComponentName(
|
|
86
|
+
activity,
|
|
87
|
+
nfcEngagementServiceClass,
|
|
88
|
+
)
|
|
89
|
+
cardEmulation.setPreferredService(activity, hceComponentName)
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@JvmStatic
|
|
94
|
+
private fun unsetAsPreferredNfcEngagementService(activity: ComponentActivity) {
|
|
95
|
+
val cardEmulation = CardEmulation.getInstance(NfcAdapter.getDefaultAdapter(activity))
|
|
96
|
+
val allowsForeground =
|
|
97
|
+
cardEmulation.categoryAllowsForegroundPreference(CardEmulation.CATEGORY_OTHER)
|
|
98
|
+
if (allowsForeground) {
|
|
99
|
+
cardEmulation.unsetPreferredService(activity)
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
private val nfcEngagementListener = object : NfcEngagementHelper.Listener {
|
|
105
|
+
override fun onTwoWayEngagementDetected() {
|
|
106
|
+
Log.d(this.TAG, "Engagement Listener: Two Way Engagement Detected.")
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
override fun onDeviceConnecting() {
|
|
110
|
+
Log.d(this.TAG, "NFC Engagement: Device Connecting")
|
|
111
|
+
onConnecting()
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
override fun onDeviceConnected(transport: DataTransport) {
|
|
115
|
+
if (deviceRetrievalHelper != null) {
|
|
116
|
+
Log.d(
|
|
117
|
+
TAG,
|
|
118
|
+
"Engagement Listener: Device Connected -> ignored due to active presentation",
|
|
119
|
+
)
|
|
120
|
+
return
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
Log.d(this.TAG, "onDeviceConnected via NFC: nfcEngagement=$nfcEngagement")
|
|
124
|
+
|
|
125
|
+
val builder = DeviceRetrievalHelper.Builder(
|
|
126
|
+
applicationContext,
|
|
127
|
+
deviceRetrievalHelperListener,
|
|
128
|
+
application.mainExecutor(),
|
|
129
|
+
eDevicePrivateKey,
|
|
130
|
+
)
|
|
131
|
+
builder.useForwardEngagement(
|
|
132
|
+
transport,
|
|
133
|
+
nfcEngagement.deviceEngagement,
|
|
134
|
+
nfcEngagement.handover,
|
|
135
|
+
)
|
|
136
|
+
deviceRetrievalHelper = builder.build()
|
|
137
|
+
nfcEngagement.close()
|
|
138
|
+
onDeviceRetrievalHelperReady(requireNotNull(deviceRetrievalHelper))
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
override fun onError(error: Throwable) {
|
|
142
|
+
Log.d(this.TAG, "NFC onError: ${error.message}")
|
|
143
|
+
onCommunicationError(error)
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
override fun onHandoverSelectMessageSent() {
|
|
147
|
+
Log.d(this.TAG, "NFC Engagement: Handover Select Message Sent")
|
|
148
|
+
Log.d(this.TAG, "NFC Engagement: NegotiatedHandover not supported yet")
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
private val deviceRetrievalHelperListener = object : DeviceRetrievalHelper.Listener {
|
|
153
|
+
override fun onEReaderKeyReceived(eReaderKey: EcPublicKey) {
|
|
154
|
+
Log.d(this.TAG, "DeviceRetrievalHelper Listener (NFC): onEReaderKeyReceived")
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
override fun onDeviceRequest(deviceRequestBytes: ByteArray) {
|
|
158
|
+
Log.d(this.TAG, "DeviceRetrievalHelper Listener (NFC): onDeviceRequest")
|
|
159
|
+
onNewDeviceRequest(deviceRequestBytes)
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
override fun onDeviceDisconnected(transportSpecificTermination: Boolean) {
|
|
163
|
+
Log.d(this.TAG, "DeviceRetrievalHelper Listener (NFC): onDeviceDisconnected")
|
|
164
|
+
onDisconnected(transportSpecificTermination)
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
override fun onError(error: Throwable) {
|
|
168
|
+
Log.d(this.TAG, "DeviceRetrievalHelper Listener (NFC): onError -> ${error.message}")
|
|
169
|
+
onCommunicationError(error)
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
override fun onCreate() {
|
|
174
|
+
super.onCreate()
|
|
175
|
+
transferManager.setupNfcEngagement(this)
|
|
176
|
+
nfcEngagement = NfcEngagementHelper.Builder(
|
|
177
|
+
applicationContext,
|
|
178
|
+
eDevicePrivateKey.publicKey,
|
|
179
|
+
retrievalMethods.transportOptions,
|
|
180
|
+
nfcEngagementListener,
|
|
181
|
+
applicationContext.mainExecutor(),
|
|
182
|
+
).apply {
|
|
183
|
+
useStaticHandover(retrievalMethods.connectionMethods)
|
|
184
|
+
}.build()
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
override fun processCommandApdu(commandApdu: ByteArray, extras: Bundle?): ByteArray {
|
|
188
|
+
return nfcEngagement.nfcProcessCommandApdu(commandApdu)
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
override fun onDeactivated(reason: Int) {
|
|
192
|
+
nfcEngagement.nfcOnDeactivated(reason)
|
|
193
|
+
val timeoutSeconds = 15
|
|
194
|
+
Handler(Looper.getMainLooper()).postDelayed({
|
|
195
|
+
nfcEngagement.close()
|
|
196
|
+
}, timeoutSeconds * 1000L)
|
|
197
|
+
}
|
|
198
|
+
}
|
package/android/src/main/java/eu/europa/ec/eudi/iso18013/transfer/engagement/RetrievalMethod.kt
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024 European Commission
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
package eu.europa.ec.eudi.iso18013.transfer.engagement
|
|
18
|
+
|
|
19
|
+
interface RetrievalMethod
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2024 European Commission
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
package eu.europa.ec.eudi.iso18013.transfer.internal
|
|
17
|
+
|
|
18
|
+
import android.util.Log
|
|
19
|
+
import com.android.identity.android.mdoc.deviceretrieval.DeviceRetrievalHelper
|
|
20
|
+
import org.multipaz.util.Constants
|
|
21
|
+
|
|
22
|
+
internal fun DeviceRetrievalHelper.stopPresentation(
|
|
23
|
+
sendSessionTerminationMessage: Boolean,
|
|
24
|
+
useTransportSpecificSessionTermination: Boolean,
|
|
25
|
+
) {
|
|
26
|
+
try {
|
|
27
|
+
if (sendSessionTerminationMessage) {
|
|
28
|
+
if (useTransportSpecificSessionTermination) {
|
|
29
|
+
sendTransportSpecificTermination()
|
|
30
|
+
} else {
|
|
31
|
+
sendDeviceResponse(
|
|
32
|
+
null,
|
|
33
|
+
Constants.SESSION_DATA_STATUS_SESSION_TERMINATION,
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
disconnect()
|
|
38
|
+
} catch (e: Exception) {
|
|
39
|
+
Log.e(this.TAG, "Error ignored.", e)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2024 European Commission
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
package eu.europa.ec.eudi.iso18013.transfer.internal
|
|
17
|
+
|
|
18
|
+
import com.android.identity.android.mdoc.transport.DataTransportOptions
|
|
19
|
+
import eu.europa.ec.eudi.iso18013.transfer.engagement.BleRetrievalMethod
|
|
20
|
+
import eu.europa.ec.eudi.iso18013.transfer.engagement.DeviceRetrievalMethod
|
|
21
|
+
import org.multipaz.mdoc.connectionmethod.MdocConnectionMethod
|
|
22
|
+
import org.multipaz.mdoc.connectionmethod.MdocConnectionMethodBle
|
|
23
|
+
import org.multipaz.util.UUID
|
|
24
|
+
|
|
25
|
+
internal val DeviceRetrievalMethod.connectionMethod: List<MdocConnectionMethod>
|
|
26
|
+
get() = when (this) {
|
|
27
|
+
is BleRetrievalMethod -> {
|
|
28
|
+
if (!peripheralServerMode && !centralClientMode) emptyList()
|
|
29
|
+
else {
|
|
30
|
+
mutableListOf<MdocConnectionMethod>().apply {
|
|
31
|
+
val randomUUID = UUID.randomUUID()
|
|
32
|
+
add(
|
|
33
|
+
MdocConnectionMethodBle(
|
|
34
|
+
peripheralServerMode,
|
|
35
|
+
centralClientMode,
|
|
36
|
+
if (peripheralServerMode) randomUUID else null,
|
|
37
|
+
if (centralClientMode) randomUUID else null
|
|
38
|
+
)
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
else -> throw IllegalArgumentException("Unsupported connection method")
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
internal val List<DeviceRetrievalMethod>.transportOptions: DataTransportOptions
|
|
48
|
+
get() = DataTransportOptions.Builder().apply {
|
|
49
|
+
for (m in this@transportOptions) {
|
|
50
|
+
if (m is BleRetrievalMethod) setBleClearCache(m.clearBleCache)
|
|
51
|
+
}
|
|
52
|
+
}.build()
|
|
53
|
+
|
|
54
|
+
internal val List<DeviceRetrievalMethod>.connectionMethods: List<MdocConnectionMethod>
|
|
55
|
+
get() = flatMap { it.connectionMethod }
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2024 European Commission
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
package eu.europa.ec.eudi.iso18013.transfer.internal
|
|
17
|
+
|
|
18
|
+
import android.content.Context
|
|
19
|
+
import android.util.Base64
|
|
20
|
+
import android.util.Log
|
|
21
|
+
import androidx.core.net.toUri
|
|
22
|
+
import com.android.identity.android.mdoc.deviceretrieval.DeviceRetrievalHelper
|
|
23
|
+
import com.android.identity.android.mdoc.transport.DataTransport
|
|
24
|
+
import com.android.identity.android.mdoc.transport.DataTransportOptions
|
|
25
|
+
import org.multipaz.cbor.Cbor
|
|
26
|
+
import org.multipaz.crypto.Crypto
|
|
27
|
+
import org.multipaz.crypto.EcCurve
|
|
28
|
+
import org.multipaz.crypto.EcPublicKey
|
|
29
|
+
import org.multipaz.mdoc.engagement.DeviceEngagement
|
|
30
|
+
import org.multipaz.mdoc.origininfo.OriginInfo
|
|
31
|
+
|
|
32
|
+
internal class EngagementToApp(
|
|
33
|
+
private val context: Context,
|
|
34
|
+
private val dataTransportOptions: DataTransportOptions,
|
|
35
|
+
private val onPresentationReady: (deviceRetrievalHelper: DeviceRetrievalHelper) -> Unit,
|
|
36
|
+
private val onNewRequest: (request: ByteArray) -> Unit,
|
|
37
|
+
private val onDisconnected: () -> Unit,
|
|
38
|
+
private val onCommunicationError: (error: Throwable) -> Unit,
|
|
39
|
+
) {
|
|
40
|
+
|
|
41
|
+
@JvmSynthetic
|
|
42
|
+
internal val eDevicePrivateKey = Crypto.createEcPrivateKey(EcCurve.P256)
|
|
43
|
+
|
|
44
|
+
private val presentationListener = object : DeviceRetrievalHelper.Listener {
|
|
45
|
+
override fun onEReaderKeyReceived(eReaderKey: EcPublicKey) {
|
|
46
|
+
Log.d(TAG, "DeviceRetrievalHelper Listener (QR): OnEReaderKeyReceived")
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
override fun onDeviceRequest(deviceRequestBytes: ByteArray) {
|
|
50
|
+
onNewRequest(deviceRequestBytes)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
override fun onDeviceDisconnected(transportSpecificTermination: Boolean) {
|
|
54
|
+
onDisconnected()
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
override fun onError(error: Throwable) {
|
|
58
|
+
onCommunicationError(error)
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
fun configure(
|
|
63
|
+
reverseEngagementUri: String,
|
|
64
|
+
origins: List<OriginInfo>,
|
|
65
|
+
) {
|
|
66
|
+
val uri = reverseEngagementUri.toUri()
|
|
67
|
+
check(uri.scheme.equals("mdoc")) { "Only supports mdoc URIs" }
|
|
68
|
+
|
|
69
|
+
val encodedReaderEngagement = Base64.decode(
|
|
70
|
+
uri.encodedSchemeSpecificPart,
|
|
71
|
+
Base64.URL_SAFE or Base64.NO_PADDING,
|
|
72
|
+
)
|
|
73
|
+
val engagement = DeviceEngagement.fromDataItem(Cbor.decode(encodedReaderEngagement))
|
|
74
|
+
check(engagement.connectionMethods.isNotEmpty()) { "No connection methods in engagement" }
|
|
75
|
+
|
|
76
|
+
// For now, just pick the first transport
|
|
77
|
+
val connectionMethod = engagement.connectionMethods[0]
|
|
78
|
+
Log.d(this.TAG, "Using connection method $connectionMethod")
|
|
79
|
+
|
|
80
|
+
val transport = DataTransport.fromConnectionMethod(
|
|
81
|
+
context,
|
|
82
|
+
connectionMethod,
|
|
83
|
+
DataTransport.Role.MDOC,
|
|
84
|
+
dataTransportOptions,
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
val builder = DeviceRetrievalHelper.Builder(
|
|
88
|
+
context,
|
|
89
|
+
presentationListener,
|
|
90
|
+
context.mainExecutor(),
|
|
91
|
+
eDevicePrivateKey,
|
|
92
|
+
).useReverseEngagement(transport, encodedReaderEngagement, origins)
|
|
93
|
+
builder.build().apply {
|
|
94
|
+
onPresentationReady(this)
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2024 European Commission
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
package eu.europa.ec.eudi.iso18013.transfer.internal
|
|
17
|
+
|
|
18
|
+
import android.content.Context
|
|
19
|
+
import android.os.Build
|
|
20
|
+
import androidx.core.content.ContextCompat
|
|
21
|
+
import java.util.concurrent.Executor
|
|
22
|
+
|
|
23
|
+
internal val Any.TAG: String
|
|
24
|
+
get() {
|
|
25
|
+
if (this is String) return this
|
|
26
|
+
val fullClassName: String = this::class.qualifiedName ?: this::class.java.typeName
|
|
27
|
+
val outerClassName = fullClassName.substringBefore('$')
|
|
28
|
+
val simplerOuterClassName = outerClassName.substringAfterLast('.')
|
|
29
|
+
return if (simplerOuterClassName.isEmpty()) {
|
|
30
|
+
fullClassName
|
|
31
|
+
} else {
|
|
32
|
+
simplerOuterClassName.removeSuffix("Kt")
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
internal fun Context.mainExecutor(): Executor {
|
|
37
|
+
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
|
38
|
+
mainExecutor
|
|
39
|
+
} else {
|
|
40
|
+
ContextCompat.getMainExecutor(applicationContext)
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2024 European Commission
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
package eu.europa.ec.eudi.iso18013.transfer.internal
|
|
17
|
+
|
|
18
|
+
import android.content.Context
|
|
19
|
+
import android.util.Log
|
|
20
|
+
import com.android.identity.android.mdoc.deviceretrieval.DeviceRetrievalHelper
|
|
21
|
+
import com.android.identity.android.mdoc.engagement.QrEngagementHelper
|
|
22
|
+
import com.android.identity.android.mdoc.transport.DataTransport
|
|
23
|
+
import eu.europa.ec.eudi.iso18013.transfer.engagement.DeviceRetrievalMethod
|
|
24
|
+
import org.multipaz.crypto.Crypto
|
|
25
|
+
import org.multipaz.crypto.EcCurve
|
|
26
|
+
import org.multipaz.crypto.EcPublicKey
|
|
27
|
+
|
|
28
|
+
internal class QrEngagement(
|
|
29
|
+
private val context: Context,
|
|
30
|
+
val retrievalMethods: List<DeviceRetrievalMethod>,
|
|
31
|
+
val onConnecting: () -> Unit,
|
|
32
|
+
val onQrEngagementReady: (qrCode: String) -> Unit,
|
|
33
|
+
val onDeviceRetrievalHelperReady: (deviceRetrievalHelper: DeviceRetrievalHelper) -> Unit,
|
|
34
|
+
val onNewDeviceRequest: (request: ByteArray) -> Unit,
|
|
35
|
+
val onDisconnected: (transportSpecificTermination: Boolean) -> Unit,
|
|
36
|
+
val onCommunicationError: (error: Throwable) -> Unit,
|
|
37
|
+
) {
|
|
38
|
+
|
|
39
|
+
@JvmSynthetic
|
|
40
|
+
internal var deviceRetrievalHelper: DeviceRetrievalHelper? = null
|
|
41
|
+
|
|
42
|
+
@get:JvmSynthetic
|
|
43
|
+
internal val eDevicePrivateKey by lazy {
|
|
44
|
+
Crypto.createEcPrivateKey(EcCurve.P256)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@get:JvmSynthetic
|
|
48
|
+
internal val qrEngagementListener = object : QrEngagementHelper.Listener {
|
|
49
|
+
|
|
50
|
+
override fun onDeviceConnecting() {
|
|
51
|
+
Log.d(this.TAG, "QR Engagement: Device Connecting")
|
|
52
|
+
onConnecting()
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
override fun onDeviceConnected(transport: DataTransport) {
|
|
56
|
+
if (deviceRetrievalHelper != null) {
|
|
57
|
+
Log.d(
|
|
58
|
+
this.TAG,
|
|
59
|
+
"OnDeviceConnected for QR engagement -> ignoring due to active presentation"
|
|
60
|
+
)
|
|
61
|
+
return
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
Log.d(this.TAG, "OnDeviceConnected via QR: qrEngagement=$helper")
|
|
65
|
+
|
|
66
|
+
val builder = DeviceRetrievalHelper.Builder(
|
|
67
|
+
context,
|
|
68
|
+
deviceRetrievalHelperListener,
|
|
69
|
+
context.mainExecutor(),
|
|
70
|
+
eDevicePrivateKey,
|
|
71
|
+
)
|
|
72
|
+
builder.useForwardEngagement(
|
|
73
|
+
transport,
|
|
74
|
+
helper.deviceEngagement,
|
|
75
|
+
helper.handover,
|
|
76
|
+
)
|
|
77
|
+
deviceRetrievalHelper = builder.build()
|
|
78
|
+
helper.close()
|
|
79
|
+
onDeviceRetrievalHelperReady(requireNotNull(deviceRetrievalHelper))
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
override fun onError(error: Throwable) {
|
|
83
|
+
Log.d(this.TAG, "QR onError: ${error.message}")
|
|
84
|
+
onCommunicationError(error)
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@JvmSynthetic
|
|
89
|
+
internal val deviceRetrievalHelperListener = object : DeviceRetrievalHelper.Listener {
|
|
90
|
+
override fun onEReaderKeyReceived(eReaderKey: EcPublicKey) {
|
|
91
|
+
Log.d(this.TAG, "DeviceRetrievalHelper Listener (QR): OnEReaderKeyReceived")
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
override fun onDeviceRequest(deviceRequestBytes: ByteArray) {
|
|
95
|
+
Log.d(this.TAG, "DeviceRetrievalHelper Listener (QR): OnDeviceRequest")
|
|
96
|
+
onNewDeviceRequest(deviceRequestBytes)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
override fun onDeviceDisconnected(transportSpecificTermination: Boolean) {
|
|
100
|
+
Log.d(this.TAG, "DeviceRetrievalHelper Listener (QR): onDeviceDisconnected")
|
|
101
|
+
onDisconnected(transportSpecificTermination)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
override fun onError(error: Throwable) {
|
|
105
|
+
Log.d(this.TAG, "DeviceRetrievalHelper Listener (QR): onError -> ${error.message}")
|
|
106
|
+
onCommunicationError(error)
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@JvmSynthetic
|
|
111
|
+
internal lateinit var helper: QrEngagementHelper
|
|
112
|
+
|
|
113
|
+
val deviceEngagementUriEncoded: String
|
|
114
|
+
get() = helper.deviceEngagementUriEncoded
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Configures the QR engagement
|
|
118
|
+
*/
|
|
119
|
+
fun configure() {
|
|
120
|
+
helper = QrEngagementHelper.Builder(
|
|
121
|
+
context,
|
|
122
|
+
eDevicePrivateKey.publicKey,
|
|
123
|
+
retrievalMethods.transportOptions,
|
|
124
|
+
qrEngagementListener,
|
|
125
|
+
context.mainExecutor(),
|
|
126
|
+
).setConnectionMethods(retrievalMethods.connectionMethods)
|
|
127
|
+
.build()
|
|
128
|
+
onQrEngagementReady(helper.deviceEngagementUriEncoded)
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Closes the connection with the mdoc verifier
|
|
133
|
+
*/
|
|
134
|
+
fun close() {
|
|
135
|
+
try {
|
|
136
|
+
helper.close()
|
|
137
|
+
} catch (exception: RuntimeException) {
|
|
138
|
+
Log.e(this.TAG, "Error closing QR engagement", exception)
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
package/android/src/main/java/id/animo/{mdocdatatransfer → mdoc/datatransfer}/MdocDataTransfer.kt
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
package id.animo.
|
|
1
|
+
package id.animo.mdoc.datatransfer
|
|
2
2
|
|
|
3
3
|
import android.app.Activity
|
|
4
4
|
import android.content.Context
|
|
@@ -6,9 +6,10 @@ import android.util.Log
|
|
|
6
6
|
import androidx.activity.ComponentActivity
|
|
7
7
|
import eu.europa.ec.eudi.iso18013.transfer.TransferEvent
|
|
8
8
|
import eu.europa.ec.eudi.iso18013.transfer.engagement.NfcEngagementService
|
|
9
|
-
import
|
|
10
|
-
import
|
|
9
|
+
import kotlin.io.encoding.Base64
|
|
10
|
+
import kotlin.io.encoding.ExperimentalEncodingApi
|
|
11
11
|
|
|
12
|
+
@OptIn(ExperimentalEncodingApi::class)
|
|
12
13
|
class MdocDataTransfer(
|
|
13
14
|
context: Context,
|
|
14
15
|
private val currentActivity: Activity,
|
|
@@ -25,7 +26,7 @@ class MdocDataTransfer(
|
|
|
25
26
|
when (event) {
|
|
26
27
|
is TransferEvent.QrEngagementReady -> {
|
|
27
28
|
Log.d(TAG, ":::mdoc-data-transfer::: TransferEvent.QrEngagementReady")
|
|
28
|
-
onQrEngagementReady?.let { it(event.qrCode
|
|
29
|
+
onQrEngagementReady?.let { it(event.qrCode) }
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
is TransferEvent.Connecting -> {
|
|
@@ -50,11 +51,11 @@ class MdocDataTransfer(
|
|
|
50
51
|
|
|
51
52
|
is TransferEvent.RequestReceived -> {
|
|
52
53
|
Log.d(TAG, ":::mdoc-data-transfer::: TransferEvent.RequestReceived")
|
|
53
|
-
val request = event.request as DeviceRequest
|
|
54
54
|
sendEvent(
|
|
55
|
-
MdocDataTransferEvent.ON_REQUEST_RECEIVED,
|
|
56
|
-
|
|
57
|
-
"
|
|
55
|
+
MdocDataTransferEvent.ON_REQUEST_RECEIVED,
|
|
56
|
+
mapOf(
|
|
57
|
+
("deviceRequest" to Base64.Default.encode(event.deviceRequestBytes)),
|
|
58
|
+
("sessionTranscript" to Base64.Default.encode(event.sessionTranscriptBytes))
|
|
58
59
|
)
|
|
59
60
|
)
|
|
60
61
|
}
|
|
@@ -62,9 +63,12 @@ class MdocDataTransfer(
|
|
|
62
63
|
is TransferEvent.ResponseSent -> {
|
|
63
64
|
Log.d(TAG, ":::mdoc-data-transfer::: TransferEvent.ResponseSent")
|
|
64
65
|
sendEvent(
|
|
65
|
-
MdocDataTransferEvent.ON_RESPONSE_SENT,
|
|
66
|
+
MdocDataTransferEvent.ON_RESPONSE_SENT,
|
|
67
|
+
null
|
|
66
68
|
)
|
|
67
69
|
}
|
|
70
|
+
|
|
71
|
+
is TransferEvent.IntentToSend -> TODO()
|
|
68
72
|
}
|
|
69
73
|
}
|
|
70
74
|
|
|
@@ -78,7 +82,7 @@ class MdocDataTransfer(
|
|
|
78
82
|
}
|
|
79
83
|
|
|
80
84
|
fun respond(deviceResponse: ByteArray) {
|
|
81
|
-
MdocDataTransferManager.transferManager.value.sendResponse(
|
|
85
|
+
MdocDataTransferManager.transferManager.value.sendResponse(deviceResponse)
|
|
82
86
|
}
|
|
83
87
|
|
|
84
88
|
fun enableNfc() {
|
|
@@ -91,6 +95,9 @@ class MdocDataTransfer(
|
|
|
91
95
|
|
|
92
96
|
fun shutdown() {
|
|
93
97
|
disableNfc()
|
|
94
|
-
MdocDataTransferManager.transferManager.value.stopPresentation(
|
|
98
|
+
MdocDataTransferManager.transferManager.value.stopPresentation(
|
|
99
|
+
sendSessionTerminationMessage = true,
|
|
100
|
+
useTransportSpecificSessionTermination = true
|
|
101
|
+
)
|
|
95
102
|
}
|
|
96
103
|
}
|