More C headers

This commit is contained in:
Tyera Eulberg 2020-08-27 09:40:39 -06:00 committed by Michael Vines
parent 8d0ba35407
commit fec5717d2a
1 changed files with 29 additions and 7 deletions

View File

@ -407,6 +407,31 @@ typedef struct Token_Mint {
Token_COption_Pubkey freeze_authority;
} Token_Mint;
/**
* A C representation of Rust's `std::option::Option`
*/
typedef enum Token_COption_u64_Tag {
/**
* No value
*/
Token_COption_u64_None_u64,
/**
* Some value `T`
*/
Token_COption_u64_Some_u64,
} Token_COption_u64_Tag;
typedef struct Token_COption_u64_Token_Some_Body_u64 {
uint64_t _0;
} Token_COption_u64_Token_Some_Body_u64;
typedef struct Token_COption_u64 {
Token_COption_u64_Tag tag;
union {
Token_COption_u64_Token_Some_Body_u64 some;
};
} Token_COption_u64;
/**
* Account data.
*/
@ -433,9 +458,11 @@ typedef struct Token_Account {
*/
Token_AccountState state;
/**
* Is this a native token
* If is_some, this is a native token, and the value logs the rent-exempt reserve. An Account
* is required to be rent-exempt, so the value is used by the Processor to ensure that wrapped
* SOL accounts do not drop below this threshold.
*/
bool is_native;
Token_COption_u64 is_native;
/**
* The amount delegated
*/
@ -444,11 +471,6 @@ typedef struct Token_Account {
* Optional authority to close the account.
*/
Token_COption_Pubkey close_authority;
/**
* An Account is required to be rent-exempt. This value logs the reserve required to be
* rent-exempt so that wrapped SOL accounts do not drop below this threshold.
*/
uint64_t rent_exempt_reserve;
} Token_Account;
/**