Merge pull request #5027 from nymtech/jon/integrate-credential-proxy-into-workspace

Integrate nym-credential-proxy into workspace
This commit is contained in:
Jon Häggblad
2024-10-29 20:47:07 +01:00
committed by GitHub
8 changed files with 119 additions and 5518 deletions
@@ -1,45 +0,0 @@
name: ci-nym-credential-proxy
on:
pull_request:
paths:
- 'common/**'
- 'nym-credential-proxy/**'
- '.github/workspace/ci-nym-credential-proxy.yml'
workflow_dispatch:
jobs:
build:
runs-on: arc-ubuntu-22.04
env:
CARGO_TERM_COLOR: always
MANIFEST_PATH: "--manifest-path nym-credential-proxy/Cargo.toml"
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: ${{ env.MANIFEST_PATH }} --all -- --check
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: ${{ env.MANIFEST_PATH }} --workspace --all-targets
- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: ${{ env.MANIFEST_PATH }} --workspace --all-targets -- -D warnings
Generated
+95
View File
@@ -5194,6 +5194,75 @@ dependencies = [
"tokio",
]
[[package]]
name = "nym-credential-proxy"
version = "0.1.1"
dependencies = [
"anyhow",
"async-trait",
"axum 0.7.7",
"bip39",
"bs58",
"cfg-if",
"clap 4.5.20",
"colored",
"dotenvy",
"futures",
"humantime 2.1.0",
"nym-bin-common 0.6.0",
"nym-compact-ecash 0.1.0",
"nym-config 0.1.0",
"nym-credential-proxy-requests",
"nym-credentials",
"nym-credentials-interface 0.1.0",
"nym-crypto 0.4.0",
"nym-http-api-common",
"nym-network-defaults 0.1.0",
"nym-validator-client 0.1.0",
"rand",
"reqwest 0.12.4",
"serde",
"serde_json",
"sqlx",
"strum 0.26.3",
"strum_macros 0.26.4",
"tempfile",
"thiserror",
"time",
"tokio",
"tokio-util",
"tower 0.4.13",
"tower-http",
"tracing",
"url",
"utoipa",
"utoipa-swagger-ui",
"uuid",
"zeroize",
]
[[package]]
name = "nym-credential-proxy-requests"
version = "0.1.0"
dependencies = [
"async-trait",
"nym-credentials",
"nym-credentials-interface 0.1.0",
"nym-http-api-client 0.1.0",
"nym-http-api-common",
"nym-serde-helpers 0.1.0",
"reqwest 0.12.4",
"schemars",
"serde",
"serde_json",
"time",
"tsify",
"utoipa",
"uuid",
"wasm-bindgen",
"wasmtimer",
]
[[package]]
name = "nym-credential-storage"
version = "0.1.0"
@@ -7096,6 +7165,31 @@ dependencies = [
"thiserror",
]
[[package]]
name = "nym-vpn-api-lib-wasm"
version = "0.1.0"
dependencies = [
"bs58",
"getrandom",
"js-sys",
"nym-bin-common 0.6.0",
"nym-compact-ecash 0.1.0",
"nym-credential-proxy-requests",
"nym-credentials",
"nym-credentials-interface 0.1.0",
"nym-crypto 0.4.0",
"nym-ecash-time 0.1.0",
"serde",
"serde-wasm-bindgen 0.6.5",
"serde_json",
"thiserror",
"time",
"tsify",
"wasm-bindgen",
"wasm-utils",
"zeroize",
]
[[package]]
name = "nym-wallet-types"
version = "1.0.0"
@@ -8724,6 +8818,7 @@ dependencies = [
"schemars_derive",
"serde",
"serde_json",
"uuid",
]
[[package]]
+19 -19
View File
@@ -19,33 +19,33 @@ members = [
"clients/native",
"clients/native/websocket-requests",
"clients/socks5",
"common/authenticator-requests",
"common/async-file-watcher",
"common/authenticator-requests",
"common/bandwidth-controller",
"common/bin-common",
"common/client-core",
"common/client-core/config-types",
"common/client-core/surb-storage",
"common/client-core/gateways-storage",
"common/client-core/surb-storage",
"common/client-libs/gateway-client",
"common/client-libs/mixnet-client",
"common/client-libs/validator-client",
"common/commands",
"common/config",
"common/cosmwasm-smart-contracts/coconut-bandwidth-contract",
"common/cosmwasm-smart-contracts/ecash-contract",
"common/cosmwasm-smart-contracts/coconut-dkg",
"common/cosmwasm-smart-contracts/contracts-common",
"common/cosmwasm-smart-contracts/ecash-contract",
"common/cosmwasm-smart-contracts/group-contract",
"common/cosmwasm-smart-contracts/mixnet-contract",
"common/cosmwasm-smart-contracts/multisig-contract",
"common/cosmwasm-smart-contracts/vesting-contract",
"common/country-group",
"common/credential-storage",
"common/credentials",
"common/credential-utils",
"common/credentials-interface",
"common/credential-verification",
"common/credentials",
"common/credentials-interface",
"common/crypto",
"common/dkg",
"common/ecash-double-spending",
@@ -65,10 +65,10 @@ members = [
"common/network-defaults",
"common/node-tester-utils",
"common/nonexhaustive-delayqueue",
"common/nymcoconut",
"common/nym_offline_compact_ecash",
"common/nym-id",
"common/nym-metrics",
"common/nym_offline_compact_ecash",
"common/nymcoconut",
"common/nymsphinx",
"common/nymsphinx/acknowledgements",
"common/nymsphinx/addressing",
@@ -104,20 +104,23 @@ members = [
"gateway",
"integrations/bity",
"mixnode",
"sdk/ffi/cpp",
"sdk/ffi/go",
"sdk/ffi/shared",
"sdk/lib/socks5-listener",
"sdk/rust/nym-sdk",
"sdk/ffi/shared",
"sdk/ffi/go",
"sdk/ffi/cpp",
"service-providers/authenticator",
"service-providers/common",
"service-providers/ip-packet-router",
"service-providers/network-requester",
"nym-network-monitor",
"nym-api",
"nym-browser-extension/storage",
"nym-api/nym-api-requests",
"nym-browser-extension/storage",
"nym-credential-proxy/nym-credential-proxy",
"nym-credential-proxy/nym-credential-proxy-requests",
"nym-credential-proxy/vpn-api-lib-wasm",
"nym-data-observatory",
"nym-network-monitor",
"nym-node",
"nym-node/nym-node-http-api",
"nym-node/nym-node-requests",
@@ -140,11 +143,11 @@ members = [
"wasm/mix-fetch",
"wasm/node-tester",
"wasm/zknym-lib",
"tools/internal/testnet-manager",
"tools/internal/testnet-manager/dkg-bypass-contract",
"tools/echo-server",
"tools/internal/contract-state-importer/importer-cli",
"tools/internal/contract-state-importer/importer-contract",
"tools/internal/testnet-manager",
"tools/internal/testnet-manager/dkg-bypass-contract",
]
default-members = [
@@ -155,6 +158,7 @@ default-members = [
"gateway",
"mixnode",
"nym-api",
"nym-credential-proxy/nym-credential-proxy",
"nym-data-observatory",
"nym-node",
"nym-node-status-api",
@@ -199,11 +203,8 @@ axum-extra = "0.9.4"
base64 = "0.22.1"
bincode = "1.3.3"
bip39 = { version = "2.0.0", features = ["zeroize"] }
# can we unify those?
bit-vec = "0.7.0"
bit-vec = "0.7.0" # can we unify those?
bitvec = "1.0.0"
blake3 = "1.5.4"
bloomfilter = "1.0.14"
bs58 = "0.5.1"
@@ -408,7 +409,6 @@ wasm-bindgen-futures = "0.4.45"
wasmtimer = "0.2.0"
web-sys = "0.3.72"
# Profile settings for individual crates
# Compile-time verified queries do quite a bit of work at compile time. Incremental
-5388
View File
File diff suppressed because it is too large Load Diff
-62
View File
@@ -1,62 +0,0 @@
[profile.release]
panic = "abort"
opt-level = "s"
overflow-checks = true
[profile.dev]
panic = "abort"
[workspace]
resolver = "2"
members = [
"nym-credential-proxy",
"nym-credential-proxy-requests",
"vpn-api-lib-wasm"
]
[workspace.package]
authors = ["Nym Technologies SA"]
repository = "https://github.com/nymtech/nym"
homepage = "https://nymtech.net"
documentation = "https://nymtech.net"
edition = "2021"
license = "GPL-3.0"
[workspace.dependencies]
async-trait = "0.1.80"
axum = "0.7.5"
anyhow = "1.0.71"
bip39 = "2.0.0"
bs58 = "0.5.1"
colored = "2.1.0"
cfg-if = "1.0.0"
clap = "4.5.4"
dotenv = "0.15.0"
futures = "0.3.30"
humantime = "2.1.0"
thiserror = "1.0.59"
rand = "0.8.5"
reqwest = "0.12.4"
schemars = "0.8.17"
strum = "0.26.3"
strum_macros = "0.26.4"
serde = "1.0.200"
serde_json = "1.0.117"
sqlx = "0.7.4"
tempfile = "3.12.0"
time = "0.3.36"
tracing = "0.1.40"
tsify = "0.4.5"
tokio = "1.37.0"
tokio-util = "0.7.10"
tower = "0.5.0"
tower-http = "0.5.2"
uuid = "1.8.0"
url = "2.5.2"
utoipa = "4.2.0"
utoipa-swagger-ui = "7.0.1"
zeroize = "1.6.0"
wasm-bindgen = "0.2.93"
wasmtimer = "0.2.0"
@@ -27,7 +27,7 @@ utoipa = { workspace = true, optional = true }
nym-credentials = { path = "../../common/credentials" }
nym-credentials-interface = { path = "../../common/credentials-interface" }
nym-http-api-common = { path = "../../common/http-api-common", optional = true }
nym-http-api-client = { path = "../../common/http-api-client" }
nym-http-api-client = { path = "../../common/http-api-client" }
nym-serde-helpers = { path = "../../common/serde-helpers", features = ["bs58"] }
[target."cfg(target_arch = \"wasm32\")".dependencies.wasmtimer]
@@ -19,7 +19,7 @@ bs58.workspace = true
cfg-if = { workspace = true }
colored.workspace = true
clap = { workspace = true, features = ["derive", "env"] }
dotenv.workspace = true
dotenvy.workspace = true
futures.workspace = true
humantime.workspace = true
rand.workspace = true
@@ -40,7 +40,7 @@ impl SqliteStorageManager {
sqlx::query_as!(
MinimalWalletShare,
r#"
SELECT t1.node_id, t1.blinded_signature, t1.epoch_id, t1.expiration_date
SELECT t1.node_id, t1.blinded_signature, t1.epoch_id, t1.expiration_date as "expiration_date!: Date"
FROM partial_blinded_wallet as t1
JOIN ticketbook_deposit as t2
on t1.corresponding_deposit = t2.deposit_id
@@ -79,10 +79,11 @@ impl SqliteStorageManager {
device_id: &str,
credential_id: &str,
) -> Result<Vec<MinimalWalletShare>, sqlx::Error> {
// https://docs.rs/sqlx/latest/sqlx/macro.query.html#force-a-differentcustom-type
sqlx::query_as!(
MinimalWalletShare,
r#"
SELECT t1.node_id, t1.blinded_signature, t1.epoch_id, t1.expiration_date
SELECT t1.node_id, t1.blinded_signature, t1.epoch_id, t1.expiration_date as "expiration_date!: Date"
FROM partial_blinded_wallet as t1
JOIN ticketbook_deposit as t2
on t1.corresponding_deposit = t2.deposit_id