Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ffi wallet file for unknown type name #4589

Merged
merged 2 commits into from
Sep 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion base_layer/wallet_ffi/build.rs
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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