Skip to content

Commit 16d54e7

Browse files
feat: trait for wallet info (#107)
* fixes * update rust version * update rust * cleanup
1 parent 40f5b4f commit 16d54e7

Some content is hidden

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

50 files changed

+574
-371
lines changed

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ cargo doc --open
153153
- **Async/Await**: Modern async Rust throughout
154154
- **FFI Support**: C and Swift bindings for cross-platform usage
155155
- **Comprehensive Testing**: Unit, integration, and fuzz testing
156-
- **MSRV**: Rust 1.80 minimum supported version
156+
- **MSRV**: Rust 1.89 minimum supported version
157157

158158
## Code Style Guidelines
159159

Cargo.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,3 @@ version = "0.39.6"
88
[patch.crates-io.dashcore_hashes]
99
path = "hashes"
1010

11-
[patch.crates-io]
12-
blsful = { git = "https://github.com/dashpay/agora-blsful", rev = "5f017aa1a0452ebc73e47f219f50c906522df4ea" }
13-
14-
15-

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ architectural mismatches.
134134

135135
## Minimum Supported Rust Version (MSRV)
136136

137-
This library should always compile with any combination of features on **Rust 1.80**.
137+
This library should always compile with any combination of features on **Rust 1.89**.
138138

139139
## Installing Rust
140140

clippy.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
msrv = "1.80"
1+
msrv = "1.89"

dash-spv/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ Use domain-specific error types:
178178

179179
## MSRV and Dependencies
180180

181-
- **Minimum Rust Version**: 1.80
181+
- **Minimum Rust Version**: 1.89
182182
- **Core dependencies**: `dashcore`, `tokio`, `async-trait`, `thiserror`
183183
- **Built on**: `dashcore` library with Dash-specific features enabled
184184
- **Async runtime**: Tokio with full feature set

dash-spv/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@ authors = ["Dash Core Team"]
66
description = "Dash SPV (Simplified Payment Verification) client library"
77
license = "MIT"
88
repository = "https://github.com/dashpay/rust-dashcore"
9-
rust-version = "1.80"
9+
rust-version = "1.89"
1010

1111
[dependencies]
1212
# Core Dash libraries
1313
dashcore = { path = "../dash", features = ["std", "serde", "core-block-hash-use-x11", "message_verification", "bls", "quorum_validation"] }
1414
dashcore_hashes = { path = "../hashes" }
15+
key-wallet = { path = "../key-wallet" }
1516
key-wallet-manager = { path = "../key-wallet-manager" }
1617

1718
# BLS signatures
18-
blsful = "2.5"
19+
blsful = { git = "https://github.com/dashpay/agora-blsful", rev = "be108b2cf6ac64eedbe04f91c63731533c8956bc" }
1920

2021
# CLI
2122
clap = { version = "4.0", features = ["derive"] }

dash-spv/examples/filter_sync.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ use dash_spv::network::MultiPeerNetworkManager;
44
use dash_spv::storage::MemoryStorageManager;
55
use dash_spv::{init_logging, ClientConfig, DashSpvClient};
66
use dashcore::{Address, Network};
7+
use key_wallet::wallet::managed_wallet_info::ManagedWalletInfo;
78
use key_wallet_manager::spv_wallet_manager::SPVWalletManager;
9+
use key_wallet_manager::wallet_manager::WalletManager;
810
use std::str::FromStr;
911
use std::sync::Arc;
1012
use tokio::sync::RwLock;
@@ -31,7 +33,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
3133
let storage_manager = MemoryStorageManager::new().await?;
3234

3335
// Create wallet manager
34-
let wallet = Arc::new(RwLock::new(SPVWalletManager::new()));
36+
let wallet = Arc::new(RwLock::new(SPVWalletManager::with_base(WalletManager::<
37+
ManagedWalletInfo,
38+
>::new())));
3539

3640
// Create the client
3741
let mut client = DashSpvClient::new(config, network_manager, storage_manager, wallet).await?;

dash-spv/examples/reorg_demo.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ mod disabled_example {
1818
use dash_spv::types::ChainState;
1919
use dashcore::{blockdata::constants::genesis_block, Header as BlockHeader, Network};
2020
use dashcore_hashes::Hash;
21+
use key_wallet::wallet::managed_wallet_info::ManagedWalletInfo;
2122
use key_wallet_manager::spv_wallet_manager::SPVWalletManager;
23+
use key_wallet_manager::wallet_manager::WalletManager;
2224
use std::sync::Arc;
2325
use tokio::sync::RwLock;
2426

@@ -38,7 +40,9 @@ mod disabled_example {
3840
let network = Network::Dash;
3941
let genesis = genesis_block(network).header;
4042
let mut chain_state = ChainState::new_for_network(network);
41-
let wallet_manager = Arc::new(RwLock::new(SPVWalletManager::new()));
43+
let wallet_manager = Arc::new(RwLock::new(SPVWalletManager::with_base(WalletManager::<
44+
ManagedWalletInfo,
45+
>::new())));
4246
let mut storage = MemoryStorageManager::new().await?;
4347

4448
println!("📦 Building main chain: genesis -> block1 -> block2");

dash-spv/examples/simple_sync.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
use dash_spv::network::MultiPeerNetworkManager;
44
use dash_spv::storage::MemoryStorageManager;
55
use dash_spv::{init_logging, ClientConfig, DashSpvClient};
6+
use key_wallet::wallet::managed_wallet_info::ManagedWalletInfo;
67
use key_wallet_manager::spv_wallet_manager::SPVWalletManager;
8+
use key_wallet_manager::wallet_manager::WalletManager;
79
use std::sync::Arc;
810
use tokio::sync::RwLock;
911

@@ -24,7 +26,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
2426
let storage_manager = MemoryStorageManager::new().await?;
2527

2628
// Create wallet manager
27-
let wallet = Arc::new(RwLock::new(SPVWalletManager::new()));
29+
let wallet = Arc::new(RwLock::new(SPVWalletManager::with_base(WalletManager::<
30+
ManagedWalletInfo,
31+
>::new())));
2832

2933
// Create the client
3034
let mut client = DashSpvClient::new(config, network_manager, storage_manager, wallet).await?;

dash-spv/src/bloom/tests.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ mod tests {
55
use crate::bloom::{
66
builder::BloomFilterBuilder,
77
manager::{BloomFilterConfig, BloomFilterManager},
8-
stats::{BloomFilterStats, BloomStatsTracker, DetailedBloomStats},
8+
stats::BloomStatsTracker,
99
utils,
1010
};
11-
use crate::error::SpvError;
11+
1212
use dashcore::{
1313
address::{Address, Payload},
14-
blockdata::script::{Script, ScriptBuf},
15-
bloom::{BloomFilter, BloomFlags},
14+
blockdata::script::ScriptBuf,
15+
bloom::BloomFlags,
1616
hash_types::PubkeyHash,
1717
OutPoint, Txid,
1818
};
19-
use std::str::FromStr;
19+
2020
use std::sync::Arc;
2121

2222
// Test data helpers

0 commit comments

Comments
 (0)