Remove grin lib re-exports from util crate (#661)

* updated util and libwallet with thiserror

* update impl crate to thiserror

* api crate converted to thiserror

* update of controller crate to thiserror

* update final bin + tests to thiserror

* update unused import

* remove failure derive

* reset import of grin to master

* update cargo lock

* update from master

* remove grin libs re-export from util crate :(

* temp local

* point code at bleeding edge grin master branch
This commit is contained in:
Yeastplume
2022-08-08 12:08:25 +01:00
committed by GitHub
parent 64cab53b1b
commit 8384a3ebb0
49 changed files with 398 additions and 211 deletions
+27
View File
@@ -38,3 +38,30 @@ byteorder = "1.3"
grin_wallet_util = { path = "../util", version = "5.2.0-alpha.1" }
grin_wallet_config = { path = "../config", version = "5.2.0-alpha.1" }
##### Grin Imports
# For Release
#grin_core = "4.0.0"
#grin_keychain = "4.0.0"
#grin_util = "4.0.0"
# For beta release
# grin_core = { git = "https://github.com/mimblewimble/grin", tag = "v5.0.0-beta.2"}
# grin_keychain = { git = "https://github.com/mimblewimble/grin", tag = "v5.0.0-beta.2" }
# grin_util = { git = "https://github.com/mimblewimble/grin", tag = "v5.0.0-beta.2" }
# grin_stire = { git = "https://github.com/mimblewimble/grin", tag = "v5.0.0-beta.2" }
# For bleeding edge
grin_core = { git = "https://github.com/mimblewimble/grin", branch = "master" }
grin_keychain = { git = "https://github.com/mimblewimble/grin", branch = "master" }
grin_util = { git = "https://github.com/mimblewimble/grin", branch = "master" }
grin_store = { git = "https://github.com/mimblewimble/grin", branch = "master" }
# For local testing
# grin_core = { path = "../../grin/core"}
# grin_keychain = { path = "../../grin/keychain"}
# grin_util = { path = "../../grin/util"}
# grin_store = { path = "../../grin/store"}
#####
+1 -1
View File
@@ -17,7 +17,7 @@
use crate::grin_util::secp::key::SecretKey;
use crate::Error;
use grin_wallet_util::grin_keychain::{ChildNumber, Identifier, Keychain, SwitchCommitmentType};
use grin_keychain::{ChildNumber, Identifier, Keychain, SwitchCommitmentType};
use crate::blake2::blake2b::blake2b;
+2 -1
View File
@@ -18,7 +18,8 @@ use crate::grin_core::core::{committed, transaction};
use crate::grin_core::libtx;
use crate::grin_keychain;
use crate::grin_util::secp;
use crate::util::{self, grin_store};
use crate::util;
use grin_store;
/// Wallet errors, mostly wrappers around underlying crypto or I/O errors.
#[derive(Clone, Eq, PartialEq, Debug, thiserror::Error, Serialize, Deserialize)]
+1 -1
View File
@@ -35,7 +35,7 @@ use ed25519_dalek::PublicKey as DalekPublicKey;
use ed25519_dalek::SecretKey as DalekSecretKey;
use ed25519_dalek::Signature as DalekSignature;
use ed25519_dalek::{Signer, Verifier};
use grin_wallet_util::grin_core::core::FeeFields;
use grin_core::core::FeeFields;
// static for incrementing test UUIDs
lazy_static! {
+4 -3
View File
@@ -23,9 +23,10 @@
#![warn(missing_docs)]
use grin_wallet_config as config;
use grin_wallet_util::grin_core;
use grin_wallet_util::grin_keychain;
use grin_wallet_util::grin_util;
use grin_core;
use grin_keychain;
use grin_util;
use grin_wallet_util as util;
+2 -2
View File
@@ -493,8 +493,8 @@ fn slate_v4_serialize_deserialize() {
use crate::grin_util::from_hex;
use crate::grin_util::secp::key::PublicKey;
use crate::Slate;
use grin_wallet_util::grin_core::global::{set_local_chain_type, ChainTypes};
use grin_wallet_util::grin_keychain::{ExtKeychain, Keychain, SwitchCommitmentType};
use grin_core::global::{set_local_chain_type, ChainTypes};
use grin_keychain::{ExtKeychain, Keychain, SwitchCommitmentType};
set_local_chain_type(ChainTypes::Mainnet);
let slate = Slate::blank(1, false);
let mut v4 = SlateV4::from(slate);
+2 -1
View File
@@ -21,7 +21,8 @@
// Finally add armor framing and space/newline formatting as desired
use crate::Error;
use grin_wallet_util::{byte_ser, grin_core::global::max_tx_weight};
use grin_core::global::max_tx_weight;
use grin_wallet_util::byte_ser;
use regex::Regex;
use sha2::{Digest, Sha256};
use std::str;
+7 -7
View File
@@ -12,15 +12,15 @@
// limitations under the License.
//! core::libtx specific tests
use grin_wallet_libwallet::Context;
use grin_wallet_util::grin_core::core::transaction;
use grin_wallet_util::grin_core::core::FeeFields;
use grin_wallet_util::grin_core::libtx::{aggsig, proof};
use grin_wallet_util::grin_keychain::{
use grin_core::core::transaction;
use grin_core::core::FeeFields;
use grin_core::libtx::{aggsig, proof};
use grin_keychain::{
BlindSum, BlindingFactor, ExtKeychain, ExtKeychainPath, Keychain, SwitchCommitmentType,
};
use grin_wallet_util::grin_util::secp;
use grin_wallet_util::grin_util::secp::key::{PublicKey, SecretKey};
use grin_util::secp;
use grin_util::secp::key::{PublicKey, SecretKey};
use grin_wallet_libwallet::Context;
use rand::thread_rng;
fn kernel_sig_msg() -> secp::Message {