diff --git a/CHANGELOG.md b/CHANGELOG.md index 4241f1a5..a6850a85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ Race Protocol: A multi-chain infrastructure for asymmetric competitive games # Master(Unreleased) +# 0.2.5 + +## Fixes +- Remove duplicated definitions for `SecretIdent` and `SecretShare`, which causes the compliation error. + # 0.2.4 ## Features diff --git a/Cargo.toml b/Cargo.toml index bb87509e..70fadbe1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,12 +22,12 @@ members = [ ] [workspace.dependencies] -race-api = { path = "api", version = ">=0.2.4" } -race-proc-macro = { path = "proc-macro", version = ">=0.2.4" } -race-core = { path = "core", version = ">=0.2.4" } -race-client = { path = "client", version = ">=0.2.4" } -race-encryptor = { path = "encryptor", version = ">=0.2.4" } -race-test = { path = "test", version = ">=0.2.4" } +race-api = { path = "api", version = ">=0.2.5" } +race-proc-macro = { path = "proc-macro", version = ">=0.2.5" } +race-core = { path = "core", version = ">=0.2.5" } +race-client = { path = "client", version = ">=0.2.5" } +race-encryptor = { path = "encryptor", version = ">=0.2.5" } +race-test = { path = "test", version = ">=0.2.5" } race-env = { path = "env", version = "*" } race-transport = { path = "transport", version = "*" } uuid = { version = "1.1.2", features = ["v4", "fast-rng"] } @@ -78,7 +78,7 @@ regex = "1" [workspace.package] authors = ["RACE Foundation "] -version = "0.2.4" +version = "0.2.5" edition = "2021" rust-version = "1.65.0" license = "MPL-2.0" diff --git a/core/src/types/common.rs b/core/src/types/common.rs index 5133fd53..0e8fdedf 100644 --- a/core/src/types/common.rs +++ b/core/src/types/common.rs @@ -27,95 +27,3 @@ impl std::fmt::Display for Signature { ) } } - -#[derive(Hash, Debug, BorshDeserialize, BorshSerialize, Clone, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] -pub struct SecretIdent { - pub from_addr: String, - pub to_addr: Option, - pub random_id: usize, - pub index: usize, -} - -impl SecretIdent { - #[allow(unused)] - pub fn new_for_assigned>( - random_id: usize, - index: usize, - from_addr: S, - to_addr: S, - ) -> Self { - SecretIdent { - from_addr: from_addr.into(), - to_addr: Some(to_addr.into()), - random_id, - index, - } - } - - #[allow(unused)] - pub fn new_for_revealed>( - random_id: RandomId, - index: usize, - from_addr: S, - ) -> Self { - SecretIdent { - from_addr: from_addr.into(), - to_addr: None, - random_id, - index, - } - } -} - -#[derive(Hash, Debug, BorshDeserialize, BorshSerialize, Clone, PartialEq, Eq)] -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] -pub enum SecretShare { - Random { - from_addr: String, - to_addr: Option, - random_id: RandomId, - index: usize, - secret: Vec, - }, - Answer { - from_addr: String, - decision_id: DecisionId, - secret: Vec, - }, -} - -impl std::fmt::Display for SecretShare { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - SecretShare::Random { - from_addr, - to_addr, - random_id, - index, - .. - } => { - write!( - f, - "#{}[{}]=>[{}]@{}", - random_id, - from_addr, - match to_addr { - Some(ref addr) => addr.as_str(), - None => "ALL", - }, - index - ) - } - SecretShare::Answer { - from_addr, - decision_id, - .. - } => { - write!(f, "#{}[{}]", decision_id, from_addr) - } - } - } -} diff --git a/js/borsh/package-lock.json b/js/borsh/package-lock.json index a062385e..709bae19 100644 --- a/js/borsh/package-lock.json +++ b/js/borsh/package-lock.json @@ -1,12 +1,12 @@ { "name": "@race-foundation/borsh", - "version": "0.2.4", + "version": "0.2.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@race-foundation/borsh", - "version": "0.2.4", + "version": "0.2.5", "license": "ISC", "devDependencies": { "@types/chai": "^4.3.4", diff --git a/js/borsh/package.json b/js/borsh/package.json index b596730d..dfb4a509 100644 --- a/js/borsh/package.json +++ b/js/borsh/package.json @@ -1,6 +1,6 @@ { "name": "@race-foundation/borsh", - "version": "0.2.4", + "version": "0.2.5", "description": "A borsh implementation with decorator support", "repository": { "type": "git", diff --git a/js/package-lock.json b/js/package-lock.json index 24217998..aa8faa3a 100644 --- a/js/package-lock.json +++ b/js/package-lock.json @@ -15,7 +15,7 @@ }, "borsh": { "name": "@race-foundation/borsh", - "version": "0.2.4", + "version": "0.2.5", "license": "ISC", "bin": { "borsh-serialize": "bin/cli.ts" @@ -6631,7 +6631,7 @@ }, "sdk-core": { "name": "@race-foundation/sdk-core", - "version": "0.2.4", + "version": "0.2.5", "license": "ISC", "devDependencies": { "@types/chai": "^4.3.4", @@ -6651,7 +6651,7 @@ }, "sdk-facade": { "name": "@race-foundation/sdk-facade", - "version": "0.2.4", + "version": "0.2.5", "license": "ISC", "devDependencies": { "@types/chai": "^4.3.4", @@ -6671,7 +6671,7 @@ }, "sdk-solana": { "name": "@race-foundation/sdk-solana", - "version": "0.2.4", + "version": "0.2.5", "license": "ISC", "devDependencies": { "@types/bn.js": "^5.1.1", diff --git a/js/sdk-core/package-lock.json b/js/sdk-core/package-lock.json index ead0c27e..2d0f8987 100644 --- a/js/sdk-core/package-lock.json +++ b/js/sdk-core/package-lock.json @@ -1,12 +1,12 @@ { "name": "race-sdk-core", - "version": "0.2.4", + "version": "0.2.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "race-sdk-core", - "version": "0.2.4", + "version": "0.2.5", "license": "ISC", "devDependencies": { "@types/chai": "^4.3.4", diff --git a/js/sdk-core/package.json b/js/sdk-core/package.json index 3a624221..fe22212f 100644 --- a/js/sdk-core/package.json +++ b/js/sdk-core/package.json @@ -1,6 +1,6 @@ { "name": "@race-foundation/sdk-core", - "version": "0.2.4", + "version": "0.2.5", "description": "The type definitions for Race SDK", "scripts": { "test": "jest", diff --git a/js/sdk-facade/package.json b/js/sdk-facade/package.json index ffc457e4..9e90a1ac 100644 --- a/js/sdk-facade/package.json +++ b/js/sdk-facade/package.json @@ -1,6 +1,6 @@ { "name": "@race-foundation/sdk-facade", - "version": "0.2.4", + "version": "0.2.5", "description": "The Facade integration for Race SDK", "main": "lib/cjs/index.ts", "module": "lib/esm/index.js", diff --git a/js/sdk-solana/package-lock.json b/js/sdk-solana/package-lock.json index 7cf8af60..d1c1eed3 100644 --- a/js/sdk-solana/package-lock.json +++ b/js/sdk-solana/package-lock.json @@ -1,12 +1,12 @@ { "name": "race-sdk-solana", - "version": "0.2.4", + "version": "0.2.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "race-sdk-solana", - "version": "0.2.4", + "version": "0.2.5", "license": "ISC", "dependencies": { "@solana/spl-token": "^0.3.7", diff --git a/js/sdk-solana/package.json b/js/sdk-solana/package.json index d1d2a4df..78fd79bd 100644 --- a/js/sdk-solana/package.json +++ b/js/sdk-solana/package.json @@ -1,6 +1,6 @@ { "name": "@race-foundation/sdk-solana", - "version": "0.2.4", + "version": "0.2.5", "description": "The Solana support for Race SDK", "scripts": { "test": "jest",