diff --git a/CHANGELOG.md b/CHANGELOG.md index fd3865054..96743c253 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ # Release Notes All notable changes to this project will be documented in this file. +## 1.1.2 Nov 15, 2020 +### Fixed +- `wasm` feature was not worked. +- `crypto.factorize` doesn't panic on invalid challenge +- `client.get_api_reference` returns proper version +- ABI JSON with explicit function ID is parsed properly + ## 1.1.1 Nov 11, 2020 ### Fixed - To be compatible with older rust version change api type derivation with `vec![]` diff --git a/api/derive/Cargo.toml b/api/derive/Cargo.toml index 744e3223c..9d4047adb 100644 --- a/api/derive/Cargo.toml +++ b/api/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "api_derive" -version = "1.1.1" +version = "1.1.2" authors = ["Michael Vlasov "] edition = "2018" diff --git a/api/info/Cargo.toml b/api/info/Cargo.toml index eba2fe929..6f9de4ff1 100644 --- a/api/info/Cargo.toml +++ b/api/info/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "api_info" -version = "1.1.1" +version = "1.1.2" authors = ["Michael Vlasov "] edition = "2018" diff --git a/api/test/Cargo.toml b/api/test/Cargo.toml index 982b1c908..16be26764 100644 --- a/api/test/Cargo.toml +++ b/api/test/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "api_test" -version = "1.1.1" +version = "1.1.2" authors = ["Michael Vlasov "] edition = "2018" diff --git a/ton_client/client/Cargo.toml b/ton_client/client/Cargo.toml index 438b47970..fb1857403 100644 --- a/ton_client/client/Cargo.toml +++ b/ton_client/client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ton_client" -version = "1.1.1" +version = "1.1.2" authors = ["Michael Vlasov"] edition = "2018" license = "Apache-2.0" @@ -81,4 +81,4 @@ pretty_assertions = "0.6.1" [features] default = ["std"] std = ["tokio/rt-threaded", "tokio/macros", "tokio/sync", "reqwest", "tokio-tungstenite"] -wasm = ["wasm-bindgen", "wasm-bindgen-futures", "js-sys", "web-sys"] +wasm = ["wasm-bindgen", "wasm-bindgen-futures", "js-sys", "web-sys", "rand/wasm-bindgen", "chrono/wasmbind"] diff --git a/ton_client/client/src/abi/types.rs b/ton_client/client/src/abi/types.rs index 58d30c8b2..9e5e8b2c3 100644 --- a/ton_client/client/src/abi/types.rs +++ b/ton_client/client/src/abi/types.rs @@ -57,7 +57,7 @@ pub struct AbiFunction { pub inputs: Vec, pub outputs: Vec, #[serde(default)] - pub id: Option, + pub id: Option, } #[derive(Serialize, Deserialize, Clone, Debug, ApiType)] @@ -65,7 +65,7 @@ pub struct AbiEvent { pub name: String, pub inputs: Vec, #[serde(default)] - pub id: Option, + pub id: Option, } #[derive(Serialize, Deserialize, Clone, Debug, ApiType)] diff --git a/ton_client/client/src/client/tests.rs b/ton_client/client/src/client/tests.rs index 8b506371d..b96ec484b 100644 --- a/ton_client/client/src/client/tests.rs +++ b/ton_client/client/src/client/tests.rs @@ -32,4 +32,5 @@ fn api_reference() { crate::client::get_api_reference_api().name )).unwrap(); assert_ne!(api.api.modules.len(), 0); + assert_eq!(api.api.version, env!("CARGO_PKG_VERSION")); } diff --git a/ton_client/client/src/crypto/math.rs b/ton_client/client/src/crypto/math.rs index 4453ec3df..be5ffc69e 100644 --- a/ton_client/client/src/crypto/math.rs +++ b/ton_client/client/src/crypto/math.rs @@ -102,7 +102,7 @@ pub fn factorize( let mut y = x; let q = ((rng.next_u64() & 0xF) + 17) % composite; - let lim = 1 << (i + 18); + let lim = 1 << (std::cmp::min(i, 5) + 18); for j in 1..lim { it += 1; diff --git a/ton_client/client/src/crypto/tests.rs b/ton_client/client/src/crypto/tests.rs index b45af8646..05ab8d008 100644 --- a/ton_client/client/src/crypto/tests.rs +++ b/ton_client/client/src/crypto/tests.rs @@ -76,6 +76,14 @@ fn math() { assert_eq!("494C553B", result.factors[0]); assert_eq!("53911073", result.factors[1]); + let result = client.request::<_, ResultOfFactorize>( + "crypto.factorize", + ParamsOfFactorize { + composite: "10".into(), + }, + ); + assert!(result.is_err()); + let result: ResultOfModularPower = client.request( "crypto.modular_power", ParamsOfModularPower { diff --git a/ton_client/client/src/json_interface/runtime.rs b/ton_client/client/src/json_interface/runtime.rs index db4315149..b94cd5743 100644 --- a/ton_client/client/src/json_interface/runtime.rs +++ b/ton_client/client/src/json_interface/runtime.rs @@ -43,7 +43,7 @@ impl RuntimeHandlers { sync_handlers: HashMap::new(), async_handlers: HashMap::new(), api: API { - version: "1.0.0".into(), + version: env!("CARGO_PKG_VERSION").to_owned(), modules: Vec::new(), }, }; diff --git a/ton_client/platforms/ton-client-node-js/Cargo.toml b/ton_client/platforms/ton-client-node-js/Cargo.toml index 008e256db..690ff0648 100644 --- a/ton_client/platforms/ton-client-node-js/Cargo.toml +++ b/ton_client/platforms/ton-client-node-js/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ton_client_node_js" -version = "1.1.1" +version = "1.1.2" authors = ["TON Labs"] license = "Apache-2.0" diff --git a/ton_client/platforms/ton-client-web/Cargo.toml b/ton_client/platforms/ton-client-web/Cargo.toml index 9259fcf6d..78ad29602 100644 --- a/ton_client/platforms/ton-client-web/Cargo.toml +++ b/ton_client/platforms/ton-client-web/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ton_client_wasm" -version = "1.1.1" +version = "1.1.2" edition = "2018" description = "TON Client WASM binding" license = "Apache-2.0" diff --git a/ton_sdk/Cargo.toml b/ton_sdk/Cargo.toml index 8e6add58f..08ccf8f0b 100644 --- a/ton_sdk/Cargo.toml +++ b/ton_sdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ton_sdk" -version = "1.1.1" +version = "1.1.2" edition = "2018" license = "Apache-2.0" diff --git a/toncli/Cargo.toml b/toncli/Cargo.toml index bb7d1c24b..39da64a26 100644 --- a/toncli/Cargo.toml +++ b/toncli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "toncli" -version = "1.1.1" +version = "1.1.2" description = "TON CLient Command Line Tool" authors = ["TON DEV SOLUTIONS LTD "] repository = "https://github.com/tonlabs/TON-SDK"