#pragma once
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#define Token_MAX_SIGNERS 11
#define Token_MIN_SIGNERS 1
enum Token_AccountState
#ifdef __cplusplus
: uint8_t
#endif {
Token_AccountState_Uninitialized,
Token_AccountState_Initialized,
Token_AccountState_Frozen,
};
#ifndef __cplusplus
typedef uint8_t Token_AccountState;
#endif
enum Token_AuthorityType
#ifdef __cplusplus
: uint8_t
#endif {
Token_AuthorityType_MintTokens,
Token_AuthorityType_FreezeAccount,
Token_AuthorityType_AccountOwner,
Token_AuthorityType_CloseAccount,
};
#ifndef __cplusplus
typedef uint8_t Token_AuthorityType;
#endif
typedef uint8_t Token_Pubkey[32];
typedef enum Token_COption_Pubkey_Tag {
Token_COption_Pubkey_None_Pubkey,
Token_COption_Pubkey_Some_Pubkey,
} Token_COption_Pubkey_Tag;
typedef struct Token_COption_Pubkey_Token_Some_Body_Pubkey {
Token_Pubkey _0;
} Token_COption_Pubkey_Token_Some_Body_Pubkey;
typedef struct Token_COption_Pubkey {
Token_COption_Pubkey_Tag tag;
union {
Token_COption_Pubkey_Token_Some_Body_Pubkey some;
};
} Token_COption_Pubkey;
typedef enum Token_TokenInstruction_Tag {
Token_TokenInstruction_InitializeMint,
Token_TokenInstruction_InitializeAccount,
Token_TokenInstruction_InitializeMultisig,
Token_TokenInstruction_Transfer,
Token_TokenInstruction_Approve,
Token_TokenInstruction_Revoke,
Token_TokenInstruction_SetAuthority,
Token_TokenInstruction_MintTo,
Token_TokenInstruction_Burn,
Token_TokenInstruction_CloseAccount,
Token_TokenInstruction_FreezeAccount,
Token_TokenInstruction_ThawAccount,
Token_TokenInstruction_Transfer2,
Token_TokenInstruction_Approve2,
Token_TokenInstruction_MintTo2,
Token_TokenInstruction_Burn2,
} Token_TokenInstruction_Tag;
typedef struct Token_TokenInstruction_Token_InitializeMint_Body {
uint8_t decimals;
Token_Pubkey mint_authority;
Token_COption_Pubkey freeze_authority;
} Token_TokenInstruction_Token_InitializeMint_Body;
typedef struct Token_TokenInstruction_Token_InitializeMultisig_Body {
uint8_t m;
} Token_TokenInstruction_Token_InitializeMultisig_Body;
typedef struct Token_TokenInstruction_Token_Transfer_Body {
uint64_t amount;
} Token_TokenInstruction_Token_Transfer_Body;
typedef struct Token_TokenInstruction_Token_Approve_Body {
uint64_t amount;
} Token_TokenInstruction_Token_Approve_Body;
typedef struct Token_TokenInstruction_Token_SetAuthority_Body {
Token_AuthorityType authority_type;
Token_COption_Pubkey new_authority;
} Token_TokenInstruction_Token_SetAuthority_Body;
typedef struct Token_TokenInstruction_Token_MintTo_Body {
uint64_t amount;
} Token_TokenInstruction_Token_MintTo_Body;
typedef struct Token_TokenInstruction_Token_Burn_Body {
uint64_t amount;
} Token_TokenInstruction_Token_Burn_Body;
typedef struct Token_TokenInstruction_Token_Transfer2_Body {
uint64_t amount;
uint8_t decimals;
} Token_TokenInstruction_Token_Transfer2_Body;
typedef struct Token_TokenInstruction_Token_Approve2_Body {
uint64_t amount;
uint8_t decimals;
} Token_TokenInstruction_Token_Approve2_Body;
typedef struct Token_TokenInstruction_Token_MintTo2_Body {
uint64_t amount;
uint8_t decimals;
} Token_TokenInstruction_Token_MintTo2_Body;
typedef struct Token_TokenInstruction_Token_Burn2_Body {
uint64_t amount;
uint8_t decimals;
} Token_TokenInstruction_Token_Burn2_Body;
typedef struct Token_TokenInstruction {
Token_TokenInstruction_Tag tag;
union {
Token_TokenInstruction_Token_InitializeMint_Body initialize_mint;
Token_TokenInstruction_Token_InitializeMultisig_Body initialize_multisig;
Token_TokenInstruction_Token_Transfer_Body transfer;
Token_TokenInstruction_Token_Approve_Body approve;
Token_TokenInstruction_Token_SetAuthority_Body set_authority;
Token_TokenInstruction_Token_MintTo_Body mint_to;
Token_TokenInstruction_Token_Burn_Body burn;
Token_TokenInstruction_Token_Transfer2_Body transfer2;
Token_TokenInstruction_Token_Approve2_Body approve2;
Token_TokenInstruction_Token_MintTo2_Body mint_to2;
Token_TokenInstruction_Token_Burn2_Body burn2;
};
} Token_TokenInstruction;
typedef struct Token_Mint {
Token_COption_Pubkey mint_authority;
uint64_t supply;
uint8_t decimals;
bool is_initialized;
Token_COption_Pubkey freeze_authority;
} Token_Mint;
typedef enum Token_COption_u64_Tag {
Token_COption_u64_None_u64,
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;
typedef struct Token_Account {
Token_Pubkey mint;
Token_Pubkey owner;
uint64_t amount;
Token_COption_Pubkey delegate;
Token_AccountState state;
Token_COption_u64 is_native;
uint64_t delegated_amount;
Token_COption_Pubkey close_authority;
} Token_Account;
typedef struct Token_Multisig {
uint8_t m;
uint8_t n;
bool is_initialized;
Token_Pubkey signers[Token_MAX_SIGNERS];
} Token_Multisig;