@@ -9,7 +9,7 @@ use std::ffi::c_char;
99use std:: sync:: atomic:: { AtomicBool , Ordering } ;
1010
1111use 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
1515static UNIFIED_INITIALIZED : AtomicBool = AtomicBool :: new ( false ) ;
@@ -19,6 +19,8 @@ static UNIFIED_INITIALIZED: AtomicBool = AtomicBool::new(false);
1919pub 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