From 078f72ade12f70fa2ae615b18256488a3ee67fe2 Mon Sep 17 00:00:00 2001 From: Athina Bekakou Date: Fri, 21 Feb 2025 16:09:04 +0200 Subject: [PATCH 1/2] Add dependencies --- core-logic/build.gradle.kts | 31 ++++++++++++++++++++++++++++++- gradle/libs.versions.toml | 6 ++++++ settings.gradle.kts | 3 +++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/core-logic/build.gradle.kts b/core-logic/build.gradle.kts index e181b4261..675a35c78 100644 --- a/core-logic/build.gradle.kts +++ b/core-logic/build.gradle.kts @@ -31,15 +31,44 @@ moduleConfig { module = LibraryModule.CoreLogic } +var WALTID_VERSION = "0.11.0" + dependencies { implementation(project(LibraryModule.ResourcesLogic.path)) implementation(project(LibraryModule.BusinessLogic.path)) implementation(project(LibraryModule.AuthenticationLogic.path)) implementation(libs.androidx.biometric) + + implementation(libs.waltid.did) { + exclude("com.google.crypto.tink") + exclude("org.bouncycastle") + } + implementation(libs.waltid.crypto) { + exclude("com.google.crypto.tink") + exclude("org.bouncycastle") + } + implementation("id.walt.sdjwt:waltid-sdjwt:${WALTID_VERSION}") { + exclude("com.google.crypto.tink") + exclude("org.bouncycastle") + // from: https://github.com/walt-id/waltid-identity/blob/main/waltid-libraries/sdjwt/waltid-sdjwt/README.md => + // https://github.com/walt-id/waltid-examples/blob/main/build.gradle.kts + + // required dependencies for running the example project +// implementation("id.walt.crypto:waltid-crypto:${WALTID_VERSION}") +// implementation("id.walt.credentials:waltid-verifiable-credentials:${WALTID_VERSION}") +// implementation("id.walt.did:waltid-did:${WALTID_VERSION}") + } +// implementation("id.walt.openid4vc:waltid-openid4vc:${WALTID_VERSION}") +// implementation("id.walt.policies:waltid-verification-policies:${WALTID_VERSION}") +// implementation("id.walt.dif-definitions-parser:waltid-dif-definitions-parser:${WALTID_VERSION}") + + // all walt.id dependencies (not required for this project) +// implementation("id.walt.mdoc-credentials:waltid-mdoc-credentials:${WALTID_VERSION}") +// implementation(libs.waltid.service.commons) } excludeFromKoverReport( excludedClasses = KoverExclusionRules.CoreLogic.classes, excludedPackages = KoverExclusionRules.CoreLogic.packages, -) \ No newline at end of file +) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e6d9237fb..bef7553d2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -55,6 +55,9 @@ ktor = "3.0.1" slf4j = "2.0.7" gson = "2.11.0" googlePhoneNumber = "8.13.40" +waltidCrypto = "0.11.0" +waltidDid = "0.11.0" +waltidServiceCommons = "0.11.0" zxing = "3.5.3" eudiWalletCore = "0.14.0" cborTree = "0.01.02" @@ -149,6 +152,9 @@ slf4j = { group = "org.slf4j", name = "slf4j-simple", version.ref = "slf4j" } gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" } okhttp-mockwebserver = { group = "com.squareup.okhttp3", name = "mockwebserver", version.ref = "okhttp" } google-phonenumber = { group = "com.googlecode.libphonenumber", name = "libphonenumber", version.ref = "googlePhoneNumber" } +waltid-crypto = { module = "id.walt.crypto:waltid-crypto", version.ref = "waltidCrypto" } +waltid-did = { module = "id.walt.did:waltid-did", version.ref = "waltidDid" } +waltid-service-commons = { module = "id.walt:waltid-service-commons", version.ref = "waltidServiceCommons" } zxing = { group = "com.google.zxing", name = "core", version.ref = "zxing" } eudi-wallet-core = { group = "eu.europa.ec.eudi", name = "eudi-lib-android-wallet-core", version.ref = "eudiWalletCore" } cbor-tree = { group = "com.google.iot.cbor", name = "cbor", version.ref = "cborTree" } diff --git a/settings.gradle.kts b/settings.gradle.kts index afb83c8c3..b61510404 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -34,6 +34,9 @@ dependencyResolutionManagement { maven { url = uri("https://jitpack.io") } + maven { + url = uri("https://maven.waltid.dev/releases") + } mavenLocal() } } From 9ba9ad64ec79e8b1e6fcb3f1afd7a3b95292d68d Mon Sep 17 00:00:00 2001 From: Athina Bekakou Date: Mon, 24 Feb 2025 10:00:51 +0200 Subject: [PATCH 2/2] Add a print from waltid-did library --- .../controller/WalletCoreDocumentsController.kt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core-logic/src/main/java/eu/europa/ec/corelogic/controller/WalletCoreDocumentsController.kt b/core-logic/src/main/java/eu/europa/ec/corelogic/controller/WalletCoreDocumentsController.kt index 1b86fd1c1..f9052af83 100644 --- a/core-logic/src/main/java/eu/europa/ec/corelogic/controller/WalletCoreDocumentsController.kt +++ b/core-logic/src/main/java/eu/europa/ec/corelogic/controller/WalletCoreDocumentsController.kt @@ -55,6 +55,11 @@ import kotlinx.coroutines.flow.callbackFlow import kotlinx.coroutines.flow.flow import kotlinx.coroutines.withContext import java.util.Locale +import android.util.Log +import id.walt.crypto.keys.KeyType +import id.walt.did.dids.DidService +import id.walt.did.dids.registrar.dids.DidWebCreateOptions + enum class IssuanceMethod { OPENID4VCI @@ -251,6 +256,13 @@ class WalletCoreDocumentsControllerImpl( } override fun getDocumentById(documentId: DocumentId): Document? { + Log.d("WHERE", "getDoc by ID") + val options = DidWebCreateOptions( + domain = "example.com", + path = "/path/to/did.json", + keyType = KeyType.Ed25519 + ) + Log.d("WHERE", options.toString()) return eudiWallet.getDocumentById(documentId = documentId) }