Merge branch 'develop' into feature/nym-api-tests
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
name: Publish Nym Wallet (Windows 10)
|
||||
on:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
|
||||
@@ -1,23 +1,36 @@
|
||||
name: CI for Nym API Tests
|
||||
'on':
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- nym-api/**
|
||||
- "nym-api/**"
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: nym-api/tests
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: nym-api tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use correct nvm version
|
||||
run: nvm use v18.1.0
|
||||
|
||||
- name: Install npm
|
||||
run: npm install
|
||||
|
||||
- name: Node v18
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.1.0
|
||||
|
||||
- name: Install yarn
|
||||
run: yarn install
|
||||
|
||||
- name: Run yarn
|
||||
run: yarn
|
||||
|
||||
- name: Run tests
|
||||
run: 'yarn test:qa'
|
||||
run: yarn test:qa
|
||||
working-directory: nym-api/tests
|
||||
|
||||
Generated
+1
-1
@@ -1601,6 +1601,7 @@ dependencies = [
|
||||
"ff 0.11.1",
|
||||
"group 0.11.0",
|
||||
"lazy_static",
|
||||
"nym-contracts-common",
|
||||
"nym-pemstore",
|
||||
"rand 0.8.5",
|
||||
"rand_chacha 0.3.1",
|
||||
@@ -3519,7 +3520,6 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"bs58",
|
||||
"cosmwasm-std",
|
||||
"dkg",
|
||||
"schemars",
|
||||
"serde",
|
||||
"serde_json",
|
||||
|
||||
@@ -9,7 +9,6 @@ edition = "2021"
|
||||
[dependencies]
|
||||
bs58 = "0.4.0"
|
||||
cosmwasm-std = "1.0.0"
|
||||
dkg = { path = "../../../common/dkg", optional = true }
|
||||
schemars = "0.8"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
thiserror = "1"
|
||||
|
||||
@@ -69,19 +69,3 @@ impl<'de> Deserialize<'de> for ContractSafeBytes {
|
||||
Ok(ContractSafeBytes(bytes))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "dkg")]
|
||||
impl<'a> From<&'a Dealing> for ContractSafeBytes {
|
||||
fn from(dealing: &'a Dealing) -> Self {
|
||||
ContractSafeBytes(dealing.to_bytes())
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "dkg")]
|
||||
impl<'a> TryFrom<&'a ContractSafeBytes> for Dealing {
|
||||
type Error = DkgError;
|
||||
|
||||
fn try_from(value: &'a ContractSafeBytes) -> Result<Self, Self::Error> {
|
||||
Dealing::try_from_bytes(&value.0)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
[package]
|
||||
name = "nym-crypto"
|
||||
version = "0.1.0"
|
||||
description = "Crypto library for the nym mixnet"
|
||||
edition = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
license = { workspace = true }
|
||||
repository = { workspace = true }
|
||||
readme = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
documentation = { workspace = true }
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
aes = { version = "0.8.1", optional = true }
|
||||
@@ -30,7 +26,7 @@ subtle-encoding = { version = "0.5", features = ["bech32-preview"]}
|
||||
thiserror = "1.0.37"
|
||||
|
||||
# internal
|
||||
nym-sphinx-types = { path = "../nymsphinx/types" }
|
||||
nym-sphinx-types = { path = "../nymsphinx/types", version = "0.1.0" }
|
||||
nym-pemstore = { path = "../../common/pemstore", version = "0.1.0" }
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -12,9 +12,10 @@ bitvec = "1.0.0"
|
||||
# unfortunately until https://github.com/zkcrypto/bls12_381/issues/10 is resolved, we have to rely on the fork
|
||||
# as we need to be able to serialize Gt so that we could create the lookup table for baby-step-giant-step algorithm
|
||||
bls12_381 = { git = "https://github.com/jstuczyn/bls12_381", branch ="gt-serialisation", default-features = false, features = ["alloc", "pairings", "experimental", "zeroize"] }
|
||||
|
||||
nym-contracts-common = { path = "../cosmwasm-smart-contracts/contracts-common", optional = true }
|
||||
bs58 = "0.4"
|
||||
|
||||
|
||||
lazy_static = "1.4.0"
|
||||
rand = { version = "0.8.5", default-features = false}
|
||||
rand_chacha = "0.3"
|
||||
@@ -41,3 +42,7 @@ criterion = "0.3"
|
||||
[[bench]]
|
||||
name = "benchmarks"
|
||||
harness = false
|
||||
|
||||
[features]
|
||||
default = []
|
||||
cw-types = ["nym-contracts-common"]
|
||||
@@ -307,6 +307,24 @@ impl Dealing {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "cw-types")]
|
||||
impl<'a> From<&'a Dealing> for nym_contracts_common::dealings::ContractSafeBytes {
|
||||
fn from(dealing: &'a Dealing) -> Self {
|
||||
nym_contracts_common::dealings::ContractSafeBytes(dealing.to_bytes())
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "cw-types")]
|
||||
impl<'a> TryFrom<&'a nym_contracts_common::dealings::ContractSafeBytes> for Dealing {
|
||||
type Error = DkgError;
|
||||
|
||||
fn try_from(
|
||||
value: &'a nym_contracts_common::dealings::ContractSafeBytes,
|
||||
) -> Result<Self, Self::Error> {
|
||||
Dealing::try_from_bytes(&value.0)
|
||||
}
|
||||
}
|
||||
|
||||
// this assumes all dealings have been verified
|
||||
pub fn try_recover_verification_keys(
|
||||
dealings: &[Dealing],
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
[package]
|
||||
name = "nym-sphinx"
|
||||
version = "0.1.0"
|
||||
description = "Top-level crate for sphinx packets as used by the Nym mixnet"
|
||||
edition = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
license = { workspace = true }
|
||||
repository = { workspace = true }
|
||||
readme = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
documentation = { workspace = true }
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
rand = { version = "0.7.3", features = ["wasm-bindgen"] }
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
[package]
|
||||
name = "nym-sphinx-acknowledgements"
|
||||
version = "0.1.0"
|
||||
description = "Sphinx packet ack messages"
|
||||
edition = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
license = { workspace = true }
|
||||
repository = { workspace = true }
|
||||
readme = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
documentation = { workspace = true }
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
rand = { version = "0.7.3", features = ["wasm-bindgen"] }
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
[package]
|
||||
name = "nym-sphinx-addressing"
|
||||
version = "0.1.0"
|
||||
description = "Nym mixnet addressing"
|
||||
edition = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
license = { workspace = true }
|
||||
repository = { workspace = true }
|
||||
readme = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
documentation = { workspace = true }
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
nym-crypto = { path = "../../crypto", features = ["asymmetric"] } # all addresses are expressed in terms on their crypto keys
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
[package]
|
||||
name = "nym-sphinx-anonymous-replies"
|
||||
version = "0.1.0"
|
||||
description = "Anonymous sphinx packet replies using singly-use-reply-blocks (SURB)"
|
||||
edition = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
license = { workspace = true }
|
||||
repository = { workspace = true }
|
||||
readme = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
documentation = { workspace = true }
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
rand = { version = "0.7.3", features = ["wasm-bindgen"] }
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
[package]
|
||||
name = "nym-sphinx-chunking"
|
||||
version = "0.1.0"
|
||||
description = "Sphinx packet chunking of underlying data packets"
|
||||
edition = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
license = { workspace = true }
|
||||
repository = { workspace = true }
|
||||
readme = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
documentation = { workspace = true }
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
[package]
|
||||
name = "nym-sphinx-cover"
|
||||
version = "0.1.0"
|
||||
description = "Sphinx packets used as cover traffic"
|
||||
edition = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
license = { workspace = true }
|
||||
repository = { workspace = true }
|
||||
readme = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
documentation = { workspace = true }
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
rand = { version = "0.7.3", features = ["wasm-bindgen"] }
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
[package]
|
||||
name = "nym-sphinx-forwarding"
|
||||
version = "0.1.0"
|
||||
description = "Sphinx packet forwarding as Nym mix packets"
|
||||
edition = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
license = { workspace = true }
|
||||
repository = { workspace = true }
|
||||
readme = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
documentation = { workspace = true }
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
nym-sphinx-addressing = { path = "../addressing" }
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
[package]
|
||||
name = "nym-sphinx-framing"
|
||||
version = "0.1.0"
|
||||
description = "Sphinx packet framing for the Nym mixnet"
|
||||
edition = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
license = { workspace = true }
|
||||
repository = { workspace = true }
|
||||
readme = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
documentation = { workspace = true }
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
bytes = "1.0"
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
[package]
|
||||
name = "nym-sphinx-params"
|
||||
version = "0.1.0"
|
||||
description = "Sphinx packet parameters for the Nym mixnet"
|
||||
edition = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
license = { workspace = true }
|
||||
repository = { workspace = true }
|
||||
readme = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
documentation = { workspace = true }
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
thiserror = "1.0.37"
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
[package]
|
||||
name = "nym-sphinx-types"
|
||||
version = "0.1.0"
|
||||
description = "Re-export sphinx packet types"
|
||||
edition = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
license = { workspace = true }
|
||||
repository = { workspace = true }
|
||||
readme = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
documentation = { workspace = true }
|
||||
|
||||
[dependencies]
|
||||
sphinx-packet = { version = "0.1.0" }
|
||||
|
||||
+2
-2
@@ -75,12 +75,12 @@ credentials = { path = "../common/credentials" }
|
||||
nym-crypto = { path = "../common/crypto" }
|
||||
cw3 = { version = "0.13.4" }
|
||||
cw4 = { version = "0.13.4" }
|
||||
dkg = { path = "../common/dkg" }
|
||||
dkg = { path = "../common/dkg", features = ["cw-types"] }
|
||||
gateway-client = { path = "../common/client-libs/gateway-client" }
|
||||
nym-inclusion-probability = { path = "../common/inclusion-probability" }
|
||||
nym-mixnet-contract-common = { path = "../common/cosmwasm-smart-contracts/mixnet-contract" }
|
||||
nym-vesting-contract-common = { path = "../common/cosmwasm-smart-contracts/vesting-contract" }
|
||||
nym-contracts-common = { path = "../common/cosmwasm-smart-contracts/contracts-common", features = ["dkg"] }
|
||||
nym-contracts-common = { path = "../common/cosmwasm-smart-contracts/contracts-common" }
|
||||
multisig-contract-common = { path = "../common/cosmwasm-smart-contracts/multisig-contract" }
|
||||
nymcoconut = { path = "../common/nymcoconut" }
|
||||
nym-sphinx = { path = "../common/nymsphinx" }
|
||||
|
||||
Reference in New Issue
Block a user