Describe the enhancement
Add an FFI bridge so coconut_wallet can call bdk-floresta APIs from Dart/Flutter.
This depends on upstream work:
We can use flutter_rust_bridge or dart:ffi + cbindgen. The bridge should live in a new Rust crate, e.g. native/bdk_floresta_ffi.
Minimum APIs to expose:
fn node_run(config: NodeConfigJson) -> Result<NodeHandle, String>;
fn node_shutdown(handle: NodeHandle) -> Result<(), String>;
fn node_broadcast_tx(handle: NodeHandle, tx_hex: String) -> Result<String, String>;
fn node_estimate_fee(handle: NodeHandle, target_blocks: u16) -> Result<u64, String>;
fn node_match_filters(...) -> Result<Vec<String>, String>;
fn node_fetch_blocks(...) -> Result<Vec<Vec<u8>>, String>;
Use case
This is required so that coconut_wallet can use bdk-floresta as a chain source backend instead of relying on a remote Electrum server.
Additional context
- Keep the FFI surface small at first.
- Mobile build setup will be handled in a separate issue.
Describe the enhancement
Add an FFI bridge so coconut_wallet can call bdk-floresta APIs from Dart/Flutter.
This depends on upstream work:
Node::estimate_fee()to bdk-floresta luisschwab/bdk-floresta#140We can use
flutter_rust_bridgeordart:ffi+cbindgen. The bridge should live in a new Rust crate, e.g.native/bdk_floresta_ffi.Minimum APIs to expose: