This crate does the light wrapping on rust-bitcoin required for use in uniffi-based libraries.
To leverage these types in your uniffi library, simply:
- Add a dependency on this crate:
bitcoin-ffi = { git = "https://github.com/thunderbiscuit/bitcoin-ffi.git", branch = "master" }
- Add the following declarations to your UDL file:
[ExternalInterface="bitcoin_ffi"]
typedef extern Script;
- Add the following to your uniffi.toml config:
[bindings.kotlin.external_packages]
# Map the crate names from [External={name}] into Kotlin package names
bitcoin_ffi = "org.bitcoindevkit.bitcoin"