Skip to content

Commit c986d22

Browse files
shumkovclaude
andcommitted
chore: update dashcore deps to 88eacdf1 (mempool + EventHandler + manager feature)
- Update rust-dashcore rev to 88eacdf1 (latest v0.42-dev) - DMNState.service stays as SocketAddr (revert of Optional was merged in dashcore) - key-wallet-manager merged into key-wallet::manager - Manager module gated behind feature flag - Remove "std" feature from dashcore dep (removed upstream) - TransactionContext restructured: InBlock(BlockInfo) - WalletInterface expanded: mempool support, watched_outpoints, monitor_revision - DashSpvClient gains EventHandler generic - FFI: dash_spv_ffi_client_new takes FFIEventCallbacks Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a0dddb0 commit c986d22

10 files changed

Lines changed: 138 additions & 209 deletions

File tree

Cargo.lock

Lines changed: 110 additions & 190 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,11 @@ members = [
4747
]
4848

4949
[workspace.dependencies]
50-
dashcore = { git = "https://github.com/dashpay/rust-dashcore", rev = "8cbae416458565faac21d3452fbc6d80b324f6d3" }
51-
dash-spv = { git = "https://github.com/dashpay/rust-dashcore", rev = "8cbae416458565faac21d3452fbc6d80b324f6d3" }
52-
dash-spv-ffi = { git = "https://github.com/dashpay/rust-dashcore", rev = "8cbae416458565faac21d3452fbc6d80b324f6d3" }
53-
key-wallet = { git = "https://github.com/dashpay/rust-dashcore", rev = "8cbae416458565faac21d3452fbc6d80b324f6d3" }
54-
key-wallet-manager = { git = "https://github.com/dashpay/rust-dashcore", rev = "8cbae416458565faac21d3452fbc6d80b324f6d3" }
55-
dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore", rev = "8cbae416458565faac21d3452fbc6d80b324f6d3" }
50+
dashcore = { git = "https://github.com/dashpay/rust-dashcore", rev = "88eacdf19d984c34a4bd8a586ede2c4acf055c54" }
51+
dash-spv = { git = "https://github.com/dashpay/rust-dashcore", rev = "88eacdf19d984c34a4bd8a586ede2c4acf055c54" }
52+
dash-spv-ffi = { git = "https://github.com/dashpay/rust-dashcore", rev = "88eacdf19d984c34a4bd8a586ede2c4acf055c54" }
53+
key-wallet = { git = "https://github.com/dashpay/rust-dashcore", rev = "88eacdf19d984c34a4bd8a586ede2c4acf055c54" }
54+
dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore", rev = "88eacdf19d984c34a4bd8a586ede2c4acf055c54" }
5655

5756
# Optimize heavy crypto crates even in dev/test builds so that
5857
# Halo 2 proof generation and verification run at near-release speed.

packages/rs-dpp/Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,13 @@ chrono = { version = "0.4.35", default-features = false, features = [
2525
chrono-tz = { version = "0.8", optional = true }
2626
ciborium = { version = "0.2.2", optional = true }
2727
dashcore = { workspace = true, features = [
28-
"std",
2928
"secp-recovery",
3029
"rand",
3130
"signer",
3231
"serde",
3332
"eddsa",
3433
], default-features = false }
3534
key-wallet = { workspace = true, optional = true }
36-
key-wallet-manager = { workspace = true, optional = true }
3735
dash-spv = { workspace = true, optional = true }
3836
dashcore-rpc = { workspace = true, optional = true }
3937

@@ -94,7 +92,7 @@ core_quorum_validation = ["dashcore/quorum_validation"]
9492
core_key_wallet = ["dep:key-wallet"]
9593
core_key_wallet_bincode = ["dep:key-wallet", "key-wallet/bincode"]
9694
core_key_wallet_bip_38 = ["dep:key-wallet", "key-wallet/bip38"]
97-
core_key_wallet_manager = ["dep:key-wallet-manager"]
95+
core_key_wallet_manager = ["dep:key-wallet", "key-wallet/manager"]
9896
core_key_wallet_serde = ["dep:key-wallet", "key-wallet/serde"]
9997
core_spv = ["dep:dash-spv"]
10098
core_rpc_client = ["dep:dashcore-rpc"]

packages/rs-dpp/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub use dashcore;
1313
pub use key_wallet;
1414

1515
#[cfg(feature = "core_key_wallet_manager")]
16-
pub use key_wallet_manager;
16+
pub use key_wallet::manager;
1717

1818
#[cfg(feature = "core_spv")]
1919
pub use dash_spv;

packages/rs-platform-wallet/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ platform-encryption = { path = "../rs-platform-encryption" }
1414

1515
# Key wallet dependencies (from rust-dashcore)
1616
key-wallet = { workspace = true }
17-
key-wallet-manager = { workspace = true, optional = true }
1817

1918
# Core dependencies
2019
dashcore = { workspace = true }
@@ -34,4 +33,4 @@ rand = "0.8"
3433
default = ["bls", "eddsa", "manager"]
3534
bls = ["key-wallet/bls"]
3635
eddsa = ["key-wallet/eddsa"]
37-
manager = ["key-wallet-manager"]
36+
manager = []

packages/rs-platform-wallet/examples/basic_usage.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn main() -> Result<(), PlatformWalletError> {
2525
// The platform wallet can be used with WalletManager (requires "manager" feature)
2626
#[cfg(feature = "manager")]
2727
{
28-
use key_wallet_manager::wallet_manager::WalletManager;
28+
use key_wallet::manager::wallet_manager::WalletManager;
2929

3030
let _wallet_manager = WalletManager::<PlatformWalletInfo>::new(network);
3131
println!("Platform wallet successfully integrated with wallet managers!");

packages/rs-platform-wallet/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ pub use managed_identity::ManagedIdentity;
2222
pub use platform_wallet_info::PlatformWalletInfo;
2323

2424
#[cfg(feature = "manager")]
25-
pub use key_wallet_manager;
25+
pub use key_wallet::manager;

packages/rs-platform-wallet/src/platform_wallet_info/wallet_info_interface.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::platform_wallet_info::PlatformWalletInfo;
22
use crate::IdentityManager;
3-
use dashcore::{Address as DashAddress, Network, Transaction};
3+
use dashcore::{Address as DashAddress, Network, Transaction, Txid};
44
use dpp::prelude::CoreBlockHeight;
55
use key_wallet::account::{ManagedAccountCollection, TransactionRecord};
66
use key_wallet::wallet::managed_wallet_info::wallet_info_interface::WalletInfoInterface;
@@ -111,4 +111,12 @@ impl WalletInfoInterface for PlatformWalletInfo {
111111
fn update_synced_height(&mut self, current_height: u32) {
112112
self.wallet_info.update_synced_height(current_height)
113113
}
114+
115+
fn mark_instant_send_utxos(&mut self, txid: &Txid) -> bool {
116+
self.wallet_info.mark_instant_send_utxos(txid)
117+
}
118+
119+
fn monitor_revision(&self) -> u64 {
120+
self.wallet_info.monitor_revision()
121+
}
114122
}

packages/rs-platform-wallet/src/platform_wallet_info/wallet_transaction_checker.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ impl WalletTransactionChecker for PlatformWalletInfo {
1313
&mut self,
1414
tx: &Transaction,
1515
context: TransactionContext,
16-
wallet: &Wallet,
16+
wallet: &mut Wallet,
1717
update_state: bool,
18+
update_balance: bool,
1819
) -> TransactionCheckResult {
1920
// Check transaction with underlying wallet info
2021
let result = self
2122
.wallet_info
22-
.check_core_transaction(tx, context, wallet, update_state)
23+
.check_core_transaction(tx, context, wallet, update_state, update_balance)
2324
.await;
2425

2526
// If the transaction is relevant, and it's an asset lock, automatically fetch identities

packages/rs-sdk-ffi/src/unified.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::ffi::c_char;
99
use std::sync::atomic::{AtomicBool, Ordering};
1010

1111
use crate::types::{DashSDKConfig, SDKHandle};
12-
use dash_spv_ffi::{FFIClientConfig, FFIDashSpvClient};
12+
use dash_spv_ffi::{FFIClientConfig, FFIDashSpvClient, FFIEventCallbacks};
1313

1414
/// Static flag to track unified initialization
1515
static UNIFIED_INITIALIZED: AtomicBool = AtomicBool::new(false);
@@ -19,6 +19,8 @@ static UNIFIED_INITIALIZED: AtomicBool = AtomicBool::new(false);
1919
pub struct UnifiedSDKConfig {
2020
/// Core SDK configuration (ignored if core feature disabled)
2121
pub core_config: *const FFIClientConfig,
22+
/// Event callbacks for core SPV client
23+
pub core_callbacks: FFIEventCallbacks,
2224
/// Platform SDK configuration
2325
pub platform_config: DashSDKConfig,
2426
/// Whether to enable cross-layer integration
@@ -72,7 +74,8 @@ pub unsafe extern "C" fn dash_unified_sdk_create(
7274
let config = &*config;
7375

7476
// Create Core SDK client (always enabled in unified SDK)
75-
let core_client = dash_spv_ffi::dash_spv_ffi_client_new(config.core_config);
77+
let core_client =
78+
dash_spv_ffi::dash_spv_ffi_client_new(config.core_config, config.core_callbacks.clone());
7679

7780
// Create Platform SDK
7881
let platform_sdk_result = crate::dash_sdk_create(&config.platform_config);
@@ -364,6 +367,7 @@ mod tests {
364367

365368
// Step 2: Create the UnifiedSDKConfig using the pointer
366369
let unified_config = UnifiedSDKConfig {
370+
core_callbacks: FFIEventCallbacks::default(),
367371
core_config: core_config_ptr,
368372
platform_config,
369373
enable_integration: true,

0 commit comments

Comments
 (0)