Skip to content

Commit 93eed45

Browse files
chore: regenerate FFI docs and apply fmt
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 63df5d8 commit 93eed45

2 files changed

Lines changed: 20 additions & 5 deletions

File tree

dash-spv-ffi/FFI_API.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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**: 40
7+
**Total Functions**: 41
88

99
## Table of Contents
1010

@@ -31,12 +31,13 @@ Functions: 3
3131

3232
### Configuration
3333

34-
Functions: 16
34+
Functions: 17
3535

3636
| Function | Description | Module |
3737
|----------|-------------|--------|
3838
| `dash_spv_ffi_client_update_config` | Update the running client's configuration | client |
3939
| `dash_spv_ffi_config_add_peer` | Adds a peer address to the configuration Accepts socket addresses with or... | config |
40+
| `dash_spv_ffi_config_clear_peers` | Removes all configured peers from the configuration This is useful when the... | config |
4041
| `dash_spv_ffi_config_destroy` | Destroys an FFIClientConfig and frees its memory # Safety - `config` must... | config |
4142
| `dash_spv_ffi_config_get_network` | Gets the network type from the configuration # Safety - `config` must be a... | config |
4243
| `dash_spv_ffi_config_mainnet` | No description | config |
@@ -201,6 +202,22 @@ Adds a peer address to the configuration Accepts socket addresses with or witho
201202
202203
---
203204
205+
#### `dash_spv_ffi_config_clear_peers`
206+
207+
```c
208+
dash_spv_ffi_config_clear_peers(config: *mut FFIClientConfig) -> i32
209+
```
210+
211+
**Description:**
212+
Removes all configured peers from the configuration This is useful when the caller wants to start with a clean slate before adding custom peers via `dash_spv_ffi_config_add_peer`. # Safety - `config` must be a valid pointer to an FFIClientConfig created by dash_spv_ffi_config_new/mainnet/testnet - The caller must ensure the config pointer remains valid for the duration of this call
213+
214+
**Safety:**
215+
- `config` must be a valid pointer to an FFIClientConfig created by dash_spv_ffi_config_new/mainnet/testnet - The caller must ensure the config pointer remains valid for the duration of this call
216+
217+
**Module:** `config`
218+
219+
---
220+
204221
#### `dash_spv_ffi_config_destroy`
205222

206223
```c

dash-spv-ffi/src/config.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,7 @@ pub unsafe extern "C" fn dash_spv_ffi_config_add_peer(
175175
/// - `config` must be a valid pointer to an FFIClientConfig created by dash_spv_ffi_config_new/mainnet/testnet
176176
/// - The caller must ensure the config pointer remains valid for the duration of this call
177177
#[no_mangle]
178-
pub unsafe extern "C" fn dash_spv_ffi_config_clear_peers(
179-
config: *mut FFIClientConfig,
180-
) -> i32 {
178+
pub unsafe extern "C" fn dash_spv_ffi_config_clear_peers(config: *mut FFIClientConfig) -> i32 {
181179
null_check!(config);
182180

183181
let cfg = unsafe { &mut *((*config).inner as *mut ClientConfig) };

0 commit comments

Comments
 (0)