Skip to content

Commit 7852251

Browse files
authored
Merge branch 'v0.42-dev' into fix/rpc-key-wallet-defaults
2 parents ecbcb07 + 2f5494f commit 7852251

48 files changed

Lines changed: 43 additions & 169 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

key-wallet-ffi/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ eddsa = ["dashcore/eddsa", "key-wallet/eddsa"]
2020
bls = ["dashcore/bls", "key-wallet/bls"]
2121

2222
[dependencies]
23-
key-wallet = { path = "../key-wallet", default-features = false, features = ["std", "manager"] }
23+
key-wallet = { path = "../key-wallet", features = ["manager"] }
2424
dashcore = { path = "../dash" }
2525
secp256k1 = { version = "0.30.0", features = ["global-context"] }
2626
tokio = { version = "1.32", features = ["rt-multi-thread", "sync"] }
@@ -31,6 +31,6 @@ hex = "0.4"
3131
cbindgen = "0.29"
3232

3333
[dev-dependencies]
34-
key-wallet = { path = "../key-wallet", default-features = false, features = ["std", "manager", "test-utils"] }
34+
key-wallet = { path = "../key-wallet", features = ["manager", "test-utils"] }
3535
tempfile = "3.0"
3636
hex = "0.4"

key-wallet/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ readme = "README.md"
99
license = "CC0-1.0"
1010

1111
[features]
12-
default = ["std", "manager"]
13-
std = ["secp256k1/std", "bip39/std", "getrandom", "rand"]
12+
default = ["secp256k1/std", "bip39/std", "getrandom", "rand", "manager"]
1413
manager = ["dep:tokio"]
1514
parallel-filters = ["manager", "dep:rayon"]
1615
serde = ["dep:serde", "dep:serde_json", "dashcore_hashes/serde", "secp256k1/serde", "dashcore/serde"]

key-wallet/src/account/account_collection.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
//!
33
//! This module provides a structured way to manage accounts by type.
44
5-
use alloc::collections::BTreeMap;
6-
use alloc::vec::Vec;
5+
use std::collections::BTreeMap;
6+
77
#[cfg(feature = "bincode")]
88
use bincode_derive::{Decode, Encode};
99
#[cfg(feature = "serde")]

key-wallet/src/account/account_trait.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use crate::bip32::DerivationPath;
77
use crate::dip9::DerivationPathReference;
88
use crate::error::Result;
99
use crate::Network;
10-
use alloc::vec::Vec;
1110

1211
/// Common trait for all account types
1312
pub trait AccountTrait {

key-wallet/src/account/bls_account.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use crate::derivation_bls_bip32::{ExtendedBLSPrivKey, ExtendedBLSPubKey};
99
use crate::error::{Error, Result};
1010
use crate::managed_account::address_pool::AddressPoolType;
1111
use crate::{ChildNumber, DerivationPath, Network};
12-
use alloc::vec::Vec;
1312
use core::fmt;
1413
use dashcore::Address;
1514

key-wallet/src/account/eddsa_account.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use crate::account::AccountType;
88
use crate::derivation_slip10::{ExtendedEd25519PrivKey, ExtendedEd25519PubKey, VerifyingKey};
99
use crate::error::{Error, Result};
1010
use crate::{ChildNumber, DerivationPath, Network};
11-
use alloc::vec::Vec;
1211
use core::fmt;
1312
use dashcore::Address;
1413

key-wallet/src/bip32.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ use core::default::Default;
2525
use core::fmt;
2626
use core::ops::Index;
2727
use core::str::FromStr;
28-
#[cfg(feature = "std")]
2928
use std::error;
3029

3130
use dashcore_hashes::{hash160, sha512, Hash, HashEngine, Hmac, HmacEngine};
@@ -42,7 +41,6 @@ use crate::dip9::{
4241
IDENTITY_REGISTRATION_PATH_MAINNET, IDENTITY_REGISTRATION_PATH_TESTNET,
4342
IDENTITY_TOPUP_PATH_MAINNET, IDENTITY_TOPUP_PATH_TESTNET,
4443
};
45-
use alloc::{string::String, vec::Vec};
4644
use base58ck;
4745
#[cfg(feature = "bincode")]
4846
use bincode_derive::{Decode, Encode};
@@ -343,7 +341,6 @@ impl<'de> serde::Deserialize<'de> for Fingerprint {
343341

344342
/// Extended private key
345343
#[derive(Copy, Clone, PartialEq, Eq)]
346-
#[cfg_attr(feature = "std", derive(Debug))]
347344
pub struct ExtendedPrivKey {
348345
/// The network this key is to be used on
349346
pub network: Network,
@@ -451,8 +448,6 @@ impl<'de> serde::Deserialize<'de> for ExtendedPrivKey {
451448
}
452449
}
453450

454-
#[cfg(not(feature = "std"))]
455-
#[cfg_attr(docsrs, doc(cfg(not(feature = "std"))))]
456451
impl fmt::Debug for ExtendedPrivKey {
457452
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
458453
f.debug_struct("ExtendedPrivKey")
@@ -1474,7 +1469,6 @@ impl fmt::Display for Error {
14741469
}
14751470
}
14761471

1477-
#[cfg(feature = "std")]
14781472
impl error::Error for Error {
14791473
fn cause(&self) -> Option<&dyn error::Error> {
14801474
if let Error::Secp256k1(ref e) = *self {

key-wallet/src/bip38.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
//! - Prefix: 0x0142 for non-EC-multiply mode (base58 starts with "6P")
1212
//! - Prefix: 0x0143 for EC-multiply mode (base58 starts with "6P")
1313
14-
use alloc::string::String;
15-
use alloc::vec::Vec;
1614
use core::fmt;
1715

1816
use crate::error::{Error, Result};

key-wallet/src/derivation.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
//! This module provides key derivation functionality with a builder pattern
44
//! for flexible path construction and derivation strategies.
55
6-
use alloc::vec::Vec;
76
use secp256k1::Secp256k1;
87

98
use crate::bip32::{ChildNumber, DerivationPath, ExtendedPrivKey, ExtendedPubKey};

key-wallet/src/derivation_bls_bip32.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,8 @@
1010
//! - Supports both hardened and non-hardened derivation
1111
1212
use core::fmt;
13-
#[cfg(feature = "std")]
14-
use std::error;
15-
16-
use alloc::string::String;
1713
use dashcore_hashes::{sha256, Hash, HashEngine, Hmac, HmacEngine};
14+
use std::error;
1815

1916
// NOTE: We use Bls12381G2Impl for BLS keys (48-byte public keys)
2017
use dashcore::blsful::{
@@ -64,7 +61,6 @@ impl fmt::Display for Error {
6461
}
6562
}
6663

67-
#[cfg(feature = "std")]
6864
impl error::Error for Error {}
6965

7066
/// Extended BLS private key for HD derivation

0 commit comments

Comments
 (0)