mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 04:09:23 +00:00
Fill out Cargo.tomls
Updated missing fields/sections, even if some won't be used, to standardize. Also made FROST tests feature-gated.
This commit is contained in:
@@ -1,14 +1,18 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "serai-coin"
|
name = "serai-coin"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "Abstract interface to represent a coin"
|
description = "An abstract interface representing a coin, along with implementations for various coins."
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/serai-dex/serai"
|
repository = "https://github.com/serai-dex/serai/tree/develop/coin"
|
||||||
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
||||||
keywords = []
|
keywords = []
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
all-features = true
|
||||||
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
async-trait = "0.1"
|
async-trait = "0.1"
|
||||||
thiserror = "1"
|
thiserror = "1"
|
||||||
@@ -38,4 +42,6 @@ serde = { version = "1.0", features = ["derive"] }
|
|||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
test = ["rand_core", "group", "serde", "serde_json"]
|
monero = []
|
||||||
|
monero_test = ["rand_core", "group", "serde", "serde_json"]
|
||||||
|
test = ["monero_test"]
|
||||||
|
|||||||
4
coin/README.md
Normal file
4
coin/README.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Serai Coin
|
||||||
|
|
||||||
|
An abstract interface representing a coin, along with implementations for
|
||||||
|
various coins.
|
||||||
@@ -8,7 +8,9 @@ use frost::{curve::Curve, FrostKeys, sign::PreprocessMachine};
|
|||||||
|
|
||||||
pub(crate) mod utils;
|
pub(crate) mod utils;
|
||||||
|
|
||||||
|
#[cfg(feature = "monero")]
|
||||||
pub mod monero;
|
pub mod monero;
|
||||||
|
#[cfg(feature = "monero")]
|
||||||
pub use self::monero::Monero;
|
pub use self::monero::Monero;
|
||||||
|
|
||||||
#[derive(Clone, Error, Debug)]
|
#[derive(Clone, Error, Debug)]
|
||||||
|
|||||||
@@ -3,8 +3,14 @@ name = "ethereum-serai"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "An Ethereum library supporting Schnorr signing and on-chain verification"
|
description = "An Ethereum library supporting Schnorr signing and on-chain verification"
|
||||||
license = "AGPL-3.0-only"
|
license = "AGPL-3.0-only"
|
||||||
|
repository = "https://github.com/serai-dex/serai/tree/develop/coins/ethereum"
|
||||||
authors = ["Luke Parker <lukeparker5132@gmail.com>", "Elizabeth Binks <elizabethjbinks@gmail.com>"]
|
authors = ["Luke Parker <lukeparker5132@gmail.com>", "Elizabeth Binks <elizabethjbinks@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
publish = false
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
all-features = true
|
||||||
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
hex-literal = "0.3"
|
hex-literal = "0.3"
|
||||||
@@ -24,8 +30,8 @@ eyre = "0.6"
|
|||||||
|
|
||||||
ethers = { version = "0.14", features = ["abigen", "ethers-solc"] }
|
ethers = { version = "0.14", features = ["abigen", "ethers-solc"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
|
||||||
tokio = { version = "1", features = ["macros"] }
|
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
ethers-solc = "0.14"
|
ethers-solc = "0.14"
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
tokio = { version = "1", features = ["macros"] }
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ name = "monero-serai"
|
|||||||
version = "0.1.1-alpha"
|
version = "0.1.1-alpha"
|
||||||
description = "A modern Monero transaction library"
|
description = "A modern Monero transaction library"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/serai-dex/serai"
|
repository = "https://github.com/serai-dex/serai/tree/develop/coins/monero"
|
||||||
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
@@ -48,12 +48,14 @@ monero-epee-bin-serde = "1.0"
|
|||||||
|
|
||||||
reqwest = { version = "0.11", features = ["json"] }
|
reqwest = { version = "0.11", features = ["json"] }
|
||||||
|
|
||||||
[features]
|
|
||||||
multisig = ["rand_chacha", "blake2", "transcript", "frost", "dleq"]
|
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
dalek-ff-group = { path = "../../crypto/dalek-ff-group", version = "0.1" }
|
dalek-ff-group = { path = "../../crypto/dalek-ff-group", version = "0.1" }
|
||||||
monero-generators = { path = "generators", version = "0.1" }
|
monero-generators = { path = "generators", version = "0.1" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tokio = { version = "1", features = ["full"] }
|
tokio = { version = "1", features = ["full"] }
|
||||||
|
|
||||||
|
frost = { package = "modular-frost", path = "../../crypto/frost", version = "0.2", features = ["ed25519", "tests"] }
|
||||||
|
|
||||||
|
[features]
|
||||||
|
multisig = ["rand_chacha", "blake2", "transcript", "frost", "dleq"]
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ name = "monero-generators"
|
|||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
description = "Monero's hash_to_point and generators"
|
description = "Monero's hash_to_point and generators"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/serai-dex/serai"
|
repository = "https://github.com/serai-dex/serai/tree/develop/coins/monero/generators"
|
||||||
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,15 @@ name = "serai-extension"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "An ink! extension for exposing Serai to ink"
|
description = "An ink! extension for exposing Serai to ink"
|
||||||
license = "AGPL-3.0-only"
|
license = "AGPL-3.0-only"
|
||||||
|
repository = "https://github.com/serai-dex/serai/tree/develop/contracts/extension"
|
||||||
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
all-features = true
|
||||||
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
|
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,20 @@ name = "serai-multisig"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "An ink! tracker for Serai's current multisig"
|
description = "An ink! tracker for Serai's current multisig"
|
||||||
license = "AGPL-3.0-only"
|
license = "AGPL-3.0-only"
|
||||||
|
repository = "https://github.com/serai-dex/serai/tree/develop/contracts/multisig"
|
||||||
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
all-features = true
|
||||||
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
name = "serai_multisig"
|
||||||
|
path = "lib.rs"
|
||||||
|
crate-type = ["cdylib"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
|
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
|
||||||
scale-info = { version = "2", default-features = false, features = ["derive"], optional = true }
|
scale-info = { version = "2", default-features = false, features = ["derive"], optional = true }
|
||||||
@@ -22,11 +32,6 @@ serai-extension = { path = "../extension", default-features = false }
|
|||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
lazy_static = "1"
|
lazy_static = "1"
|
||||||
|
|
||||||
[lib]
|
|
||||||
name = "serai_multisig"
|
|
||||||
path = "lib.rs"
|
|
||||||
crate-type = ["cdylib"]
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
std = [
|
std = [
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ name = "dalek-ff-group"
|
|||||||
version = "0.1.5"
|
version = "0.1.5"
|
||||||
description = "ff/group bindings around curve25519-dalek"
|
description = "ff/group bindings around curve25519-dalek"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/serai-dex/serai"
|
repository = "https://github.com/serai-dex/serai/tree/develop/crypto/dalek-ff-group"
|
||||||
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
||||||
keywords = ["curve25519", "ed25519", "ristretto", "dalek", "group"]
|
keywords = ["curve25519", "ed25519", "ristretto", "dalek", "group"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ name = "dleq"
|
|||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
description = "Implementation of single and cross-curve Discrete Log Equality proofs"
|
description = "Implementation of single and cross-curve Discrete Log Equality proofs"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/serai-dex/serai"
|
repository = "https://github.com/serai-dex/serai/tree/develop/crypto/dleq"
|
||||||
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ name = "minimal-ed448"
|
|||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
description = "Unaudited, inefficient implementation of Ed448 in Rust"
|
description = "Unaudited, inefficient implementation of Ed448 in Rust"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/serai-dex/serai"
|
repository = "https://github.com/serai-dex/serai/tree/develop/crypto/ed448"
|
||||||
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
||||||
keywords = ["ed448", "ff", "group"]
|
keywords = ["ed448", "ff", "group"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ name = "modular-frost"
|
|||||||
version = "0.2.4"
|
version = "0.2.4"
|
||||||
description = "Modular implementation of FROST over ff/group"
|
description = "Modular implementation of FROST over ff/group"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/serai-dex/serai"
|
repository = "https://github.com/serai-dex/serai/tree/develop/crypto/frost"
|
||||||
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
||||||
keywords = ["frost", "multisig", "threshold"]
|
keywords = ["frost", "multisig", "threshold"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
@@ -57,3 +57,5 @@ p256 = ["kp256", "dep:p256"]
|
|||||||
secp256k1 = ["kp256", "k256"]
|
secp256k1 = ["kp256", "k256"]
|
||||||
|
|
||||||
ed448 = ["sha3", "minimal-ed448"]
|
ed448 = ["sha3", "minimal-ed448"]
|
||||||
|
|
||||||
|
tests = []
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ pub mod algorithm;
|
|||||||
pub mod sign;
|
pub mod sign;
|
||||||
|
|
||||||
/// Tests for application-provided curves and algorithms.
|
/// Tests for application-provided curves and algorithms.
|
||||||
|
#[cfg(any(test, feature = "tests"))]
|
||||||
pub mod tests;
|
pub mod tests;
|
||||||
|
|
||||||
// Validate a map of serialized values to have the expected included participants
|
// Validate a map of serialized values to have the expected included participants
|
||||||
@@ -215,6 +216,7 @@ impl<C: Curve> FrostCore<C> {
|
|||||||
self.params
|
self.params
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(any(test, feature = "tests"))]
|
||||||
pub(crate) fn secret_share(&self) -> C::F {
|
pub(crate) fn secret_share(&self) -> C::F {
|
||||||
self.secret_share
|
self.secret_share
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -431,6 +431,7 @@ impl<C: Curve, A: Algorithm<C>> AlgorithmMachine<C, A> {
|
|||||||
Ok(AlgorithmMachine { params: Params::new(algorithm, keys, included)? })
|
Ok(AlgorithmMachine { params: Params::new(algorithm, keys, included)? })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(any(test, feature = "tests"))]
|
||||||
pub(crate) fn unsafe_override_preprocess(
|
pub(crate) fn unsafe_override_preprocess(
|
||||||
self,
|
self,
|
||||||
preprocess: PreprocessPackage<C>,
|
preprocess: PreprocessPackage<C>,
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ pub struct Vectors {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
impl From<serde_json::Value> for Vectors {
|
impl From<serde_json::Value> for Vectors {
|
||||||
fn from(value: serde_json::Value) -> Vectors {
|
fn from(value: serde_json::Value) -> Vectors {
|
||||||
let to_str = |value: &serde_json::Value| dbg!(value).as_str().unwrap().to_string();
|
let to_str = |value: &serde_json::Value| value.as_str().unwrap().to_string();
|
||||||
Vectors {
|
Vectors {
|
||||||
threshold: u16::from_str(value["config"]["NUM_PARTICIPANTS"].as_str().unwrap()).unwrap(),
|
threshold: u16::from_str(value["config"]["NUM_PARTICIPANTS"].as_str().unwrap()).unwrap(),
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ name = "multiexp"
|
|||||||
version = "0.2.1"
|
version = "0.2.1"
|
||||||
description = "Multiexponentation algorithms for ff/group"
|
description = "Multiexponentation algorithms for ff/group"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/serai-dex/serai"
|
repository = "https://github.com/serai-dex/serai/tree/develop/crypto/multiexp"
|
||||||
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
||||||
keywords = ["multiexp", "ff", "group"]
|
keywords = ["multiexp", "ff", "group"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ name = "flexible-transcript"
|
|||||||
version = "0.1.3"
|
version = "0.1.3"
|
||||||
description = "A simple transcript trait definition, along with viable options"
|
description = "A simple transcript trait definition, along with viable options"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/serai-dex/serai"
|
repository = "https://github.com/serai-dex/serai/tree/develop/crypto/transcript"
|
||||||
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
||||||
keywords = ["transcript"]
|
keywords = ["transcript"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|||||||
@@ -3,12 +3,16 @@ name = "serai-processor"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "Multichain processor premised on canonicity to reach distributed consensus automatically"
|
description = "Multichain processor premised on canonicity to reach distributed consensus automatically"
|
||||||
license = "AGPL-3.0-only"
|
license = "AGPL-3.0-only"
|
||||||
repository = "https://github.com/serai-dex/serai"
|
repository = "https://github.com/serai-dex/serai/tree/develop/processor"
|
||||||
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
||||||
keywords = []
|
keywords = []
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
all-features = true
|
||||||
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
async-trait = "0.1"
|
async-trait = "0.1"
|
||||||
rand_core = "0.6"
|
rand_core = "0.6"
|
||||||
@@ -17,9 +21,9 @@ thiserror = "1"
|
|||||||
group = "0.12"
|
group = "0.12"
|
||||||
|
|
||||||
transcript = { package = "flexible-transcript", path = "../crypto/transcript", features = ["recommended"] }
|
transcript = { package = "flexible-transcript", path = "../crypto/transcript", features = ["recommended"] }
|
||||||
frost = { package = "modular-frost", path = "../crypto/frost", features = ["secp256k1", "ed25519"] }
|
frost = { package = "modular-frost", path = "../crypto/frost", features = ["ed25519"] }
|
||||||
|
|
||||||
serai-coin = { path = "../coin" }
|
serai-coin = { path = "../coin", features = ["monero"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
@@ -27,4 +31,6 @@ hex = "0.4"
|
|||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
tokio = { version = "1", features = ["full"] }
|
tokio = { version = "1", features = ["full"] }
|
||||||
|
|
||||||
serai-coin = { path = "../coin", features = ["test"] }
|
frost = { package = "modular-frost", path = "../crypto/frost", features = ["ed25519", "tests"] }
|
||||||
|
|
||||||
|
serai-coin = { path = "../coin", features = ["monero", "test"] }
|
||||||
|
|||||||
@@ -3,10 +3,15 @@ name = "serai-consensus"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "Serai consensus module"
|
description = "Serai consensus module"
|
||||||
license = "AGPL-3.0-only"
|
license = "AGPL-3.0-only"
|
||||||
|
repository = "https://github.com/serai-dex/serai/tree/develop/substrate/consensus"
|
||||||
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
all-features = true
|
||||||
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
sp-core = { git = "https://github.com/serai-dex/substrate" }
|
sp-core = { git = "https://github.com/serai-dex/substrate" }
|
||||||
sp-trie = { git = "https://github.com/serai-dex/substrate" }
|
sp-trie = { git = "https://github.com/serai-dex/substrate" }
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ name = "serai-node"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "Serai network node, built over Substrate"
|
description = "Serai network node, built over Substrate"
|
||||||
license = "AGPL-3.0-only"
|
license = "AGPL-3.0-only"
|
||||||
|
repository = "https://github.com/serai-dex/serai/tree/develop/substrate/node"
|
||||||
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = false
|
||||||
|
|||||||
@@ -3,9 +3,13 @@ name = "serai-runtime"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "Serai network node runtime, built over Substrate"
|
description = "Serai network node runtime, built over Substrate"
|
||||||
license = "AGPL-3.0-only"
|
license = "AGPL-3.0-only"
|
||||||
|
repository = "https://github.com/serai-dex/serai/tree/develop/substrate/runtime"
|
||||||
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
all-features = true
|
||||||
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
hex-literal = { version = "0.3.4", optional = true }
|
hex-literal = { version = "0.3.4", optional = true }
|
||||||
|
|||||||
Reference in New Issue
Block a user