Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
c9f048e
feat(spv): enhance wallet transaction logging and UTXO management
PastaPastaPasta Sep 16, 2025
0949d16
feat(ffi-cli): add FFI-only CLI with logging and runtime/
PastaPastaPasta Sep 25, 2025
90ba566
fix(bip158): match_any returns false for empty queries; check emptine…
PastaPastaPasta Sep 25, 2025
cd61634
feat(ffi): configurable Tokio workers; pull-based event draining via …
PastaPastaPasta Sep 25, 2025
1e5263f
fix(wallet-manager): avoid false positives when no monitored scripts …
PastaPastaPasta Sep 25, 2025
c9009df
feat(sync): derive filter request window from wallet birth height and…
PastaPastaPasta Sep 25, 2025
178935f
chore(cli): include wallet-affecting tx count in periodic snapshot logs
PastaPastaPasta Sep 25, 2025
cb1a32a
fix(wallet): detect spend-only transactions via UTXO spend tracking; …
PastaPastaPasta Sep 25, 2025
9d8d5c0
docs: update FFI API documentation
PastaPastaPasta Sep 25, 2025
21d6435
fix(key-wallet): resolve clippy warning for useless format!
PastaPastaPasta Sep 25, 2025
6ef136f
fix(hashes): resolve clippy manual_is_multiple_of warnings
PastaPastaPasta Sep 25, 2025
d607521
fix(dash): resolve clippy manual_is_multiple_of warnings in taproot
PastaPastaPasta Sep 25, 2025
5d7f410
fix(key-wallet): resolve clippy useless_conversion and unused import …
PastaPastaPasta Sep 25, 2025
4d1e3f5
fix(dash): resolve clippy manual_is_multiple_of warnings in special t…
PastaPastaPasta Sep 25, 2025
628e939
fix(dash-spv): resolve clippy manual_is_multiple_of warnings
PastaPastaPasta Sep 25, 2025
901e3df
fix(dash-spv-ffi): remove unused start_event_listener method
PastaPastaPasta Sep 25, 2025
c79298e
test(ffi): add comprehensive test coverage for new FFI functions
PastaPastaPasta Sep 25, 2025
a915f78
fix(dash-spv): improve wallet birth height hint handling
PastaPastaPasta Sep 25, 2025
2eaea02
fix: allow optional filter sync in ffi cli
PastaPastaPasta Sep 25, 2025
4b2f06b
fix: preserve event receiver reuse after start
PastaPastaPasta Sep 25, 2025
fec61d5
test: flatten event callback tests
PastaPastaPasta Sep 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions dash-spv-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ key-wallet-ffi = { path = "../key-wallet-ffi" }
key-wallet = { path = "../key-wallet" }
key-wallet-manager = { path = "../key-wallet-manager" }
rand = "0.8"
clap = { version = "4.5", features = ["derive"] }

[dev-dependencies]
tempfile = "3.8"
Expand All @@ -39,3 +40,7 @@ dashcore-test-utils = { path = "../test-utils" }

[build-dependencies]
cbindgen = "0.29"

[[bin]]
name = "dash-spv-ffi"
path = "src/bin/ffi_cli.rs"
40 changes: 37 additions & 3 deletions dash-spv-ffi/FFI_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This document provides a comprehensive reference for all FFI (Foreign Function I

**Auto-generated**: This documentation is automatically generated from the source code. Do not edit manually.

**Total Functions**: 68
**Total Functions**: 70

## Table of Contents

Expand Down Expand Up @@ -34,7 +34,7 @@ Functions: 4

### Configuration

Functions: 26
Functions: 27

| Function | Description | Module |
|----------|-------------|--------|
Expand Down Expand Up @@ -63,6 +63,7 @@ Functions: 26
| `dash_spv_ffi_config_set_user_agent` | Sets the user agent string to advertise in the P2P handshake # Safety - `con... | config |
| `dash_spv_ffi_config_set_validation_mode` | Sets the validation mode for the SPV client # Safety - `config` must be a va... | config |
| `dash_spv_ffi_config_set_wallet_creation_time` | Sets the wallet creation timestamp for synchronization optimization # Safety... | config |
| `dash_spv_ffi_config_set_worker_threads` | Sets the number of Tokio worker threads for the FFI runtime (0 = auto) # Saf... | config |
| `dash_spv_ffi_config_testnet` | No description | config |

### Synchronization
Expand Down Expand Up @@ -119,10 +120,11 @@ Functions: 4

### Event Callbacks

Functions: 1
Functions: 2

| Function | Description | Module |
|----------|-------------|--------|
| `dash_spv_ffi_client_drain_events` | Drain pending events and invoke configured callbacks (non-blocking) | client |
| `dash_spv_ffi_client_set_event_callbacks` | Set event callbacks for the client | client |

### Error Handling
Expand Down Expand Up @@ -617,6 +619,22 @@ Sets the wallet creation timestamp for synchronization optimization # Safety -

---

#### `dash_spv_ffi_config_set_worker_threads`

```c
dash_spv_ffi_config_set_worker_threads(config: *mut FFIClientConfig, threads: u32,) -> i32
```

**Description:**
Sets the number of Tokio worker threads for the FFI runtime (0 = auto) # Safety - `config` must be a valid pointer to an FFIClientConfig

**Safety:**
- `config` must be a valid pointer to an FFIClientConfig

**Module:** `config`

---

#### `dash_spv_ffi_config_testnet`

```c
Expand Down Expand Up @@ -905,6 +923,22 @@ This function is unsafe because: - The caller must ensure the handle pointer is

### Event Callbacks - Detailed

#### `dash_spv_ffi_client_drain_events`

```c
dash_spv_ffi_client_drain_events(client: *mut FFIDashSpvClient) -> i32
```

**Description:**
Drain pending events and invoke configured callbacks (non-blocking). # Safety - `client` must be a valid, non-null pointer.

**Safety:**
- `client` must be a valid, non-null pointer.

**Module:** `client`

---

#### `dash_spv_ffi_client_set_event_callbacks`

```c
Expand Down
Loading
Loading