diff --git a/.github/workflows/publish-pages-only.yml b/.github/workflows/publish-pages-only.yml
new file mode 100644
index 000000000..7c29b950e
--- /dev/null
+++ b/.github/workflows/publish-pages-only.yml
@@ -0,0 +1,29 @@
+name: Publish Pages
+on: workflow_dispatch
+permissions:
+ contents: read
+ pages: write
+ id-token: write
+jobs:
+ deploy-docs:
+ environment:
+ name: github-pages
+ url: ${{ steps.deployment.outputs.page_url }}
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ with:
+ submodules: recursive
+ - name: Build Dokka HTML
+ run: ./gradlew dokkaHtmlMultiModule
+ - name: Setup Pages
+ uses: actions/configure-pages@v3
+ - name: Upload artifact
+ uses: actions/upload-pages-artifact@v1
+ with:
+ # Upload docs folder
+ path: './build/dokka'
+ - name: Deploy to GitHub Pages
+ id: deployment
+ uses: actions/deploy-pages@v2
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index b522cc9a0..3b4b262c7 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -1,5 +1,9 @@
name: Publish
on: workflow_dispatch
+permissions:
+ contents: read
+ pages: write
+ id-token: write
jobs:
build:
runs-on: macos-latest
@@ -20,3 +24,26 @@ jobs:
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PUBLISH_SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.PUBLISH_SONATYPE_USER }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.PUBLISH_SONATYPE_PASSWORD }}
+ deploy-docs:
+ needs: build
+ environment:
+ name: github-pages
+ url: ${{ steps.deployment.outputs.page_url }}
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ with:
+ submodules: recursive
+ - name: Build Dokka HTML
+ run: ./gradlew dokkaHtmlMultiModule
+ - name: Setup Pages
+ uses: actions/configure-pages@v3
+ - name: Upload artifact
+ uses: actions/upload-pages-artifact@v1
+ with:
+ # Upload docs folder
+ path: './build/dokka'
+ - name: Deploy to GitHub Pages
+ id: deployment
+ uses: actions/deploy-pages@v2
diff --git a/README.md b/README.md
index b7429e678..a79968dae 100644
--- a/README.md
+++ b/README.md
@@ -5,12 +5,12 @@
![Java](https://img.shields.io/badge/java-11-blue.svg?logo=OPENJDK)
[![Maven Central](https://img.shields.io/maven-central/v/at.asitplus.wallet/vclib)](https://mvnrepository.com/artifact/at.asitplus.wallet/vclib/)
-This [Kotlin Mulitplatform](https://kotlinlang.org/docs/multiplatform.html) library implements the [W3C VC Data Model](https://w3c.github.io/vc-data-model/) to support several use cases of verifiable credentials, verifiable presentations, and validation thereof. This library may be shared between Wallet Apps, Verifier Apps and a Backend Service issuing credentials.
+This [Kotlin Multiplatform](https://kotlinlang.org/docs/multiplatform.html) library implements the [W3C VC Data Model](https://w3c.github.io/vc-data-model/) to support several use cases of verifiable credentials, verifiable presentations, and validation thereof. This library may be shared between Wallet Apps, Verifier Apps and a Backend Service issuing credentials.
## Architecture
-This library was built with [Kotlin Mulitplatform](https://kotlinlang.org/docs/multiplatform.html) and [Mulitplatform Mobile](https://kotlinlang.org/lp/mobile/) in mind. Its primary targets are JVM, Android and iOS. In order to achieve smooth usage especially under iOS, there have been some notable design decisions:
+This library was built with [Kotlin Multiplatform](https://kotlinlang.org/docs/multiplatform.html) and [Multiplatform Mobile](https://kotlinlang.org/lp/mobile/) in mind. Its primary targets are JVM, Android and iOS. In order to achieve smooth usage especially under iOS, there have been some notable design decisions:
- Code interfacing with client implementations uses the return type `KmmResult` to transport the `Success` case (i.e. a custom data type) as well as potential errors from native implementations as a `Failure`.
- Native implementations can be plugged in by implementing interfaces, e.g. `CryptoService`, as opposed to callback functions.
@@ -18,7 +18,7 @@ This library was built with [Kotlin Mulitplatform](https://kotlinlang.org/docs/m
- This library provides some "default" implementations, e.g. `DefaultCryptoService` to test as much code as possible from the `commonMain` module.
- Some classes feature additional constructors or factory methods with a shorter argument list because the default arguments are lost when called from Swift.
-Notable features for mulitplatform are:
+Notable features for multiplatform are:
- Use of [Napier](https://github.com/AAkira/Napier) as the logging framework
- Use of [Kotest](https://kotest.io/) for unit tests
@@ -86,3 +86,14 @@ at.asitplus.wallet.lib.LibraryInitializer.registerExtensionLibrary(
)
)
```
+
+
+
+---
+
+This project has received funding from the European Union’s Horizon 2020 research and innovation
+programme under grant agreement No 959072.
+
+
+
+
diff --git a/build.gradle.kts b/build.gradle.kts
index 63ffabbd7..4ad06c4ea 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -24,4 +24,4 @@ task("purge") {
val artifactVersion: String by extra
group = "at.asitplus.wallet"
-version = artifactVersion
\ No newline at end of file
+version = artifactVersion
diff --git a/vclib-aries/src/commonTest/kotlin/at/asitplus/wallet/lib/aries/IssueCredentialProtocolTestIso.kt b/vclib-aries/src/commonTest/kotlin/at/asitplus/wallet/lib/aries/IssueCredentialProtocolTestIso.kt
deleted file mode 100644
index 36217d63d..000000000
--- a/vclib-aries/src/commonTest/kotlin/at/asitplus/wallet/lib/aries/IssueCredentialProtocolTestIso.kt
+++ /dev/null
@@ -1,125 +0,0 @@
-package at.asitplus.wallet.lib.aries
-
-import at.asitplus.wallet.lib.agent.CryptoService
-import at.asitplus.wallet.lib.agent.DefaultCryptoService
-import at.asitplus.wallet.lib.agent.Holder
-import at.asitplus.wallet.lib.agent.HolderAgent
-import at.asitplus.wallet.lib.agent.Issuer
-import at.asitplus.wallet.lib.agent.IssuerAgent
-import at.asitplus.wallet.lib.data.ConstantIndex
-import at.asitplus.wallet.lib.msg.AttachmentFormatReference
-import at.asitplus.wallet.lib.msg.IssueCredential
-import at.asitplus.wallet.lib.msg.JwmAttachment
-import at.asitplus.wallet.lib.msg.JwmAttachmentData
-import at.asitplus.wallet.lib.msg.Presentation
-import at.asitplus.wallet.lib.msg.PresentationBody
-import at.asitplus.wallet.lib.msg.RequestCredential
-import at.asitplus.wallet.lib.msg.RequestCredentialBody
-import com.benasher44.uuid.uuid4
-import io.kotest.core.spec.style.FreeSpec
-import io.kotest.matchers.shouldNotBe
-import io.kotest.matchers.types.shouldBeInstanceOf
-
-class IssueCredentialProtocolTestIso : FreeSpec({
-
- lateinit var issuerCryptoService: CryptoService
- lateinit var holderCryptoService: CryptoService
- lateinit var issuer: Issuer
- lateinit var holder: Holder
- lateinit var issuerProtocol: IssueCredentialProtocol
- lateinit var holderProtocol: IssueCredentialProtocol
-
- beforeEach {
- issuerCryptoService = DefaultCryptoService()
- holderCryptoService = DefaultCryptoService()
- issuer = IssuerAgent.newDefaultInstance(issuerCryptoService, dataProvider = DummyCredentialDataProvider())
- holder = HolderAgent.newDefaultInstance(holderCryptoService)
- issuerProtocol = IssueCredentialProtocol.newIssuerInstance(
- issuer = issuer,
- serviceEndpoint = "https://example.com/issue?${uuid4()}",
- credentialScheme = ConstantIndex.MobileDrivingLicence2023,
- )
- holderProtocol = IssueCredentialProtocol.newHolderInstance(
- holder = holder,
- credentialScheme = ConstantIndex.MobileDrivingLicence2023,
- )
- }
-
- "issueCredentialGenericWithInvitation" {
- val oobInvitation = issuerProtocol.startCreatingInvitation()
- oobInvitation.shouldBeInstanceOf()
- val invitationMessage = oobInvitation.message
-
- val parsedInvitation = holderProtocol.parseMessage(invitationMessage, issuerCryptoService.toJsonWebKey())
- parsedInvitation.shouldBeInstanceOf()
- val requestCredential = parsedInvitation.message
-
- val parsedRequestCredential = issuerProtocol.parseMessage(requestCredential, holderCryptoService.toJsonWebKey())
- parsedRequestCredential.shouldBeInstanceOf()
- val issueCredential = parsedRequestCredential.message
-
- val parsedIssueCredential = holderProtocol.parseMessage(issueCredential, issuerCryptoService.toJsonWebKey())
- parsedIssueCredential.shouldBeInstanceOf()
-
- val issuedCredential = parsedIssueCredential.lastMessage
- issuedCredential.shouldBeInstanceOf()
- }
-
- "issueCredentialGenericDirect" {
- val requestCredential = holderProtocol.startDirect()
- requestCredential.shouldBeInstanceOf()
-
- val parsedRequestCredential =
- issuerProtocol.parseMessage(requestCredential.message, holderCryptoService.toJsonWebKey())
- parsedRequestCredential.shouldBeInstanceOf()
- val issueCredential = parsedRequestCredential.message
-
- val parsedIssueCredential = holderProtocol.parseMessage(issueCredential, issuerCryptoService.toJsonWebKey())
- parsedIssueCredential.shouldBeInstanceOf()
-
- val issuedCredential = parsedIssueCredential.lastMessage
- issuedCredential.shouldBeInstanceOf()
- }
-
- "wrongStartMessage" {
- val parsed = holderProtocol.parseMessage(
- Presentation(
- body = PresentationBody("foo", arrayOf(AttachmentFormatReference("id1", "jws"))),
- threadId = uuid4().toString(),
- attachment = JwmAttachment(id = uuid4().toString(), "mimeType", JwmAttachmentData())
- ),
- issuerCryptoService.toJsonWebKey()
- )
- parsed.shouldBeInstanceOf()
- }
-
- "wrongRequestCredentialMessage" {
- val oobInvitation = issuerProtocol.startCreatingInvitation()
- oobInvitation.shouldBeInstanceOf()
- val invitationMessage = oobInvitation.message
-
- val parsedInvitation = holderProtocol.parseMessage(invitationMessage, issuerCryptoService.toJsonWebKey())
- parsedInvitation.shouldBeInstanceOf()
- val requestCredential = parsedInvitation.message
-
- val wrongRequestCredential = RequestCredential(
- body = RequestCredentialBody(
- comment = "something",
- goalCode = "issue-vc-${ConstantIndex.AtomicAttribute2023.credentialDefinitionName}",
- formats = arrayOf()
- ),
- parentThreadId = requestCredential.parentThreadId!!,
- attachment = JwmAttachment(
- id = uuid4().toString(),
- mediaType = "unknown",
- data = JwmAttachmentData()
- )
- )
- val parsedRequestCredential =
- issuerProtocol.parseMessage(wrongRequestCredential, holderCryptoService.toJsonWebKey())
- parsedRequestCredential.shouldBeInstanceOf()
- val problemReport = parsedRequestCredential.message
-
- problemReport.parentThreadId shouldNotBe null
- }
-})
\ No newline at end of file
diff --git a/vclib/build.gradle.kts b/vclib/build.gradle.kts
index 73c36b9ee..99b5e0022 100644
--- a/vclib/build.gradle.kts
+++ b/vclib/build.gradle.kts
@@ -17,7 +17,6 @@ version = artifactVersion
exportIosFramework("VcLibKmm", *commonIosExports())
kotlin {
-
sourceSets {
val commonMain by getting {
@@ -31,7 +30,6 @@ kotlin {
}
}
-
val commonTest by getting
val iosMain by getting
diff --git a/vclib/src/commonTest/kotlin/at/asitplus/wallet/lib/iso/CborSerializationTest.kt b/vclib/src/commonTest/kotlin/at/asitplus/wallet/lib/iso/CborSerializationTest.kt
index 46fb3a38f..e286a848a 100644
--- a/vclib/src/commonTest/kotlin/at/asitplus/wallet/lib/iso/CborSerializationTest.kt
+++ b/vclib/src/commonTest/kotlin/at/asitplus/wallet/lib/iso/CborSerializationTest.kt
@@ -162,7 +162,7 @@ class CborSerializationTest : FreeSpec({
}
// From ISO/IEC 18013-5:2021(E), D4.1.2, page 116
- "mdoc response" {
+ "!mdoc response" {
/**
* a3 # map(3)
* 67 # text(7)
@@ -416,7 +416,8 @@ class CborSerializationTest : FreeSpec({
deserialized.expiryDate shouldBe LocalDate.parse("2024-10-20")
}
- "Date in IssuerSignedItem from ISO example" {
+
+ "!Date in IssuerSignedItem from ISO example" {
val input = """
a4686469676573744944036672616e646f6d5820b23f627e8999c706df0c0a4ed98ad74af988af619b4bb078b89058553f44615d7165
6c656d656e744964656e7469666965726a69737375655f646174656c656c656d656e7456616c7565d903ec6a323031392d31302d3230