Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to refactored ssi #384

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
File renamed without changes.
23 changes: 13 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

env:
CARGO_TERM_COLOR: always
SSI_REF: main
SSI_REF: treeldr
RUSTFLAGS: "-Dwarnings"

defaults:
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Install Rust old stable with incremental compilation
uses: actions-rs/toolchain@v1
with:
toolchain: 1.70.0
toolchain: 1.77.0
profile: minimal
default: true

Expand Down Expand Up @@ -129,10 +129,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
# di-ed25519-test-suite fails one test because issuer != proof VM
# did-key-test-suite requires more checks in ssi
# di-eddsa-2022-test-suite passes but currently it's depending on a (npm) git branch that doesn't exist anymore
suite: ["vc-api-issuer-test-suite", "vc-api-verifier-test-suite"] # "di-eddsa-2022-test-suite", "di-ed25519-test-suite", "did-key-test-suite"]
suite:
- "vc-api-issuer-test-suite"
- "vc-api-verifier-test-suite"
- "vc-di-ecdsa-test-suite"
- "vc-di-eddsa-test-suite"
- "vc-di-ed25519signature2020-test-suite"
- "did-key-test-suite"
- "vc-data-model-2.0-test-suite"
steps:
- name: Checkout DIDKit repository
uses: actions/checkout@v4
Expand All @@ -154,7 +158,7 @@ jobs:
shared-key: "vc-api"
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
- name: Start VC API
run: |
cd http
Expand All @@ -166,12 +170,11 @@ jobs:
run: |
cd http/tests/${{ matrix.suite }}
npm i
rm node_modules/vc-api-test-suite-implementations/implementations/*.json
ln ../vcApiTestImplementationsConfig.cjs .vcApiTestImplementationsConfig.cjs
ln ../localConfig.cjs localConfig.cjs
- name: Run Test Suite
run: |
cd http/tests/${{ matrix.suite }}
ISSUER_NAME="Spruce" KEY_SEED_DB=z1Aaj5A4UCsdMpXwdYAReXa4bxWYiKJtdAvB1zMzCHtCbtD npm test
npm test

build_ios:
runs-on: macos-latest
Expand Down
18 changes: 12 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "http/tests/di-ed25519-test-suite"]
path = http/tests/di-ed25519-test-suite
url = https://github.com/w3c-ccg/di-ed25519-test-suite.git
[submodule "http/tests/vc-api-issuer-test-suite"]
path = http/tests/vc-api-issuer-test-suite
url = https://github.com/w3c-ccg/vc-api-issuer-test-suite.git
Expand All @@ -10,6 +7,15 @@
[submodule "http/tests/did-key-test-suite"]
path = http/tests/did-key-test-suite
url = https://github.com/w3c-ccg/did-key-test-suite.git
[submodule "http/tests/di-eddsa-2022-test-suite"]
path = http/tests/di-eddsa-2022-test-suite
url = https://github.com/w3c-ccg/di-eddsa-2022-test-suite.git
[submodule "http/tests/vc-data-model-2.0-test-suite"]
path = http/tests/vc-data-model-2.0-test-suite
url = https://github.com/w3c/vc-data-model-2.0-test-suite.git
[submodule "http/tests/vc-di-ed25519signature2020-test-suite"]
path = http/tests/vc-di-ed25519signature2020-test-suite
url = https://github.com/w3c/vc-di-ed25519signature2020-test-suite.git
[submodule "http/tests/vc-di-eddsa-test-suite"]
path = http/tests/vc-di-eddsa-test-suite
url = https://github.com/w3c/vc-di-eddsa-test-suite.git
[submodule "http/tests/vc-di-ecdsa-test-suite"]
path = http/tests/vc-di-ecdsa-test-suite
url = https://github.com/w3c/vc-di-ecdsa-test-suite.git
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "didkit-cli"
version = "0.3.2"
authors = ["Spruce Systems, Inc."]
edition = "2018"
edition = "2021"
description = "Command-line interface for Verifiable Credentials and Decentralized Identifiers."
license = "Apache-2.0"
keywords = ["ssi", "did", "vc", "cli"]
Expand Down
8 changes: 6 additions & 2 deletions http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ exclude = [
didkit = { version = "0.6", path = "../lib", features = ["http-did"] }

anyhow = "1.0.70"
axum = { version = "0.6.16", features = ["macros", "headers"] }
axum = { version = "0.7.5", features = ["macros"] }
axum-extra = { version = "0.9.3", features = ["typed-header"] }
figment = { version = "0.10.8", features = ["env", "toml"] }
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }
tower = "0.4.13"
tower-http = { version = "0.4.0", features = ["trace", "limit"] }
tower-http = { version = "0.5.2", features = ["trace", "limit"] }
tracing = "0.1.37"
tracing-subscriber = "0.3.16"
serde = { version = "1.0", features = ["derive"] }
Expand All @@ -30,3 +31,6 @@ serde_with = { version = "2.1.0", features = ["json"] }
serde_urlencoded = "0.7"
url = { version = "2.3.1", features = ["serde"] }
percent-encoding = "2.2.0"

[dev-dependencies]
didkit = { version = "0.6", path = "../lib", features = ["ed25519"] }
2 changes: 1 addition & 1 deletion http/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use didkit::JWK;
use didkit::ssi::JWK;
use serde::Deserialize;
use serde_with::{json::JsonString, serde_as};

Expand Down