diff --git a/base_layer/wallet_ffi/build.rs b/base_layer/wallet_ffi/build.rs index af2a1ae4ed..29e32918c4 100644 --- a/base_layer/wallet_ffi/build.rs +++ b/base_layer/wallet_ffi/build.rs @@ -3,7 +3,7 @@ use std::{env, path::PathBuf}; -use cbindgen::{Config, Language, ParseConfig, Style}; +use cbindgen::{Config, ExportConfig, Language, ParseConfig, Style}; fn main() { let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap(); @@ -28,6 +28,10 @@ fn main() { autogen_warning: Some("// This file was generated by cargo-bindgen. Please do not edit manually.".to_string()), style: Style::Tag, cpp_compat: true, + export: ExportConfig { + include: vec!["TariUtxo".to_string()], + ..Default::default() + }, ..Default::default() }; diff --git a/base_layer/wallet_ffi/wallet.h b/base_layer/wallet_ffi/wallet.h index db6be26839..8eb936227e 100644 --- a/base_layer/wallet_ffi/wallet.h +++ b/base_layer/wallet_ffi/wallet.h @@ -305,6 +305,14 @@ typedef struct FeePerGramStatsResponse TariFeePerGramStats; typedef struct FeePerGramStat TariFeePerGramStat; +struct TariUtxo { + const char *commitment; + uint64_t value; + uint64_t mined_height; + uint64_t mined_timestamp; + uint8_t status; +}; + #ifdef __cplusplus extern "C" { #endif // __cplusplus