build: update grin libs and related dependencies at lock file, update HttpWallet, HttpGrinNode, MixClient code accordingly

This commit is contained in:
ardocrat 2023-12-03 10:08:20 +03:00
parent 19e12a1f2e
commit e2507a122f
6 changed files with 1140 additions and 943 deletions

2017
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -40,15 +40,15 @@ tokio = { version = "1", features = ["full"] }
toml = "0.5" toml = "0.5"
x25519-dalek = "0.6.0" x25519-dalek = "0.6.0"
grin_onion = { path = "./onion" } grin_onion = { path = "./onion" }
grin_secp256k1zkp = { version = "0.7.11", features = ["bullet-proof-sizing"]} grin_secp256k1zkp = { version = "0.7.12", features = ["bullet-proof-sizing"]}
grin_util = "5" grin_util = { git = "https://github.com/mimblewimble/grin", branch = "master" }
grin_api = { git = "https://github.com/mimblewimble/grin", version = "5.2.0-alpha.1" } grin_api = { git = "https://github.com/mimblewimble/grin", branch = "master" }
grin_core = { git = "https://github.com/mimblewimble/grin", version = "5.2.0-alpha.1" } grin_core = { git = "https://github.com/mimblewimble/grin", branch = "master" }
grin_chain = { git = "https://github.com/mimblewimble/grin", version = "5.2.0-alpha.1" } grin_chain = { git = "https://github.com/mimblewimble/grin", branch = "master" }
grin_keychain = { git = "https://github.com/mimblewimble/grin", version = "5.2.0-alpha.1" } grin_keychain = { git = "https://github.com/mimblewimble/grin", branch = "master" }
grin_servers = { git = "https://github.com/mimblewimble/grin", version = "5.2.0-alpha.1" } grin_servers = { git = "https://github.com/mimblewimble/grin", branch = "master" }
grin_store = { git = "https://github.com/mimblewimble/grin", version = "5.2.0-alpha.1" } grin_store = { git = "https://github.com/mimblewimble/grin", branch = "master" }
grin_wallet_api = { git = "https://github.com/mimblewimble/grin-wallet", branch = "master" } grin_wallet_api = { git = "https://github.com/mimblewimble/grin-wallet", tag = "v5.2.0-beta.1" }
grin_wallet_impls = { git = "https://github.com/mimblewimble/grin-wallet", branch = "master" } grin_wallet_impls = { git = "https://github.com/mimblewimble/grin-wallet", tag = "v5.2.0-beta.1" }
grin_wallet_libwallet = { git = "https://github.com/mimblewimble/grin-wallet", branch = "master" } grin_wallet_libwallet = { git = "https://github.com/mimblewimble/grin-wallet", tag = "v5.2.0-beta.1" }
grin_wallet_util = { git = "https://github.com/mimblewimble/grin-wallet", branch = "master" } grin_wallet_util = { git = "https://github.com/mimblewimble/grin-wallet", tag = "v5.2.0-beta.1" }

View file

@ -25,14 +25,14 @@ thiserror = "1.0.31"
toml = "0.5" toml = "0.5"
x25519-dalek = "0.6.0" x25519-dalek = "0.6.0"
grin_secp256k1zkp = { version = "0.7.11", features = ["bullet-proof-sizing"]} grin_secp256k1zkp = { version = "0.7.11", features = ["bullet-proof-sizing"]}
grin_util = "5" grin_util = { git = "https://github.com/mimblewimble/grin", branch = "master" }
grin_api = { git = "https://github.com/mimblewimble/grin", version = "5.2.0-alpha.1" } grin_api = { git = "https://github.com/mimblewimble/grin", branch = "master" }
grin_core = { git = "https://github.com/mimblewimble/grin", version = "5.2.0-alpha.1" } grin_core = { git = "https://github.com/mimblewimble/grin", branch = "master" }
grin_chain = { git = "https://github.com/mimblewimble/grin", version = "5.2.0-alpha.1" } grin_chain = { git = "https://github.com/mimblewimble/grin", branch = "master" }
grin_keychain = { git = "https://github.com/mimblewimble/grin", version = "5.2.0-alpha.1" } grin_keychain = { git = "https://github.com/mimblewimble/grin", branch = "master" }
grin_servers = { git = "https://github.com/mimblewimble/grin", version = "5.2.0-alpha.1" } grin_servers = { git = "https://github.com/mimblewimble/grin", branch = "master" }
grin_store = { git = "https://github.com/mimblewimble/grin", version = "5.2.0-alpha.1" } grin_store = { git = "https://github.com/mimblewimble/grin", branch = "master" }
grin_wallet_api = { git = "https://github.com/mimblewimble/grin-wallet", branch = "master" } grin_wallet_api = { git = "https://github.com/mimblewimble/grin-wallet", tag = "v5.2.0-beta.1" }
grin_wallet_impls = { git = "https://github.com/mimblewimble/grin-wallet", branch = "master" } grin_wallet_impls = { git = "https://github.com/mimblewimble/grin-wallet", tag = "v5.2.0-beta.1" }
grin_wallet_libwallet = { git = "https://github.com/mimblewimble/grin-wallet", branch = "master" } grin_wallet_libwallet = { git = "https://github.com/mimblewimble/grin-wallet", tag = "v5.2.0-beta.1" }
grin_wallet_util = { git = "https://github.com/mimblewimble/grin-wallet", branch = "master" } grin_wallet_util = { git = "https://github.com/mimblewimble/grin-wallet", tag = "v5.2.0-beta.1" }

View file

@ -6,6 +6,7 @@ use crate::{tor, DalekPublicKey};
use grin_onion::onion::Onion; use grin_onion::onion::Onion;
use grin_api::client; use grin_api::client;
use grin_api::client::TimeOut;
use grin_api::json_rpc::build_request; use grin_api::json_rpc::build_request;
use grin_core::ser; use grin_core::ser;
use grin_core::ser::ProtocolVersion; use grin_core::ser::ProtocolVersion;
@ -75,7 +76,7 @@ impl MixClientImpl {
req.headers_mut().extend(headers.clone().into_iter()); req.headers_mut().extend(headers.clone().into_iter());
} }
let res = client::send_request(req).map_err(ClientError::API)?; let res = client::send_request(req, TimeOut::default()).map_err(ClientError::API)?;
serde_json::from_str(&res).map_err(ClientError::ResponseParse) serde_json::from_str(&res).map_err(ClientError::ResponseParse)
} }

View file

@ -114,8 +114,12 @@ impl HttpGrinNode {
let url = format!("http://{}{}", self.node_url, ENDPOINT); let url = format!("http://{}{}", self.node_url, ENDPOINT);
let req = build_request(method, params); let req = build_request(method, params);
let res = let res =
client::post::<Request, Response>(url.as_str(), self.node_api_secret.clone(), &req) client::post::<Request, Response>(
.map_err(NodeError::ApiCommError)?; url.as_str(),
self.node_api_secret.clone(),
&req,
client::TimeOut::default()
).map_err(NodeError::ApiCommError)?;
let parsed = res let parsed = res
.clone() .clone()
.into_result() .into_result()

View file

@ -133,6 +133,7 @@ impl HttpWallet {
url.as_str(), url.as_str(),
wallet_owner_secret.clone(), wallet_owner_secret.clone(),
&enc_req, &enc_req,
client::TimeOut::default(),
) )
.map_err(WalletError::ApiCommError)?; .map_err(WalletError::ApiCommError)?;
let decrypted = res let decrypted = res
@ -154,8 +155,12 @@ impl HttpWallet {
let url = format!("http://{}{}", wallet_owner_url, ENDPOINT); let url = format!("http://{}{}", wallet_owner_url, ENDPOINT);
let req = build_request(method, params); let req = build_request(method, params);
let res = let res =
client::post::<Request, Response>(url.as_str(), wallet_owner_secret.clone(), &req) client::post::<Request, Response>(
.map_err(WalletError::ApiCommError)?; url.as_str(),
wallet_owner_secret.clone(),
&req,
client::TimeOut::default()
).map_err(WalletError::ApiCommError)?;
let parsed = res let parsed = res
.clone() .clone()
.into_result() .into_result()