@@ -4,7 +4,7 @@ This document provides a comprehensive reference for all FFI (Foreign Function I
44
55** Auto-generated** : This documentation is automatically generated from the source code. Do not edit manually.
66
7- ** Total Functions** : 64
7+ ** Total Functions** : 68
88
99## Table of Contents
1010
@@ -67,11 +67,12 @@ Functions: 26
6767
6868### Synchronization
6969
70- Functions: 7
70+ Functions: 8
7171
7272| Function | Description | Module |
7373| ----------| -------------| --------|
7474| ` dash_spv_ffi_client_cancel_sync ` | Cancels the sync operation | client |
75+ | ` dash_spv_ffi_client_clear_sync_state ` | Clear only the persisted sync-state snapshot | client |
7576| ` dash_spv_ffi_client_get_sync_progress ` | Get the current sync progress snapshot | client |
7677| ` dash_spv_ffi_client_is_filter_sync_available ` | Check if compact filter sync is currently available | client |
7778| ` dash_spv_ffi_client_sync_to_tip ` | Sync the SPV client to the chain tip | client |
@@ -135,7 +136,7 @@ Functions: 2
135136
136137### Utility Functions
137138
138- Functions: 15
139+ Functions: 18
139140
140141| Function | Description | Module |
141142| ----------| -------------| --------|
@@ -144,7 +145,10 @@ Functions: 15
144145| ` dash_spv_ffi_checkpoint_before_timestamp ` | Get the last checkpoint at or before a given UNIX timestamp (seconds) | checkpoints |
145146| ` dash_spv_ffi_checkpoint_latest ` | Get the latest checkpoint for the given network | checkpoints |
146147| ` dash_spv_ffi_checkpoints_between_heights ` | Get all checkpoints between two heights (inclusive) | checkpoints |
148+ | ` dash_spv_ffi_client_clear_storage ` | Clear all persisted SPV storage (headers, filters, metadata, sync state) | client |
147149| ` dash_spv_ffi_client_get_stats ` | Get current runtime statistics for the SPV client | client |
150+ | ` dash_spv_ffi_client_get_tip_hash ` | Get the current chain tip hash (32 bytes) if available | client |
151+ | ` dash_spv_ffi_client_get_tip_height ` | Get the current chain tip height (absolute) | client |
148152| ` dash_spv_ffi_client_get_wallet_manager ` | Get the wallet manager from the SPV client Returns an opaque pointer to FFIW... | client |
149153| ` dash_spv_ffi_client_record_send ` | Record that we attempted to send a transaction by its txid | client |
150154| ` dash_spv_ffi_client_rescan_blockchain ` | Request a rescan of the blockchain from a given height (not yet implemented) | client |
@@ -632,7 +636,7 @@ dash_spv_ffi_client_cancel_sync(client: *mut FFIDashSpvClient) -> i32
632636```
633637
634638**Description:**
635- Cancels the sync operation. **Note**: This function currently only stops the SPV client and clears sync callbacks, but does not fully abort the ongoing sync process. The sync operation may continue running in the background until it completes naturally. Full sync cancellation with proper task abortion is not yet implemented . # Safety The client pointer must be valid and non-null. # Returns Returns 0 on success, or an error code on failure.
639+ Cancels the sync operation. This stops the SPV client, clears callbacks, and joins active threads so the sync operation halts immediately . # Safety The client pointer must be valid and non-null. # Returns Returns 0 on success, or an error code on failure.
636640
637641**Safety:**
638642The client pointer must be valid and non-null.
@@ -641,6 +645,22 @@ The client pointer must be valid and non-null.
641645
642646---
643647
648+ #### `dash_spv_ffi_client_clear_sync_state`
649+
650+ ```c
651+ dash_spv_ffi_client_clear_sync_state(client: *mut FFIDashSpvClient,) -> i32
652+ ```
653+
654+ ** Description:**
655+ Clear only the persisted sync-state snapshot. # Safety - ` client ` must be a valid, non-null pointer.
656+
657+ ** Safety:**
658+ - ` client ` must be a valid, non-null pointer.
659+
660+ ** Module:** ` client `
661+
662+ ---
663+
644664#### ` dash_spv_ffi_client_get_sync_progress `
645665
646666``` c
@@ -996,6 +1016,22 @@ Get all checkpoints between two heights (inclusive). Returns an `FFIArray` of `
9961016
9971017---
9981018
1019+ #### `dash_spv_ffi_client_clear_storage`
1020+
1021+ ```c
1022+ dash_spv_ffi_client_clear_storage(client: *mut FFIDashSpvClient) -> i32
1023+ ```
1024+
1025+ ** Description:**
1026+ Clear all persisted SPV storage (headers, filters, metadata, sync state). # Safety - ` client ` must be a valid, non-null pointer.
1027+
1028+ ** Safety:**
1029+ - ` client ` must be a valid, non-null pointer.
1030+
1031+ ** Module:** ` client `
1032+
1033+ ---
1034+
9991035#### ` dash_spv_ffi_client_get_stats `
10001036
10011037``` c
@@ -1012,6 +1048,38 @@ Get current runtime statistics for the SPV client. # Safety - `client` must be
10121048
10131049---
10141050
1051+ #### `dash_spv_ffi_client_get_tip_hash`
1052+
1053+ ```c
1054+ dash_spv_ffi_client_get_tip_hash(client: *mut FFIDashSpvClient, out_hash: *mut u8,) -> i32
1055+ ```
1056+
1057+ ** Description:**
1058+ Get the current chain tip hash (32 bytes) if available. # Safety - ` client ` must be a valid, non-null pointer. - ` out_hash ` must be a valid pointer to a 32-byte buffer.
1059+
1060+ ** Safety:**
1061+ - ` client ` must be a valid, non-null pointer. - ` out_hash ` must be a valid pointer to a 32-byte buffer.
1062+
1063+ ** Module:** ` client `
1064+
1065+ ---
1066+
1067+ #### ` dash_spv_ffi_client_get_tip_height `
1068+
1069+ ``` c
1070+ dash_spv_ffi_client_get_tip_height (client: * mut FFIDashSpvClient, out_height: * mut u32,) -> i32
1071+ ```
1072+
1073+ **Description:**
1074+ Get the current chain tip height (absolute). # Safety - `client` must be a valid, non-null pointer. - `out_height` must be a valid, non-null pointer.
1075+
1076+ **Safety:**
1077+ - `client` must be a valid, non-null pointer. - `out_height` must be a valid, non-null pointer.
1078+
1079+ **Module:** `client`
1080+
1081+ ---
1082+
10151083#### `dash_spv_ffi_client_get_wallet_manager`
10161084
10171085```c
0 commit comments