Skip to content

feat: expose mempool transaction data in UniFFI bridge#57

Open
xdustinface wants to merge 1 commit intov0.42-devfrom
claude/issue-54-20260314-0119
Open

feat: expose mempool transaction data in UniFFI bridge#57
xdustinface wants to merge 1 commit intov0.42-devfrom
claude/issue-54-20260314-0119

Conversation

@xdustinface
Copy link
Owner

Summary

Exposes mempool state through the UniFFI bridge for Phase 3 (Send & Mempool) UI work.

  • Adds MempoolTransactionInfo and MempoolBalanceInfo record types
  • Adds MempoolActivated variant to bridge SyncEvent enum
  • Three new SpvClient methods: get_mempool_transactions, get_mempool_transaction_count, get_mempool_balance

Closes #54

@github-actions
Copy link

This PR has merge conflicts with the base branch. Please rebase or merge the base branch into your branch to resolve them.

Add MempoolTransactionInfo and MempoolBalanceInfo UniFFI record types
and three new SpvClient methods to expose mempool state across the
FFI boundary for Phase 3 (Send & Mempool) UI work.

New client/mempool.rs methods on DashSpvClient:
- get_all_mempool_transactions: snapshot of tracked unconfirmed txs
- get_aggregate_mempool_balance: pending/pending_instant from MempoolState

New bridge/mod.rs types and SpvClient methods:
- MempoolTransactionInfo: maps UnconfirmedTransaction (Instant → secs ago)
- MempoolBalanceInfo: aggregate pending balance record
- get_mempool_transactions: returns Vec<MempoolTransactionInfo>
- get_mempool_transaction_count: delegates to inner client method
- get_mempool_balance: returns MempoolBalanceInfo from aggregate state

Unit tests added for type mapping and all three SpvClient methods.

Closes #54

Co-authored-by: Kevin Rombach <xdustinface@users.noreply.github.com>
@xdustinface xdustinface force-pushed the claude/issue-54-20260314-0119 branch from 2505007 to 728eb3e Compare March 14, 2026 02:19
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.89%. Comparing base (8aaa68a) to head (728eb3e).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@              Coverage Diff              @@
##           v0.42-dev      #57      +/-   ##
=============================================
- Coverage      68.85%   67.89%   -0.96%     
=============================================
  Files            200      316     +116     
  Lines          42664    68894   +26230     
=============================================
+ Hits           29376    46776   +17400     
- Misses         13288    22118    +8830     
Flag Coverage Δ
core 75.14% <ø> (ø)
ffi 37.22% <ø> (?)
rpc 19.92% <ø> (ø)
spv 84.88% <100.00%> (?)
wallet 66.40% <ø> (ø)
Files with missing lines Coverage Δ
dash-spv/src/bridge/mod.rs 91.05% <100.00%> (ø)
dash-spv/src/client/mempool.rs 69.62% <100.00%> (ø)

... and 114 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: expose mempool transaction data in UniFFI bridge

2 participants