diff --git a/base_layer/wallet_ffi/build.rs b/base_layer/wallet_ffi/build.rs index 8c41d640db..29e32918c4 100644 --- a/base_layer/wallet_ffi/build.rs +++ b/base_layer/wallet_ffi/build.rs @@ -17,7 +17,7 @@ fn main() { parse: ParseConfig { parse_deps: true, include: Some(vec![ - // "tari_core".to_string(), + "tari_core".to_string(), "tari_common_types".to_string(), "tari_crypto".to_string(), "tari_p2p".to_string(), diff --git a/base_layer/wallet_ffi/wallet.h b/base_layer/wallet_ffi/wallet.h index 09b190b334..cf3b054424 100644 --- a/base_layer/wallet_ffi/wallet.h +++ b/base_layer/wallet_ffi/wallet.h @@ -8,6 +8,11 @@ #include #include +/** + * The number of unique fields available. This always matches the number of variants in `OutputField`. + */ +#define OutputFields_NUM_FIELDS 10 + enum TariTypeTag { Text = 0, Utxo = 1, @@ -60,14 +65,28 @@ struct Contact; struct ContactsLivenessData; +struct Covenant; + struct EmojiSet; +/** + * value: u64 + tag: [u8; 16] + */ +struct EncryptedValue; + +struct FeePerGramStat; + struct FeePerGramStatsResponse; struct InboundTransaction; struct OutboundTransaction; +/** + * Options for UTXO's + */ +struct OutputFeatures; + /** * Configuration for a comms node */ @@ -138,6 +157,15 @@ struct TariSeedWords; struct TariWallet; +/** + * The transaction kernel tracks the excess for a given transaction. For an explanation of what the excess is, and + * why it is necessary, refer to the + * [Mimblewimble TLU post](https://tlu.tarilabs.com/protocols/mimblewimble-1/sources/PITCHME.link.html?highlight=mimblewimble#mimblewimble). + * The kernel also tracks other transaction metadata, such as the lock height for the transaction (i.e. the earliest + * this transaction can be mined) and the transaction fee, in cleartext. + */ +struct TransactionKernel; + struct TransactionSendStatus; struct TransportConfig; @@ -157,7 +185,7 @@ struct TariCoinPreview { uint64_t fee; }; -typedef TransactionKernel TariTransactionKernel; +typedef struct TransactionKernel TariTransactionKernel; /** * Define the explicit Public key implementation for the Tari base layer @@ -261,11 +289,11 @@ typedef RistrettoComSig ComSignature; typedef ComSignature TariCommitmentSignature; -typedef Covenant TariCovenant; +typedef struct Covenant TariCovenant; -typedef EncryptedValue TariEncryptedValue; +typedef struct EncryptedValue TariEncryptedValue; -typedef OutputFeatures TariOutputFeatures; +typedef struct OutputFeatures TariOutputFeatures; typedef struct Contact TariContact; @@ -287,7 +315,7 @@ typedef struct Balance TariBalance; typedef struct FeePerGramStatsResponse TariFeePerGramStats; -typedef FeePerGramStat TariFeePerGramStat; +typedef struct FeePerGramStat TariFeePerGramStat; struct TariUtxo { const char *commitment;