Skip to content

Commit

Permalink
mwc-wallet crate name (#44)
Browse files Browse the repository at this point in the history
* change crate names

* change crates name v2

* Add Mwc devs copyright

* fix process invoice test

* add version to dependencies

* change email and repo

* mwc_util 5.3.4

* bump mwc node version to 5.3.5

* bump bitcoin crate to 0.27.1
  • Loading branch information
vekamo authored Nov 12, 2024
1 parent 0aa096d commit 840681d
Show file tree
Hide file tree
Showing 167 changed files with 3,459 additions and 3,094 deletions.
3,090 changes: 1,668 additions & 1,422 deletions Cargo.lock

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[package]
name = "mwc_wallet"
version = "5.3.3"
authors = ["Grin Developers <[email protected]>"]
authors = ["Mwc Developers <[email protected]>"]
description = "Simple, private and scalable cryptocurrency implementation based on the MimbleWimble chain format."
license = "Apache-2.0"
repository = "https://github.com/mwc-project/mwc-wallet"
keywords = [ "crypto", "grin", "mimblewimble" ]
keywords = [ "crypto", "mwc", "mimblewimble" ]
readme = "README.md"
exclude = ["**/*.grin", "**/*.grin2"]
exclude = ["**/*.mwc", "**/*.mwc2"]
build = "src/build/build.rs"
edition = "2018"

[[bin]]
name = "mwc-wallet"
path = "src/bin/grin-wallet.rs"
path = "src/bin/mwc-wallet.rs"

[workspace]
members = ["api", "config", "controller", "impls", "libwallet", "util"]
Expand All @@ -36,12 +36,12 @@ funty = "=1.1.0"
uuid = { version = "0.8", features = ["serde", "v4"] }
shlex = "1.3.0"

grin_wallet_api = { path = "./api", version = "5.3.3" }
grin_wallet_impls = { path = "./impls", version = "5.3.3" }
grin_wallet_libwallet = { path = "./libwallet", version = "5.3.3" }
grin_wallet_controller = { path = "./controller", version = "5.3.3" }
grin_wallet_config = { path = "./config", version = "5.3.3" }
grin_wallet_util = { path = "./util", version = "5.3.3" }
mwc_wallet_api = { path = "./api", version = "5.3.3" }
mwc_wallet_impls = { path = "./impls", version = "5.3.3" }
mwc_wallet_libwallet = { path = "./libwallet", version = "5.3.3" }
mwc_wallet_controller = { path = "./controller", version = "5.3.3" }
mwc_wallet_config = { path = "./config", version = "5.3.3" }
mwc_wallet_util = { path = "./util", version = "5.3.3" }

[build-dependencies]
built = { version = "0.4", features = ["git2"]}
Expand All @@ -55,4 +55,4 @@ remove_dir_all = "0.7"
easy-jsonrpc-mw = "0.5.4"

[patch.crates-io]
grin_secp256k1zkp = { git = "https://github.com/mwcproject/rust-secp256k1-zkp", tag = "0.7.14" }
mwc_secp256k1zkp = { git = "https://github.com/mwcproject/rust-secp256k1-zkp", tag = "0.7.16" }
20 changes: 10 additions & 10 deletions api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "grin_wallet_api"
name = "mwc_wallet_api"
version = "5.3.3"
authors = ["Grin Developers <[email protected]>"]
description = "Grin Wallet API"
authors = ["Mwc Developers <[email protected]>"]
description = "Mwc Wallet API"
license = "Apache-2.0"
repository = "https://github.com/mimblewimble/grin-wallet"
keywords = [ "crypto", "grin", "mimblewimble" ]
exclude = ["**/*.grin", "**/*.grin2"]
repository = "https://github.com/mwcproject/mwc-wallet"
keywords = [ "crypto", "mwc", "mimblewimble" ]
exclude = ["**/*.mwc", "**/*.mwc2"]
edition = "2018"

[dependencies]
Expand All @@ -24,10 +24,10 @@ ed25519-dalek = "1.0.0-pre.4"
colored = "1.6"
x25519-dalek = "0.6"

grin_wallet_libwallet = { path = "../libwallet", version = "5.3.3" }
grin_wallet_config = { path = "../config", version = "5.3.3" }
grin_wallet_impls = { path = "../impls", version = "5.3.3" }
grin_wallet_util = { path = "../util", version = "5.3.3" }
mwc_wallet_libwallet = { path = "../libwallet", version = "5.3.3" }
mwc_wallet_config = { path = "../config", version = "5.3.3" }
mwc_wallet_impls = { path = "../impls", version = "5.3.3" }
mwc_wallet_util = { path = "../util", version = "5.3.3" }

[dev-dependencies]
serde_json = "1"
Expand Down
89 changes: 45 additions & 44 deletions api/src/foreign.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2021 The Grin Developers
// Copyright 2019 The Grin Developers
// Copyright 2024 The Mwc Developers
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -82,14 +83,14 @@ where
/// Create a new API instance with the given wallet instance. All subsequent
/// API calls will operate on this instance of the wallet.
///
/// Each method will call the [`WalletBackend`](../grin_wallet_libwallet/types/trait.WalletBackend.html)'s
/// [`open_with_credentials`](../grin_wallet_libwallet/types/trait.WalletBackend.html#tymethod.open_with_credentials)
/// Each method will call the [`WalletBackend`](../mwc_wallet_libwallet/types/trait.WalletBackend.html)'s
/// [`open_with_credentials`](../mwc_wallet_libwallet/types/trait.WalletBackend.html#tymethod.open_with_credentials)
/// (initialising a keychain with the master seed), perform its operation, then close the keychain
/// with a call to [`close`](../grin_wallet_libwallet/types/trait.WalletBackend.html#tymethod.close)
/// with a call to [`close`](../mwc_wallet_libwallet/types/trait.WalletBackend.html#tymethod.close)
///
/// # Arguments
/// * `wallet_in` - A reference-counted mutex containing an implementation of the
/// [`WalletBackend`](../grin_wallet_libwallet/types/trait.WalletBackend.html) trait.
/// [`WalletBackend`](../mwc_wallet_libwallet/types/trait.WalletBackend.html) trait.
/// * `keychain_mask` - Mask value stored internally to use when calling a wallet
/// whose seed has been XORed with a token value (such as when running the foreign
/// and owner listeners in the same instance)
Expand All @@ -101,27 +102,27 @@ where
///
/// # Example
/// ```
/// use grin_wallet_util::grin_keychain as keychain;
/// use grin_wallet_util::grin_util as util;
/// use grin_wallet_util::grin_core;
/// use grin_wallet_api as api;
/// use grin_wallet_config as config;
/// use grin_wallet_impls as impls;
/// use grin_wallet_libwallet as libwallet;
/// use mwc_wallet_util::mwc_keychain as keychain;
/// use mwc_wallet_util::mwc_util as util;
/// use mwc_wallet_util::mwc_core;
/// use mwc_wallet_api as api;
/// use mwc_wallet_config as config;
/// use mwc_wallet_impls as impls;
/// use mwc_wallet_libwallet as libwallet;
///
/// use keychain::ExtKeychain;
/// use tempfile::tempdir;
///
/// use std::sync::Arc;
/// use util::{Mutex, ZeroingString};
///
/// use grin_core::global;
/// use mwc_core::global;
///
/// use api::Foreign;
/// use config::WalletConfig;
/// use impls::{DefaultWalletImpl, DefaultLCProvider, HTTPNodeClient};
/// use libwallet::WalletInst;
/// use grin_wallet_config::parse_node_address_string;
/// use mwc_wallet_config::parse_node_address_string;
///
/// global::set_local_chain_type(global::ChainTypes::AutomatedTesting);
///
Expand Down Expand Up @@ -183,11 +184,11 @@ where
/// # Arguments
/// None
/// # Returns
/// * [`VersionInfo`](../grin_wallet_libwallet/api_impl/types/struct.VersionInfo.html)
/// * [`VersionInfo`](../mwc_wallet_libwallet/api_impl/types/struct.VersionInfo.html)
/// # Example
/// Set up as in [`new`](struct.Foreign.html#method.new) method above.
/// ```
/// # grin_wallet_api::doctest_helper_setup_doc_env_foreign!(wallet, wallet_config);
/// # mwc_wallet_api::doctest_helper_setup_doc_env_foreign!(wallet, wallet_config);
///
/// let mut api_foreign = Foreign::new(wallet.clone(), None, None);
///
Expand All @@ -208,7 +209,7 @@ where
/// # Example
/// Set up as in [`new`](struct.Foreign.html#method.new) method above.
/// ```
/// # grin_wallet_api::doctest_helper_setup_doc_env_foreign!(wallet, wallet_config);
/// # mwc_wallet_api::doctest_helper_setup_doc_env_foreign!(wallet, wallet_config);
///
/// let mut api_foreign = Foreign::new(wallet.clone(), None, None);
///
Expand All @@ -228,13 +229,13 @@ where
///
/// All potential coinbase outputs are created as 'Unconfirmed' with the coinbase flag set.
/// If a potential coinbase output is found on the chain after a wallet update, it status
/// is set to `Unsent` and a [Transaction Log Entry](../grin_wallet_libwallet/types/struct.TxLogEntry.html)
/// is set to `Unsent` and a [Transaction Log Entry](../mwc_wallet_libwallet/types/struct.TxLogEntry.html)
/// will be created. Note the output will be unspendable until the coinbase maturity period
/// has expired.
///
/// # Arguments
///
/// * `block_fees` - A [`BlockFees`](../grin_wallet_libwallet/api_impl/types/struct.BlockFees.html)
/// * `block_fees` - A [`BlockFees`](../mwc_wallet_libwallet/api_impl/types/struct.BlockFees.html)
/// struct, set up as follows:
///
/// `fees` - should contain the sum of all transaction fees included in the potential
Expand All @@ -247,14 +248,14 @@ where
/// id will be assigned
///
/// # Returns
/// * `Ok`([`cb_data`](../grin_wallet_libwallet/api_impl/types/struct.CbData.html)`)` if successful. This
/// * `Ok`([`cb_data`](../mwc_wallet_libwallet/api_impl/types/struct.CbData.html)`)` if successful. This
/// will contain the corresponding output, kernel and keyID used to create the coinbase output.
/// * or [`libwallet::Error`](../grin_wallet_libwallet/struct.Error.html) if an error is encountered.
/// * or [`libwallet::Error`](../mwc_wallet_libwallet/struct.Error.html) if an error is encountered.
///
/// # Example
/// Set up as in [`new`](struct.Foreign.html#method.new) method above.
/// ```
/// # grin_wallet_api::doctest_helper_setup_doc_env_foreign!(wallet, wallet_config);
/// # mwc_wallet_api::doctest_helper_setup_doc_env_foreign!(wallet, wallet_config);
///
/// let mut api_foreign = Foreign::new(wallet.clone(), None, None);
///
Expand Down Expand Up @@ -301,16 +302,16 @@ where
///
/// # Arguments
///
/// * `slate` - The transaction [`Slate`](../grin_wallet_libwallet/slate/struct.Slate.html).
/// * `slate` - The transaction [`Slate`](../mwc_wallet_libwallet/slate/struct.Slate.html).
///
/// # Returns
/// * `Ok(())` if successful and the signatures validate
/// * or [`libwallet::Error`](../grin_wallet_libwallet/struct.Error.html) if an error is encountered.
/// * or [`libwallet::Error`](../mwc_wallet_libwallet/struct.Error.html) if an error is encountered.
///
/// # Example
/// Set up as in [`new`](struct.Foreign.html#method.new) method above.
/// ```
/// # grin_wallet_api::doctest_helper_setup_doc_env_foreign!(wallet, wallet_config);
/// # mwc_wallet_api::doctest_helper_setup_doc_env_foreign!(wallet, wallet_config);
///
/// let mut api_foreign = Foreign::new(wallet.clone(), None, None);
///
Expand Down Expand Up @@ -343,7 +344,7 @@ where
}

/// Recieve a tranaction created by another party, returning the modified
/// [`Slate`](../grin_wallet_libwallet/slate/struct.Slate.html) object, modified with
/// [`Slate`](../mwc_wallet_libwallet/slate/struct.Slate.html) object, modified with
/// the recipient's output for the transaction amount, and public signature data. This slate can
/// then be sent back to the sender to finalize the transaction via the
/// [Owner API's `finalize_tx`](struct.Owner.html#method.finalize_tx) method.
Expand All @@ -354,11 +355,11 @@ where
/// will be updated with the results of Signing round 1 and 2, adding the recipient's public
/// nonce, public excess value, and partial signature to the slate.
///
/// Also creates a corresponding [Transaction Log Entry](../grin_wallet_libwallet/types/struct.TxLogEntry.html)
/// Also creates a corresponding [Transaction Log Entry](../mwc_wallet_libwallet/types/struct.TxLogEntry.html)
/// in the wallet's transaction log.
///
/// # Arguments
/// * `slate` - The transaction [`Slate`](../grin_wallet_libwallet/slate/struct.Slate.html).
/// * `slate` - The transaction [`Slate`](../mwc_wallet_libwallet/slate/struct.Slate.html).
/// The slate should contain the results of the sender's round 1 (e.g, public nonce and public
/// excess value).
/// * `dest_acct_name` - The name of the account into which the slate should be received. If
Expand All @@ -372,9 +373,9 @@ where
///
/// # Returns
/// * a result containing:
/// * `Ok`([`slate`](../grin_wallet_libwallet/slate/struct.Slate.html)`)` if successful,
/// * `Ok`([`slate`](../mwc_wallet_libwallet/slate/struct.Slate.html)`)` if successful,
/// containing the new slate updated with the recipient's output and public signing information.
/// * or [`libwallet::Error`](../grin_wallet_libwallet/struct.Error.html) if an error is encountered.
/// * or [`libwallet::Error`](../mwc_wallet_libwallet/struct.Error.html) if an error is encountered.
///
/// # Remarks
///
Expand All @@ -383,7 +384,7 @@ where
/// # Example
/// Set up as in [new](struct.Foreign.html#method.new) method above.
/// ```
/// # grin_wallet_api::doctest_helper_setup_doc_env_foreign!(wallet, wallet_config);
/// # mwc_wallet_api::doctest_helper_setup_doc_env_foreign!(wallet, wallet_config);
///
/// let mut api_foreign = Foreign::new(wallet.clone(), None, None);
/// # let slate = Slate::blank(2, false);
Expand Down Expand Up @@ -444,18 +445,18 @@ where
/// via the [`get_stored_tx`](struct.Owner.html#method.get_stored_tx) function.
///
/// # Arguments
/// * `slate` - The transaction [`Slate`](../grin_wallet_libwallet/slate/struct.Slate.html). The
/// * `slate` - The transaction [`Slate`](../mwc_wallet_libwallet/slate/struct.Slate.html). The
/// payer should have filled in round 1 and 2.
///
/// # Returns
/// * Ok([`slate`](../grin_wallet_libwallet/slate/struct.Slate.html)) if successful,
/// * Ok([`slate`](../mwc_wallet_libwallet/slate/struct.Slate.html)) if successful,
/// containing the new finalized slate.
/// * or [`libwallet::Error`](../grin_wallet_libwallet/struct.Error.html) if an error is encountered.
/// * or [`libwallet::Error`](../mwc_wallet_libwallet/struct.Error.html) if an error is encountered.
///
/// # Example
/// Set up as in [`new`](struct.Owner.html#method.new) method above.
/// ```
/// # grin_wallet_api::doctest_helper_setup_doc_env_foreign!(wallet, wallet_config);
/// # mwc_wallet_api::doctest_helper_setup_doc_env_foreign!(wallet, wallet_config);
///
/// let mut api_owner = Owner::new(wallet.clone(), None, None);
/// let mut api_foreign = Foreign::new(wallet.clone(), None, None);
Expand Down Expand Up @@ -560,16 +561,16 @@ where
#[macro_export]
macro_rules! doctest_helper_setup_doc_env_foreign {
($wallet:ident, $wallet_config:ident) => {
use grin_wallet_api as api;
use grin_wallet_config as config;
use grin_wallet_impls as impls;
use grin_wallet_libwallet as libwallet;
use grin_wallet_util::grin_core;
use grin_wallet_util::grin_keychain as keychain;
use grin_wallet_util::grin_util as util;

use grin_core::global;
use mwc_wallet_api as api;
use mwc_wallet_config as config;
use mwc_wallet_impls as impls;
use mwc_wallet_libwallet as libwallet;
use mwc_wallet_util::mwc_core;
use mwc_wallet_util::mwc_keychain as keychain;
use mwc_wallet_util::mwc_util as util;

use keychain::ExtKeychain;
use mwc_core::global;
use tempfile::tempdir;

use std::sync::Arc;
Expand Down
Loading

0 comments on commit 840681d

Please sign in to comment.