Skip to content

Commit

Permalink
Merge pull request #622 from walt-id/ios-backup
Browse files Browse the repository at this point in the history
 iOS Fixes #621
  • Loading branch information
waltkb committed Jul 16, 2024
2 parents 611c277 + 921db9f commit 6abba3f
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 17 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ allprojects {
}

plugins {
val kotlinVersion = "2.0.0"
// val kotlinVersion = "2.0.20-Beta1"
// val kotlinVersion = "2.0.0"
val kotlinVersion = "2.0.20-Beta1"
kotlin("multiplatform") version kotlinVersion apply false
kotlin("jvm") version kotlinVersion

Expand Down
2 changes: 1 addition & 1 deletion waltid-applications/waltid-cli/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ kotlin {
implementation("com.google.code.gson:gson:2.11.0")

// CLI
implementation("com.github.ajalt.mordant:mordant:2.7.0")
implementation("com.github.ajalt.mordant:mordant:2.7.1")
implementation("com.github.ajalt.clikt:clikt:4.4.0")

// Coroutines
Expand Down
2 changes: 1 addition & 1 deletion waltid-libraries/waltid-crypto-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
id("com.android.library")
id("maven-publish")
id("com.github.ben-manes.versions")
id("love.forte.plugin.suspend-transform") version "0.9.0"
id("love.forte.plugin.suspend-transform") version "2.0.20-Beta1-0.9.2"
}

group = "id.walt.crypto"
Expand Down
4 changes: 2 additions & 2 deletions waltid-libraries/waltid-crypto-oci/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
id("maven-publish")
id("com.github.ben-manes.versions")
// id("com.android.library")
id("love.forte.plugin.suspend-transform") version "0.9.0"
id("love.forte.plugin.suspend-transform") version "2.0.20-Beta1-0.9.2"
}

group = "id.walt.crypto"
Expand Down Expand Up @@ -103,7 +103,7 @@ kotlin {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.8.1")

// OCI
implementation("com.oracle.oci.sdk:oci-java-sdk-shaded-full:3.44.1")
implementation("com.oracle.oci.sdk:oci-java-sdk-shaded-full:3.44.2")

// JOSE
implementation("com.nimbusds:nimbus-jose-jwt:9.40")
Expand Down
2 changes: 1 addition & 1 deletion waltid-libraries/waltid-crypto/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
kotlin("plugin.serialization")
id("maven-publish")
id("com.github.ben-manes.versions")
id("love.forte.plugin.suspend-transform") version "0.9.0"
id("love.forte.plugin.suspend-transform") version "2.0.20-Beta1-0.9.2"
}

group = "id.walt.crypto"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ abstract class Key {
@JvmAsync
@JsPromise
@JsExport.Ignore
@Throws(Exception::class)
abstract suspend fun getKeyId(): String

@JvmBlocking
@JvmAsync
@JsPromise
@JsExport.Ignore
@Throws(Exception::class)
abstract suspend fun getThumbprint(): String


Expand All @@ -46,19 +48,22 @@ abstract class Key {
@JvmAsync
@JsPromise
@JsExport.Ignore
@Throws(Exception::class)
abstract suspend fun exportJWK(): String

@JvmBlocking
@JvmAsync
@JsPromise
@JsExport.Ignore
@Throws(Exception::class)
open suspend fun exportJWKPretty(): String = prettyJson.encodeToString(Json.parseToJsonElement(exportJWK()))


@JvmBlocking
@JvmAsync
@JsPromise
@JsExport.Ignore
@Throws(Exception::class)
abstract suspend fun exportJWKObject(): JsonObject

/**
Expand All @@ -70,6 +75,7 @@ abstract class Key {
@JvmAsync
@JsPromise
@JsExport.Ignore
@Throws(Exception::class)
abstract suspend fun exportPEM(): String

/**
Expand All @@ -82,6 +88,7 @@ abstract class Key {
@JvmAsync
@JsPromise
@JsExport.Ignore
@Throws(Exception::class)
abstract suspend fun signRaw(plaintext: ByteArray): Any

/**
Expand All @@ -94,6 +101,7 @@ abstract class Key {
@JvmAsync
@JsPromise
@JsExport.Ignore
@Throws(Exception::class)
abstract suspend fun signJws(plaintext: ByteArray, headers: Map<String, String> = emptyMap()): String

/**
Expand All @@ -105,12 +113,14 @@ abstract class Key {
@JvmAsync
@JsPromise
@JsExport.Ignore
@Throws(Exception::class)
abstract suspend fun verifyRaw(signed: ByteArray, detachedPlaintext: ByteArray? = null): Result<ByteArray>

@JvmBlocking
@JvmAsync
@JsPromise
@JsExport.Ignore
@Throws(Exception::class)
abstract suspend fun verifyJws(signedJws: String): Result<JsonElement>

/*/**
Expand All @@ -133,24 +143,28 @@ abstract class Key {
@JvmAsync
@JsPromise
@JsExport.Ignore
@Throws(Exception::class)
abstract suspend fun getPublicKey(): Key

@JvmBlocking
@JvmAsync
@JsPromise
@JsExport.Ignore
@Throws(Exception::class)
abstract suspend fun getPublicKeyRepresentation(): ByteArray

@JvmBlocking
@JvmAsync
@JsPromise
@JsExport.Ignore
@Throws(Exception::class)
abstract suspend fun getMeta(): KeyMeta

@JvmBlocking
@JvmAsync
@JsPromise
@JsExport.Ignore

override fun toString() = "[walt.id crypto ${if (hasPrivateKey) "private" else "public"} $keyType key]"

@JvmBlocking
Expand All @@ -159,3 +173,4 @@ abstract class Key {
@JsExport.Ignore
open suspend fun init() {}
}

4 changes: 2 additions & 2 deletions waltid-libraries/waltid-did/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
kotlin("plugin.serialization")
id("maven-publish")
id("com.github.ben-manes.versions")
id("love.forte.plugin.suspend-transform") version "0.9.0"
id("love.forte.plugin.suspend-transform") version "2.0.20-Beta1-0.9.2"
}

group = "id.walt.did"
Expand Down Expand Up @@ -101,7 +101,7 @@ kotlin {
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.0")

// UUID
implementation("app.softwork:kotlinx-uuid-core:0.0.25")
implementation("app.softwork:kotlinx-uuid-core:0.0.26")

// Crypto
api(project(":waltid-libraries:waltid-crypto"))
Expand Down
2 changes: 1 addition & 1 deletion waltid-libraries/waltid-openid4vc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ kotlin {

// -- Multiplatform --
// Multiplatform / UUID
implementation("app.softwork:kotlinx-uuid-core:0.0.25")
implementation("app.softwork:kotlinx-uuid-core:0.0.26")

// Multiplatform / Date & time
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.0")
Expand Down
7 changes: 7 additions & 0 deletions waltid-libraries/waltid-target-ios/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# waltid-target-ios

This module contains iOS specific implementations, e.g., for the waltid-crypto-ios module.

You can find both Swift code implementation and the corresponding Kotlin bindings in here.

For compilation, you will require Xcode (as this is Swift code), which only works on macOS, and, please make sure `kdoctor` is not reporting any issues for your environment.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
kotlin("plugin.serialization")
id("maven-publish")
id("dev.petuska.npm.publish") version "3.4.3"
id("love.forte.plugin.suspend-transform") version "0.9.0"
id("love.forte.plugin.suspend-transform") version "2.0.20-Beta1-0.9.2"
id("com.github.ben-manes.versions")
}

Expand Down Expand Up @@ -99,7 +99,7 @@ kotlin {

// Kotlinx
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.0")
implementation("app.softwork:kotlinx-uuid-core:0.0.25")
implementation("app.softwork:kotlinx-uuid-core:0.0.26")

// Loggin
implementation("io.github.oshai:kotlin-logging:7.0.0")
Expand Down
4 changes: 2 additions & 2 deletions waltid-services/waltid-e2e-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ dependencies {
testImplementation("io.ktor:ktor-client-cio:2.3.12")
testImplementation("io.ktor:ktor-client-content-negotiation:2.3.12")
testImplementation("io.ktor:ktor-client-logging:2.3.12")
testImplementation("com.github.ajalt.mordant:mordant:2.7.0")
testImplementation("com.github.ajalt.mordant:mordant:2.7.1")
implementation(project(":waltid-services:waltid-service-commons"))
implementation(project(":waltid-services:waltid-issuer-api"))
implementation(project(":waltid-services:waltid-verifier-api"))
implementation(project(":waltid-services:waltid-wallet-api"))

testImplementation("app.softwork:kotlinx-uuid-core:0.0.25")
testImplementation("app.softwork:kotlinx-uuid-core:0.0.26")

}

Expand Down
2 changes: 1 addition & 1 deletion waltid-services/waltid-service-commons/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies {
api("com.sksamuel.cohort:cohort-ktor:2.5.1")

// OpenAPI
api("io.github.smiley4:ktor-swagger-ui:3.1.0")
api("io.github.smiley4:ktor-swagger-ui:3.2.0")
implementation("io.github.smiley4:schema-kenerator-core:1.0.1")
implementation("io.github.smiley4:schema-kenerator-serialization:1.0.1")
implementation("io.github.smiley4:schema-kenerator-reflection:1.0.1")
Expand Down
2 changes: 1 addition & 1 deletion waltid-services/waltid-verifier-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.COROUTINES_VERSION}")

// UUID
implementation("app.softwork:kotlinx-uuid-core:0.0.25")
implementation("app.softwork:kotlinx-uuid-core:0.0.26")

/* -- Misc --*/

Expand Down
2 changes: 1 addition & 1 deletion waltid-services/waltid-wallet-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1")

// UUID
implementation("app.softwork:kotlinx-uuid-core:0.0.25")
implementation("app.softwork:kotlinx-uuid-core:0.0.26")
implementation("app.softwork:kotlinx-uuid-exposed:0.0.26")

/* -- Security -- */
Expand Down

0 comments on commit 6abba3f

Please sign in to comment.