/* Generated by the protocol buffer compiler.  DO NOT EDIT! */
/* Generated from: blockchain.proto */

#ifndef PROTOBUF_C_blockchain_2eproto__INCLUDED
#define PROTOBUF_C_blockchain_2eproto__INCLUDED

#include <protobuf-c/protobuf-c.h>

PROTOBUF_C__BEGIN_DECLS

#if PROTOBUF_C_VERSION_NUMBER < 1003000
# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
#elif 1003003 < PROTOBUF_C_MIN_COMPILER_VERSION
# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
#endif


typedef struct _Proof Proof;
typedef struct _BlockHeader BlockHeader;
typedef struct _Status Status;
typedef struct _AccountGasLimit AccountGasLimit;
typedef struct _AccountGasLimit__SpecificQuotaLimitEntry AccountGasLimit__SpecificQuotaLimitEntry;
typedef struct _RichStatus RichStatus;
typedef struct _Transaction Transaction;
typedef struct _UnverifiedTransaction UnverifiedTransaction;
typedef struct _SignedTransaction SignedTransaction;
typedef struct _BlockBody BlockBody;
typedef struct _CompactBlockBody CompactBlockBody;
typedef struct _Block Block;
typedef struct _CompactBlock CompactBlock;
typedef struct _BlockWithProof BlockWithProof;
typedef struct _BlockTxs BlockTxs;
typedef struct _BlackList BlackList;
typedef struct _StateSignal StateSignal;


/* --- enums --- */

typedef enum _ProofType {
  PROOF_TYPE__AuthorityRound = 0,
  PROOF_TYPE__Raft = 1,
  PROOF_TYPE__Bft = 2
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(PROOF_TYPE)
} ProofType;
typedef enum _Crypto {
  CRYPTO__DEFAULT = 0,
  CRYPTO__RESERVED = 1
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(CRYPTO)
} Crypto;

/* --- messages --- */

struct  _Proof
{
  ProtobufCMessage base;
  ProtobufCBinaryData content;
  ProofType type;
};
#define PROOF__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&proof__descriptor) \
    , {0,NULL}, PROOF_TYPE__AuthorityRound }


struct  _BlockHeader
{
  ProtobufCMessage base;
  ProtobufCBinaryData prevhash;
  uint64_t timestamp;
  uint64_t height;
  ProtobufCBinaryData state_root;
  ProtobufCBinaryData transactions_root;
  ProtobufCBinaryData receipts_root;
  uint64_t quota_used;
  uint64_t quota_limit;
  Proof *proof;
  ProtobufCBinaryData proposer;
};
#define BLOCK_HEADER__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&block_header__descriptor) \
    , {0,NULL}, 0, 0, {0,NULL}, {0,NULL}, {0,NULL}, 0, 0, NULL, {0,NULL} }


struct  _Status
{
  ProtobufCMessage base;
  ProtobufCBinaryData hash;
  uint64_t height;
};
#define STATUS__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&status__descriptor) \
    , {0,NULL}, 0 }


struct  _AccountGasLimit__SpecificQuotaLimitEntry
{
  ProtobufCMessage base;
  char *key;
  uint64_t value;
};
#define ACCOUNT_GAS_LIMIT__SPECIFIC_QUOTA_LIMIT_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&account_gas_limit__specific_quota_limit_entry__descriptor) \
    , (char *)protobuf_c_empty_string, 0 }


struct  _AccountGasLimit
{
  ProtobufCMessage base;
  uint64_t common_quota_limit;
  size_t n_specific_quota_limit;
  AccountGasLimit__SpecificQuotaLimitEntry **specific_quota_limit;
};
#define ACCOUNT_GAS_LIMIT__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&account_gas_limit__descriptor) \
    , 0, 0,NULL }


struct  _RichStatus
{
  ProtobufCMessage base;
  ProtobufCBinaryData hash;
  uint64_t height;
  size_t n_nodes;
  ProtobufCBinaryData *nodes;
  uint64_t interval;
  uint32_t version;
  size_t n_validators;
  ProtobufCBinaryData *validators;
};
#define RICH_STATUS__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&rich_status__descriptor) \
    , {0,NULL}, 0, 0,NULL, 0, 0, 0,NULL }


struct  _Transaction
{
  ProtobufCMessage base;
  char *to;
  char *nonce;
  uint64_t quota;
  uint64_t valid_until_block;
  ProtobufCBinaryData data;
  ProtobufCBinaryData value;
  uint32_t chain_id;
  uint32_t version;
  ProtobufCBinaryData to_v1;
  ProtobufCBinaryData chain_id_v1;
};
#define TRANSACTION__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&transaction__descriptor) \
    , (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, 0, 0, {0,NULL}, {0,NULL}, 0, 0, {0,NULL}, {0,NULL} }


struct  _UnverifiedTransaction
{
  ProtobufCMessage base;
  Transaction *transaction;
  ProtobufCBinaryData signature;
  Crypto crypto;
};
#define UNVERIFIED_TRANSACTION__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&unverified_transaction__descriptor) \
    , NULL, {0,NULL}, CRYPTO__DEFAULT }


struct  _SignedTransaction
{
  ProtobufCMessage base;
  UnverifiedTransaction *transaction_with_sig;
  /*
   * SignedTransaction hash
   */
  ProtobufCBinaryData tx_hash;
  /*
   * public key
   */
  ProtobufCBinaryData signer;
};
#define SIGNED_TRANSACTION__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&signed_transaction__descriptor) \
    , NULL, {0,NULL}, {0,NULL} }


struct  _BlockBody
{
  ProtobufCMessage base;
  size_t n_transactions;
  SignedTransaction **transactions;
};
#define BLOCK_BODY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&block_body__descriptor) \
    , 0,NULL }


struct  _CompactBlockBody
{
  ProtobufCMessage base;
  size_t n_tx_hashes;
  ProtobufCBinaryData *tx_hashes;
};
#define COMPACT_BLOCK_BODY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&compact_block_body__descriptor) \
    , 0,NULL }


struct  _Block
{
  ProtobufCMessage base;
  uint32_t version;
  BlockHeader *header;
  BlockBody *body;
};
#define BLOCK__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&block__descriptor) \
    , 0, NULL, NULL }


struct  _CompactBlock
{
  ProtobufCMessage base;
  uint32_t version;
  BlockHeader *header;
  CompactBlockBody *body;
};
#define COMPACT_BLOCK__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&compact_block__descriptor) \
    , 0, NULL, NULL }


struct  _BlockWithProof
{
  ProtobufCMessage base;
  Block *blk;
  Proof *proof;
};
#define BLOCK_WITH_PROOF__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&block_with_proof__descriptor) \
    , NULL, NULL }


struct  _BlockTxs
{
  ProtobufCMessage base;
  uint64_t height;
  BlockBody *body;
};
#define BLOCK_TXS__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&block_txs__descriptor) \
    , 0, NULL }


struct  _BlackList
{
  ProtobufCMessage base;
  /*
   * black list of address, the account that sent the transaction does not have enough gas
   */
  size_t n_black_list;
  ProtobufCBinaryData *black_list;
  /*
   * clear list of address
   */
  size_t n_clear_list;
  ProtobufCBinaryData *clear_list;
};
#define BLACK_LIST__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&black_list__descriptor) \
    , 0,NULL, 0,NULL }


/*
 * State positioning signal
 */
struct  _StateSignal
{
  ProtobufCMessage base;
  uint64_t height;
};
#define STATE_SIGNAL__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&state_signal__descriptor) \
    , 0 }


/* Proof methods */
void   proof__init
                     (Proof         *message);
size_t proof__get_packed_size
                     (const Proof   *message);
size_t proof__pack
                     (const Proof   *message,
                      uint8_t             *out);
size_t proof__pack_to_buffer
                     (const Proof   *message,
                      ProtobufCBuffer     *buffer);
Proof *
       proof__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   proof__free_unpacked
                     (Proof *message,
                      ProtobufCAllocator *allocator);
/* BlockHeader methods */
void   block_header__init
                     (BlockHeader         *message);
size_t block_header__get_packed_size
                     (const BlockHeader   *message);
size_t block_header__pack
                     (const BlockHeader   *message,
                      uint8_t             *out);
size_t block_header__pack_to_buffer
                     (const BlockHeader   *message,
                      ProtobufCBuffer     *buffer);
BlockHeader *
       block_header__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   block_header__free_unpacked
                     (BlockHeader *message,
                      ProtobufCAllocator *allocator);
/* Status methods */
void   status__init
                     (Status         *message);
size_t status__get_packed_size
                     (const Status   *message);
size_t status__pack
                     (const Status   *message,
                      uint8_t             *out);
size_t status__pack_to_buffer
                     (const Status   *message,
                      ProtobufCBuffer     *buffer);
Status *
       status__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   status__free_unpacked
                     (Status *message,
                      ProtobufCAllocator *allocator);
/* AccountGasLimit__SpecificQuotaLimitEntry methods */
void   account_gas_limit__specific_quota_limit_entry__init
                     (AccountGasLimit__SpecificQuotaLimitEntry         *message);
/* AccountGasLimit methods */
void   account_gas_limit__init
                     (AccountGasLimit         *message);
size_t account_gas_limit__get_packed_size
                     (const AccountGasLimit   *message);
size_t account_gas_limit__pack
                     (const AccountGasLimit   *message,
                      uint8_t             *out);
size_t account_gas_limit__pack_to_buffer
                     (const AccountGasLimit   *message,
                      ProtobufCBuffer     *buffer);
AccountGasLimit *
       account_gas_limit__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   account_gas_limit__free_unpacked
                     (AccountGasLimit *message,
                      ProtobufCAllocator *allocator);
/* RichStatus methods */
void   rich_status__init
                     (RichStatus         *message);
size_t rich_status__get_packed_size
                     (const RichStatus   *message);
size_t rich_status__pack
                     (const RichStatus   *message,
                      uint8_t             *out);
size_t rich_status__pack_to_buffer
                     (const RichStatus   *message,
                      ProtobufCBuffer     *buffer);
RichStatus *
       rich_status__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   rich_status__free_unpacked
                     (RichStatus *message,
                      ProtobufCAllocator *allocator);
/* Transaction methods */
void   transaction__init
                     (Transaction         *message);
size_t transaction__get_packed_size
                     (const Transaction   *message);
size_t transaction__pack
                     (const Transaction   *message,
                      uint8_t             *out);
size_t transaction__pack_to_buffer
                     (const Transaction   *message,
                      ProtobufCBuffer     *buffer);
Transaction *
       transaction__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   transaction__free_unpacked
                     (Transaction *message,
                      ProtobufCAllocator *allocator);
/* UnverifiedTransaction methods */
void   unverified_transaction__init
                     (UnverifiedTransaction         *message);
size_t unverified_transaction__get_packed_size
                     (const UnverifiedTransaction   *message);
size_t unverified_transaction__pack
                     (const UnverifiedTransaction   *message,
                      uint8_t             *out);
size_t unverified_transaction__pack_to_buffer
                     (const UnverifiedTransaction   *message,
                      ProtobufCBuffer     *buffer);
UnverifiedTransaction *
       unverified_transaction__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   unverified_transaction__free_unpacked
                     (UnverifiedTransaction *message,
                      ProtobufCAllocator *allocator);
/* SignedTransaction methods */
void   signed_transaction__init
                     (SignedTransaction         *message);
size_t signed_transaction__get_packed_size
                     (const SignedTransaction   *message);
size_t signed_transaction__pack
                     (const SignedTransaction   *message,
                      uint8_t             *out);
size_t signed_transaction__pack_to_buffer
                     (const SignedTransaction   *message,
                      ProtobufCBuffer     *buffer);
SignedTransaction *
       signed_transaction__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   signed_transaction__free_unpacked
                     (SignedTransaction *message,
                      ProtobufCAllocator *allocator);
/* BlockBody methods */
void   block_body__init
                     (BlockBody         *message);
size_t block_body__get_packed_size
                     (const BlockBody   *message);
size_t block_body__pack
                     (const BlockBody   *message,
                      uint8_t             *out);
size_t block_body__pack_to_buffer
                     (const BlockBody   *message,
                      ProtobufCBuffer     *buffer);
BlockBody *
       block_body__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   block_body__free_unpacked
                     (BlockBody *message,
                      ProtobufCAllocator *allocator);
/* CompactBlockBody methods */
void   compact_block_body__init
                     (CompactBlockBody         *message);
size_t compact_block_body__get_packed_size
                     (const CompactBlockBody   *message);
size_t compact_block_body__pack
                     (const CompactBlockBody   *message,
                      uint8_t             *out);
size_t compact_block_body__pack_to_buffer
                     (const CompactBlockBody   *message,
                      ProtobufCBuffer     *buffer);
CompactBlockBody *
       compact_block_body__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   compact_block_body__free_unpacked
                     (CompactBlockBody *message,
                      ProtobufCAllocator *allocator);
/* Block methods */
void   block__init
                     (Block         *message);
size_t block__get_packed_size
                     (const Block   *message);
size_t block__pack
                     (const Block   *message,
                      uint8_t             *out);
size_t block__pack_to_buffer
                     (const Block   *message,
                      ProtobufCBuffer     *buffer);
Block *
       block__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   block__free_unpacked
                     (Block *message,
                      ProtobufCAllocator *allocator);
/* CompactBlock methods */
void   compact_block__init
                     (CompactBlock         *message);
size_t compact_block__get_packed_size
                     (const CompactBlock   *message);
size_t compact_block__pack
                     (const CompactBlock   *message,
                      uint8_t             *out);
size_t compact_block__pack_to_buffer
                     (const CompactBlock   *message,
                      ProtobufCBuffer     *buffer);
CompactBlock *
       compact_block__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   compact_block__free_unpacked
                     (CompactBlock *message,
                      ProtobufCAllocator *allocator);
/* BlockWithProof methods */
void   block_with_proof__init
                     (BlockWithProof         *message);
size_t block_with_proof__get_packed_size
                     (const BlockWithProof   *message);
size_t block_with_proof__pack
                     (const BlockWithProof   *message,
                      uint8_t             *out);
size_t block_with_proof__pack_to_buffer
                     (const BlockWithProof   *message,
                      ProtobufCBuffer     *buffer);
BlockWithProof *
       block_with_proof__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   block_with_proof__free_unpacked
                     (BlockWithProof *message,
                      ProtobufCAllocator *allocator);
/* BlockTxs methods */
void   block_txs__init
                     (BlockTxs         *message);
size_t block_txs__get_packed_size
                     (const BlockTxs   *message);
size_t block_txs__pack
                     (const BlockTxs   *message,
                      uint8_t             *out);
size_t block_txs__pack_to_buffer
                     (const BlockTxs   *message,
                      ProtobufCBuffer     *buffer);
BlockTxs *
       block_txs__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   block_txs__free_unpacked
                     (BlockTxs *message,
                      ProtobufCAllocator *allocator);
/* BlackList methods */
void   black_list__init
                     (BlackList         *message);
size_t black_list__get_packed_size
                     (const BlackList   *message);
size_t black_list__pack
                     (const BlackList   *message,
                      uint8_t             *out);
size_t black_list__pack_to_buffer
                     (const BlackList   *message,
                      ProtobufCBuffer     *buffer);
BlackList *
       black_list__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   black_list__free_unpacked
                     (BlackList *message,
                      ProtobufCAllocator *allocator);
/* StateSignal methods */
void   state_signal__init
                     (StateSignal         *message);
size_t state_signal__get_packed_size
                     (const StateSignal   *message);
size_t state_signal__pack
                     (const StateSignal   *message,
                      uint8_t             *out);
size_t state_signal__pack_to_buffer
                     (const StateSignal   *message,
                      ProtobufCBuffer     *buffer);
StateSignal *
       state_signal__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   state_signal__free_unpacked
                     (StateSignal *message,
                      ProtobufCAllocator *allocator);
/* --- per-message closures --- */

typedef void (*Proof_Closure)
                 (const Proof *message,
                  void *closure_data);
typedef void (*BlockHeader_Closure)
                 (const BlockHeader *message,
                  void *closure_data);
typedef void (*Status_Closure)
                 (const Status *message,
                  void *closure_data);
typedef void (*AccountGasLimit__SpecificQuotaLimitEntry_Closure)
                 (const AccountGasLimit__SpecificQuotaLimitEntry *message,
                  void *closure_data);
typedef void (*AccountGasLimit_Closure)
                 (const AccountGasLimit *message,
                  void *closure_data);
typedef void (*RichStatus_Closure)
                 (const RichStatus *message,
                  void *closure_data);
typedef void (*Transaction_Closure)
                 (const Transaction *message,
                  void *closure_data);
typedef void (*UnverifiedTransaction_Closure)
                 (const UnverifiedTransaction *message,
                  void *closure_data);
typedef void (*SignedTransaction_Closure)
                 (const SignedTransaction *message,
                  void *closure_data);
typedef void (*BlockBody_Closure)
                 (const BlockBody *message,
                  void *closure_data);
typedef void (*CompactBlockBody_Closure)
                 (const CompactBlockBody *message,
                  void *closure_data);
typedef void (*Block_Closure)
                 (const Block *message,
                  void *closure_data);
typedef void (*CompactBlock_Closure)
                 (const CompactBlock *message,
                  void *closure_data);
typedef void (*BlockWithProof_Closure)
                 (const BlockWithProof *message,
                  void *closure_data);
typedef void (*BlockTxs_Closure)
                 (const BlockTxs *message,
                  void *closure_data);
typedef void (*BlackList_Closure)
                 (const BlackList *message,
                  void *closure_data);
typedef void (*StateSignal_Closure)
                 (const StateSignal *message,
                  void *closure_data);

/* --- services --- */


/* --- descriptors --- */

extern const ProtobufCEnumDescriptor    proof_type__descriptor;
extern const ProtobufCEnumDescriptor    crypto__descriptor;
extern const ProtobufCMessageDescriptor proof__descriptor;
extern const ProtobufCMessageDescriptor block_header__descriptor;
extern const ProtobufCMessageDescriptor status__descriptor;
extern const ProtobufCMessageDescriptor account_gas_limit__descriptor;
extern const ProtobufCMessageDescriptor account_gas_limit__specific_quota_limit_entry__descriptor;
extern const ProtobufCMessageDescriptor rich_status__descriptor;
extern const ProtobufCMessageDescriptor transaction__descriptor;
extern const ProtobufCMessageDescriptor unverified_transaction__descriptor;
extern const ProtobufCMessageDescriptor signed_transaction__descriptor;
extern const ProtobufCMessageDescriptor block_body__descriptor;
extern const ProtobufCMessageDescriptor compact_block_body__descriptor;
extern const ProtobufCMessageDescriptor block__descriptor;
extern const ProtobufCMessageDescriptor compact_block__descriptor;
extern const ProtobufCMessageDescriptor block_with_proof__descriptor;
extern const ProtobufCMessageDescriptor block_txs__descriptor;
extern const ProtobufCMessageDescriptor black_list__descriptor;
extern const ProtobufCMessageDescriptor state_signal__descriptor;

PROTOBUF_C__END_DECLS


#endif  /* PROTOBUF_C_blockchain_2eproto__INCLUDED */
