Skip to content

Commit

Permalink
Merge branch 'main' into release/2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JesusMcCloud committed Aug 22, 2023
2 parents 25a806b + 52e9833 commit d5c5496
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 133 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/publish-pages-only.yml
Original file line number Diff line number Diff line change
@@ -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
27 changes: 27 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Publish
on: workflow_dispatch
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: macos-latest
Expand All @@ -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
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
![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.
- Use of primitve data types for constructor properties instead of e.g. kotlinx datetime types.
- 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
Expand Down Expand Up @@ -86,3 +86,14 @@ at.asitplus.wallet.lib.LibraryInitializer.registerExtensionLibrary(
)
)
```

<br>

---
<p align="center">
This project has received funding from the European Union’s Horizon 2020 research and innovation
programme under grant agreement No 959072.
</p>
<p align="center">
<img src="https://github.com/a-sit-plus/kmm-vc-library/assets/5648377/a236d75d-c940-401b-a60d-18c30d0c60c5" alt="EU flag">
</p>
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ task<Exec>("purge") {

val artifactVersion: String by extra
group = "at.asitplus.wallet"
version = artifactVersion
version = artifactVersion

This file was deleted.

2 changes: 0 additions & 2 deletions vclib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ version = artifactVersion
exportIosFramework("VcLibKmm", *commonIosExports())
kotlin {


sourceSets {

val commonMain by getting {
Expand All @@ -31,7 +30,6 @@ kotlin {
}
}


val commonTest by getting

val iosMain by getting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d5c5496

Please sign in to comment.