Skip to content

Commit

Permalink
fix: ffi wallet file for unknown type name (#4589)
Browse files Browse the repository at this point in the history
Description
---
Wallet.h file complains of `unknown type` this is a fix for that.
  • Loading branch information
SWvheerden committed Sep 5, 2022
1 parent d9ef267 commit 5cbf9aa
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
2 changes: 1 addition & 1 deletion base_layer/wallet_ffi/build.rs
Expand Up @@ -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(),
Expand Down
38 changes: 33 additions & 5 deletions base_layer/wallet_ffi/wallet.h
Expand Up @@ -8,6 +8,11 @@
#include <stdint.h>
#include <stdlib.h>

/**
* 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,
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -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;

Expand All @@ -287,7 +315,7 @@ typedef struct Balance TariBalance;

typedef struct FeePerGramStatsResponse TariFeePerGramStats;

typedef FeePerGramStat TariFeePerGramStat;
typedef struct FeePerGramStat TariFeePerGramStat;

struct TariUtxo {
const char *commitment;
Expand Down

0 comments on commit 5cbf9aa

Please sign in to comment.