From 73deb2f5d38662c5ca295e626b385d219589a8ad Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Fri, 22 Nov 2024 16:59:49 +0000 Subject: [PATCH 1/6] Remove unused deps --- trustchain-cli/Cargo.toml | 2 -- trustchain-core/Cargo.toml | 6 ------ trustchain-http/Cargo.toml | 7 ------- trustchain-ion/Cargo.toml | 4 ---- 4 files changed, 19 deletions(-) diff --git a/trustchain-cli/Cargo.toml b/trustchain-cli/Cargo.toml index 60bffaba..fd24094e 100644 --- a/trustchain-cli/Cargo.toml +++ b/trustchain-cli/Cargo.toml @@ -16,8 +16,6 @@ trustchain-http = { path = "../trustchain-http" } clap = { version = "4.0.32", features = ["derive", "cargo"] } -did-ion = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223a384ee71df1333bbce04af445e852eab5" } -josekit = "0.8" lazy_static = "1.4.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" diff --git a/trustchain-core/Cargo.toml b/trustchain-core/Cargo.toml index 806c6df4..73672a37 100644 --- a/trustchain-core/Cargo.toml +++ b/trustchain-core/Cargo.toml @@ -5,14 +5,9 @@ authors = ["Trustchain Devs"] edition = "2021" [dependencies] -ps_sig = { git = "https://github.com/alan-turing-institute/RSS.git", rev = "ec9386e125d87c5f54898b34fbe0883b3b36ffd4" } - async-trait = "0.1" base64 = "0.13" -canonical_json = "0.4.0" -chrono = "0.4" did-method-key = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223a384ee71df1333bbce04af445e852eab5" } -futures = "0.3.21" petgraph = { version = "0.6" } serde = { version = "1.0", features = ["derive"] } serde_jcs = "0.1.0" @@ -25,7 +20,6 @@ ssi = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223 ] } tempfile = { version = "3.3" } thiserror = "1.0" -tokio = { version = "1.20.1", features = ["full"] } [dev-dependencies] mockall = "0.11.2" diff --git a/trustchain-http/Cargo.toml b/trustchain-http/Cargo.toml index a52064ee..bc6358ca 100644 --- a/trustchain-http/Cargo.toml +++ b/trustchain-http/Cargo.toml @@ -20,11 +20,7 @@ axum = "0.6" axum-server = { version = "0.5.1", features = ["tls-rustls"] } base64 = "0.21.0" chrono = "^0.4" -clap = { version = "^4", features = ["derive", "env", "cargo"] } did-ion = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223a384ee71df1333bbce04af445e852eab5" } -execute = "0.2.11" -gloo-console = "0.2.3" -hex = "0.4.3" hyper = "0.14.26" image = "0.23.14" is_empty = "0.2.0" @@ -35,7 +31,6 @@ qrcode = "0.12.0" rand = "0.8" reqwest = { version = "0.11.16", features = ["stream"] } serde = { version = "1.0", features = ["derive"] } -serde_jcs = "0.1.0" serde_json = "1.0" # sha2 = "0.10" shellexpand = "3.1.0" @@ -47,12 +42,10 @@ ssi = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223 thiserror = "1.0" tokio = { version = "1.20.1", features = ["full"] } tower = "0.4" -tower-http = { version = "0.4.0", features = ["map-request-body", "util"] } toml = "0.7.2" tracing = "0.1" tracing-subscriber = "0.3" serde_with = "3.4.0" -uuid = { version = "1.2.2", features = ["v4", "fast-rng", "macro-diagnostics"] } [dev-dependencies] axum-test-helper = "0.2.0" diff --git a/trustchain-ion/Cargo.toml b/trustchain-ion/Cargo.toml index 37f6f971..150eb707 100644 --- a/trustchain-ion/Cargo.toml +++ b/trustchain-ion/Cargo.toml @@ -6,16 +6,13 @@ edition = "2021" [dependencies] -flutter_rust_bridge = "1" trustchain-core = { path = "../trustchain-core" } anyhow = "1.0" async-trait = "0.1" bip39 = "2.0.0" bitcoin = "0.29.2" bitcoincore-rpc = "0.16.0" -canonical_json = "0.4.0" chrono = "0.4" -clap = { version = "^4.1", features = ["derive", "cargo"] } did-ion = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223a384ee71df1333bbce04af445e852eab5" } ed25519-dalek-bip32 = "0.3.0" flate2 = "1.0.24" @@ -29,7 +26,6 @@ mongodb = "2.3.1" reqwest = "0.11" secp256k1 = "0.27.0" serde = { version = "1.0", features = ["derive"] } -serde_jcs = "0.1.0" serde_json = "1.0" sha2 = "0.10.7" ssi = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223a384ee71df1333bbce04af445e852eab5", features = [ From b9c4fd6a78fb284c12419c2a4dbabd2da97bce96 Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Fri, 22 Nov 2024 17:00:51 +0000 Subject: [PATCH 2/6] Apply autoinherit --- Cargo.toml | 52 ++++++++++++++++++++++++++++++++ trustchain-api/Cargo.toml | 24 ++++++--------- trustchain-cli/Cargo.toml | 18 +++++------ trustchain-core/Cargo.toml | 26 +++++++--------- trustchain-ffi/Cargo.toml | 26 +++++++--------- trustchain-http/Cargo.toml | 62 ++++++++++++++++++-------------------- trustchain-ion/Cargo.toml | 60 +++++++++++++++++------------------- 7 files changed, 148 insertions(+), 120 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index dbb5db5d..568ca2ac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,6 +20,58 @@ members = [ ] resolver = "2" +[workspace.dependencies] +anyhow = "1.0" +async-trait = "0.1" +axum = "0.6" +axum-server = "0.5.1" +axum-test-helper = "0.2.0" +bip39 = "2.0.0" +bitcoin = "0.29.2" +bitcoincore-rpc = "0.16.0" +chrono = "0.4.26" +clap = "4.0.32" +did-ion = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223a384ee71df1333bbce04af445e852eab5" } +did-method-key = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223a384ee71df1333bbce04af445e852eab5" } +ed25519-dalek-bip32 = "0.3.0" +flate2 = "1.0.24" +flutter_rust_bridge = "=1.64.0" +futures = "0.3.28" +glob = "0.3" +hex = "0.4.3" +hyper = "0.14.26" +image = "0.23.14" +ipfs-api-backend-hyper = "0.6" +ipfs-hasher = "0.13.0" +is_empty = "0.2.0" +itertools = "0.13.0" +josekit = "0.8" +k256 = "0.13.1" +lazy_static = "1.4.0" +log = "0.4" +mockall = "0.11.4" +mongodb = "2.3.1" +petgraph = "0.6" +ps_sig = { git = "https://github.com/alan-turing-institute/RSS.git", rev = "ec9386e125d87c5f54898b34fbe0883b3b36ffd4" } +qrcode = "0.12.0" +rand = "0.8" +reqwest = "0.11.16" +secp256k1 = "0.27.0" +serde = "1.0" +serde_jcs = "0.1.0" +serde_json = "1.0" +serde_with = "3.4.0" +sha2 = "0.10.7" +shellexpand = "3.1.0" +ssi = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223a384ee71df1333bbce04af445e852eab5" } +tempfile = "3.9.0" +thiserror = "1.0" +tokio = "1.20.1" +toml = "0.7.2" +tower = "0.4" +tracing = "0.1" +tracing-subscriber = "0.3" + [dependencies] trustchain-api = { path = "./trustchain-api", version = "0.1.0"} trustchain-core = { path = "./trustchain-core", version = "0.2.0"} diff --git a/trustchain-api/Cargo.toml b/trustchain-api/Cargo.toml index a81648e8..96d30510 100644 --- a/trustchain-api/Cargo.toml +++ b/trustchain-api/Cargo.toml @@ -8,20 +8,16 @@ edition = "2021" [dependencies] trustchain-core = { path = "../trustchain-core" } trustchain-ion = { path = "../trustchain-ion" } -ps_sig = { git = "https://github.com/alan-turing-institute/RSS.git", rev = "ec9386e125d87c5f54898b34fbe0883b3b36ffd4" } +ps_sig = { workspace = true } -async-trait = "0.1" -chrono = "0.4" -serde_json = "1.0" -sha2 = "0.10.7" -ssi = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223a384ee71df1333bbce04af445e852eab5", features = [ - "http-did", - "secp256k1", - "rss", -] } -did-ion = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223a384ee71df1333bbce04af445e852eab5" } -futures = "0.3.28" -hex = "0.4.3" +async-trait = { workspace = true } +chrono = { workspace = true } +serde_json = { workspace = true } +sha2 = { workspace = true } +ssi = { workspace = true, features = ["http-did", "secp256k1", "rss"] } +did-ion = { workspace = true } +futures = { workspace = true } +hex = { workspace = true } [dev-dependencies] -tokio = { version = "1.20.1", features = ["full"] } +tokio = { workspace = true, features = ["full"] } diff --git a/trustchain-cli/Cargo.toml b/trustchain-cli/Cargo.toml index fd24094e..f057387e 100644 --- a/trustchain-cli/Cargo.toml +++ b/trustchain-cli/Cargo.toml @@ -15,14 +15,10 @@ trustchain-api = { path = "../trustchain-api" } trustchain-http = { path = "../trustchain-http" } -clap = { version = "4.0.32", features = ["derive", "cargo"] } -lazy_static = "1.4.0" -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -ssi = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223a384ee71df1333bbce04af445e852eab5", features = [ - "http-did", - "secp256k1", - "rss", -] } -tokio = { version = "1.20.1", features = ["full"] } -toml = "0.7.2" +clap = { workspace = true, features = ["derive", "cargo"] } +lazy_static = { workspace = true } +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true } +ssi = { workspace = true, features = ["http-did", "secp256k1", "rss"] } +tokio = { workspace = true, features = ["full"] } +toml = { workspace = true } diff --git a/trustchain-core/Cargo.toml b/trustchain-core/Cargo.toml index 73672a37..a4d74e8a 100644 --- a/trustchain-core/Cargo.toml +++ b/trustchain-core/Cargo.toml @@ -5,21 +5,17 @@ authors = ["Trustchain Devs"] edition = "2021" [dependencies] -async-trait = "0.1" +async-trait = { workspace = true } base64 = "0.13" -did-method-key = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223a384ee71df1333bbce04af445e852eab5" } -petgraph = { version = "0.6" } -serde = { version = "1.0", features = ["derive"] } -serde_jcs = "0.1.0" -serde_json = "1.0" -sha2 = "0.10.7" -ssi = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223a384ee71df1333bbce04af445e852eab5", features = [ - "http-did", - "secp256k1", - "rss", -] } -tempfile = { version = "3.3" } -thiserror = "1.0" +did-method-key = { workspace = true } +petgraph = { workspace = true } +serde = { workspace = true, features = ["derive"] } +serde_jcs = { workspace = true } +serde_json = { workspace = true } +sha2 = { workspace = true } +ssi = { workspace = true, features = ["http-did", "secp256k1", "rss"] } +tempfile = { workspace = true } +thiserror = { workspace = true } [dev-dependencies] -mockall = "0.11.2" +mockall = { workspace = true } diff --git a/trustchain-ffi/Cargo.toml b/trustchain-ffi/Cargo.toml index d323160c..4d9b35bb 100644 --- a/trustchain-ffi/Cargo.toml +++ b/trustchain-ffi/Cargo.toml @@ -15,19 +15,15 @@ trustchain-ion = { path = "../trustchain-ion" } trustchain-api = { path = "../trustchain-api" } trustchain-http = { path = "../trustchain-http" } -anyhow = "1.0" -chrono = "0.4.26" -did-ion = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223a384ee71df1333bbce04af445e852eab5" } +anyhow = { workspace = true } +chrono = { workspace = true } +did-ion = { workspace = true } # Fixed to same version used to generate bridge: `flutter_rust_bridge_codegen@1.64.0` -flutter_rust_bridge = "=1.64.0" -lazy_static = "1.4.0" -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -ssi = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223a384ee71df1333bbce04af445e852eab5", features = [ - "http-did", - "secp256k1", - "rss", -] } -thiserror = "1.0" -tokio = { version = "1.14.0", features = ["rt-multi-thread"] } -toml = "0.7.2" +flutter_rust_bridge = { workspace = true } +lazy_static = { workspace = true } +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true } +ssi = { workspace = true, features = ["http-did", "secp256k1", "rss"] } +thiserror = { workspace = true } +tokio = { workspace = true, features = ["rt-multi-thread"] } +toml = { workspace = true } diff --git a/trustchain-http/Cargo.toml b/trustchain-http/Cargo.toml index bc6358ca..3360255d 100644 --- a/trustchain-http/Cargo.toml +++ b/trustchain-http/Cargo.toml @@ -15,40 +15,36 @@ trustchain-core = { path = "../trustchain-core" } trustchain-ion = { path = "../trustchain-ion" } trustchain-api = { path = "../trustchain-api" } -async-trait = "0.1" -axum = "0.6" -axum-server = { version = "0.5.1", features = ["tls-rustls"] } +async-trait = { workspace = true } +axum = { workspace = true } +axum-server = { workspace = true, features = ["tls-rustls"] } base64 = "0.21.0" -chrono = "^0.4" -did-ion = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223a384ee71df1333bbce04af445e852eab5" } -hyper = "0.14.26" -image = "0.23.14" -is_empty = "0.2.0" -josekit = "0.8" -lazy_static = "1.4.0" -log = "0.4" -qrcode = "0.12.0" -rand = "0.8" -reqwest = { version = "0.11.16", features = ["stream"] } -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" +chrono = { workspace = true } +did-ion = { workspace = true } +hyper = { workspace = true } +image = { workspace = true } +is_empty = { workspace = true } +josekit = { workspace = true } +lazy_static = { workspace = true } +log = { workspace = true } +qrcode = { workspace = true } +rand = { workspace = true } +reqwest = { workspace = true, features = ["stream"] } +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true } # sha2 = "0.10" -shellexpand = "3.1.0" -ssi = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223a384ee71df1333bbce04af445e852eab5", features = [ - "http-did", - "secp256k1", - "rss", -] } -thiserror = "1.0" -tokio = { version = "1.20.1", features = ["full"] } -tower = "0.4" -toml = "0.7.2" -tracing = "0.1" -tracing-subscriber = "0.3" -serde_with = "3.4.0" +shellexpand = { workspace = true } +ssi = { workspace = true, features = ["http-did", "secp256k1", "rss"] } +thiserror = { workspace = true } +tokio = { workspace = true, features = ["full"] } +tower = { workspace = true } +toml = { workspace = true } +tracing = { workspace = true } +tracing-subscriber = { workspace = true } +serde_with = { workspace = true } [dev-dependencies] -axum-test-helper = "0.2.0" -itertools = "0.13.0" -mockall = "0.11.4" -tempfile = "3.9.0" +axum-test-helper = { workspace = true } +itertools = { workspace = true } +mockall = { workspace = true } +tempfile = { workspace = true } diff --git a/trustchain-ion/Cargo.toml b/trustchain-ion/Cargo.toml index 150eb707..00a6418e 100644 --- a/trustchain-ion/Cargo.toml +++ b/trustchain-ion/Cargo.toml @@ -7,37 +7,33 @@ edition = "2021" [dependencies] trustchain-core = { path = "../trustchain-core" } -anyhow = "1.0" -async-trait = "0.1" -bip39 = "2.0.0" -bitcoin = "0.29.2" -bitcoincore-rpc = "0.16.0" -chrono = "0.4" -did-ion = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223a384ee71df1333bbce04af445e852eab5" } -ed25519-dalek-bip32 = "0.3.0" -flate2 = "1.0.24" -futures = "0.3.21" -hex = "0.4.3" -ipfs-api-backend-hyper = { version = "0.6", features = ["with-send-sync"] } -ipfs-hasher = "0.13.0" -k256 = "0.13.1" -lazy_static = "1.4.0" -mongodb = "2.3.1" -reqwest = "0.11" -secp256k1 = "0.27.0" -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -sha2 = "0.10.7" -ssi = { git = "https://github.com/alan-turing-institute/ssi.git", rev = "1aa3223a384ee71df1333bbce04af445e852eab5", features = [ - "http-did", - "secp256k1", - "rss", -] } -thiserror = "1.0" -toml = "0.7.2" -tokio = { version = "1.20.1", features = ["full"] } +anyhow = { workspace = true } +async-trait = { workspace = true } +bip39 = { workspace = true } +bitcoin = { workspace = true } +bitcoincore-rpc = { workspace = true } +chrono = { workspace = true } +did-ion = { workspace = true } +ed25519-dalek-bip32 = { workspace = true } +flate2 = { workspace = true } +futures = { workspace = true } +hex = { workspace = true } +ipfs-api-backend-hyper = { workspace = true, features = ["with-send-sync"] } +ipfs-hasher = { workspace = true } +k256 = { workspace = true } +lazy_static = { workspace = true } +mongodb = { workspace = true } +reqwest = { workspace = true } +secp256k1 = { workspace = true } +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true } +sha2 = { workspace = true } +ssi = { workspace = true, features = ["http-did", "secp256k1", "rss"] } +thiserror = { workspace = true } +toml = { workspace = true } +tokio = { workspace = true, features = ["full"] } [dev-dependencies] -glob = "0.3" -itertools = "0.13.0" -mockall = "0.11.2" +glob = { workspace = true } +itertools = { workspace = true } +mockall = { workspace = true } From 8e51d812d590fa2addf5703ecde3b8069000303f Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Fri, 22 Nov 2024 17:04:38 +0000 Subject: [PATCH 3/6] Apply sort --- Cargo.toml | 20 ++++++++++---------- trustchain-api/Cargo.toml | 13 ++++++------- trustchain-cli/Cargo.toml | 9 ++++----- trustchain-ffi/Cargo.toml | 9 ++++----- trustchain-http/Cargo.toml | 13 +++++-------- trustchain-ion/Cargo.toml | 5 ++--- 6 files changed, 31 insertions(+), 38 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 568ca2ac..d87c0570 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,16 +7,16 @@ description = "Trustchain decentralised PKI reference implementation." homepage = "https://alan-turing-institute.github.io/trustchain/" repository = "https://github.com/alan-turing-institute/trustchain/" keywords = ["pki", "did", "vc", "vp"] -edition = "2021" +edition = "2021" [workspace] members = [ - "trustchain-core", - "trustchain-ion", - "trustchain-http", "trustchain-api", "trustchain-cli", - "trustchain-ffi" + "trustchain-core", + "trustchain-ffi", + "trustchain-http", + "trustchain-ion", ] resolver = "2" @@ -73,8 +73,8 @@ tracing = "0.1" tracing-subscriber = "0.3" [dependencies] -trustchain-api = { path = "./trustchain-api", version = "0.1.0"} -trustchain-core = { path = "./trustchain-core", version = "0.2.0"} -trustchain-ffi = { path = "./trustchain-ffi", version = "0.1.0"} -trustchain-http = { path = "./trustchain-http", version = "0.1.0"} -trustchain-ion = { path = "./trustchain-ion", version = "0.2.0"} +trustchain-api = { path = "./trustchain-api", version = "0.1.0" } +trustchain-core = { path = "./trustchain-core", version = "0.2.0" } +trustchain-ffi = { path = "./trustchain-ffi", version = "0.1.0" } +trustchain-http = { path = "./trustchain-http", version = "0.1.0" } +trustchain-ion = { path = "./trustchain-ion", version = "0.2.0" } diff --git a/trustchain-api/Cargo.toml b/trustchain-api/Cargo.toml index 96d30510..ce4961f1 100644 --- a/trustchain-api/Cargo.toml +++ b/trustchain-api/Cargo.toml @@ -4,20 +4,19 @@ version = "0.1.0" authors = ["Trustchain Devs"] edition = "2021" - [dependencies] -trustchain-core = { path = "../trustchain-core" } -trustchain-ion = { path = "../trustchain-ion" } -ps_sig = { workspace = true } async-trait = { workspace = true } chrono = { workspace = true } -serde_json = { workspace = true } -sha2 = { workspace = true } -ssi = { workspace = true, features = ["http-did", "secp256k1", "rss"] } did-ion = { workspace = true } futures = { workspace = true } hex = { workspace = true } +ps_sig = { workspace = true } +serde_json = { workspace = true } +sha2 = { workspace = true } +ssi = { workspace = true, features = ["http-did", "secp256k1", "rss"] } +trustchain-core = { path = "../trustchain-core" } +trustchain-ion = { path = "../trustchain-ion" } [dev-dependencies] tokio = { workspace = true, features = ["full"] } diff --git a/trustchain-cli/Cargo.toml b/trustchain-cli/Cargo.toml index f057387e..eb2868b1 100644 --- a/trustchain-cli/Cargo.toml +++ b/trustchain-cli/Cargo.toml @@ -9,11 +9,6 @@ name = "trustchain-cli" path = "src/bin/main.rs" [dependencies] -trustchain-core = { path = "../trustchain-core" } -trustchain-ion = { path = "../trustchain-ion" } -trustchain-api = { path = "../trustchain-api" } -trustchain-http = { path = "../trustchain-http" } - clap = { workspace = true, features = ["derive", "cargo"] } lazy_static = { workspace = true } @@ -22,3 +17,7 @@ serde_json = { workspace = true } ssi = { workspace = true, features = ["http-did", "secp256k1", "rss"] } tokio = { workspace = true, features = ["full"] } toml = { workspace = true } +trustchain-api = { path = "../trustchain-api" } +trustchain-core = { path = "../trustchain-core" } +trustchain-http = { path = "../trustchain-http" } +trustchain-ion = { path = "../trustchain-ion" } diff --git a/trustchain-ffi/Cargo.toml b/trustchain-ffi/Cargo.toml index 4d9b35bb..43589de6 100644 --- a/trustchain-ffi/Cargo.toml +++ b/trustchain-ffi/Cargo.toml @@ -6,14 +6,9 @@ edition = "2021" [lib] crate-type = ["cdylib", "staticlib", "lib"] - # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -trustchain-core = { path = "../trustchain-core" } -trustchain-ion = { path = "../trustchain-ion" } -trustchain-api = { path = "../trustchain-api" } -trustchain-http = { path = "../trustchain-http" } anyhow = { workspace = true } chrono = { workspace = true } @@ -27,3 +22,7 @@ ssi = { workspace = true, features = ["http-did", "secp256k1", "rss"] } thiserror = { workspace = true } tokio = { workspace = true, features = ["rt-multi-thread"] } toml = { workspace = true } +trustchain-api = { path = "../trustchain-api" } +trustchain-core = { path = "../trustchain-core" } +trustchain-http = { path = "../trustchain-http" } +trustchain-ion = { path = "../trustchain-ion" } diff --git a/trustchain-http/Cargo.toml b/trustchain-http/Cargo.toml index 3360255d..1f38faef 100644 --- a/trustchain-http/Cargo.toml +++ b/trustchain-http/Cargo.toml @@ -2,18 +2,13 @@ name = "trustchain-http" version = "0.1.0" edition = "2021" - # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [[bin]] name = "trustchain-http" path = "src/bin/main.rs" [dependencies] -trustchain-core = { path = "../trustchain-core" } -trustchain-ion = { path = "../trustchain-ion" } -trustchain-api = { path = "../trustchain-api" } async-trait = { workspace = true } axum = { workspace = true } @@ -32,16 +27,18 @@ rand = { workspace = true } reqwest = { workspace = true, features = ["stream"] } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } -# sha2 = "0.10" +serde_with = { workspace = true } shellexpand = { workspace = true } ssi = { workspace = true, features = ["http-did", "secp256k1", "rss"] } thiserror = { workspace = true } tokio = { workspace = true, features = ["full"] } -tower = { workspace = true } toml = { workspace = true } +tower = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } -serde_with = { workspace = true } +trustchain-api = { path = "../trustchain-api" } +trustchain-core = { path = "../trustchain-core" } +trustchain-ion = { path = "../trustchain-ion" } [dev-dependencies] axum-test-helper = { workspace = true } diff --git a/trustchain-ion/Cargo.toml b/trustchain-ion/Cargo.toml index 00a6418e..529d5882 100644 --- a/trustchain-ion/Cargo.toml +++ b/trustchain-ion/Cargo.toml @@ -4,9 +4,7 @@ version = "0.2.0" authors = ["Trustchain Devs"] edition = "2021" - [dependencies] -trustchain-core = { path = "../trustchain-core" } anyhow = { workspace = true } async-trait = { workspace = true } bip39 = { workspace = true } @@ -30,8 +28,9 @@ serde_json = { workspace = true } sha2 = { workspace = true } ssi = { workspace = true, features = ["http-did", "secp256k1", "rss"] } thiserror = { workspace = true } -toml = { workspace = true } tokio = { workspace = true, features = ["full"] } +toml = { workspace = true } +trustchain-core = { path = "../trustchain-core" } [dev-dependencies] glob = { workspace = true } From f5529cd4ffec8f17dccfb16ae1b362273414a3b2 Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Fri, 22 Nov 2024 17:36:28 +0000 Subject: [PATCH 4/6] Move packages to crates directory --- Cargo.toml | 19 ++++++------------- .../trustchain-api}/Cargo.toml | 0 .../trustchain-api}/src/api.rs | 0 .../trustchain-api}/src/lib.rs | 0 .../trustchain-cli}/Cargo.toml | 0 .../trustchain-cli}/src/bin/main.rs | 0 .../trustchain-cli}/src/config.rs | 0 .../trustchain-cli}/src/lib.rs | 0 .../trustchain-core}/Cargo.toml | 0 .../trustchain-core}/src/attestor.rs | 0 .../trustchain-core}/src/chain.rs | 0 .../trustchain-core}/src/commitment.rs | 0 .../trustchain-core}/src/controller.rs | 0 .../trustchain-core}/src/data.rs | 0 .../trustchain-core}/src/display.rs | 0 .../trustchain-core}/src/graph.rs | 0 .../trustchain-core}/src/holder.rs | 0 .../trustchain-core}/src/issuer.rs | 0 .../trustchain-core}/src/key_manager.rs | 0 .../trustchain-core}/src/lib.rs | 0 .../trustchain-core}/src/resolver.rs | 0 .../trustchain-core}/src/subject.rs | 0 .../trustchain-core}/src/utils.rs | 0 .../trustchain-core}/src/vc.rs | 0 .../trustchain-core}/src/verifier.rs | 0 .../trustchain-core}/src/vp.rs | 0 .../trustchain-ffi}/Cargo.toml | 0 .../trustchain-ffi}/README.md | 0 .../trustchain-ffi}/src/config.rs | 0 .../trustchain-ffi}/src/gui.rs | 0 .../trustchain-ffi}/src/lib.rs | 0 .../trustchain-ffi}/src/mobile.rs | 0 .../trustchain-ffi}/src/mobile_bridge.io.rs | 0 .../trustchain-ffi}/src/mobile_bridge.rs | 0 .../trustchain-http}/Cargo.toml | 0 .../src/attestation_encryption_utils.rs | 0 .../trustchain-http}/src/attestation_utils.rs | 0 .../trustchain-http}/src/attestor.rs | 0 .../trustchain-http}/src/bin/main.rs | 0 .../trustchain-http}/src/config.rs | 0 .../trustchain-http}/src/data.rs | 0 .../trustchain-http}/src/errors.rs | 0 .../trustchain-http}/src/ion.rs | 0 .../trustchain-http}/src/issuer.rs | 0 .../trustchain-http}/src/lib.rs | 0 .../trustchain-http}/src/middleware.rs | 0 .../trustchain-http}/src/qrcode.rs | 0 .../trustchain-http}/src/requester.rs | 0 .../trustchain-http}/src/resolver.rs | 0 .../trustchain-http}/src/root.rs | 0 .../trustchain-http}/src/server.rs | 0 .../trustchain-http}/src/state.rs | 0 .../trustchain-http}/src/static_handlers.rs | 0 .../trustchain-http}/src/store.rs | 0 .../trustchain-http}/src/temp_s_key.json | 2 +- .../trustchain-http}/src/test.json | 2 +- .../trustchain-http}/src/test_p_key.json | 2 +- .../trustchain-http}/src/utils.rs | 0 .../trustchain-http}/src/verifier.rs | 0 .../trustchain-http}/static/index.html | 0 .../trustchain-http}/static/issuer.html | 0 .../trustchain-http}/tests/attestation.rs | 0 .../trustchain-ion}/Cargo.toml | 0 .../trustchain-ion}/src/attest.rs | 0 .../trustchain-ion}/src/attestor.rs | 0 .../trustchain-ion}/src/commitment.rs | 0 .../trustchain-ion}/src/config.rs | 0 .../trustchain-ion}/src/controller.rs | 0 .../trustchain-ion}/src/create.rs | 0 .../trustchain-ion}/src/data.rs | 0 .../trustchain-ion}/src/ion.rs | 0 .../trustchain-ion}/src/lib.rs | 0 .../trustchain-ion}/src/mnemonic.rs | 0 .../trustchain-ion}/src/resolver.rs | 0 .../trustchain-ion}/src/root.rs | 0 .../trustchain-ion}/src/sidetree.rs | 0 .../trustchain-ion}/src/utils.rs | 0 .../trustchain-ion}/src/verifier.rs | 0 .../trustchain-ion}/tests/config.rs | 0 .../trustchain-ion}/tests/display.rs | 0 .../trustchain-ion}/tests/resolver.rs | 0 .../trustchain-ion}/tests/verifier.rs | 0 .../trustchain-ion}/tests/web.rs | 0 83 files changed, 9 insertions(+), 16 deletions(-) rename {trustchain-api => crates/trustchain-api}/Cargo.toml (100%) rename {trustchain-api => crates/trustchain-api}/src/api.rs (100%) rename {trustchain-api => crates/trustchain-api}/src/lib.rs (100%) rename {trustchain-cli => crates/trustchain-cli}/Cargo.toml (100%) rename {trustchain-cli => crates/trustchain-cli}/src/bin/main.rs (100%) rename {trustchain-cli => crates/trustchain-cli}/src/config.rs (100%) rename {trustchain-cli => crates/trustchain-cli}/src/lib.rs (100%) rename {trustchain-core => crates/trustchain-core}/Cargo.toml (100%) rename {trustchain-core => crates/trustchain-core}/src/attestor.rs (100%) rename {trustchain-core => crates/trustchain-core}/src/chain.rs (100%) rename {trustchain-core => crates/trustchain-core}/src/commitment.rs (100%) rename {trustchain-core => crates/trustchain-core}/src/controller.rs (100%) rename {trustchain-core => crates/trustchain-core}/src/data.rs (100%) rename {trustchain-core => crates/trustchain-core}/src/display.rs (100%) rename {trustchain-core => crates/trustchain-core}/src/graph.rs (100%) rename {trustchain-core => crates/trustchain-core}/src/holder.rs (100%) rename {trustchain-core => crates/trustchain-core}/src/issuer.rs (100%) rename {trustchain-core => crates/trustchain-core}/src/key_manager.rs (100%) rename {trustchain-core => crates/trustchain-core}/src/lib.rs (100%) rename {trustchain-core => crates/trustchain-core}/src/resolver.rs (100%) rename {trustchain-core => crates/trustchain-core}/src/subject.rs (100%) rename {trustchain-core => crates/trustchain-core}/src/utils.rs (100%) rename {trustchain-core => crates/trustchain-core}/src/vc.rs (100%) rename {trustchain-core => crates/trustchain-core}/src/verifier.rs (100%) rename {trustchain-core => crates/trustchain-core}/src/vp.rs (100%) rename {trustchain-ffi => crates/trustchain-ffi}/Cargo.toml (100%) rename {trustchain-ffi => crates/trustchain-ffi}/README.md (100%) rename {trustchain-ffi => crates/trustchain-ffi}/src/config.rs (100%) rename {trustchain-ffi => crates/trustchain-ffi}/src/gui.rs (100%) rename {trustchain-ffi => crates/trustchain-ffi}/src/lib.rs (100%) rename {trustchain-ffi => crates/trustchain-ffi}/src/mobile.rs (100%) rename {trustchain-ffi => crates/trustchain-ffi}/src/mobile_bridge.io.rs (100%) rename {trustchain-ffi => crates/trustchain-ffi}/src/mobile_bridge.rs (100%) rename {trustchain-http => crates/trustchain-http}/Cargo.toml (100%) rename {trustchain-http => crates/trustchain-http}/src/attestation_encryption_utils.rs (100%) rename {trustchain-http => crates/trustchain-http}/src/attestation_utils.rs (100%) rename {trustchain-http => crates/trustchain-http}/src/attestor.rs (100%) rename {trustchain-http => crates/trustchain-http}/src/bin/main.rs (100%) rename {trustchain-http => crates/trustchain-http}/src/config.rs (100%) rename {trustchain-http => crates/trustchain-http}/src/data.rs (100%) rename {trustchain-http => crates/trustchain-http}/src/errors.rs (100%) rename {trustchain-http => crates/trustchain-http}/src/ion.rs (100%) rename {trustchain-http => crates/trustchain-http}/src/issuer.rs (100%) rename {trustchain-http => crates/trustchain-http}/src/lib.rs (100%) rename {trustchain-http => crates/trustchain-http}/src/middleware.rs (100%) rename {trustchain-http => crates/trustchain-http}/src/qrcode.rs (100%) rename {trustchain-http => crates/trustchain-http}/src/requester.rs (100%) rename {trustchain-http => crates/trustchain-http}/src/resolver.rs (100%) rename {trustchain-http => crates/trustchain-http}/src/root.rs (100%) rename {trustchain-http => crates/trustchain-http}/src/server.rs (100%) rename {trustchain-http => crates/trustchain-http}/src/state.rs (100%) rename {trustchain-http => crates/trustchain-http}/src/static_handlers.rs (100%) rename {trustchain-http => crates/trustchain-http}/src/store.rs (100%) rename {trustchain-http => crates/trustchain-http}/src/temp_s_key.json (99%) rename {trustchain-http => crates/trustchain-http}/src/test.json (99%) rename {trustchain-http => crates/trustchain-http}/src/test_p_key.json (99%) rename {trustchain-http => crates/trustchain-http}/src/utils.rs (100%) rename {trustchain-http => crates/trustchain-http}/src/verifier.rs (100%) rename {trustchain-http => crates/trustchain-http}/static/index.html (100%) rename {trustchain-http => crates/trustchain-http}/static/issuer.html (100%) rename {trustchain-http => crates/trustchain-http}/tests/attestation.rs (100%) rename {trustchain-ion => crates/trustchain-ion}/Cargo.toml (100%) rename {trustchain-ion => crates/trustchain-ion}/src/attest.rs (100%) rename {trustchain-ion => crates/trustchain-ion}/src/attestor.rs (100%) rename {trustchain-ion => crates/trustchain-ion}/src/commitment.rs (100%) rename {trustchain-ion => crates/trustchain-ion}/src/config.rs (100%) rename {trustchain-ion => crates/trustchain-ion}/src/controller.rs (100%) rename {trustchain-ion => crates/trustchain-ion}/src/create.rs (100%) rename {trustchain-ion => crates/trustchain-ion}/src/data.rs (100%) rename {trustchain-ion => crates/trustchain-ion}/src/ion.rs (100%) rename {trustchain-ion => crates/trustchain-ion}/src/lib.rs (100%) rename {trustchain-ion => crates/trustchain-ion}/src/mnemonic.rs (100%) rename {trustchain-ion => crates/trustchain-ion}/src/resolver.rs (100%) rename {trustchain-ion => crates/trustchain-ion}/src/root.rs (100%) rename {trustchain-ion => crates/trustchain-ion}/src/sidetree.rs (100%) rename {trustchain-ion => crates/trustchain-ion}/src/utils.rs (100%) rename {trustchain-ion => crates/trustchain-ion}/src/verifier.rs (100%) rename {trustchain-ion => crates/trustchain-ion}/tests/config.rs (100%) rename {trustchain-ion => crates/trustchain-ion}/tests/display.rs (100%) rename {trustchain-ion => crates/trustchain-ion}/tests/resolver.rs (100%) rename {trustchain-ion => crates/trustchain-ion}/tests/verifier.rs (100%) rename {trustchain-ion => crates/trustchain-ion}/tests/web.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index d87c0570..2f0ffb06 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,14 +10,7 @@ keywords = ["pki", "did", "vc", "vp"] edition = "2021" [workspace] -members = [ - "trustchain-api", - "trustchain-cli", - "trustchain-core", - "trustchain-ffi", - "trustchain-http", - "trustchain-ion", -] +members = ["crates/*"] resolver = "2" [workspace.dependencies] @@ -73,8 +66,8 @@ tracing = "0.1" tracing-subscriber = "0.3" [dependencies] -trustchain-api = { path = "./trustchain-api", version = "0.1.0" } -trustchain-core = { path = "./trustchain-core", version = "0.2.0" } -trustchain-ffi = { path = "./trustchain-ffi", version = "0.1.0" } -trustchain-http = { path = "./trustchain-http", version = "0.1.0" } -trustchain-ion = { path = "./trustchain-ion", version = "0.2.0" } +trustchain-api = { path = "crates/trustchain-api", version = "0.1.0" } +trustchain-core = { path = "crates/trustchain-core", version = "0.2.0" } +trustchain-ffi = { path = "crates/trustchain-ffi", version = "0.1.0" } +trustchain-http = { path = "crates/trustchain-http", version = "0.1.0" } +trustchain-ion = { path = "crates/trustchain-ion", version = "0.2.0" } diff --git a/trustchain-api/Cargo.toml b/crates/trustchain-api/Cargo.toml similarity index 100% rename from trustchain-api/Cargo.toml rename to crates/trustchain-api/Cargo.toml diff --git a/trustchain-api/src/api.rs b/crates/trustchain-api/src/api.rs similarity index 100% rename from trustchain-api/src/api.rs rename to crates/trustchain-api/src/api.rs diff --git a/trustchain-api/src/lib.rs b/crates/trustchain-api/src/lib.rs similarity index 100% rename from trustchain-api/src/lib.rs rename to crates/trustchain-api/src/lib.rs diff --git a/trustchain-cli/Cargo.toml b/crates/trustchain-cli/Cargo.toml similarity index 100% rename from trustchain-cli/Cargo.toml rename to crates/trustchain-cli/Cargo.toml diff --git a/trustchain-cli/src/bin/main.rs b/crates/trustchain-cli/src/bin/main.rs similarity index 100% rename from trustchain-cli/src/bin/main.rs rename to crates/trustchain-cli/src/bin/main.rs diff --git a/trustchain-cli/src/config.rs b/crates/trustchain-cli/src/config.rs similarity index 100% rename from trustchain-cli/src/config.rs rename to crates/trustchain-cli/src/config.rs diff --git a/trustchain-cli/src/lib.rs b/crates/trustchain-cli/src/lib.rs similarity index 100% rename from trustchain-cli/src/lib.rs rename to crates/trustchain-cli/src/lib.rs diff --git a/trustchain-core/Cargo.toml b/crates/trustchain-core/Cargo.toml similarity index 100% rename from trustchain-core/Cargo.toml rename to crates/trustchain-core/Cargo.toml diff --git a/trustchain-core/src/attestor.rs b/crates/trustchain-core/src/attestor.rs similarity index 100% rename from trustchain-core/src/attestor.rs rename to crates/trustchain-core/src/attestor.rs diff --git a/trustchain-core/src/chain.rs b/crates/trustchain-core/src/chain.rs similarity index 100% rename from trustchain-core/src/chain.rs rename to crates/trustchain-core/src/chain.rs diff --git a/trustchain-core/src/commitment.rs b/crates/trustchain-core/src/commitment.rs similarity index 100% rename from trustchain-core/src/commitment.rs rename to crates/trustchain-core/src/commitment.rs diff --git a/trustchain-core/src/controller.rs b/crates/trustchain-core/src/controller.rs similarity index 100% rename from trustchain-core/src/controller.rs rename to crates/trustchain-core/src/controller.rs diff --git a/trustchain-core/src/data.rs b/crates/trustchain-core/src/data.rs similarity index 100% rename from trustchain-core/src/data.rs rename to crates/trustchain-core/src/data.rs diff --git a/trustchain-core/src/display.rs b/crates/trustchain-core/src/display.rs similarity index 100% rename from trustchain-core/src/display.rs rename to crates/trustchain-core/src/display.rs diff --git a/trustchain-core/src/graph.rs b/crates/trustchain-core/src/graph.rs similarity index 100% rename from trustchain-core/src/graph.rs rename to crates/trustchain-core/src/graph.rs diff --git a/trustchain-core/src/holder.rs b/crates/trustchain-core/src/holder.rs similarity index 100% rename from trustchain-core/src/holder.rs rename to crates/trustchain-core/src/holder.rs diff --git a/trustchain-core/src/issuer.rs b/crates/trustchain-core/src/issuer.rs similarity index 100% rename from trustchain-core/src/issuer.rs rename to crates/trustchain-core/src/issuer.rs diff --git a/trustchain-core/src/key_manager.rs b/crates/trustchain-core/src/key_manager.rs similarity index 100% rename from trustchain-core/src/key_manager.rs rename to crates/trustchain-core/src/key_manager.rs diff --git a/trustchain-core/src/lib.rs b/crates/trustchain-core/src/lib.rs similarity index 100% rename from trustchain-core/src/lib.rs rename to crates/trustchain-core/src/lib.rs diff --git a/trustchain-core/src/resolver.rs b/crates/trustchain-core/src/resolver.rs similarity index 100% rename from trustchain-core/src/resolver.rs rename to crates/trustchain-core/src/resolver.rs diff --git a/trustchain-core/src/subject.rs b/crates/trustchain-core/src/subject.rs similarity index 100% rename from trustchain-core/src/subject.rs rename to crates/trustchain-core/src/subject.rs diff --git a/trustchain-core/src/utils.rs b/crates/trustchain-core/src/utils.rs similarity index 100% rename from trustchain-core/src/utils.rs rename to crates/trustchain-core/src/utils.rs diff --git a/trustchain-core/src/vc.rs b/crates/trustchain-core/src/vc.rs similarity index 100% rename from trustchain-core/src/vc.rs rename to crates/trustchain-core/src/vc.rs diff --git a/trustchain-core/src/verifier.rs b/crates/trustchain-core/src/verifier.rs similarity index 100% rename from trustchain-core/src/verifier.rs rename to crates/trustchain-core/src/verifier.rs diff --git a/trustchain-core/src/vp.rs b/crates/trustchain-core/src/vp.rs similarity index 100% rename from trustchain-core/src/vp.rs rename to crates/trustchain-core/src/vp.rs diff --git a/trustchain-ffi/Cargo.toml b/crates/trustchain-ffi/Cargo.toml similarity index 100% rename from trustchain-ffi/Cargo.toml rename to crates/trustchain-ffi/Cargo.toml diff --git a/trustchain-ffi/README.md b/crates/trustchain-ffi/README.md similarity index 100% rename from trustchain-ffi/README.md rename to crates/trustchain-ffi/README.md diff --git a/trustchain-ffi/src/config.rs b/crates/trustchain-ffi/src/config.rs similarity index 100% rename from trustchain-ffi/src/config.rs rename to crates/trustchain-ffi/src/config.rs diff --git a/trustchain-ffi/src/gui.rs b/crates/trustchain-ffi/src/gui.rs similarity index 100% rename from trustchain-ffi/src/gui.rs rename to crates/trustchain-ffi/src/gui.rs diff --git a/trustchain-ffi/src/lib.rs b/crates/trustchain-ffi/src/lib.rs similarity index 100% rename from trustchain-ffi/src/lib.rs rename to crates/trustchain-ffi/src/lib.rs diff --git a/trustchain-ffi/src/mobile.rs b/crates/trustchain-ffi/src/mobile.rs similarity index 100% rename from trustchain-ffi/src/mobile.rs rename to crates/trustchain-ffi/src/mobile.rs diff --git a/trustchain-ffi/src/mobile_bridge.io.rs b/crates/trustchain-ffi/src/mobile_bridge.io.rs similarity index 100% rename from trustchain-ffi/src/mobile_bridge.io.rs rename to crates/trustchain-ffi/src/mobile_bridge.io.rs diff --git a/trustchain-ffi/src/mobile_bridge.rs b/crates/trustchain-ffi/src/mobile_bridge.rs similarity index 100% rename from trustchain-ffi/src/mobile_bridge.rs rename to crates/trustchain-ffi/src/mobile_bridge.rs diff --git a/trustchain-http/Cargo.toml b/crates/trustchain-http/Cargo.toml similarity index 100% rename from trustchain-http/Cargo.toml rename to crates/trustchain-http/Cargo.toml diff --git a/trustchain-http/src/attestation_encryption_utils.rs b/crates/trustchain-http/src/attestation_encryption_utils.rs similarity index 100% rename from trustchain-http/src/attestation_encryption_utils.rs rename to crates/trustchain-http/src/attestation_encryption_utils.rs diff --git a/trustchain-http/src/attestation_utils.rs b/crates/trustchain-http/src/attestation_utils.rs similarity index 100% rename from trustchain-http/src/attestation_utils.rs rename to crates/trustchain-http/src/attestation_utils.rs diff --git a/trustchain-http/src/attestor.rs b/crates/trustchain-http/src/attestor.rs similarity index 100% rename from trustchain-http/src/attestor.rs rename to crates/trustchain-http/src/attestor.rs diff --git a/trustchain-http/src/bin/main.rs b/crates/trustchain-http/src/bin/main.rs similarity index 100% rename from trustchain-http/src/bin/main.rs rename to crates/trustchain-http/src/bin/main.rs diff --git a/trustchain-http/src/config.rs b/crates/trustchain-http/src/config.rs similarity index 100% rename from trustchain-http/src/config.rs rename to crates/trustchain-http/src/config.rs diff --git a/trustchain-http/src/data.rs b/crates/trustchain-http/src/data.rs similarity index 100% rename from trustchain-http/src/data.rs rename to crates/trustchain-http/src/data.rs diff --git a/trustchain-http/src/errors.rs b/crates/trustchain-http/src/errors.rs similarity index 100% rename from trustchain-http/src/errors.rs rename to crates/trustchain-http/src/errors.rs diff --git a/trustchain-http/src/ion.rs b/crates/trustchain-http/src/ion.rs similarity index 100% rename from trustchain-http/src/ion.rs rename to crates/trustchain-http/src/ion.rs diff --git a/trustchain-http/src/issuer.rs b/crates/trustchain-http/src/issuer.rs similarity index 100% rename from trustchain-http/src/issuer.rs rename to crates/trustchain-http/src/issuer.rs diff --git a/trustchain-http/src/lib.rs b/crates/trustchain-http/src/lib.rs similarity index 100% rename from trustchain-http/src/lib.rs rename to crates/trustchain-http/src/lib.rs diff --git a/trustchain-http/src/middleware.rs b/crates/trustchain-http/src/middleware.rs similarity index 100% rename from trustchain-http/src/middleware.rs rename to crates/trustchain-http/src/middleware.rs diff --git a/trustchain-http/src/qrcode.rs b/crates/trustchain-http/src/qrcode.rs similarity index 100% rename from trustchain-http/src/qrcode.rs rename to crates/trustchain-http/src/qrcode.rs diff --git a/trustchain-http/src/requester.rs b/crates/trustchain-http/src/requester.rs similarity index 100% rename from trustchain-http/src/requester.rs rename to crates/trustchain-http/src/requester.rs diff --git a/trustchain-http/src/resolver.rs b/crates/trustchain-http/src/resolver.rs similarity index 100% rename from trustchain-http/src/resolver.rs rename to crates/trustchain-http/src/resolver.rs diff --git a/trustchain-http/src/root.rs b/crates/trustchain-http/src/root.rs similarity index 100% rename from trustchain-http/src/root.rs rename to crates/trustchain-http/src/root.rs diff --git a/trustchain-http/src/server.rs b/crates/trustchain-http/src/server.rs similarity index 100% rename from trustchain-http/src/server.rs rename to crates/trustchain-http/src/server.rs diff --git a/trustchain-http/src/state.rs b/crates/trustchain-http/src/state.rs similarity index 100% rename from trustchain-http/src/state.rs rename to crates/trustchain-http/src/state.rs diff --git a/trustchain-http/src/static_handlers.rs b/crates/trustchain-http/src/static_handlers.rs similarity index 100% rename from trustchain-http/src/static_handlers.rs rename to crates/trustchain-http/src/static_handlers.rs diff --git a/trustchain-http/src/store.rs b/crates/trustchain-http/src/store.rs similarity index 100% rename from trustchain-http/src/store.rs rename to crates/trustchain-http/src/store.rs diff --git a/trustchain-http/src/temp_s_key.json b/crates/trustchain-http/src/temp_s_key.json similarity index 99% rename from trustchain-http/src/temp_s_key.json rename to crates/trustchain-http/src/temp_s_key.json index 79927b1a..6ea30505 100644 --- a/trustchain-http/src/temp_s_key.json +++ b/crates/trustchain-http/src/temp_s_key.json @@ -6,4 +6,4 @@ "y": "z737jJY7kxW_lpE1eZur-9n9_HUEGFyBGsTdChzI4Kg", "d": "CfdUwQ-CcBQkWpIDPjhSJAq2SCg6hAGdcvLmCj0aA-c" } -} \ No newline at end of file +} diff --git a/trustchain-http/src/test.json b/crates/trustchain-http/src/test.json similarity index 99% rename from trustchain-http/src/test.json rename to crates/trustchain-http/src/test.json index 0aa0af02..fbdc1a12 100644 --- a/trustchain-http/src/test.json +++ b/crates/trustchain-http/src/test.json @@ -10,4 +10,4 @@ "requester_org": "myTrustworthyEntity", "operator_name": "trustworthyOperator" } -} \ No newline at end of file +} diff --git a/trustchain-http/src/test_p_key.json b/crates/trustchain-http/src/test_p_key.json similarity index 99% rename from trustchain-http/src/test_p_key.json rename to crates/trustchain-http/src/test_p_key.json index 97bb895b..6f6c1c15 100644 --- a/trustchain-http/src/test_p_key.json +++ b/crates/trustchain-http/src/test_p_key.json @@ -9,4 +9,4 @@ "requester_org": "myTrustworthyEntity", "operator_name": "trustworthyOperator" } -} \ No newline at end of file +} diff --git a/trustchain-http/src/utils.rs b/crates/trustchain-http/src/utils.rs similarity index 100% rename from trustchain-http/src/utils.rs rename to crates/trustchain-http/src/utils.rs diff --git a/trustchain-http/src/verifier.rs b/crates/trustchain-http/src/verifier.rs similarity index 100% rename from trustchain-http/src/verifier.rs rename to crates/trustchain-http/src/verifier.rs diff --git a/trustchain-http/static/index.html b/crates/trustchain-http/static/index.html similarity index 100% rename from trustchain-http/static/index.html rename to crates/trustchain-http/static/index.html diff --git a/trustchain-http/static/issuer.html b/crates/trustchain-http/static/issuer.html similarity index 100% rename from trustchain-http/static/issuer.html rename to crates/trustchain-http/static/issuer.html diff --git a/trustchain-http/tests/attestation.rs b/crates/trustchain-http/tests/attestation.rs similarity index 100% rename from trustchain-http/tests/attestation.rs rename to crates/trustchain-http/tests/attestation.rs diff --git a/trustchain-ion/Cargo.toml b/crates/trustchain-ion/Cargo.toml similarity index 100% rename from trustchain-ion/Cargo.toml rename to crates/trustchain-ion/Cargo.toml diff --git a/trustchain-ion/src/attest.rs b/crates/trustchain-ion/src/attest.rs similarity index 100% rename from trustchain-ion/src/attest.rs rename to crates/trustchain-ion/src/attest.rs diff --git a/trustchain-ion/src/attestor.rs b/crates/trustchain-ion/src/attestor.rs similarity index 100% rename from trustchain-ion/src/attestor.rs rename to crates/trustchain-ion/src/attestor.rs diff --git a/trustchain-ion/src/commitment.rs b/crates/trustchain-ion/src/commitment.rs similarity index 100% rename from trustchain-ion/src/commitment.rs rename to crates/trustchain-ion/src/commitment.rs diff --git a/trustchain-ion/src/config.rs b/crates/trustchain-ion/src/config.rs similarity index 100% rename from trustchain-ion/src/config.rs rename to crates/trustchain-ion/src/config.rs diff --git a/trustchain-ion/src/controller.rs b/crates/trustchain-ion/src/controller.rs similarity index 100% rename from trustchain-ion/src/controller.rs rename to crates/trustchain-ion/src/controller.rs diff --git a/trustchain-ion/src/create.rs b/crates/trustchain-ion/src/create.rs similarity index 100% rename from trustchain-ion/src/create.rs rename to crates/trustchain-ion/src/create.rs diff --git a/trustchain-ion/src/data.rs b/crates/trustchain-ion/src/data.rs similarity index 100% rename from trustchain-ion/src/data.rs rename to crates/trustchain-ion/src/data.rs diff --git a/trustchain-ion/src/ion.rs b/crates/trustchain-ion/src/ion.rs similarity index 100% rename from trustchain-ion/src/ion.rs rename to crates/trustchain-ion/src/ion.rs diff --git a/trustchain-ion/src/lib.rs b/crates/trustchain-ion/src/lib.rs similarity index 100% rename from trustchain-ion/src/lib.rs rename to crates/trustchain-ion/src/lib.rs diff --git a/trustchain-ion/src/mnemonic.rs b/crates/trustchain-ion/src/mnemonic.rs similarity index 100% rename from trustchain-ion/src/mnemonic.rs rename to crates/trustchain-ion/src/mnemonic.rs diff --git a/trustchain-ion/src/resolver.rs b/crates/trustchain-ion/src/resolver.rs similarity index 100% rename from trustchain-ion/src/resolver.rs rename to crates/trustchain-ion/src/resolver.rs diff --git a/trustchain-ion/src/root.rs b/crates/trustchain-ion/src/root.rs similarity index 100% rename from trustchain-ion/src/root.rs rename to crates/trustchain-ion/src/root.rs diff --git a/trustchain-ion/src/sidetree.rs b/crates/trustchain-ion/src/sidetree.rs similarity index 100% rename from trustchain-ion/src/sidetree.rs rename to crates/trustchain-ion/src/sidetree.rs diff --git a/trustchain-ion/src/utils.rs b/crates/trustchain-ion/src/utils.rs similarity index 100% rename from trustchain-ion/src/utils.rs rename to crates/trustchain-ion/src/utils.rs diff --git a/trustchain-ion/src/verifier.rs b/crates/trustchain-ion/src/verifier.rs similarity index 100% rename from trustchain-ion/src/verifier.rs rename to crates/trustchain-ion/src/verifier.rs diff --git a/trustchain-ion/tests/config.rs b/crates/trustchain-ion/tests/config.rs similarity index 100% rename from trustchain-ion/tests/config.rs rename to crates/trustchain-ion/tests/config.rs diff --git a/trustchain-ion/tests/display.rs b/crates/trustchain-ion/tests/display.rs similarity index 100% rename from trustchain-ion/tests/display.rs rename to crates/trustchain-ion/tests/display.rs diff --git a/trustchain-ion/tests/resolver.rs b/crates/trustchain-ion/tests/resolver.rs similarity index 100% rename from trustchain-ion/tests/resolver.rs rename to crates/trustchain-ion/tests/resolver.rs diff --git a/trustchain-ion/tests/verifier.rs b/crates/trustchain-ion/tests/verifier.rs similarity index 100% rename from trustchain-ion/tests/verifier.rs rename to crates/trustchain-ion/tests/verifier.rs diff --git a/trustchain-ion/tests/web.rs b/crates/trustchain-ion/tests/web.rs similarity index 100% rename from trustchain-ion/tests/web.rs rename to crates/trustchain-ion/tests/web.rs From 7ea2bc0060622173c8bfcdd1a82ab93a2b6f756a Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Mon, 13 Jan 2025 16:52:36 +0000 Subject: [PATCH 5/6] Update install path in docs Co-authored-by: pwochner Co-authored-by: Tim Hobson --- docs/dev-guide.md | 4 ++-- docs/getting-started.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/dev-guide.md b/docs/dev-guide.md index 4e1b20e9..061c1b10 100644 --- a/docs/dev-guide.md +++ b/docs/dev-guide.md @@ -113,7 +113,7 @@ Where required, configurable variables within crates are managed according to th ### trustchain-cli Install with: ```bash -cargo install --path trustchain-cli +cargo install --path crates/trustchain-cli ``` @@ -308,7 +308,7 @@ rsync -azvuv --prune-empty-dirs \ ##### Running the HTTP server on the VM over https - Go trustchain repo, install from branch you would like to serve: ``` -cargo install --path trustchain-http +cargo install --path crates/trustchain-http ``` - Allow the binary to access 443 without sudo: ``` diff --git a/docs/getting-started.md b/docs/getting-started.md index 401698bd..b4bae601 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -91,7 +91,7 @@ $ cargo build Finally, we install the Trustchain command line interface (CLI): ```console -$ cargo install --path trustchain-cli +$ cargo install --path crates/trustchain-cli ``` !!! info "Trustchain HTTP server (this step is optional)" @@ -100,7 +100,7 @@ $ cargo install --path trustchain-cli To install the Trustchain HTTP server, run: ```console - $ cargo install --path trustchain-http + $ cargo install --path crates/trustchain-http ``` ## Configuration From 74d6d1558625abc6c149f1e735d777a26ba163ef Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Mon, 13 Jan 2025 16:57:52 +0000 Subject: [PATCH 6/6] Fix warning Co-authored-by: pwochner Co-authored-by: Tim Hobson --- crates/trustchain-core/src/graph.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/trustchain-core/src/graph.rs b/crates/trustchain-core/src/graph.rs index cc3912eb..3761c9f1 100644 --- a/crates/trustchain-core/src/graph.rs +++ b/crates/trustchain-core/src/graph.rs @@ -136,7 +136,7 @@ mod tests { fn test_display() -> Result<(), GraphError> { let chains = vec![test_chain(), test_chain()]; let graph = TrustchainGraph::new(&chains, DEFAULT_LABEL_WIDTH)?; - format!("{}", graph); + let _ = format!("{}", graph); Ok(()) } }