Skip to content

[Enhancement] Add bdk-floresta FFI bridge for Dart/Flutter #698

Description

@4xvgal

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions