Changed protobuf to protobuf-c

To reduce code bloat
merge-mining
SChernykh 5 months ago
parent 373182024a
commit 6d39ea4696

@ -115,7 +115,7 @@ jobs:
strategy:
matrix:
config:
- {os: ubuntu-20.04, c: gcc-8, cpp: g++-8, flags: "-Wno-lto-type-mismatch"}
- {os: ubuntu-20.04, c: gcc-7, cpp: g++-7, flags: "-Wno-lto-type-mismatch"}
- {os: ubuntu-20.04, c: gcc-11, cpp: g++-11, flags: ""}
- {os: ubuntu-22.04, c: gcc-12, cpp: g++-12, flags: ""}
@ -579,7 +579,7 @@ jobs:
build-freebsd:
timeout-minutes: 120
timeout-minutes: 75
runs-on: ${{ matrix.os.host }}
strategy:
@ -647,7 +647,7 @@ jobs:
build-openbsd:
timeout-minutes: 120
timeout-minutes: 75
runs-on: ${{ matrix.os.host }}
strategy:

6
.gitmodules vendored

@ -25,6 +25,6 @@
[submodule "external/src/miniupnp"]
path = external/src/miniupnp
url = https://github.com/SChernykh/miniupnp
[submodule "external/src/protobuf"]
path = external/src/protobuf
url = https://github.com/SChernykh/protobuf
[submodule "external/src/protobuf-c"]
path = external/src/protobuf-c
url = https://github.com/SChernykh/protobuf-c

@ -25,9 +25,6 @@ option(DEV_TRACK_MEMORY "[Developer only] Track memory allocations" OFF)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT p2pool)
add_subdirectory(external/src/protobuf)
set(LIBS ${LIBS} libprotobuf)
add_subdirectory(external/src/Tari)
set(LIBS ${LIBS} Tari_gRPC)
@ -177,7 +174,7 @@ include_directories(external/src/robin-hood-hashing/src/include)
if (WITH_UPNP)
include_directories(external/src/miniupnp/miniupnpc/include)
endif()
include_directories(external/src/protobuf/src)
include_directories(external/src/protobuf-c)
if (WIN32)
set(LIBS ${LIBS} ws2_32 iphlpapi userenv psapi dnsapi dbghelp)

@ -232,7 +232,7 @@ Only 64-bit builds are supported, in particular ARMv7 or older CPUs are not supp
### Prerequisites
- cmake >= 3.10
- C++ compiler with full C++17 support. GCC-8, Clang-13 and MSVC-2019 have been tested and confirmed to work, older compilers may fail to build P2Pool.
- C++ compiler with C++17 support. GCC-7, Clang-13 and MSVC-2019 have been tested and confirmed to work, older compilers may fail to build P2Pool.
### Ubuntu 20.04

@ -2,26 +2,29 @@ cmake_minimum_required(VERSION 3.10)
project(Tari_gRPC)
set(HEADERS
proto/gRPC/base_node.pb.h
proto/gRPC/block.pb.h
proto/gRPC/network.pb.h
proto/gRPC/sidechain_types.pb.h
proto/gRPC/transaction.pb.h
proto/gRPC/types.pb.h
../protobuf-c/protobuf-c/protobuf-c.h
proto/gRPC/google/protobuf/timestamp.pb-c.h
proto/gRPC/base_node.pb-c.h
proto/gRPC/block.pb-c.h
proto/gRPC/network.pb-c.h
proto/gRPC/sidechain_types.pb-c.h
proto/gRPC/transaction.pb-c.h
proto/gRPC/types.pb-c.h
proto.h
)
set(SOURCES
proto/gRPC/base_node.pb.cc
proto/gRPC/block.pb.cc
proto/gRPC/network.pb.cc
proto/gRPC/sidechain_types.pb.cc
proto/gRPC/transaction.pb.cc
proto/gRPC/types.pb.cc
../protobuf-c/protobuf-c/protobuf-c.c
proto/gRPC/google/protobuf/timestamp.pb-c.c
proto/gRPC/base_node.pb-c.c
proto/gRPC/block.pb-c.c
proto/gRPC/network.pb-c.c
proto/gRPC/sidechain_types.pb-c.c
proto/gRPC/transaction.pb-c.c
proto/gRPC/types.pb-c.c
)
include_directories(../protobuf/src)
include_directories(../protobuf/third_party/abseil-cpp)
include_directories(../protobuf-c)
set(DISABLE_WARNINGS ON)

@ -4,12 +4,16 @@
#pragma warning(push, 0)
#endif
#include "proto/gRPC/base_node.pb.h"
#include "proto/gRPC/block.pb.h"
#include "proto/gRPC/network.pb.h"
#include "proto/gRPC/sidechain_types.pb.h"
#include "proto/gRPC/transaction.pb.h"
#include "proto/gRPC/types.pb.h"
extern "C" {
#include "proto/gRPC/base_node.pb-c.h"
#include "proto/gRPC/block.pb-c.h"
#include "proto/gRPC/network.pb-c.h"
#include "proto/gRPC/sidechain_types.pb-c.h"
#include "proto/gRPC/transaction.pb-c.h"
#include "proto/gRPC/types.pb-c.h"
}
#ifdef _MSC_VER
#pragma warning(pop)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,933 @@
/* Generated by the protocol buffer compiler. DO NOT EDIT! */
/* Generated from: block.proto */
/* Do not generate deprecated warnings for self */
#ifndef PROTOBUF_C__NO_DEPRECATED
#define PROTOBUF_C__NO_DEPRECATED
#endif
#include "block.pb-c.h"
void tari__rpc__block_header__init
(Tari__Rpc__BlockHeader *message)
{
static const Tari__Rpc__BlockHeader init_value = TARI__RPC__BLOCK_HEADER__INIT;
*message = init_value;
}
size_t tari__rpc__block_header__get_packed_size
(const Tari__Rpc__BlockHeader *message)
{
assert(message->base.descriptor == &tari__rpc__block_header__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__block_header__pack
(const Tari__Rpc__BlockHeader *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__block_header__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__block_header__pack_to_buffer
(const Tari__Rpc__BlockHeader *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__block_header__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__BlockHeader *
tari__rpc__block_header__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__BlockHeader *)
protobuf_c_message_unpack (&tari__rpc__block_header__descriptor,
allocator, len, data);
}
void tari__rpc__block_header__free_unpacked
(Tari__Rpc__BlockHeader *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__block_header__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void tari__rpc__proof_of_work__init
(Tari__Rpc__ProofOfWork *message)
{
static const Tari__Rpc__ProofOfWork init_value = TARI__RPC__PROOF_OF_WORK__INIT;
*message = init_value;
}
size_t tari__rpc__proof_of_work__get_packed_size
(const Tari__Rpc__ProofOfWork *message)
{
assert(message->base.descriptor == &tari__rpc__proof_of_work__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__proof_of_work__pack
(const Tari__Rpc__ProofOfWork *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__proof_of_work__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__proof_of_work__pack_to_buffer
(const Tari__Rpc__ProofOfWork *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__proof_of_work__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__ProofOfWork *
tari__rpc__proof_of_work__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__ProofOfWork *)
protobuf_c_message_unpack (&tari__rpc__proof_of_work__descriptor,
allocator, len, data);
}
void tari__rpc__proof_of_work__free_unpacked
(Tari__Rpc__ProofOfWork *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__proof_of_work__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void tari__rpc__pow_algo__init
(Tari__Rpc__PowAlgo *message)
{
static const Tari__Rpc__PowAlgo init_value = TARI__RPC__POW_ALGO__INIT;
*message = init_value;
}
size_t tari__rpc__pow_algo__get_packed_size
(const Tari__Rpc__PowAlgo *message)
{
assert(message->base.descriptor == &tari__rpc__pow_algo__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__pow_algo__pack
(const Tari__Rpc__PowAlgo *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__pow_algo__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__pow_algo__pack_to_buffer
(const Tari__Rpc__PowAlgo *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__pow_algo__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__PowAlgo *
tari__rpc__pow_algo__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__PowAlgo *)
protobuf_c_message_unpack (&tari__rpc__pow_algo__descriptor,
allocator, len, data);
}
void tari__rpc__pow_algo__free_unpacked
(Tari__Rpc__PowAlgo *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__pow_algo__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void tari__rpc__block__init
(Tari__Rpc__Block *message)
{
static const Tari__Rpc__Block init_value = TARI__RPC__BLOCK__INIT;
*message = init_value;
}
size_t tari__rpc__block__get_packed_size
(const Tari__Rpc__Block *message)
{
assert(message->base.descriptor == &tari__rpc__block__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__block__pack
(const Tari__Rpc__Block *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__block__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__block__pack_to_buffer
(const Tari__Rpc__Block *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__block__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__Block *
tari__rpc__block__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__Block *)
protobuf_c_message_unpack (&tari__rpc__block__descriptor,
allocator, len, data);
}
void tari__rpc__block__free_unpacked
(Tari__Rpc__Block *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__block__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void tari__rpc__historical_block__init
(Tari__Rpc__HistoricalBlock *message)
{
static const Tari__Rpc__HistoricalBlock init_value = TARI__RPC__HISTORICAL_BLOCK__INIT;
*message = init_value;
}
size_t tari__rpc__historical_block__get_packed_size
(const Tari__Rpc__HistoricalBlock *message)
{
assert(message->base.descriptor == &tari__rpc__historical_block__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__historical_block__pack
(const Tari__Rpc__HistoricalBlock *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__historical_block__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__historical_block__pack_to_buffer
(const Tari__Rpc__HistoricalBlock *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__historical_block__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__HistoricalBlock *
tari__rpc__historical_block__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__HistoricalBlock *)
protobuf_c_message_unpack (&tari__rpc__historical_block__descriptor,
allocator, len, data);
}
void tari__rpc__historical_block__free_unpacked
(Tari__Rpc__HistoricalBlock *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__historical_block__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void tari__rpc__new_block_header_template__init
(Tari__Rpc__NewBlockHeaderTemplate *message)
{
static const Tari__Rpc__NewBlockHeaderTemplate init_value = TARI__RPC__NEW_BLOCK_HEADER_TEMPLATE__INIT;
*message = init_value;
}
size_t tari__rpc__new_block_header_template__get_packed_size
(const Tari__Rpc__NewBlockHeaderTemplate *message)
{
assert(message->base.descriptor == &tari__rpc__new_block_header_template__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__new_block_header_template__pack
(const Tari__Rpc__NewBlockHeaderTemplate *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__new_block_header_template__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__new_block_header_template__pack_to_buffer
(const Tari__Rpc__NewBlockHeaderTemplate *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__new_block_header_template__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__NewBlockHeaderTemplate *
tari__rpc__new_block_header_template__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__NewBlockHeaderTemplate *)
protobuf_c_message_unpack (&tari__rpc__new_block_header_template__descriptor,
allocator, len, data);
}
void tari__rpc__new_block_header_template__free_unpacked
(Tari__Rpc__NewBlockHeaderTemplate *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__new_block_header_template__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void tari__rpc__new_block_template__init
(Tari__Rpc__NewBlockTemplate *message)
{
static const Tari__Rpc__NewBlockTemplate init_value = TARI__RPC__NEW_BLOCK_TEMPLATE__INIT;
*message = init_value;
}
size_t tari__rpc__new_block_template__get_packed_size
(const Tari__Rpc__NewBlockTemplate *message)
{
assert(message->base.descriptor == &tari__rpc__new_block_template__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__new_block_template__pack
(const Tari__Rpc__NewBlockTemplate *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__new_block_template__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__new_block_template__pack_to_buffer
(const Tari__Rpc__NewBlockTemplate *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__new_block_template__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__NewBlockTemplate *
tari__rpc__new_block_template__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__NewBlockTemplate *)
protobuf_c_message_unpack (&tari__rpc__new_block_template__descriptor,
allocator, len, data);
}
void tari__rpc__new_block_template__free_unpacked
(Tari__Rpc__NewBlockTemplate *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__new_block_template__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
static const ProtobufCFieldDescriptor tari__rpc__block_header__field_descriptors[16] =
{
{
"hash",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__BlockHeader, hash),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"version",
2,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_UINT32,
0, /* quantifier_offset */
offsetof(Tari__Rpc__BlockHeader, version),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"height",
3,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_UINT64,
0, /* quantifier_offset */
offsetof(Tari__Rpc__BlockHeader, height),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"prev_hash",
4,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__BlockHeader, prev_hash),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"timestamp",
5,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_UINT64,
0, /* quantifier_offset */
offsetof(Tari__Rpc__BlockHeader, timestamp),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"output_mr",
6,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__BlockHeader, output_mr),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"kernel_mr",
8,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__BlockHeader, kernel_mr),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"input_mr",
9,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__BlockHeader, input_mr),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"total_kernel_offset",
10,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__BlockHeader, total_kernel_offset),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"nonce",
11,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_UINT64,
0, /* quantifier_offset */
offsetof(Tari__Rpc__BlockHeader, nonce),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"pow",
12,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */
offsetof(Tari__Rpc__BlockHeader, pow),
&tari__rpc__proof_of_work__descriptor,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"kernel_mmr_size",
13,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_UINT64,
0, /* quantifier_offset */
offsetof(Tari__Rpc__BlockHeader, kernel_mmr_size),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"output_mmr_size",
14,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_UINT64,
0, /* quantifier_offset */
offsetof(Tari__Rpc__BlockHeader, output_mmr_size),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"total_script_offset",
15,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__BlockHeader, total_script_offset),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"validator_node_mr",
16,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__BlockHeader, validator_node_mr),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"validator_node_size",
17,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_UINT64,
0, /* quantifier_offset */
offsetof(Tari__Rpc__BlockHeader, validator_node_size),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
};
static const unsigned tari__rpc__block_header__field_indices_by_name[] = {
0, /* field[0] = hash */
2, /* field[2] = height */
7, /* field[7] = input_mr */
11, /* field[11] = kernel_mmr_size */
6, /* field[6] = kernel_mr */
9, /* field[9] = nonce */
12, /* field[12] = output_mmr_size */
5, /* field[5] = output_mr */
10, /* field[10] = pow */
3, /* field[3] = prev_hash */
4, /* field[4] = timestamp */
8, /* field[8] = total_kernel_offset */
13, /* field[13] = total_script_offset */
14, /* field[14] = validator_node_mr */
15, /* field[15] = validator_node_size */
1, /* field[1] = version */
};
static const ProtobufCIntRange tari__rpc__block_header__number_ranges[2 + 1] =
{
{ 1, 0 },
{ 8, 6 },
{ 0, 16 }
};
const ProtobufCMessageDescriptor tari__rpc__block_header__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.BlockHeader",
"BlockHeader",
"Tari__Rpc__BlockHeader",
"tari.rpc",
sizeof(Tari__Rpc__BlockHeader),
16,
tari__rpc__block_header__field_descriptors,
tari__rpc__block_header__field_indices_by_name,
2, tari__rpc__block_header__number_ranges,
(ProtobufCMessageInit) tari__rpc__block_header__init,
NULL,NULL,NULL /* reserved[123] */
};
static const ProtobufCFieldDescriptor tari__rpc__proof_of_work__field_descriptors[2] =
{
{
"pow_algo",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_UINT64,
0, /* quantifier_offset */
offsetof(Tari__Rpc__ProofOfWork, pow_algo),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"pow_data",
4,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__ProofOfWork, pow_data),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
};
static const unsigned tari__rpc__proof_of_work__field_indices_by_name[] = {
0, /* field[0] = pow_algo */
1, /* field[1] = pow_data */
};
static const ProtobufCIntRange tari__rpc__proof_of_work__number_ranges[2 + 1] =
{
{ 1, 0 },
{ 4, 1 },
{ 0, 2 }
};
const ProtobufCMessageDescriptor tari__rpc__proof_of_work__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.ProofOfWork",
"ProofOfWork",
"Tari__Rpc__ProofOfWork",
"tari.rpc",
sizeof(Tari__Rpc__ProofOfWork),
2,
tari__rpc__proof_of_work__field_descriptors,
tari__rpc__proof_of_work__field_indices_by_name,
2, tari__rpc__proof_of_work__number_ranges,
(ProtobufCMessageInit) tari__rpc__proof_of_work__init,
NULL,NULL,NULL /* reserved[123] */
};
static const ProtobufCEnumValue tari__rpc__pow_algo__pow_algos__enum_values_by_number[2] =
{
{ "POW_ALGOS_RANDOMX", "TARI__RPC__POW_ALGO__POW_ALGOS__POW_ALGOS_RANDOMX", 0 },
{ "POW_ALGOS_SHA3X", "TARI__RPC__POW_ALGO__POW_ALGOS__POW_ALGOS_SHA3X", 1 },
};
static const ProtobufCIntRange tari__rpc__pow_algo__pow_algos__value_ranges[] = {
{0, 0},{0, 2}
};
static const ProtobufCEnumValueIndex tari__rpc__pow_algo__pow_algos__enum_values_by_name[2] =
{
{ "POW_ALGOS_RANDOMX", 0 },
{ "POW_ALGOS_SHA3X", 1 },
};
const ProtobufCEnumDescriptor tari__rpc__pow_algo__pow_algos__descriptor =
{
PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
"tari.rpc.PowAlgo.PowAlgos",
"PowAlgos",
"Tari__Rpc__PowAlgo__PowAlgos",
"tari.rpc",
2,
tari__rpc__pow_algo__pow_algos__enum_values_by_number,
2,
tari__rpc__pow_algo__pow_algos__enum_values_by_name,
1,
tari__rpc__pow_algo__pow_algos__value_ranges,
NULL,NULL,NULL,NULL /* reserved[1234] */
};
static const ProtobufCFieldDescriptor tari__rpc__pow_algo__field_descriptors[1] =
{
{
"pow_algo",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_ENUM,
0, /* quantifier_offset */
offsetof(Tari__Rpc__PowAlgo, pow_algo),
&tari__rpc__pow_algo__pow_algos__descriptor,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
};
static const unsigned tari__rpc__pow_algo__field_indices_by_name[] = {
0, /* field[0] = pow_algo */
};
static const ProtobufCIntRange tari__rpc__pow_algo__number_ranges[1 + 1] =
{
{ 1, 0 },
{ 0, 1 }
};
const ProtobufCMessageDescriptor tari__rpc__pow_algo__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.PowAlgo",
"PowAlgo",
"Tari__Rpc__PowAlgo",
"tari.rpc",
sizeof(Tari__Rpc__PowAlgo),
1,
tari__rpc__pow_algo__field_descriptors,
tari__rpc__pow_algo__field_indices_by_name,
1, tari__rpc__pow_algo__number_ranges,
(ProtobufCMessageInit) tari__rpc__pow_algo__init,
NULL,NULL,NULL /* reserved[123] */
};
static const ProtobufCFieldDescriptor tari__rpc__block__field_descriptors[2] =
{
{
"header",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */
offsetof(Tari__Rpc__Block, header),
&tari__rpc__block_header__descriptor,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"body",
2,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */
offsetof(Tari__Rpc__Block, body),
&tari__rpc__aggregate_body__descriptor,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
};
static const unsigned tari__rpc__block__field_indices_by_name[] = {
1, /* field[1] = body */
0, /* field[0] = header */
};
static const ProtobufCIntRange tari__rpc__block__number_ranges[1 + 1] =
{
{ 1, 0 },
{ 0, 2 }
};
const ProtobufCMessageDescriptor tari__rpc__block__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.Block",
"Block",
"Tari__Rpc__Block",
"tari.rpc",
sizeof(Tari__Rpc__Block),
2,
tari__rpc__block__field_descriptors,
tari__rpc__block__field_indices_by_name,
1, tari__rpc__block__number_ranges,
(ProtobufCMessageInit) tari__rpc__block__init,
NULL,NULL,NULL /* reserved[123] */
};
static const ProtobufCFieldDescriptor tari__rpc__historical_block__field_descriptors[2] =
{
{
"confirmations",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_UINT64,
0, /* quantifier_offset */
offsetof(Tari__Rpc__HistoricalBlock, confirmations),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"block",
2,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */
offsetof(Tari__Rpc__HistoricalBlock, block),
&tari__rpc__block__descriptor,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
};
static const unsigned tari__rpc__historical_block__field_indices_by_name[] = {
1, /* field[1] = block */
0, /* field[0] = confirmations */
};
static const ProtobufCIntRange tari__rpc__historical_block__number_ranges[1 + 1] =
{
{ 1, 0 },
{ 0, 2 }
};
const ProtobufCMessageDescriptor tari__rpc__historical_block__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.HistoricalBlock",
"HistoricalBlock",
"Tari__Rpc__HistoricalBlock",
"tari.rpc",
sizeof(Tari__Rpc__HistoricalBlock),
2,
tari__rpc__historical_block__field_descriptors,
tari__rpc__historical_block__field_indices_by_name,
1, tari__rpc__historical_block__number_ranges,
(ProtobufCMessageInit) tari__rpc__historical_block__init,
NULL,NULL,NULL /* reserved[123] */
};
static const ProtobufCFieldDescriptor tari__rpc__new_block_header_template__field_descriptors[6] =
{
{
"version",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_UINT32,
0, /* quantifier_offset */
offsetof(Tari__Rpc__NewBlockHeaderTemplate, version),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"height",
2,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_UINT64,
0, /* quantifier_offset */
offsetof(Tari__Rpc__NewBlockHeaderTemplate, height),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"prev_hash",
3,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__NewBlockHeaderTemplate, prev_hash),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"total_kernel_offset",
4,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__NewBlockHeaderTemplate, total_kernel_offset),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"pow",
5,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */
offsetof(Tari__Rpc__NewBlockHeaderTemplate, pow),
&tari__rpc__proof_of_work__descriptor,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"total_script_offset",
7,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__NewBlockHeaderTemplate, total_script_offset),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
};
static const unsigned tari__rpc__new_block_header_template__field_indices_by_name[] = {
1, /* field[1] = height */
4, /* field[4] = pow */
2, /* field[2] = prev_hash */
3, /* field[3] = total_kernel_offset */
5, /* field[5] = total_script_offset */
0, /* field[0] = version */
};
static const ProtobufCIntRange tari__rpc__new_block_header_template__number_ranges[2 + 1] =
{
{ 1, 0 },
{ 7, 5 },
{ 0, 6 }
};
const ProtobufCMessageDescriptor tari__rpc__new_block_header_template__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.NewBlockHeaderTemplate",
"NewBlockHeaderTemplate",
"Tari__Rpc__NewBlockHeaderTemplate",
"tari.rpc",
sizeof(Tari__Rpc__NewBlockHeaderTemplate),
6,
tari__rpc__new_block_header_template__field_descriptors,
tari__rpc__new_block_header_template__field_indices_by_name,
2, tari__rpc__new_block_header_template__number_ranges,
(ProtobufCMessageInit) tari__rpc__new_block_header_template__init,
NULL,NULL,NULL /* reserved[123] */
};
static const ProtobufCFieldDescriptor tari__rpc__new_block_template__field_descriptors[2] =
{
{
"header",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */
offsetof(Tari__Rpc__NewBlockTemplate, header),
&tari__rpc__new_block_header_template__descriptor,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"body",
2,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */
offsetof(Tari__Rpc__NewBlockTemplate, body),
&tari__rpc__aggregate_body__descriptor,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
};
static const unsigned tari__rpc__new_block_template__field_indices_by_name[] = {
1, /* field[1] = body */
0, /* field[0] = header */
};
static const ProtobufCIntRange tari__rpc__new_block_template__number_ranges[1 + 1] =
{
{ 1, 0 },
{ 0, 2 }
};
const ProtobufCMessageDescriptor tari__rpc__new_block_template__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.NewBlockTemplate",
"NewBlockTemplate",
"Tari__Rpc__NewBlockTemplate",
"tari.rpc",
sizeof(Tari__Rpc__NewBlockTemplate),
2,
tari__rpc__new_block_template__field_descriptors,
tari__rpc__new_block_template__field_indices_by_name,
1, tari__rpc__new_block_template__number_ranges,
(ProtobufCMessageInit) tari__rpc__new_block_template__init,
NULL,NULL,NULL /* reserved[123] */
};

@ -0,0 +1,442 @@
/* Generated by the protocol buffer compiler. DO NOT EDIT! */
/* Generated from: block.proto */
#ifndef PROTOBUF_C_block_2eproto__INCLUDED
#define PROTOBUF_C_block_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
#include "transaction.pb-c.h"
typedef struct _Tari__Rpc__BlockHeader Tari__Rpc__BlockHeader;
typedef struct _Tari__Rpc__ProofOfWork Tari__Rpc__ProofOfWork;
typedef struct _Tari__Rpc__PowAlgo Tari__Rpc__PowAlgo;
typedef struct _Tari__Rpc__Block Tari__Rpc__Block;
typedef struct _Tari__Rpc__HistoricalBlock Tari__Rpc__HistoricalBlock;
typedef struct _Tari__Rpc__NewBlockHeaderTemplate Tari__Rpc__NewBlockHeaderTemplate;
typedef struct _Tari__Rpc__NewBlockTemplate Tari__Rpc__NewBlockTemplate;
/* --- enums --- */
/*
* The permitted pow algorithms
*/
typedef enum _Tari__Rpc__PowAlgo__PowAlgos {
/*
* Accessible as `grpc::pow_algo::PowAlgos::Randomx`
*/
TARI__RPC__POW_ALGO__POW_ALGOS__POW_ALGOS_RANDOMX = 0,
/*
* Accessible as `grpc::pow_algo::PowAlgos::Sha3x`
*/
TARI__RPC__POW_ALGO__POW_ALGOS__POW_ALGOS_SHA3X = 1
PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(TARI__RPC__POW_ALGO__POW_ALGOS)
} Tari__Rpc__PowAlgo__PowAlgos;
/* --- messages --- */
/*
* The BlockHeader contains all the metadata for the block, including proof of work, a link to the previous block
* and the transaction kernels.
*/
struct _Tari__Rpc__BlockHeader
{
ProtobufCMessage base;
/*
* The hash of the block
*/
ProtobufCBinaryData hash;
/*
* Version of the block
*/
uint32_t version;
/*
* Height of this block since the genesis block (height 0)
*/
uint64_t height;
/*
* Hash of the block previous to this in the chain.
*/
ProtobufCBinaryData prev_hash;
/*
* Timestamp at which the block was built.
*/
uint64_t timestamp;
/*
* This is the UTXO merkle root of the outputs
* This is calculated as Hash (txo MMR root || roaring bitmap hash of UTXO indices)
*/
ProtobufCBinaryData output_mr;
/*
* This is the MMR root of the kernels
*/
ProtobufCBinaryData kernel_mr;
/*
* This is the Merkle root of the inputs in this block
*/
ProtobufCBinaryData input_mr;
/*
* Total accumulated sum of kernel offsets since genesis block. We can derive the kernel offset sum for *this*
* block from the total kernel offset of the previous block header.
*/
ProtobufCBinaryData total_kernel_offset;
/*
* Nonce increment used to mine this block.
*/
uint64_t nonce;
/*
* Proof of work metadata
*/
Tari__Rpc__ProofOfWork *pow;
/*
* Kernel MMR size
*/
uint64_t kernel_mmr_size;
/*
* Output MMR size
*/
uint64_t output_mmr_size;
/*
* Sum of script offsets for all kernels in this block.
*/
ProtobufCBinaryData total_script_offset;
/*
* Merkle root of validator nodes
*/
ProtobufCBinaryData validator_node_mr;
/*
* Validator size
*/
uint64_t validator_node_size;
};
#define TARI__RPC__BLOCK_HEADER__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__block_header__descriptor) \
, {0,NULL}, 0, 0, {0,NULL}, 0, {0,NULL}, {0,NULL}, {0,NULL}, {0,NULL}, 0, NULL, 0, 0, {0,NULL}, {0,NULL}, 0 }
/*
* The proof of work data structure that is included in the block header.
*/
struct _Tari__Rpc__ProofOfWork
{
ProtobufCMessage base;
/*
* The algorithm used to mine this block
* 0 = Monero
* 1 = Sha3X
*/
uint64_t pow_algo;
/*
* Supplemental proof of work data. For example for Sha3x, this would be empty (only the block header is
* required), but for Monero merge mining we need the Monero block header and RandomX seed hash.
*/
ProtobufCBinaryData pow_data;
};
#define TARI__RPC__PROOF_OF_WORK__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__proof_of_work__descriptor) \
, 0, {0,NULL} }
/*
*This is used to request the which pow algo should be used with the block template
*/
struct _Tari__Rpc__PowAlgo
{
ProtobufCMessage base;
/*
* The pow algo to use
*/
Tari__Rpc__PowAlgo__PowAlgos pow_algo;
};
#define TARI__RPC__POW_ALGO__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__pow_algo__descriptor) \
, TARI__RPC__POW_ALGO__POW_ALGOS__POW_ALGOS_RANDOMX }
/*
* A Minotari block. Blocks are linked together into a blockchain.
*/
struct _Tari__Rpc__Block
{
ProtobufCMessage base;
/*
* The BlockHeader contains all the metadata for the block, including proof of work, a link to the previous block
* and the transaction kernels.
*/
Tari__Rpc__BlockHeader *header;
/*
* The components of the block or transaction. The same struct can be used for either, since in Mimblewimble,
* blocks consist of inputs, outputs and kernels, rather than transactions.
*/
Tari__Rpc__AggregateBody *body;
};
#define TARI__RPC__BLOCK__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__block__descriptor) \
, NULL, NULL }
/*
* The representation of a historical block in the blockchain. It is essentially identical to a protocol-defined
* block but contains some extra metadata that clients such as Block Explorers will find interesting.
*/
struct _Tari__Rpc__HistoricalBlock
{
ProtobufCMessage base;
/*
* The number of blocks that have been mined since this block, including this one. The current tip will have one
* confirmation.
*/
uint64_t confirmations;
/*
* The underlying block
*/
Tari__Rpc__Block *block;
};
#define TARI__RPC__HISTORICAL_BLOCK__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__historical_block__descriptor) \
, 0, NULL }
/*
* The NewBlockHeaderTemplate is used for the construction of a new mine-able block. It contains all the metadata for the block that the Base Node is able to complete on behalf of a Miner.
*/
struct _Tari__Rpc__NewBlockHeaderTemplate
{
ProtobufCMessage base;
/*
* Version of the block
*/
uint32_t version;
/*
* Height of this block since the genesis block (height 0)
*/
uint64_t height;
/*
* Hash of the block previous to this in the chain.
*/
ProtobufCBinaryData prev_hash;
/*
* Total accumulated sum of kernel offsets since genesis block. We can derive the kernel offset sum for *this*
* block from the total kernel offset of the previous block header.
*/
ProtobufCBinaryData total_kernel_offset;
/*
* Proof of work metadata
*/
Tari__Rpc__ProofOfWork *pow;
/*
* Sum of script offsets for all kernels in this block.
*/
ProtobufCBinaryData total_script_offset;
};
#define TARI__RPC__NEW_BLOCK_HEADER_TEMPLATE__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__new_block_header_template__descriptor) \
, 0, 0, {0,NULL}, {0,NULL}, NULL, {0,NULL} }
/*
* The new block template is used constructing a new partial block, allowing a miner to added the coinbase utxo and as a final step the Base node to add the MMR roots to the header.
*/
struct _Tari__Rpc__NewBlockTemplate
{
ProtobufCMessage base;
/*
* The NewBlockHeaderTemplate is used for the construction of a new mineable block. It contains all the metadata for
* the block that the Base Node is able to complete on behalf of a Miner.
*/
Tari__Rpc__NewBlockHeaderTemplate *header;
/*
* This flag indicates if the inputs, outputs and kernels have been sorted internally, that is, the sort() method
* has been called. This may be false even if all components are sorted.
*/
Tari__Rpc__AggregateBody *body;
};
#define TARI__RPC__NEW_BLOCK_TEMPLATE__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__new_block_template__descriptor) \
, NULL, NULL }
/* Tari__Rpc__BlockHeader methods */
void tari__rpc__block_header__init
(Tari__Rpc__BlockHeader *message);
size_t tari__rpc__block_header__get_packed_size
(const Tari__Rpc__BlockHeader *message);
size_t tari__rpc__block_header__pack
(const Tari__Rpc__BlockHeader *message,
uint8_t *out);
size_t tari__rpc__block_header__pack_to_buffer
(const Tari__Rpc__BlockHeader *message,
ProtobufCBuffer *buffer);
Tari__Rpc__BlockHeader *
tari__rpc__block_header__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__block_header__free_unpacked
(Tari__Rpc__BlockHeader *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__ProofOfWork methods */
void tari__rpc__proof_of_work__init
(Tari__Rpc__ProofOfWork *message);
size_t tari__rpc__proof_of_work__get_packed_size
(const Tari__Rpc__ProofOfWork *message);
size_t tari__rpc__proof_of_work__pack
(const Tari__Rpc__ProofOfWork *message,
uint8_t *out);
size_t tari__rpc__proof_of_work__pack_to_buffer
(const Tari__Rpc__ProofOfWork *message,
ProtobufCBuffer *buffer);
Tari__Rpc__ProofOfWork *
tari__rpc__proof_of_work__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__proof_of_work__free_unpacked
(Tari__Rpc__ProofOfWork *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__PowAlgo methods */
void tari__rpc__pow_algo__init
(Tari__Rpc__PowAlgo *message);
size_t tari__rpc__pow_algo__get_packed_size
(const Tari__Rpc__PowAlgo *message);
size_t tari__rpc__pow_algo__pack
(const Tari__Rpc__PowAlgo *message,
uint8_t *out);
size_t tari__rpc__pow_algo__pack_to_buffer
(const Tari__Rpc__PowAlgo *message,
ProtobufCBuffer *buffer);
Tari__Rpc__PowAlgo *
tari__rpc__pow_algo__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__pow_algo__free_unpacked
(Tari__Rpc__PowAlgo *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__Block methods */
void tari__rpc__block__init
(Tari__Rpc__Block *message);
size_t tari__rpc__block__get_packed_size
(const Tari__Rpc__Block *message);
size_t tari__rpc__block__pack
(const Tari__Rpc__Block *message,
uint8_t *out);
size_t tari__rpc__block__pack_to_buffer
(const Tari__Rpc__Block *message,
ProtobufCBuffer *buffer);
Tari__Rpc__Block *
tari__rpc__block__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__block__free_unpacked
(Tari__Rpc__Block *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__HistoricalBlock methods */
void tari__rpc__historical_block__init
(Tari__Rpc__HistoricalBlock *message);
size_t tari__rpc__historical_block__get_packed_size
(const Tari__Rpc__HistoricalBlock *message);
size_t tari__rpc__historical_block__pack
(const Tari__Rpc__HistoricalBlock *message,
uint8_t *out);
size_t tari__rpc__historical_block__pack_to_buffer
(const Tari__Rpc__HistoricalBlock *message,
ProtobufCBuffer *buffer);
Tari__Rpc__HistoricalBlock *
tari__rpc__historical_block__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__historical_block__free_unpacked
(Tari__Rpc__HistoricalBlock *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__NewBlockHeaderTemplate methods */
void tari__rpc__new_block_header_template__init
(Tari__Rpc__NewBlockHeaderTemplate *message);
size_t tari__rpc__new_block_header_template__get_packed_size
(const Tari__Rpc__NewBlockHeaderTemplate *message);
size_t tari__rpc__new_block_header_template__pack
(const Tari__Rpc__NewBlockHeaderTemplate *message,
uint8_t *out);
size_t tari__rpc__new_block_header_template__pack_to_buffer
(const Tari__Rpc__NewBlockHeaderTemplate *message,
ProtobufCBuffer *buffer);
Tari__Rpc__NewBlockHeaderTemplate *
tari__rpc__new_block_header_template__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__new_block_header_template__free_unpacked
(Tari__Rpc__NewBlockHeaderTemplate *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__NewBlockTemplate methods */
void tari__rpc__new_block_template__init
(Tari__Rpc__NewBlockTemplate *message);
size_t tari__rpc__new_block_template__get_packed_size
(const Tari__Rpc__NewBlockTemplate *message);
size_t tari__rpc__new_block_template__pack
(const Tari__Rpc__NewBlockTemplate *message,
uint8_t *out);
size_t tari__rpc__new_block_template__pack_to_buffer
(const Tari__Rpc__NewBlockTemplate *message,
ProtobufCBuffer *buffer);
Tari__Rpc__NewBlockTemplate *
tari__rpc__new_block_template__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__new_block_template__free_unpacked
(Tari__Rpc__NewBlockTemplate *message,
ProtobufCAllocator *allocator);
/* --- per-message closures --- */
typedef void (*Tari__Rpc__BlockHeader_Closure)
(const Tari__Rpc__BlockHeader *message,
void *closure_data);
typedef void (*Tari__Rpc__ProofOfWork_Closure)
(const Tari__Rpc__ProofOfWork *message,
void *closure_data);
typedef void (*Tari__Rpc__PowAlgo_Closure)
(const Tari__Rpc__PowAlgo *message,
void *closure_data);
typedef void (*Tari__Rpc__Block_Closure)
(const Tari__Rpc__Block *message,
void *closure_data);
typedef void (*Tari__Rpc__HistoricalBlock_Closure)
(const Tari__Rpc__HistoricalBlock *message,
void *closure_data);
typedef void (*Tari__Rpc__NewBlockHeaderTemplate_Closure)
(const Tari__Rpc__NewBlockHeaderTemplate *message,
void *closure_data);
typedef void (*Tari__Rpc__NewBlockTemplate_Closure)
(const Tari__Rpc__NewBlockTemplate *message,
void *closure_data);
/* --- services --- */
/* --- descriptors --- */
extern const ProtobufCMessageDescriptor tari__rpc__block_header__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__proof_of_work__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__pow_algo__descriptor;
extern const ProtobufCEnumDescriptor tari__rpc__pow_algo__pow_algos__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__block__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__historical_block__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__new_block_header_template__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__new_block_template__descriptor;
PROTOBUF_C__END_DECLS
#endif /* PROTOBUF_C_block_2eproto__INCLUDED */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,105 @@
/* Generated by the protocol buffer compiler. DO NOT EDIT! */
/* Generated from: timestamp.proto */
/* Do not generate deprecated warnings for self */
#ifndef PROTOBUF_C__NO_DEPRECATED
#define PROTOBUF_C__NO_DEPRECATED
#endif
#include "timestamp.pb-c.h"
void google__protobuf__timestamp__init
(Google__Protobuf__Timestamp *message)
{
static const Google__Protobuf__Timestamp init_value = GOOGLE__PROTOBUF__TIMESTAMP__INIT;
*message = init_value;
}
size_t google__protobuf__timestamp__get_packed_size
(const Google__Protobuf__Timestamp *message)
{
assert(message->base.descriptor == &google__protobuf__timestamp__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t google__protobuf__timestamp__pack
(const Google__Protobuf__Timestamp *message,
uint8_t *out)
{
assert(message->base.descriptor == &google__protobuf__timestamp__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t google__protobuf__timestamp__pack_to_buffer
(const Google__Protobuf__Timestamp *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &google__protobuf__timestamp__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Google__Protobuf__Timestamp *
google__protobuf__timestamp__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Google__Protobuf__Timestamp *)
protobuf_c_message_unpack (&google__protobuf__timestamp__descriptor,
allocator, len, data);
}
void google__protobuf__timestamp__free_unpacked
(Google__Protobuf__Timestamp *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &google__protobuf__timestamp__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
static const ProtobufCFieldDescriptor google__protobuf__timestamp__field_descriptors[2] =
{
{
"seconds",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_INT64,
0, /* quantifier_offset */
offsetof(Google__Protobuf__Timestamp, seconds),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"nanos",
2,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_INT32,
0, /* quantifier_offset */
offsetof(Google__Protobuf__Timestamp, nanos),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
};
static const unsigned google__protobuf__timestamp__field_indices_by_name[] = {
1, /* field[1] = nanos */
0, /* field[0] = seconds */
};
static const ProtobufCIntRange google__protobuf__timestamp__number_ranges[1 + 1] =
{
{ 1, 0 },
{ 0, 2 }
};
const ProtobufCMessageDescriptor google__protobuf__timestamp__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"google.protobuf.Timestamp",
"Timestamp",
"Google__Protobuf__Timestamp",
"google.protobuf",
sizeof(Google__Protobuf__Timestamp),
2,
google__protobuf__timestamp__field_descriptors,
google__protobuf__timestamp__field_indices_by_name,
1, google__protobuf__timestamp__number_ranges,
(ProtobufCMessageInit) google__protobuf__timestamp__init,
NULL,NULL,NULL /* reserved[123] */
};

@ -0,0 +1,151 @@
/* Generated by the protocol buffer compiler. DO NOT EDIT! */
/* Generated from: timestamp.proto */
#ifndef PROTOBUF_C_timestamp_2eproto__INCLUDED
#define PROTOBUF_C_timestamp_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 _Google__Protobuf__Timestamp Google__Protobuf__Timestamp;
/* --- enums --- */
/* --- messages --- */
/*
* A Timestamp represents a point in time independent of any time zone or local
* calendar, encoded as a count of seconds and fractions of seconds at
* nanosecond resolution. The count is relative to an epoch at UTC midnight on
* January 1, 1970, in the proleptic Gregorian calendar which extends the
* Gregorian calendar backwards to year one.
* All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
* second table is needed for interpretation, using a [24-hour linear
* smear](https://developers.google.com/time/smear).
* The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
* restricting to that range, we ensure that we can convert to and from [RFC
* 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
* # Examples
* Example 1: Compute Timestamp from POSIX `time()`.
* Timestamp timestamp;
* timestamp.set_seconds(time(NULL));
* timestamp.set_nanos(0);
* Example 2: Compute Timestamp from POSIX `gettimeofday()`.
* struct timeval tv;
* gettimeofday(&tv, NULL);
* Timestamp timestamp;
* timestamp.set_seconds(tv.tv_sec);
* timestamp.set_nanos(tv.tv_usec * 1000);
* Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
* FILETIME ft;
* GetSystemTimeAsFileTime(&ft);
* UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
* // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
* // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
* Timestamp timestamp;
* timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
* timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
* Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
* long millis = System.currentTimeMillis();
* Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
* .setNanos((int) ((millis % 1000) * 1000000)).build();
* Example 5: Compute Timestamp from Java `Instant.now()`.
* Instant now = Instant.now();
* Timestamp timestamp =
* Timestamp.newBuilder().setSeconds(now.getEpochSecond())
* .setNanos(now.getNano()).build();
* Example 6: Compute Timestamp from current time in Python.
* timestamp = Timestamp()
* timestamp.GetCurrentTime()
* # JSON Mapping
* In JSON format, the Timestamp type is encoded as a string in the
* [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
* format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
* where {year} is always expressed using four digits while {month}, {day},
* {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
* seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
* are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
* is required. A proto3 JSON serializer should always use UTC (as indicated by
* "Z") when printing the Timestamp type and a proto3 JSON parser should be
* able to accept both UTC and other timezones (as indicated by an offset).
* For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
* 01:30 UTC on January 15, 2017.
* In JavaScript, one can convert a Date object to this format using the
* standard
* [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
* method. In Python, a standard `datetime.datetime` object can be converted
* to this format using
* [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
* the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
* the Joda Time's [`ISODateTimeFormat.dateTime()`](
* http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
* ) to obtain a formatter capable of generating timestamps in this format.
*/
struct _Google__Protobuf__Timestamp
{
ProtobufCMessage base;
/*
* Represents seconds of UTC time since Unix epoch
* 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
* 9999-12-31T23:59:59Z inclusive.
*/
int64_t seconds;
/*
* Non-negative fractions of a second at nanosecond resolution. Negative
* second values with fractions must still have non-negative nanos values
* that count forward in time. Must be from 0 to 999,999,999
* inclusive.
*/
int32_t nanos;
};
#define GOOGLE__PROTOBUF__TIMESTAMP__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&google__protobuf__timestamp__descriptor) \
, 0, 0 }
/* Google__Protobuf__Timestamp methods */
void google__protobuf__timestamp__init
(Google__Protobuf__Timestamp *message);
size_t google__protobuf__timestamp__get_packed_size
(const Google__Protobuf__Timestamp *message);
size_t google__protobuf__timestamp__pack
(const Google__Protobuf__Timestamp *message,
uint8_t *out);
size_t google__protobuf__timestamp__pack_to_buffer
(const Google__Protobuf__Timestamp *message,
ProtobufCBuffer *buffer);
Google__Protobuf__Timestamp *
google__protobuf__timestamp__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void google__protobuf__timestamp__free_unpacked
(Google__Protobuf__Timestamp *message,
ProtobufCAllocator *allocator);
/* --- per-message closures --- */
typedef void (*Google__Protobuf__Timestamp_Closure)
(const Google__Protobuf__Timestamp *message,
void *closure_data);
/* --- services --- */
/* --- descriptors --- */
extern const ProtobufCMessageDescriptor google__protobuf__timestamp__descriptor;
PROTOBUF_C__END_DECLS
#endif /* PROTOBUF_C_timestamp_2eproto__INCLUDED */

@ -0,0 +1,144 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
package google.protobuf;
option cc_enable_arenas = true;
option go_package = "google.golang.org/protobuf/types/known/timestamppb";
option java_package = "com.google.protobuf";
option java_outer_classname = "TimestampProto";
option java_multiple_files = true;
option objc_class_prefix = "GPB";
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
// A Timestamp represents a point in time independent of any time zone or local
// calendar, encoded as a count of seconds and fractions of seconds at
// nanosecond resolution. The count is relative to an epoch at UTC midnight on
// January 1, 1970, in the proleptic Gregorian calendar which extends the
// Gregorian calendar backwards to year one.
//
// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
// second table is needed for interpretation, using a [24-hour linear
// smear](https://developers.google.com/time/smear).
//
// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
// restricting to that range, we ensure that we can convert to and from [RFC
// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
//
// # Examples
//
// Example 1: Compute Timestamp from POSIX `time()`.
//
// Timestamp timestamp;
// timestamp.set_seconds(time(NULL));
// timestamp.set_nanos(0);
//
// Example 2: Compute Timestamp from POSIX `gettimeofday()`.
//
// struct timeval tv;
// gettimeofday(&tv, NULL);
//
// Timestamp timestamp;
// timestamp.set_seconds(tv.tv_sec);
// timestamp.set_nanos(tv.tv_usec * 1000);
//
// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
//
// FILETIME ft;
// GetSystemTimeAsFileTime(&ft);
// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
//
// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
// Timestamp timestamp;
// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
//
// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
//
// long millis = System.currentTimeMillis();
//
// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
// .setNanos((int) ((millis % 1000) * 1000000)).build();
//
// Example 5: Compute Timestamp from Java `Instant.now()`.
//
// Instant now = Instant.now();
//
// Timestamp timestamp =
// Timestamp.newBuilder().setSeconds(now.getEpochSecond())
// .setNanos(now.getNano()).build();
//
// Example 6: Compute Timestamp from current time in Python.
//
// timestamp = Timestamp()
// timestamp.GetCurrentTime()
//
// # JSON Mapping
//
// In JSON format, the Timestamp type is encoded as a string in the
// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
// where {year} is always expressed using four digits while {month}, {day},
// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
// is required. A proto3 JSON serializer should always use UTC (as indicated by
// "Z") when printing the Timestamp type and a proto3 JSON parser should be
// able to accept both UTC and other timezones (as indicated by an offset).
//
// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
// 01:30 UTC on January 15, 2017.
//
// In JavaScript, one can convert a Date object to this format using the
// standard
// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
// method. In Python, a standard `datetime.datetime` object can be converted
// to this format using
// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
// the Joda Time's [`ISODateTimeFormat.dateTime()`](
// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
// ) to obtain a formatter capable of generating timestamps in this format.
//
message Timestamp {
// Represents seconds of UTC time since Unix epoch
// 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
// 9999-12-31T23:59:59Z inclusive.
int64 seconds = 1;
// Non-negative fractions of a second at nanosecond resolution. Negative
// second values with fractions must still have non-negative nanos values
// that count forward in time. Must be from 0 to 999,999,999
// inclusive.
int32 nanos = 2;
}

@ -0,0 +1,973 @@
/* Generated by the protocol buffer compiler. DO NOT EDIT! */
/* Generated from: network.proto */
/* Do not generate deprecated warnings for self */
#ifndef PROTOBUF_C__NO_DEPRECATED
#define PROTOBUF_C__NO_DEPRECATED
#endif
#include "network.pb-c.h"
void tari__rpc__node_identity__init
(Tari__Rpc__NodeIdentity *message)
{
static const Tari__Rpc__NodeIdentity init_value = TARI__RPC__NODE_IDENTITY__INIT;
*message = init_value;
}
size_t tari__rpc__node_identity__get_packed_size
(const Tari__Rpc__NodeIdentity *message)
{
assert(message->base.descriptor == &tari__rpc__node_identity__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__node_identity__pack
(const Tari__Rpc__NodeIdentity *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__node_identity__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__node_identity__pack_to_buffer
(const Tari__Rpc__NodeIdentity *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__node_identity__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__NodeIdentity *
tari__rpc__node_identity__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__NodeIdentity *)
protobuf_c_message_unpack (&tari__rpc__node_identity__descriptor,
allocator, len, data);
}
void tari__rpc__node_identity__free_unpacked
(Tari__Rpc__NodeIdentity *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__node_identity__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void tari__rpc__peer__init
(Tari__Rpc__Peer *message)
{
static const Tari__Rpc__Peer init_value = TARI__RPC__PEER__INIT;
*message = init_value;
}
size_t tari__rpc__peer__get_packed_size
(const Tari__Rpc__Peer *message)
{
assert(message->base.descriptor == &tari__rpc__peer__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__peer__pack
(const Tari__Rpc__Peer *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__peer__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__peer__pack_to_buffer
(const Tari__Rpc__Peer *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__peer__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__Peer *
tari__rpc__peer__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__Peer *)
protobuf_c_message_unpack (&tari__rpc__peer__descriptor,
allocator, len, data);
}
void tari__rpc__peer__free_unpacked
(Tari__Rpc__Peer *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__peer__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void tari__rpc__network_status_response__init
(Tari__Rpc__NetworkStatusResponse *message)
{
static const Tari__Rpc__NetworkStatusResponse init_value = TARI__RPC__NETWORK_STATUS_RESPONSE__INIT;
*message = init_value;
}
size_t tari__rpc__network_status_response__get_packed_size
(const Tari__Rpc__NetworkStatusResponse *message)
{
assert(message->base.descriptor == &tari__rpc__network_status_response__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__network_status_response__pack
(const Tari__Rpc__NetworkStatusResponse *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__network_status_response__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__network_status_response__pack_to_buffer
(const Tari__Rpc__NetworkStatusResponse *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__network_status_response__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__NetworkStatusResponse *
tari__rpc__network_status_response__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__NetworkStatusResponse *)
protobuf_c_message_unpack (&tari__rpc__network_status_response__descriptor,
allocator, len, data);
}
void tari__rpc__network_status_response__free_unpacked
(Tari__Rpc__NetworkStatusResponse *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__network_status_response__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void tari__rpc__address__init
(Tari__Rpc__Address *message)
{
static const Tari__Rpc__Address init_value = TARI__RPC__ADDRESS__INIT;
*message = init_value;
}
size_t tari__rpc__address__get_packed_size
(const Tari__Rpc__Address *message)
{
assert(message->base.descriptor == &tari__rpc__address__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__address__pack
(const Tari__Rpc__Address *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__address__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__address__pack_to_buffer
(const Tari__Rpc__Address *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__address__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__Address *
tari__rpc__address__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__Address *)
protobuf_c_message_unpack (&tari__rpc__address__descriptor,
allocator, len, data);
}
void tari__rpc__address__free_unpacked
(Tari__Rpc__Address *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__address__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void tari__rpc__list_connected_peers_response__init
(Tari__Rpc__ListConnectedPeersResponse *message)
{
static const Tari__Rpc__ListConnectedPeersResponse init_value = TARI__RPC__LIST_CONNECTED_PEERS_RESPONSE__INIT;
*message = init_value;
}
size_t tari__rpc__list_connected_peers_response__get_packed_size
(const Tari__Rpc__ListConnectedPeersResponse *message)
{
assert(message->base.descriptor == &tari__rpc__list_connected_peers_response__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__list_connected_peers_response__pack
(const Tari__Rpc__ListConnectedPeersResponse *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__list_connected_peers_response__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__list_connected_peers_response__pack_to_buffer
(const Tari__Rpc__ListConnectedPeersResponse *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__list_connected_peers_response__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__ListConnectedPeersResponse *
tari__rpc__list_connected_peers_response__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__ListConnectedPeersResponse *)
protobuf_c_message_unpack (&tari__rpc__list_connected_peers_response__descriptor,
allocator, len, data);
}
void tari__rpc__list_connected_peers_response__free_unpacked
(Tari__Rpc__ListConnectedPeersResponse *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__list_connected_peers_response__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void tari__rpc__software_update__init
(Tari__Rpc__SoftwareUpdate *message)
{
static const Tari__Rpc__SoftwareUpdate init_value = TARI__RPC__SOFTWARE_UPDATE__INIT;
*message = init_value;
}
size_t tari__rpc__software_update__get_packed_size
(const Tari__Rpc__SoftwareUpdate *message)
{
assert(message->base.descriptor == &tari__rpc__software_update__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__software_update__pack
(const Tari__Rpc__SoftwareUpdate *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__software_update__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__software_update__pack_to_buffer
(const Tari__Rpc__SoftwareUpdate *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__software_update__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__SoftwareUpdate *
tari__rpc__software_update__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__SoftwareUpdate *)
protobuf_c_message_unpack (&tari__rpc__software_update__descriptor,
allocator, len, data);
}
void tari__rpc__software_update__free_unpacked
(Tari__Rpc__SoftwareUpdate *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__software_update__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void tari__rpc__get_identity_request__init
(Tari__Rpc__GetIdentityRequest *message)
{
static const Tari__Rpc__GetIdentityRequest init_value = TARI__RPC__GET_IDENTITY_REQUEST__INIT;
*message = init_value;
}
size_t tari__rpc__get_identity_request__get_packed_size
(const Tari__Rpc__GetIdentityRequest *message)
{
assert(message->base.descriptor == &tari__rpc__get_identity_request__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__get_identity_request__pack
(const Tari__Rpc__GetIdentityRequest *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__get_identity_request__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__get_identity_request__pack_to_buffer
(const Tari__Rpc__GetIdentityRequest *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__get_identity_request__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__GetIdentityRequest *
tari__rpc__get_identity_request__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__GetIdentityRequest *)
protobuf_c_message_unpack (&tari__rpc__get_identity_request__descriptor,
allocator, len, data);
}
void tari__rpc__get_identity_request__free_unpacked
(Tari__Rpc__GetIdentityRequest *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__get_identity_request__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void tari__rpc__get_identity_response__init
(Tari__Rpc__GetIdentityResponse *message)
{
static const Tari__Rpc__GetIdentityResponse init_value = TARI__RPC__GET_IDENTITY_RESPONSE__INIT;
*message = init_value;
}
size_t tari__rpc__get_identity_response__get_packed_size
(const Tari__Rpc__GetIdentityResponse *message)
{
assert(message->base.descriptor == &tari__rpc__get_identity_response__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__get_identity_response__pack
(const Tari__Rpc__GetIdentityResponse *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__get_identity_response__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__get_identity_response__pack_to_buffer
(const Tari__Rpc__GetIdentityResponse *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__get_identity_response__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__GetIdentityResponse *
tari__rpc__get_identity_response__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__GetIdentityResponse *)
protobuf_c_message_unpack (&tari__rpc__get_identity_response__descriptor,
allocator, len, data);
}
void tari__rpc__get_identity_response__free_unpacked
(Tari__Rpc__GetIdentityResponse *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__get_identity_response__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
static const ProtobufCFieldDescriptor tari__rpc__node_identity__field_descriptors[3] =
{
{
"public_key",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__NodeIdentity, public_key),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"public_addresses",
2,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_STRING,
offsetof(Tari__Rpc__NodeIdentity, n_public_addresses),
offsetof(Tari__Rpc__NodeIdentity, public_addresses),
NULL,
&protobuf_c_empty_string,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"node_id",
3,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__NodeIdentity, node_id),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
};
static const unsigned tari__rpc__node_identity__field_indices_by_name[] = {
2, /* field[2] = node_id */
1, /* field[1] = public_addresses */
0, /* field[0] = public_key */
};
static const ProtobufCIntRange tari__rpc__node_identity__number_ranges[1 + 1] =
{
{ 1, 0 },
{ 0, 3 }
};
const ProtobufCMessageDescriptor tari__rpc__node_identity__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.NodeIdentity",
"NodeIdentity",
"Tari__Rpc__NodeIdentity",
"tari.rpc",
sizeof(Tari__Rpc__NodeIdentity),
3,
tari__rpc__node_identity__field_descriptors,
tari__rpc__node_identity__field_indices_by_name,
1, tari__rpc__node_identity__number_ranges,
(ProtobufCMessageInit) tari__rpc__node_identity__init,
NULL,NULL,NULL /* reserved[123] */
};
static const ProtobufCFieldDescriptor tari__rpc__peer__field_descriptors[11] =
{
{
"public_key",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__Peer, public_key),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"node_id",
2,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__Peer, node_id),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"addresses",
3,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_MESSAGE,
offsetof(Tari__Rpc__Peer, n_addresses),
offsetof(Tari__Rpc__Peer, addresses),
&tari__rpc__address__descriptor,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"last_connection",
4,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_UINT64,
0, /* quantifier_offset */
offsetof(Tari__Rpc__Peer, last_connection),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"flags",
5,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_UINT32,
0, /* quantifier_offset */
offsetof(Tari__Rpc__Peer, flags),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"banned_until",
6,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_UINT64,
0, /* quantifier_offset */
offsetof(Tari__Rpc__Peer, banned_until),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"banned_reason",
7,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_STRING,
0, /* quantifier_offset */
offsetof(Tari__Rpc__Peer, banned_reason),
NULL,
&protobuf_c_empty_string,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"offline_at",
8,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_UINT64,
0, /* quantifier_offset */
offsetof(Tari__Rpc__Peer, offline_at),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"features",
9,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_UINT32,
0, /* quantifier_offset */
offsetof(Tari__Rpc__Peer, features),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"supported_protocols",
11,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_BYTES,
offsetof(Tari__Rpc__Peer, n_supported_protocols),
offsetof(Tari__Rpc__Peer, supported_protocols),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"user_agent",
12,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_STRING,
0, /* quantifier_offset */
offsetof(Tari__Rpc__Peer, user_agent),
NULL,
&protobuf_c_empty_string,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
};
static const unsigned tari__rpc__peer__field_indices_by_name[] = {
2, /* field[2] = addresses */
6, /* field[6] = banned_reason */
5, /* field[5] = banned_until */
8, /* field[8] = features */
4, /* field[4] = flags */
3, /* field[3] = last_connection */
1, /* field[1] = node_id */
7, /* field[7] = offline_at */
0, /* field[0] = public_key */
9, /* field[9] = supported_protocols */
10, /* field[10] = user_agent */
};
static const ProtobufCIntRange tari__rpc__peer__number_ranges[2 + 1] =
{
{ 1, 0 },
{ 11, 9 },
{ 0, 11 }
};
const ProtobufCMessageDescriptor tari__rpc__peer__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.Peer",
"Peer",
"Tari__Rpc__Peer",
"tari.rpc",
sizeof(Tari__Rpc__Peer),
11,
tari__rpc__peer__field_descriptors,
tari__rpc__peer__field_indices_by_name,
2, tari__rpc__peer__number_ranges,
(ProtobufCMessageInit) tari__rpc__peer__init,
NULL,NULL,NULL /* reserved[123] */
};
static const ProtobufCFieldDescriptor tari__rpc__network_status_response__field_descriptors[3] =
{
{
"status",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_ENUM,
0, /* quantifier_offset */
offsetof(Tari__Rpc__NetworkStatusResponse, status),
&tari__rpc__connectivity_status__descriptor,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"avg_latency_ms",
2,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_UINT32,
0, /* quantifier_offset */
offsetof(Tari__Rpc__NetworkStatusResponse, avg_latency_ms),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"num_node_connections",
3,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_UINT32,
0, /* quantifier_offset */
offsetof(Tari__Rpc__NetworkStatusResponse, num_node_connections),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
};
static const unsigned tari__rpc__network_status_response__field_indices_by_name[] = {
1, /* field[1] = avg_latency_ms */
2, /* field[2] = num_node_connections */
0, /* field[0] = status */
};
static const ProtobufCIntRange tari__rpc__network_status_response__number_ranges[1 + 1] =
{
{ 1, 0 },
{ 0, 3 }
};
const ProtobufCMessageDescriptor tari__rpc__network_status_response__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.NetworkStatusResponse",
"NetworkStatusResponse",
"Tari__Rpc__NetworkStatusResponse",
"tari.rpc",
sizeof(Tari__Rpc__NetworkStatusResponse),
3,
tari__rpc__network_status_response__field_descriptors,
tari__rpc__network_status_response__field_indices_by_name,
1, tari__rpc__network_status_response__number_ranges,
(ProtobufCMessageInit) tari__rpc__network_status_response__init,
NULL,NULL,NULL /* reserved[123] */
};
static const ProtobufCFieldDescriptor tari__rpc__address__field_descriptors[4] =
{
{
"address",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__Address, address),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"last_seen",
2,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_STRING,
0, /* quantifier_offset */
offsetof(Tari__Rpc__Address, last_seen),
NULL,
&protobuf_c_empty_string,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"connection_attempts",
3,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_UINT32,
0, /* quantifier_offset */
offsetof(Tari__Rpc__Address, connection_attempts),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"avg_latency",
5,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_UINT64,
0, /* quantifier_offset */
offsetof(Tari__Rpc__Address, avg_latency),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
};
static const unsigned tari__rpc__address__field_indices_by_name[] = {
0, /* field[0] = address */
3, /* field[3] = avg_latency */
2, /* field[2] = connection_attempts */
1, /* field[1] = last_seen */
};
static const ProtobufCIntRange tari__rpc__address__number_ranges[2 + 1] =
{
{ 1, 0 },
{ 5, 3 },
{ 0, 4 }
};
const ProtobufCMessageDescriptor tari__rpc__address__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.Address",
"Address",
"Tari__Rpc__Address",
"tari.rpc",
sizeof(Tari__Rpc__Address),
4,
tari__rpc__address__field_descriptors,
tari__rpc__address__field_indices_by_name,
2, tari__rpc__address__number_ranges,
(ProtobufCMessageInit) tari__rpc__address__init,
NULL,NULL,NULL /* reserved[123] */
};
static const ProtobufCFieldDescriptor tari__rpc__list_connected_peers_response__field_descriptors[1] =
{
{
"connected_peers",
1,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_MESSAGE,
offsetof(Tari__Rpc__ListConnectedPeersResponse, n_connected_peers),
offsetof(Tari__Rpc__ListConnectedPeersResponse, connected_peers),
&tari__rpc__peer__descriptor,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
};
static const unsigned tari__rpc__list_connected_peers_response__field_indices_by_name[] = {
0, /* field[0] = connected_peers */
};
static const ProtobufCIntRange tari__rpc__list_connected_peers_response__number_ranges[1 + 1] =
{
{ 1, 0 },
{ 0, 1 }
};
const ProtobufCMessageDescriptor tari__rpc__list_connected_peers_response__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.ListConnectedPeersResponse",
"ListConnectedPeersResponse",
"Tari__Rpc__ListConnectedPeersResponse",
"tari.rpc",
sizeof(Tari__Rpc__ListConnectedPeersResponse),
1,
tari__rpc__list_connected_peers_response__field_descriptors,
tari__rpc__list_connected_peers_response__field_indices_by_name,
1, tari__rpc__list_connected_peers_response__number_ranges,
(ProtobufCMessageInit) tari__rpc__list_connected_peers_response__init,
NULL,NULL,NULL /* reserved[123] */
};
static const ProtobufCFieldDescriptor tari__rpc__software_update__field_descriptors[4] =
{
{
"has_update",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BOOL,
0, /* quantifier_offset */
offsetof(Tari__Rpc__SoftwareUpdate, has_update),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"version",
2,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_STRING,
0, /* quantifier_offset */
offsetof(Tari__Rpc__SoftwareUpdate, version),
NULL,
&protobuf_c_empty_string,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"sha",
3,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_STRING,
0, /* quantifier_offset */
offsetof(Tari__Rpc__SoftwareUpdate, sha),
NULL,
&protobuf_c_empty_string,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"download_url",
4,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_STRING,
0, /* quantifier_offset */
offsetof(Tari__Rpc__SoftwareUpdate, download_url),
NULL,
&protobuf_c_empty_string,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
};
static const unsigned tari__rpc__software_update__field_indices_by_name[] = {
3, /* field[3] = download_url */
0, /* field[0] = has_update */
2, /* field[2] = sha */
1, /* field[1] = version */
};
static const ProtobufCIntRange tari__rpc__software_update__number_ranges[1 + 1] =
{
{ 1, 0 },
{ 0, 4 }
};
const ProtobufCMessageDescriptor tari__rpc__software_update__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.SoftwareUpdate",
"SoftwareUpdate",
"Tari__Rpc__SoftwareUpdate",
"tari.rpc",
sizeof(Tari__Rpc__SoftwareUpdate),
4,
tari__rpc__software_update__field_descriptors,
tari__rpc__software_update__field_indices_by_name,
1, tari__rpc__software_update__number_ranges,
(ProtobufCMessageInit) tari__rpc__software_update__init,
NULL,NULL,NULL /* reserved[123] */
};
#define tari__rpc__get_identity_request__field_descriptors NULL
#define tari__rpc__get_identity_request__field_indices_by_name NULL
#define tari__rpc__get_identity_request__number_ranges NULL
const ProtobufCMessageDescriptor tari__rpc__get_identity_request__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.GetIdentityRequest",
"GetIdentityRequest",
"Tari__Rpc__GetIdentityRequest",
"tari.rpc",
sizeof(Tari__Rpc__GetIdentityRequest),
0,
tari__rpc__get_identity_request__field_descriptors,
tari__rpc__get_identity_request__field_indices_by_name,
0, tari__rpc__get_identity_request__number_ranges,
(ProtobufCMessageInit) tari__rpc__get_identity_request__init,
NULL,NULL,NULL /* reserved[123] */
};
static const ProtobufCFieldDescriptor tari__rpc__get_identity_response__field_descriptors[3] =
{
{
"public_key",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__GetIdentityResponse, public_key),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"public_address",
2,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_STRING,
0, /* quantifier_offset */
offsetof(Tari__Rpc__GetIdentityResponse, public_address),
NULL,
&protobuf_c_empty_string,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"node_id",
3,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__GetIdentityResponse, node_id),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
};
static const unsigned tari__rpc__get_identity_response__field_indices_by_name[] = {
2, /* field[2] = node_id */
1, /* field[1] = public_address */
0, /* field[0] = public_key */
};
static const ProtobufCIntRange tari__rpc__get_identity_response__number_ranges[1 + 1] =
{
{ 1, 0 },
{ 0, 3 }
};
const ProtobufCMessageDescriptor tari__rpc__get_identity_response__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.GetIdentityResponse",
"GetIdentityResponse",
"Tari__Rpc__GetIdentityResponse",
"tari.rpc",
sizeof(Tari__Rpc__GetIdentityResponse),
3,
tari__rpc__get_identity_response__field_descriptors,
tari__rpc__get_identity_response__field_indices_by_name,
1, tari__rpc__get_identity_response__number_ranges,
(ProtobufCMessageInit) tari__rpc__get_identity_response__init,
NULL,NULL,NULL /* reserved[123] */
};
static const ProtobufCEnumValue tari__rpc__connectivity_status__enum_values_by_number[4] =
{
{ "Initializing", "TARI__RPC__CONNECTIVITY_STATUS__Initializing", 0 },
{ "Online", "TARI__RPC__CONNECTIVITY_STATUS__Online", 1 },
{ "Degraded", "TARI__RPC__CONNECTIVITY_STATUS__Degraded", 2 },
{ "Offline", "TARI__RPC__CONNECTIVITY_STATUS__Offline", 3 },
};
static const ProtobufCIntRange tari__rpc__connectivity_status__value_ranges[] = {
{0, 0},{0, 4}
};
static const ProtobufCEnumValueIndex tari__rpc__connectivity_status__enum_values_by_name[4] =
{
{ "Degraded", 2 },
{ "Initializing", 0 },
{ "Offline", 3 },
{ "Online", 1 },
};
const ProtobufCEnumDescriptor tari__rpc__connectivity_status__descriptor =
{
PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
"tari.rpc.ConnectivityStatus",
"ConnectivityStatus",
"Tari__Rpc__ConnectivityStatus",
"tari.rpc",
4,
tari__rpc__connectivity_status__enum_values_by_number,
4,
tari__rpc__connectivity_status__enum_values_by_name,
1,
tari__rpc__connectivity_status__value_ranges,
NULL,NULL,NULL,NULL /* reserved[1234] */
};

@ -0,0 +1,367 @@
/* Generated by the protocol buffer compiler. DO NOT EDIT! */
/* Generated from: network.proto */
#ifndef PROTOBUF_C_network_2eproto__INCLUDED
#define PROTOBUF_C_network_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
#include "google/protobuf/timestamp.pb-c.h"
typedef struct _Tari__Rpc__NodeIdentity Tari__Rpc__NodeIdentity;
typedef struct _Tari__Rpc__Peer Tari__Rpc__Peer;
typedef struct _Tari__Rpc__NetworkStatusResponse Tari__Rpc__NetworkStatusResponse;
typedef struct _Tari__Rpc__Address Tari__Rpc__Address;
typedef struct _Tari__Rpc__ListConnectedPeersResponse Tari__Rpc__ListConnectedPeersResponse;
typedef struct _Tari__Rpc__SoftwareUpdate Tari__Rpc__SoftwareUpdate;
typedef struct _Tari__Rpc__GetIdentityRequest Tari__Rpc__GetIdentityRequest;
typedef struct _Tari__Rpc__GetIdentityResponse Tari__Rpc__GetIdentityResponse;
/* --- enums --- */
typedef enum _Tari__Rpc__ConnectivityStatus {
TARI__RPC__CONNECTIVITY_STATUS__Initializing = 0,
TARI__RPC__CONNECTIVITY_STATUS__Online = 1,
TARI__RPC__CONNECTIVITY_STATUS__Degraded = 2,
TARI__RPC__CONNECTIVITY_STATUS__Offline = 3
PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(TARI__RPC__CONNECTIVITY_STATUS)
} Tari__Rpc__ConnectivityStatus;
/* --- messages --- */
struct _Tari__Rpc__NodeIdentity
{
ProtobufCMessage base;
ProtobufCBinaryData public_key;
size_t n_public_addresses;
char **public_addresses;
ProtobufCBinaryData node_id;
};
#define TARI__RPC__NODE_IDENTITY__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__node_identity__descriptor) \
, {0,NULL}, 0,NULL, {0,NULL} }
struct _Tari__Rpc__Peer
{
ProtobufCMessage base;
/*
* / Public key of the peer
*/
ProtobufCBinaryData public_key;
/*
* / NodeId of the peer
*/
ProtobufCBinaryData node_id;
/*
* / Peer's addresses
*/
size_t n_addresses;
Tari__Rpc__Address **addresses;
/*
* / Last connection attempt to peer
*/
uint64_t last_connection;
/*
* / Flags for the peer.
*/
uint32_t flags;
uint64_t banned_until;
char *banned_reason;
uint64_t offline_at;
/*
* / Features supported by the peer
*/
uint32_t features;
/*
* / used as information for more efficient protocol negotiation.
*/
size_t n_supported_protocols;
ProtobufCBinaryData *supported_protocols;
/*
* / User agent advertised by the peer
*/
char *user_agent;
};
#define TARI__RPC__PEER__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__peer__descriptor) \
, {0,NULL}, {0,NULL}, 0,NULL, 0, 0, 0, (char *)protobuf_c_empty_string, 0, 0, 0,NULL, (char *)protobuf_c_empty_string }
struct _Tari__Rpc__NetworkStatusResponse
{
ProtobufCMessage base;
Tari__Rpc__ConnectivityStatus status;
uint32_t avg_latency_ms;
uint32_t num_node_connections;
};
#define TARI__RPC__NETWORK_STATUS_RESPONSE__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__network_status_response__descriptor) \
, TARI__RPC__CONNECTIVITY_STATUS__Initializing, 0, 0 }
struct _Tari__Rpc__Address
{
ProtobufCMessage base;
ProtobufCBinaryData address;
char *last_seen;
uint32_t connection_attempts;
uint64_t avg_latency;
};
#define TARI__RPC__ADDRESS__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__address__descriptor) \
, {0,NULL}, (char *)protobuf_c_empty_string, 0, 0 }
struct _Tari__Rpc__ListConnectedPeersResponse
{
ProtobufCMessage base;
size_t n_connected_peers;
Tari__Rpc__Peer **connected_peers;
};
#define TARI__RPC__LIST_CONNECTED_PEERS_RESPONSE__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__list_connected_peers_response__descriptor) \
, 0,NULL }
struct _Tari__Rpc__SoftwareUpdate
{
ProtobufCMessage base;
protobuf_c_boolean has_update;
char *version;
char *sha;
char *download_url;
};
#define TARI__RPC__SOFTWARE_UPDATE__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__software_update__descriptor) \
, 0, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string }
struct _Tari__Rpc__GetIdentityRequest
{
ProtobufCMessage base;
};
#define TARI__RPC__GET_IDENTITY_REQUEST__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__get_identity_request__descriptor) \
}
struct _Tari__Rpc__GetIdentityResponse
{
ProtobufCMessage base;
ProtobufCBinaryData public_key;
char *public_address;
ProtobufCBinaryData node_id;
};
#define TARI__RPC__GET_IDENTITY_RESPONSE__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__get_identity_response__descriptor) \
, {0,NULL}, (char *)protobuf_c_empty_string, {0,NULL} }
/* Tari__Rpc__NodeIdentity methods */
void tari__rpc__node_identity__init
(Tari__Rpc__NodeIdentity *message);
size_t tari__rpc__node_identity__get_packed_size
(const Tari__Rpc__NodeIdentity *message);
size_t tari__rpc__node_identity__pack
(const Tari__Rpc__NodeIdentity *message,
uint8_t *out);
size_t tari__rpc__node_identity__pack_to_buffer
(const Tari__Rpc__NodeIdentity *message,
ProtobufCBuffer *buffer);
Tari__Rpc__NodeIdentity *
tari__rpc__node_identity__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__node_identity__free_unpacked
(Tari__Rpc__NodeIdentity *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__Peer methods */
void tari__rpc__peer__init
(Tari__Rpc__Peer *message);
size_t tari__rpc__peer__get_packed_size
(const Tari__Rpc__Peer *message);
size_t tari__rpc__peer__pack
(const Tari__Rpc__Peer *message,
uint8_t *out);
size_t tari__rpc__peer__pack_to_buffer
(const Tari__Rpc__Peer *message,
ProtobufCBuffer *buffer);
Tari__Rpc__Peer *
tari__rpc__peer__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__peer__free_unpacked
(Tari__Rpc__Peer *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__NetworkStatusResponse methods */
void tari__rpc__network_status_response__init
(Tari__Rpc__NetworkStatusResponse *message);
size_t tari__rpc__network_status_response__get_packed_size
(const Tari__Rpc__NetworkStatusResponse *message);
size_t tari__rpc__network_status_response__pack
(const Tari__Rpc__NetworkStatusResponse *message,
uint8_t *out);
size_t tari__rpc__network_status_response__pack_to_buffer
(const Tari__Rpc__NetworkStatusResponse *message,
ProtobufCBuffer *buffer);
Tari__Rpc__NetworkStatusResponse *
tari__rpc__network_status_response__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__network_status_response__free_unpacked
(Tari__Rpc__NetworkStatusResponse *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__Address methods */
void tari__rpc__address__init
(Tari__Rpc__Address *message);
size_t tari__rpc__address__get_packed_size
(const Tari__Rpc__Address *message);
size_t tari__rpc__address__pack
(const Tari__Rpc__Address *message,
uint8_t *out);
size_t tari__rpc__address__pack_to_buffer
(const Tari__Rpc__Address *message,
ProtobufCBuffer *buffer);
Tari__Rpc__Address *
tari__rpc__address__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__address__free_unpacked
(Tari__Rpc__Address *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__ListConnectedPeersResponse methods */
void tari__rpc__list_connected_peers_response__init
(Tari__Rpc__ListConnectedPeersResponse *message);
size_t tari__rpc__list_connected_peers_response__get_packed_size
(const Tari__Rpc__ListConnectedPeersResponse *message);
size_t tari__rpc__list_connected_peers_response__pack
(const Tari__Rpc__ListConnectedPeersResponse *message,
uint8_t *out);
size_t tari__rpc__list_connected_peers_response__pack_to_buffer
(const Tari__Rpc__ListConnectedPeersResponse *message,
ProtobufCBuffer *buffer);
Tari__Rpc__ListConnectedPeersResponse *
tari__rpc__list_connected_peers_response__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__list_connected_peers_response__free_unpacked
(Tari__Rpc__ListConnectedPeersResponse *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__SoftwareUpdate methods */
void tari__rpc__software_update__init
(Tari__Rpc__SoftwareUpdate *message);
size_t tari__rpc__software_update__get_packed_size
(const Tari__Rpc__SoftwareUpdate *message);
size_t tari__rpc__software_update__pack
(const Tari__Rpc__SoftwareUpdate *message,
uint8_t *out);
size_t tari__rpc__software_update__pack_to_buffer
(const Tari__Rpc__SoftwareUpdate *message,
ProtobufCBuffer *buffer);
Tari__Rpc__SoftwareUpdate *
tari__rpc__software_update__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__software_update__free_unpacked
(Tari__Rpc__SoftwareUpdate *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__GetIdentityRequest methods */
void tari__rpc__get_identity_request__init
(Tari__Rpc__GetIdentityRequest *message);
size_t tari__rpc__get_identity_request__get_packed_size
(const Tari__Rpc__GetIdentityRequest *message);
size_t tari__rpc__get_identity_request__pack
(const Tari__Rpc__GetIdentityRequest *message,
uint8_t *out);
size_t tari__rpc__get_identity_request__pack_to_buffer
(const Tari__Rpc__GetIdentityRequest *message,
ProtobufCBuffer *buffer);
Tari__Rpc__GetIdentityRequest *
tari__rpc__get_identity_request__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__get_identity_request__free_unpacked
(Tari__Rpc__GetIdentityRequest *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__GetIdentityResponse methods */
void tari__rpc__get_identity_response__init
(Tari__Rpc__GetIdentityResponse *message);
size_t tari__rpc__get_identity_response__get_packed_size
(const Tari__Rpc__GetIdentityResponse *message);
size_t tari__rpc__get_identity_response__pack
(const Tari__Rpc__GetIdentityResponse *message,
uint8_t *out);
size_t tari__rpc__get_identity_response__pack_to_buffer
(const Tari__Rpc__GetIdentityResponse *message,
ProtobufCBuffer *buffer);
Tari__Rpc__GetIdentityResponse *
tari__rpc__get_identity_response__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__get_identity_response__free_unpacked
(Tari__Rpc__GetIdentityResponse *message,
ProtobufCAllocator *allocator);
/* --- per-message closures --- */
typedef void (*Tari__Rpc__NodeIdentity_Closure)
(const Tari__Rpc__NodeIdentity *message,
void *closure_data);
typedef void (*Tari__Rpc__Peer_Closure)
(const Tari__Rpc__Peer *message,
void *closure_data);
typedef void (*Tari__Rpc__NetworkStatusResponse_Closure)
(const Tari__Rpc__NetworkStatusResponse *message,
void *closure_data);
typedef void (*Tari__Rpc__Address_Closure)
(const Tari__Rpc__Address *message,
void *closure_data);
typedef void (*Tari__Rpc__ListConnectedPeersResponse_Closure)
(const Tari__Rpc__ListConnectedPeersResponse *message,
void *closure_data);
typedef void (*Tari__Rpc__SoftwareUpdate_Closure)
(const Tari__Rpc__SoftwareUpdate *message,
void *closure_data);
typedef void (*Tari__Rpc__GetIdentityRequest_Closure)
(const Tari__Rpc__GetIdentityRequest *message,
void *closure_data);
typedef void (*Tari__Rpc__GetIdentityResponse_Closure)
(const Tari__Rpc__GetIdentityResponse *message,
void *closure_data);
/* --- services --- */
/* --- descriptors --- */
extern const ProtobufCEnumDescriptor tari__rpc__connectivity_status__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__node_identity__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__peer__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__network_status_response__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__address__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__list_connected_peers_response__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__software_update__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__get_identity_request__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__get_identity_response__descriptor;
PROTOBUF_C__END_DECLS
#endif /* PROTOBUF_C_network_2eproto__INCLUDED */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,885 @@
/* Generated by the protocol buffer compiler. DO NOT EDIT! */
/* Generated from: sidechain_types.proto */
/* Do not generate deprecated warnings for self */
#ifndef PROTOBUF_C__NO_DEPRECATED
#define PROTOBUF_C__NO_DEPRECATED
#endif
#include "sidechain_types.pb-c.h"
void tari__rpc__side_chain_feature__init
(Tari__Rpc__SideChainFeature *message)
{
static const Tari__Rpc__SideChainFeature init_value = TARI__RPC__SIDE_CHAIN_FEATURE__INIT;
*message = init_value;
}
size_t tari__rpc__side_chain_feature__get_packed_size
(const Tari__Rpc__SideChainFeature *message)
{
assert(message->base.descriptor == &tari__rpc__side_chain_feature__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__side_chain_feature__pack
(const Tari__Rpc__SideChainFeature *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__side_chain_feature__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__side_chain_feature__pack_to_buffer
(const Tari__Rpc__SideChainFeature *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__side_chain_feature__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__SideChainFeature *
tari__rpc__side_chain_feature__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__SideChainFeature *)
protobuf_c_message_unpack (&tari__rpc__side_chain_feature__descriptor,
allocator, len, data);
}
void tari__rpc__side_chain_feature__free_unpacked
(Tari__Rpc__SideChainFeature *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__side_chain_feature__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void tari__rpc__validator_node_registration__init
(Tari__Rpc__ValidatorNodeRegistration *message)
{
static const Tari__Rpc__ValidatorNodeRegistration init_value = TARI__RPC__VALIDATOR_NODE_REGISTRATION__INIT;
*message = init_value;
}
size_t tari__rpc__validator_node_registration__get_packed_size
(const Tari__Rpc__ValidatorNodeRegistration *message)
{
assert(message->base.descriptor == &tari__rpc__validator_node_registration__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__validator_node_registration__pack
(const Tari__Rpc__ValidatorNodeRegistration *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__validator_node_registration__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__validator_node_registration__pack_to_buffer
(const Tari__Rpc__ValidatorNodeRegistration *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__validator_node_registration__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__ValidatorNodeRegistration *
tari__rpc__validator_node_registration__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__ValidatorNodeRegistration *)
protobuf_c_message_unpack (&tari__rpc__validator_node_registration__descriptor,
allocator, len, data);
}
void tari__rpc__validator_node_registration__free_unpacked
(Tari__Rpc__ValidatorNodeRegistration *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__validator_node_registration__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void tari__rpc__template_registration__init
(Tari__Rpc__TemplateRegistration *message)
{
static const Tari__Rpc__TemplateRegistration init_value = TARI__RPC__TEMPLATE_REGISTRATION__INIT;
*message = init_value;
}
size_t tari__rpc__template_registration__get_packed_size
(const Tari__Rpc__TemplateRegistration *message)
{
assert(message->base.descriptor == &tari__rpc__template_registration__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__template_registration__pack
(const Tari__Rpc__TemplateRegistration *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__template_registration__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__template_registration__pack_to_buffer
(const Tari__Rpc__TemplateRegistration *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__template_registration__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__TemplateRegistration *
tari__rpc__template_registration__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__TemplateRegistration *)
protobuf_c_message_unpack (&tari__rpc__template_registration__descriptor,
allocator, len, data);
}
void tari__rpc__template_registration__free_unpacked
(Tari__Rpc__TemplateRegistration *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__template_registration__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void tari__rpc__confidential_output_data__init
(Tari__Rpc__ConfidentialOutputData *message)
{
static const Tari__Rpc__ConfidentialOutputData init_value = TARI__RPC__CONFIDENTIAL_OUTPUT_DATA__INIT;
*message = init_value;
}
size_t tari__rpc__confidential_output_data__get_packed_size
(const Tari__Rpc__ConfidentialOutputData *message)
{
assert(message->base.descriptor == &tari__rpc__confidential_output_data__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__confidential_output_data__pack
(const Tari__Rpc__ConfidentialOutputData *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__confidential_output_data__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__confidential_output_data__pack_to_buffer
(const Tari__Rpc__ConfidentialOutputData *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__confidential_output_data__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__ConfidentialOutputData *
tari__rpc__confidential_output_data__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__ConfidentialOutputData *)
protobuf_c_message_unpack (&tari__rpc__confidential_output_data__descriptor,
allocator, len, data);
}
void tari__rpc__confidential_output_data__free_unpacked
(Tari__Rpc__ConfidentialOutputData *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__confidential_output_data__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void tari__rpc__template_type__init
(Tari__Rpc__TemplateType *message)
{
static const Tari__Rpc__TemplateType init_value = TARI__RPC__TEMPLATE_TYPE__INIT;
*message = init_value;
}
size_t tari__rpc__template_type__get_packed_size
(const Tari__Rpc__TemplateType *message)
{
assert(message->base.descriptor == &tari__rpc__template_type__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__template_type__pack
(const Tari__Rpc__TemplateType *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__template_type__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__template_type__pack_to_buffer
(const Tari__Rpc__TemplateType *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__template_type__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__TemplateType *
tari__rpc__template_type__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__TemplateType *)
protobuf_c_message_unpack (&tari__rpc__template_type__descriptor,
allocator, len, data);
}
void tari__rpc__template_type__free_unpacked
(Tari__Rpc__TemplateType *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__template_type__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void tari__rpc__wasm_info__init
(Tari__Rpc__WasmInfo *message)
{
static const Tari__Rpc__WasmInfo init_value = TARI__RPC__WASM_INFO__INIT;
*message = init_value;
}
size_t tari__rpc__wasm_info__get_packed_size
(const Tari__Rpc__WasmInfo *message)
{
assert(message->base.descriptor == &tari__rpc__wasm_info__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__wasm_info__pack
(const Tari__Rpc__WasmInfo *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__wasm_info__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__wasm_info__pack_to_buffer
(const Tari__Rpc__WasmInfo *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__wasm_info__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__WasmInfo *
tari__rpc__wasm_info__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__WasmInfo *)
protobuf_c_message_unpack (&tari__rpc__wasm_info__descriptor,
allocator, len, data);
}
void tari__rpc__wasm_info__free_unpacked
(Tari__Rpc__WasmInfo *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__wasm_info__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void tari__rpc__flow_info__init
(Tari__Rpc__FlowInfo *message)
{
static const Tari__Rpc__FlowInfo init_value = TARI__RPC__FLOW_INFO__INIT;
*message = init_value;
}
size_t tari__rpc__flow_info__get_packed_size
(const Tari__Rpc__FlowInfo *message)
{
assert(message->base.descriptor == &tari__rpc__flow_info__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__flow_info__pack
(const Tari__Rpc__FlowInfo *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__flow_info__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__flow_info__pack_to_buffer
(const Tari__Rpc__FlowInfo *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__flow_info__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__FlowInfo *
tari__rpc__flow_info__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__FlowInfo *)
protobuf_c_message_unpack (&tari__rpc__flow_info__descriptor,
allocator, len, data);
}
void tari__rpc__flow_info__free_unpacked
(Tari__Rpc__FlowInfo *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__flow_info__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void tari__rpc__manifest_info__init
(Tari__Rpc__ManifestInfo *message)
{
static const Tari__Rpc__ManifestInfo init_value = TARI__RPC__MANIFEST_INFO__INIT;
*message = init_value;
}
size_t tari__rpc__manifest_info__get_packed_size
(const Tari__Rpc__ManifestInfo *message)
{
assert(message->base.descriptor == &tari__rpc__manifest_info__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__manifest_info__pack
(const Tari__Rpc__ManifestInfo *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__manifest_info__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__manifest_info__pack_to_buffer
(const Tari__Rpc__ManifestInfo *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__manifest_info__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__ManifestInfo *
tari__rpc__manifest_info__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__ManifestInfo *)
protobuf_c_message_unpack (&tari__rpc__manifest_info__descriptor,
allocator, len, data);
}
void tari__rpc__manifest_info__free_unpacked
(Tari__Rpc__ManifestInfo *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__manifest_info__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void tari__rpc__build_info__init
(Tari__Rpc__BuildInfo *message)
{
static const Tari__Rpc__BuildInfo init_value = TARI__RPC__BUILD_INFO__INIT;
*message = init_value;
}
size_t tari__rpc__build_info__get_packed_size
(const Tari__Rpc__BuildInfo *message)
{
assert(message->base.descriptor == &tari__rpc__build_info__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t tari__rpc__build_info__pack
(const Tari__Rpc__BuildInfo *message,
uint8_t *out)
{
assert(message->base.descriptor == &tari__rpc__build_info__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t tari__rpc__build_info__pack_to_buffer
(const Tari__Rpc__BuildInfo *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &tari__rpc__build_info__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Tari__Rpc__BuildInfo *
tari__rpc__build_info__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (Tari__Rpc__BuildInfo *)
protobuf_c_message_unpack (&tari__rpc__build_info__descriptor,
allocator, len, data);
}
void tari__rpc__build_info__free_unpacked
(Tari__Rpc__BuildInfo *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &tari__rpc__build_info__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
static const ProtobufCFieldDescriptor tari__rpc__side_chain_feature__field_descriptors[3] =
{
{
"validator_node_registration",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_MESSAGE,
offsetof(Tari__Rpc__SideChainFeature, side_chain_feature_case),
offsetof(Tari__Rpc__SideChainFeature, validator_node_registration),
&tari__rpc__validator_node_registration__descriptor,
NULL,
0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"template_registration",
2,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_MESSAGE,
offsetof(Tari__Rpc__SideChainFeature, side_chain_feature_case),
offsetof(Tari__Rpc__SideChainFeature, template_registration),
&tari__rpc__template_registration__descriptor,
NULL,
0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"confidential_output",
3,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_MESSAGE,
offsetof(Tari__Rpc__SideChainFeature, side_chain_feature_case),
offsetof(Tari__Rpc__SideChainFeature, confidential_output),
&tari__rpc__confidential_output_data__descriptor,
NULL,
0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
};
static const unsigned tari__rpc__side_chain_feature__field_indices_by_name[] = {
2, /* field[2] = confidential_output */
1, /* field[1] = template_registration */
0, /* field[0] = validator_node_registration */
};
static const ProtobufCIntRange tari__rpc__side_chain_feature__number_ranges[1 + 1] =
{
{ 1, 0 },
{ 0, 3 }
};
const ProtobufCMessageDescriptor tari__rpc__side_chain_feature__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.SideChainFeature",
"SideChainFeature",
"Tari__Rpc__SideChainFeature",
"tari.rpc",
sizeof(Tari__Rpc__SideChainFeature),
3,
tari__rpc__side_chain_feature__field_descriptors,
tari__rpc__side_chain_feature__field_indices_by_name,
1, tari__rpc__side_chain_feature__number_ranges,
(ProtobufCMessageInit) tari__rpc__side_chain_feature__init,
NULL,NULL,NULL /* reserved[123] */
};
static const ProtobufCFieldDescriptor tari__rpc__validator_node_registration__field_descriptors[2] =
{
{
"public_key",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__ValidatorNodeRegistration, public_key),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"signature",
2,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */
offsetof(Tari__Rpc__ValidatorNodeRegistration, signature),
&tari__rpc__signature__descriptor,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
};
static const unsigned tari__rpc__validator_node_registration__field_indices_by_name[] = {
0, /* field[0] = public_key */
1, /* field[1] = signature */
};
static const ProtobufCIntRange tari__rpc__validator_node_registration__number_ranges[1 + 1] =
{
{ 1, 0 },
{ 0, 2 }
};
const ProtobufCMessageDescriptor tari__rpc__validator_node_registration__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.ValidatorNodeRegistration",
"ValidatorNodeRegistration",
"Tari__Rpc__ValidatorNodeRegistration",
"tari.rpc",
sizeof(Tari__Rpc__ValidatorNodeRegistration),
2,
tari__rpc__validator_node_registration__field_descriptors,
tari__rpc__validator_node_registration__field_indices_by_name,
1, tari__rpc__validator_node_registration__number_ranges,
(ProtobufCMessageInit) tari__rpc__validator_node_registration__init,
NULL,NULL,NULL /* reserved[123] */
};
static const ProtobufCFieldDescriptor tari__rpc__template_registration__field_descriptors[8] =
{
{
"author_public_key",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__TemplateRegistration, author_public_key),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"author_signature",
2,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */
offsetof(Tari__Rpc__TemplateRegistration, author_signature),
&tari__rpc__signature__descriptor,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"template_name",
3,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_STRING,
0, /* quantifier_offset */
offsetof(Tari__Rpc__TemplateRegistration, template_name),
NULL,
&protobuf_c_empty_string,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"template_version",
4,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_UINT32,
0, /* quantifier_offset */
offsetof(Tari__Rpc__TemplateRegistration, template_version),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"template_type",
5,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */
offsetof(Tari__Rpc__TemplateRegistration, template_type),
&tari__rpc__template_type__descriptor,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"build_info",
6,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_MESSAGE,
0, /* quantifier_offset */
offsetof(Tari__Rpc__TemplateRegistration, build_info),
&tari__rpc__build_info__descriptor,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"binary_sha",
7,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__TemplateRegistration, binary_sha),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"binary_url",
8,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_STRING,
0, /* quantifier_offset */
offsetof(Tari__Rpc__TemplateRegistration, binary_url),
NULL,
&protobuf_c_empty_string,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
};
static const unsigned tari__rpc__template_registration__field_indices_by_name[] = {
0, /* field[0] = author_public_key */
1, /* field[1] = author_signature */
6, /* field[6] = binary_sha */
7, /* field[7] = binary_url */
5, /* field[5] = build_info */
2, /* field[2] = template_name */
4, /* field[4] = template_type */
3, /* field[3] = template_version */
};
static const ProtobufCIntRange tari__rpc__template_registration__number_ranges[1 + 1] =
{
{ 1, 0 },
{ 0, 8 }
};
const ProtobufCMessageDescriptor tari__rpc__template_registration__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.TemplateRegistration",
"TemplateRegistration",
"Tari__Rpc__TemplateRegistration",
"tari.rpc",
sizeof(Tari__Rpc__TemplateRegistration),
8,
tari__rpc__template_registration__field_descriptors,
tari__rpc__template_registration__field_indices_by_name,
1, tari__rpc__template_registration__number_ranges,
(ProtobufCMessageInit) tari__rpc__template_registration__init,
NULL,NULL,NULL /* reserved[123] */
};
static const ProtobufCFieldDescriptor tari__rpc__confidential_output_data__field_descriptors[1] =
{
{
"claim_public_key",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__ConfidentialOutputData, claim_public_key),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
};
static const unsigned tari__rpc__confidential_output_data__field_indices_by_name[] = {
0, /* field[0] = claim_public_key */
};
static const ProtobufCIntRange tari__rpc__confidential_output_data__number_ranges[1 + 1] =
{
{ 1, 0 },
{ 0, 1 }
};
const ProtobufCMessageDescriptor tari__rpc__confidential_output_data__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.ConfidentialOutputData",
"ConfidentialOutputData",
"Tari__Rpc__ConfidentialOutputData",
"tari.rpc",
sizeof(Tari__Rpc__ConfidentialOutputData),
1,
tari__rpc__confidential_output_data__field_descriptors,
tari__rpc__confidential_output_data__field_indices_by_name,
1, tari__rpc__confidential_output_data__number_ranges,
(ProtobufCMessageInit) tari__rpc__confidential_output_data__init,
NULL,NULL,NULL /* reserved[123] */
};
static const ProtobufCFieldDescriptor tari__rpc__template_type__field_descriptors[3] =
{
{
"wasm",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_MESSAGE,
offsetof(Tari__Rpc__TemplateType, template_type_case),
offsetof(Tari__Rpc__TemplateType, wasm),
&tari__rpc__wasm_info__descriptor,
NULL,
0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"flow",
2,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_MESSAGE,
offsetof(Tari__Rpc__TemplateType, template_type_case),
offsetof(Tari__Rpc__TemplateType, flow),
&tari__rpc__flow_info__descriptor,
NULL,
0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"manifest",
3,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_MESSAGE,
offsetof(Tari__Rpc__TemplateType, template_type_case),
offsetof(Tari__Rpc__TemplateType, manifest),
&tari__rpc__manifest_info__descriptor,
NULL,
0 | PROTOBUF_C_FIELD_FLAG_ONEOF, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
};
static const unsigned tari__rpc__template_type__field_indices_by_name[] = {
1, /* field[1] = flow */
2, /* field[2] = manifest */
0, /* field[0] = wasm */
};
static const ProtobufCIntRange tari__rpc__template_type__number_ranges[1 + 1] =
{
{ 1, 0 },
{ 0, 3 }
};
const ProtobufCMessageDescriptor tari__rpc__template_type__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.TemplateType",
"TemplateType",
"Tari__Rpc__TemplateType",
"tari.rpc",
sizeof(Tari__Rpc__TemplateType),
3,
tari__rpc__template_type__field_descriptors,
tari__rpc__template_type__field_indices_by_name,
1, tari__rpc__template_type__number_ranges,
(ProtobufCMessageInit) tari__rpc__template_type__init,
NULL,NULL,NULL /* reserved[123] */
};
static const ProtobufCFieldDescriptor tari__rpc__wasm_info__field_descriptors[1] =
{
{
"abi_version",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_UINT32,
0, /* quantifier_offset */
offsetof(Tari__Rpc__WasmInfo, abi_version),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
};
static const unsigned tari__rpc__wasm_info__field_indices_by_name[] = {
0, /* field[0] = abi_version */
};
static const ProtobufCIntRange tari__rpc__wasm_info__number_ranges[1 + 1] =
{
{ 1, 0 },
{ 0, 1 }
};
const ProtobufCMessageDescriptor tari__rpc__wasm_info__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.WasmInfo",
"WasmInfo",
"Tari__Rpc__WasmInfo",
"tari.rpc",
sizeof(Tari__Rpc__WasmInfo),
1,
tari__rpc__wasm_info__field_descriptors,
tari__rpc__wasm_info__field_indices_by_name,
1, tari__rpc__wasm_info__number_ranges,
(ProtobufCMessageInit) tari__rpc__wasm_info__init,
NULL,NULL,NULL /* reserved[123] */
};
#define tari__rpc__flow_info__field_descriptors NULL
#define tari__rpc__flow_info__field_indices_by_name NULL
#define tari__rpc__flow_info__number_ranges NULL
const ProtobufCMessageDescriptor tari__rpc__flow_info__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.FlowInfo",
"FlowInfo",
"Tari__Rpc__FlowInfo",
"tari.rpc",
sizeof(Tari__Rpc__FlowInfo),
0,
tari__rpc__flow_info__field_descriptors,
tari__rpc__flow_info__field_indices_by_name,
0, tari__rpc__flow_info__number_ranges,
(ProtobufCMessageInit) tari__rpc__flow_info__init,
NULL,NULL,NULL /* reserved[123] */
};
#define tari__rpc__manifest_info__field_descriptors NULL
#define tari__rpc__manifest_info__field_indices_by_name NULL
#define tari__rpc__manifest_info__number_ranges NULL
const ProtobufCMessageDescriptor tari__rpc__manifest_info__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.ManifestInfo",
"ManifestInfo",
"Tari__Rpc__ManifestInfo",
"tari.rpc",
sizeof(Tari__Rpc__ManifestInfo),
0,
tari__rpc__manifest_info__field_descriptors,
tari__rpc__manifest_info__field_indices_by_name,
0, tari__rpc__manifest_info__number_ranges,
(ProtobufCMessageInit) tari__rpc__manifest_info__init,
NULL,NULL,NULL /* reserved[123] */
};
static const ProtobufCFieldDescriptor tari__rpc__build_info__field_descriptors[2] =
{
{
"repo_url",
1,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_STRING,
0, /* quantifier_offset */
offsetof(Tari__Rpc__BuildInfo, repo_url),
NULL,
&protobuf_c_empty_string,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"commit_hash",
2,
PROTOBUF_C_LABEL_NONE,
PROTOBUF_C_TYPE_BYTES,
0, /* quantifier_offset */
offsetof(Tari__Rpc__BuildInfo, commit_hash),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
};
static const unsigned tari__rpc__build_info__field_indices_by_name[] = {
1, /* field[1] = commit_hash */
0, /* field[0] = repo_url */
};
static const ProtobufCIntRange tari__rpc__build_info__number_ranges[1 + 1] =
{
{ 1, 0 },
{ 0, 2 }
};
const ProtobufCMessageDescriptor tari__rpc__build_info__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"tari.rpc.BuildInfo",
"BuildInfo",
"Tari__Rpc__BuildInfo",
"tari.rpc",
sizeof(Tari__Rpc__BuildInfo),
2,
tari__rpc__build_info__field_descriptors,
tari__rpc__build_info__field_indices_by_name,
1, tari__rpc__build_info__number_ranges,
(ProtobufCMessageInit) tari__rpc__build_info__init,
NULL,NULL,NULL /* reserved[123] */
};

@ -0,0 +1,377 @@
/* Generated by the protocol buffer compiler. DO NOT EDIT! */
/* Generated from: sidechain_types.proto */
#ifndef PROTOBUF_C_sidechain_5ftypes_2eproto__INCLUDED
#define PROTOBUF_C_sidechain_5ftypes_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
#include "types.pb-c.h"
typedef struct _Tari__Rpc__SideChainFeature Tari__Rpc__SideChainFeature;
typedef struct _Tari__Rpc__ValidatorNodeRegistration Tari__Rpc__ValidatorNodeRegistration;
typedef struct _Tari__Rpc__TemplateRegistration Tari__Rpc__TemplateRegistration;
typedef struct _Tari__Rpc__ConfidentialOutputData Tari__Rpc__ConfidentialOutputData;
typedef struct _Tari__Rpc__TemplateType Tari__Rpc__TemplateType;
typedef struct _Tari__Rpc__WasmInfo Tari__Rpc__WasmInfo;
typedef struct _Tari__Rpc__FlowInfo Tari__Rpc__FlowInfo;
typedef struct _Tari__Rpc__ManifestInfo Tari__Rpc__ManifestInfo;
typedef struct _Tari__Rpc__BuildInfo Tari__Rpc__BuildInfo;
/* --- enums --- */
/* --- messages --- */
typedef enum {
TARI__RPC__SIDE_CHAIN_FEATURE__SIDE_CHAIN_FEATURE__NOT_SET = 0,
TARI__RPC__SIDE_CHAIN_FEATURE__SIDE_CHAIN_FEATURE_VALIDATOR_NODE_REGISTRATION = 1,
TARI__RPC__SIDE_CHAIN_FEATURE__SIDE_CHAIN_FEATURE_TEMPLATE_REGISTRATION = 2,
TARI__RPC__SIDE_CHAIN_FEATURE__SIDE_CHAIN_FEATURE_CONFIDENTIAL_OUTPUT = 3
PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(TARI__RPC__SIDE_CHAIN_FEATURE__SIDE_CHAIN_FEATURE)
} Tari__Rpc__SideChainFeature__SideChainFeatureCase;
struct _Tari__Rpc__SideChainFeature
{
ProtobufCMessage base;
Tari__Rpc__SideChainFeature__SideChainFeatureCase side_chain_feature_case;
union {
Tari__Rpc__ValidatorNodeRegistration *validator_node_registration;
Tari__Rpc__TemplateRegistration *template_registration;
Tari__Rpc__ConfidentialOutputData *confidential_output;
};
};
#define TARI__RPC__SIDE_CHAIN_FEATURE__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__side_chain_feature__descriptor) \
, TARI__RPC__SIDE_CHAIN_FEATURE__SIDE_CHAIN_FEATURE__NOT_SET, {0} }
struct _Tari__Rpc__ValidatorNodeRegistration
{
ProtobufCMessage base;
ProtobufCBinaryData public_key;
Tari__Rpc__Signature *signature;
};
#define TARI__RPC__VALIDATOR_NODE_REGISTRATION__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__validator_node_registration__descriptor) \
, {0,NULL}, NULL }
struct _Tari__Rpc__TemplateRegistration
{
ProtobufCMessage base;
ProtobufCBinaryData author_public_key;
Tari__Rpc__Signature *author_signature;
char *template_name;
uint32_t template_version;
Tari__Rpc__TemplateType *template_type;
Tari__Rpc__BuildInfo *build_info;
ProtobufCBinaryData binary_sha;
char *binary_url;
};
#define TARI__RPC__TEMPLATE_REGISTRATION__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__template_registration__descriptor) \
, {0,NULL}, NULL, (char *)protobuf_c_empty_string, 0, NULL, NULL, {0,NULL}, (char *)protobuf_c_empty_string }
struct _Tari__Rpc__ConfidentialOutputData
{
ProtobufCMessage base;
ProtobufCBinaryData claim_public_key;
};
#define TARI__RPC__CONFIDENTIAL_OUTPUT_DATA__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__confidential_output_data__descriptor) \
, {0,NULL} }
typedef enum {
TARI__RPC__TEMPLATE_TYPE__TEMPLATE_TYPE__NOT_SET = 0,
TARI__RPC__TEMPLATE_TYPE__TEMPLATE_TYPE_WASM = 1,
TARI__RPC__TEMPLATE_TYPE__TEMPLATE_TYPE_FLOW = 2,
TARI__RPC__TEMPLATE_TYPE__TEMPLATE_TYPE_MANIFEST = 3
PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(TARI__RPC__TEMPLATE_TYPE__TEMPLATE_TYPE)
} Tari__Rpc__TemplateType__TemplateTypeCase;
struct _Tari__Rpc__TemplateType
{
ProtobufCMessage base;
Tari__Rpc__TemplateType__TemplateTypeCase template_type_case;
union {
Tari__Rpc__WasmInfo *wasm;
Tari__Rpc__FlowInfo *flow;
Tari__Rpc__ManifestInfo *manifest;
};
};
#define TARI__RPC__TEMPLATE_TYPE__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__template_type__descriptor) \
, TARI__RPC__TEMPLATE_TYPE__TEMPLATE_TYPE__NOT_SET, {0} }
struct _Tari__Rpc__WasmInfo
{
ProtobufCMessage base;
uint32_t abi_version;
};
#define TARI__RPC__WASM_INFO__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__wasm_info__descriptor) \
, 0 }
struct _Tari__Rpc__FlowInfo
{
ProtobufCMessage base;
};
#define TARI__RPC__FLOW_INFO__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__flow_info__descriptor) \
}
struct _Tari__Rpc__ManifestInfo
{
ProtobufCMessage base;
};
#define TARI__RPC__MANIFEST_INFO__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__manifest_info__descriptor) \
}
struct _Tari__Rpc__BuildInfo
{
ProtobufCMessage base;
char *repo_url;
ProtobufCBinaryData commit_hash;
};
#define TARI__RPC__BUILD_INFO__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__build_info__descriptor) \
, (char *)protobuf_c_empty_string, {0,NULL} }
/* Tari__Rpc__SideChainFeature methods */
void tari__rpc__side_chain_feature__init
(Tari__Rpc__SideChainFeature *message);
size_t tari__rpc__side_chain_feature__get_packed_size
(const Tari__Rpc__SideChainFeature *message);
size_t tari__rpc__side_chain_feature__pack
(const Tari__Rpc__SideChainFeature *message,
uint8_t *out);
size_t tari__rpc__side_chain_feature__pack_to_buffer
(const Tari__Rpc__SideChainFeature *message,
ProtobufCBuffer *buffer);
Tari__Rpc__SideChainFeature *
tari__rpc__side_chain_feature__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__side_chain_feature__free_unpacked
(Tari__Rpc__SideChainFeature *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__ValidatorNodeRegistration methods */
void tari__rpc__validator_node_registration__init
(Tari__Rpc__ValidatorNodeRegistration *message);
size_t tari__rpc__validator_node_registration__get_packed_size
(const Tari__Rpc__ValidatorNodeRegistration *message);
size_t tari__rpc__validator_node_registration__pack
(const Tari__Rpc__ValidatorNodeRegistration *message,
uint8_t *out);
size_t tari__rpc__validator_node_registration__pack_to_buffer
(const Tari__Rpc__ValidatorNodeRegistration *message,
ProtobufCBuffer *buffer);
Tari__Rpc__ValidatorNodeRegistration *
tari__rpc__validator_node_registration__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__validator_node_registration__free_unpacked
(Tari__Rpc__ValidatorNodeRegistration *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__TemplateRegistration methods */
void tari__rpc__template_registration__init
(Tari__Rpc__TemplateRegistration *message);
size_t tari__rpc__template_registration__get_packed_size
(const Tari__Rpc__TemplateRegistration *message);
size_t tari__rpc__template_registration__pack
(const Tari__Rpc__TemplateRegistration *message,
uint8_t *out);
size_t tari__rpc__template_registration__pack_to_buffer
(const Tari__Rpc__TemplateRegistration *message,
ProtobufCBuffer *buffer);
Tari__Rpc__TemplateRegistration *
tari__rpc__template_registration__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__template_registration__free_unpacked
(Tari__Rpc__TemplateRegistration *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__ConfidentialOutputData methods */
void tari__rpc__confidential_output_data__init
(Tari__Rpc__ConfidentialOutputData *message);
size_t tari__rpc__confidential_output_data__get_packed_size
(const Tari__Rpc__ConfidentialOutputData *message);
size_t tari__rpc__confidential_output_data__pack
(const Tari__Rpc__ConfidentialOutputData *message,
uint8_t *out);
size_t tari__rpc__confidential_output_data__pack_to_buffer
(const Tari__Rpc__ConfidentialOutputData *message,
ProtobufCBuffer *buffer);
Tari__Rpc__ConfidentialOutputData *
tari__rpc__confidential_output_data__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__confidential_output_data__free_unpacked
(Tari__Rpc__ConfidentialOutputData *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__TemplateType methods */
void tari__rpc__template_type__init
(Tari__Rpc__TemplateType *message);
size_t tari__rpc__template_type__get_packed_size
(const Tari__Rpc__TemplateType *message);
size_t tari__rpc__template_type__pack
(const Tari__Rpc__TemplateType *message,
uint8_t *out);
size_t tari__rpc__template_type__pack_to_buffer
(const Tari__Rpc__TemplateType *message,
ProtobufCBuffer *buffer);
Tari__Rpc__TemplateType *
tari__rpc__template_type__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__template_type__free_unpacked
(Tari__Rpc__TemplateType *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__WasmInfo methods */
void tari__rpc__wasm_info__init
(Tari__Rpc__WasmInfo *message);
size_t tari__rpc__wasm_info__get_packed_size
(const Tari__Rpc__WasmInfo *message);
size_t tari__rpc__wasm_info__pack
(const Tari__Rpc__WasmInfo *message,
uint8_t *out);
size_t tari__rpc__wasm_info__pack_to_buffer
(const Tari__Rpc__WasmInfo *message,
ProtobufCBuffer *buffer);
Tari__Rpc__WasmInfo *
tari__rpc__wasm_info__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__wasm_info__free_unpacked
(Tari__Rpc__WasmInfo *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__FlowInfo methods */
void tari__rpc__flow_info__init
(Tari__Rpc__FlowInfo *message);
size_t tari__rpc__flow_info__get_packed_size
(const Tari__Rpc__FlowInfo *message);
size_t tari__rpc__flow_info__pack
(const Tari__Rpc__FlowInfo *message,
uint8_t *out);
size_t tari__rpc__flow_info__pack_to_buffer
(const Tari__Rpc__FlowInfo *message,
ProtobufCBuffer *buffer);
Tari__Rpc__FlowInfo *
tari__rpc__flow_info__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__flow_info__free_unpacked
(Tari__Rpc__FlowInfo *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__ManifestInfo methods */
void tari__rpc__manifest_info__init
(Tari__Rpc__ManifestInfo *message);
size_t tari__rpc__manifest_info__get_packed_size
(const Tari__Rpc__ManifestInfo *message);
size_t tari__rpc__manifest_info__pack
(const Tari__Rpc__ManifestInfo *message,
uint8_t *out);
size_t tari__rpc__manifest_info__pack_to_buffer
(const Tari__Rpc__ManifestInfo *message,
ProtobufCBuffer *buffer);
Tari__Rpc__ManifestInfo *
tari__rpc__manifest_info__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__manifest_info__free_unpacked
(Tari__Rpc__ManifestInfo *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__BuildInfo methods */
void tari__rpc__build_info__init
(Tari__Rpc__BuildInfo *message);
size_t tari__rpc__build_info__get_packed_size
(const Tari__Rpc__BuildInfo *message);
size_t tari__rpc__build_info__pack
(const Tari__Rpc__BuildInfo *message,
uint8_t *out);
size_t tari__rpc__build_info__pack_to_buffer
(const Tari__Rpc__BuildInfo *message,
ProtobufCBuffer *buffer);
Tari__Rpc__BuildInfo *
tari__rpc__build_info__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__build_info__free_unpacked
(Tari__Rpc__BuildInfo *message,
ProtobufCAllocator *allocator);
/* --- per-message closures --- */
typedef void (*Tari__Rpc__SideChainFeature_Closure)
(const Tari__Rpc__SideChainFeature *message,
void *closure_data);
typedef void (*Tari__Rpc__ValidatorNodeRegistration_Closure)
(const Tari__Rpc__ValidatorNodeRegistration *message,
void *closure_data);
typedef void (*Tari__Rpc__TemplateRegistration_Closure)
(const Tari__Rpc__TemplateRegistration *message,
void *closure_data);
typedef void (*Tari__Rpc__ConfidentialOutputData_Closure)
(const Tari__Rpc__ConfidentialOutputData *message,
void *closure_data);
typedef void (*Tari__Rpc__TemplateType_Closure)
(const Tari__Rpc__TemplateType *message,
void *closure_data);
typedef void (*Tari__Rpc__WasmInfo_Closure)
(const Tari__Rpc__WasmInfo *message,
void *closure_data);
typedef void (*Tari__Rpc__FlowInfo_Closure)
(const Tari__Rpc__FlowInfo *message,
void *closure_data);
typedef void (*Tari__Rpc__ManifestInfo_Closure)
(const Tari__Rpc__ManifestInfo *message,
void *closure_data);
typedef void (*Tari__Rpc__BuildInfo_Closure)
(const Tari__Rpc__BuildInfo *message,
void *closure_data);
/* --- services --- */
/* --- descriptors --- */
extern const ProtobufCMessageDescriptor tari__rpc__side_chain_feature__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__validator_node_registration__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__template_registration__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__confidential_output_data__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__template_type__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__wasm_info__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__flow_info__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__manifest_info__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__build_info__descriptor;
PROTOBUF_C__END_DECLS
#endif /* PROTOBUF_C_sidechain_5ftypes_2eproto__INCLUDED */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,525 @@
/* Generated by the protocol buffer compiler. DO NOT EDIT! */
/* Generated from: transaction.proto */
#ifndef PROTOBUF_C_transaction_2eproto__INCLUDED
#define PROTOBUF_C_transaction_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
#include "types.pb-c.h"
#include "sidechain_types.pb-c.h"
typedef struct _Tari__Rpc__TransactionKernel Tari__Rpc__TransactionKernel;
typedef struct _Tari__Rpc__TransactionInput Tari__Rpc__TransactionInput;
typedef struct _Tari__Rpc__TransactionOutput Tari__Rpc__TransactionOutput;
typedef struct _Tari__Rpc__OutputFeatures Tari__Rpc__OutputFeatures;
typedef struct _Tari__Rpc__AggregateBody Tari__Rpc__AggregateBody;
typedef struct _Tari__Rpc__Transaction Tari__Rpc__Transaction;
typedef struct _Tari__Rpc__UnblindedOutput Tari__Rpc__UnblindedOutput;
/* --- enums --- */
/* --- messages --- */
/*
* 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 _Tari__Rpc__TransactionKernel
{
ProtobufCMessage base;
/*
* Options for a kernel's structure or use
*/
uint32_t features;
/*
* / Fee originally included in the transaction this proof is for (in MicroMinotari)
*/
uint64_t fee;
/*
* This kernel is not valid earlier than lock_height blocks
* The max lock_height of all *inputs* to this transaction
*/
uint64_t lock_height;
/*
* Remainder of the sum of all transaction commitments. If the transaction
* is well formed, amounts components should sum to zero and the excess
* is hence a valid public key.
*/
ProtobufCBinaryData excess;
/*
* The signature proving the excess is a valid public key, which signs
* the transaction fee.
*/
Tari__Rpc__Signature *excess_sig;
/*
* The hash of the kernel, as it appears in the MMR
*/
ProtobufCBinaryData hash;
/*
* Version
*/
uint32_t version;
/*
* Optional burned commitment
*/
ProtobufCBinaryData burn_commitment;
};
#define TARI__RPC__TRANSACTION_KERNEL__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__transaction_kernel__descriptor) \
, 0, 0, 0, {0,NULL}, NULL, {0,NULL}, 0, {0,NULL} }
/*
* A transaction input.
* Primarily a reference to an output being spent by the transaction.
*/
struct _Tari__Rpc__TransactionInput
{
ProtobufCMessage base;
/*
* The features of the output being spent. We will check maturity for all outputs.
*/
Tari__Rpc__OutputFeatures *features;
/*
* The commitment referencing the output being spent.
*/
ProtobufCBinaryData commitment;
/*
* Hash of the input, as it appears in the MMR
*/
ProtobufCBinaryData hash;
/*
* The serialised script
*/
ProtobufCBinaryData script;
/*
* The script input data, if any
*/
ProtobufCBinaryData input_data;
/*
* A signature with k_s, signing the script, input data, and mined height
*/
Tari__Rpc__ComAndPubSignature *script_signature;
/*
* The offset public key, K_O
*/
ProtobufCBinaryData sender_offset_public_key;
/*
* The hash of the output this input is spending
*/
ProtobufCBinaryData output_hash;
/*
* Covenant
*/
ProtobufCBinaryData covenant;
/*
* Version
*/
uint32_t version;
/*
* The encrypted data
*/
ProtobufCBinaryData encrypted_data;
/*
* The minimum value of the commitment that is proven by the range proof (in MicroMinotari)
*/
uint64_t minimum_value_promise;
/*
* The metadata signature for output this input is spending
*/
Tari__Rpc__ComAndPubSignature *metadata_signature;
/*
* The rangeproof hash for output this input is spending
*/
ProtobufCBinaryData rangeproof_hash;
};
#define TARI__RPC__TRANSACTION_INPUT__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__transaction_input__descriptor) \
, NULL, {0,NULL}, {0,NULL}, {0,NULL}, {0,NULL}, NULL, {0,NULL}, {0,NULL}, {0,NULL}, 0, {0,NULL}, 0, NULL, {0,NULL} }
/*
* Output for a transaction, defining the new ownership of coins that are being transferred. The commitment is a
* blinded value for the output while the range proof guarantees the commitment includes a positive value without
* overflow and the ownership of the private key.
*/
struct _Tari__Rpc__TransactionOutput
{
ProtobufCMessage base;
/*
* Options for an output's structure or use
*/
Tari__Rpc__OutputFeatures *features;
/*
* The homomorphic commitment representing the output amount
*/
ProtobufCBinaryData commitment;
/*
* A proof that the commitment is in the right range
*/
Tari__Rpc__RangeProof *range_proof;
/*
* The hash of the output, as it appears in the MMR
*/
ProtobufCBinaryData hash;
/*
* Tari script serialised script
*/
ProtobufCBinaryData script;
/*
* Tari script offset public key, K_O
*/
ProtobufCBinaryData sender_offset_public_key;
/*
* Metadata signature with the homomorphic commitment private values (amount and blinding factor) and the sender
* offset private key
*/
Tari__Rpc__ComAndPubSignature *metadata_signature;
/*
* Covenant
*/
ProtobufCBinaryData covenant;
/*
* Version
*/
uint32_t version;
/*
* Encrypted Pedersen commitment openings (value and mask) for the output
*/
ProtobufCBinaryData encrypted_data;
/*
* The minimum value of the commitment that is proven by the range proof (in MicroMinotari)
*/
uint64_t minimum_value_promise;
};
#define TARI__RPC__TRANSACTION_OUTPUT__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__transaction_output__descriptor) \
, NULL, {0,NULL}, NULL, {0,NULL}, {0,NULL}, {0,NULL}, NULL, {0,NULL}, 0, {0,NULL}, 0 }
/*
* Options for UTXOs
*/
struct _Tari__Rpc__OutputFeatures
{
ProtobufCMessage base;
/*
* Version
*/
uint32_t version;
/*
* The type of output, eg Coinbase, all of which have different consensus rules
*/
uint32_t output_type;
/*
* The maturity of the specific UTXO. This is the min lock height at which an UTXO can be spend. Coinbase UTXO
* require a min maturity of the Coinbase_lock_height, this should be checked on receiving new blocks.
*/
uint64_t maturity;
/*
* Additional arbitrary info in coinbase transactions supplied by miners
*/
ProtobufCBinaryData coinbase_extra;
/*
* Features that are specific to a side chain
*/
Tari__Rpc__SideChainFeature *sidechain_feature;
/*
* The type of range proof used in the output
*/
uint32_t range_proof_type;
};
#define TARI__RPC__OUTPUT_FEATURES__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__output_features__descriptor) \
, 0, 0, 0, {0,NULL}, NULL, 0 }
/*
* The components of the block or transaction. The same struct can be used for either, since in Mimblewimble,
* cut-through means that blocks and transactions have the same structure. The inputs, outputs and kernels should
* be sorted by their Blake2b-256bit digest hash
*/
struct _Tari__Rpc__AggregateBody
{
ProtobufCMessage base;
/*
* List of inputs spent by the transaction.
*/
size_t n_inputs;
Tari__Rpc__TransactionInput **inputs;
/*
* List of outputs the transaction produces.
*/
size_t n_outputs;
Tari__Rpc__TransactionOutput **outputs;
/*
* Kernels contain the excesses and their signatures for transaction
*/
size_t n_kernels;
Tari__Rpc__TransactionKernel **kernels;
};
#define TARI__RPC__AGGREGATE_BODY__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__aggregate_body__descriptor) \
, 0,NULL, 0,NULL, 0,NULL }
/*
* A transaction which consists of a kernel offset and an aggregate body made up of inputs, outputs and kernels.
*/
struct _Tari__Rpc__Transaction
{
ProtobufCMessage base;
ProtobufCBinaryData offset;
Tari__Rpc__AggregateBody *body;
ProtobufCBinaryData script_offset;
};
#define TARI__RPC__TRANSACTION__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__transaction__descriptor) \
, {0,NULL}, NULL, {0,NULL} }
struct _Tari__Rpc__UnblindedOutput
{
ProtobufCMessage base;
/*
* Value of the output
*/
uint64_t value;
/*
* Spending key of the output
*/
ProtobufCBinaryData spending_key;
/*
* Options for an output's structure or use
*/
Tari__Rpc__OutputFeatures *features;
/*
* Tari script serialised script
*/
ProtobufCBinaryData script;
/*
* Tari script input data for spending
*/
ProtobufCBinaryData input_data;
/*
* Tari script private key
*/
ProtobufCBinaryData script_private_key;
/*
* Tari script offset pubkey, K_O
*/
ProtobufCBinaryData sender_offset_public_key;
/*
* UTXO signature with the script offset private key, k_O
*/
Tari__Rpc__ComAndPubSignature *metadata_signature;
/*
* The minimum height the script allows this output to be spent
*/
uint64_t script_lock_height;
/*
* Covenant
*/
ProtobufCBinaryData covenant;
/*
* Encrypted data
*/
ProtobufCBinaryData encrypted_data;
/*
* The minimum value of the commitment that is proven by the range proof (in MicroMinotari)
*/
uint64_t minimum_value_promise;
};
#define TARI__RPC__UNBLINDED_OUTPUT__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__unblinded_output__descriptor) \
, 0, {0,NULL}, NULL, {0,NULL}, {0,NULL}, {0,NULL}, {0,NULL}, NULL, 0, {0,NULL}, {0,NULL}, 0 }
/* Tari__Rpc__TransactionKernel methods */
void tari__rpc__transaction_kernel__init
(Tari__Rpc__TransactionKernel *message);
size_t tari__rpc__transaction_kernel__get_packed_size
(const Tari__Rpc__TransactionKernel *message);
size_t tari__rpc__transaction_kernel__pack
(const Tari__Rpc__TransactionKernel *message,
uint8_t *out);
size_t tari__rpc__transaction_kernel__pack_to_buffer
(const Tari__Rpc__TransactionKernel *message,
ProtobufCBuffer *buffer);
Tari__Rpc__TransactionKernel *
tari__rpc__transaction_kernel__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__transaction_kernel__free_unpacked
(Tari__Rpc__TransactionKernel *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__TransactionInput methods */
void tari__rpc__transaction_input__init
(Tari__Rpc__TransactionInput *message);
size_t tari__rpc__transaction_input__get_packed_size
(const Tari__Rpc__TransactionInput *message);
size_t tari__rpc__transaction_input__pack
(const Tari__Rpc__TransactionInput *message,
uint8_t *out);
size_t tari__rpc__transaction_input__pack_to_buffer
(const Tari__Rpc__TransactionInput *message,
ProtobufCBuffer *buffer);
Tari__Rpc__TransactionInput *
tari__rpc__transaction_input__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__transaction_input__free_unpacked
(Tari__Rpc__TransactionInput *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__TransactionOutput methods */
void tari__rpc__transaction_output__init
(Tari__Rpc__TransactionOutput *message);
size_t tari__rpc__transaction_output__get_packed_size
(const Tari__Rpc__TransactionOutput *message);
size_t tari__rpc__transaction_output__pack
(const Tari__Rpc__TransactionOutput *message,
uint8_t *out);
size_t tari__rpc__transaction_output__pack_to_buffer
(const Tari__Rpc__TransactionOutput *message,
ProtobufCBuffer *buffer);
Tari__Rpc__TransactionOutput *
tari__rpc__transaction_output__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__transaction_output__free_unpacked
(Tari__Rpc__TransactionOutput *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__OutputFeatures methods */
void tari__rpc__output_features__init
(Tari__Rpc__OutputFeatures *message);
size_t tari__rpc__output_features__get_packed_size
(const Tari__Rpc__OutputFeatures *message);
size_t tari__rpc__output_features__pack
(const Tari__Rpc__OutputFeatures *message,
uint8_t *out);
size_t tari__rpc__output_features__pack_to_buffer
(const Tari__Rpc__OutputFeatures *message,
ProtobufCBuffer *buffer);
Tari__Rpc__OutputFeatures *
tari__rpc__output_features__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__output_features__free_unpacked
(Tari__Rpc__OutputFeatures *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__AggregateBody methods */
void tari__rpc__aggregate_body__init
(Tari__Rpc__AggregateBody *message);
size_t tari__rpc__aggregate_body__get_packed_size
(const Tari__Rpc__AggregateBody *message);
size_t tari__rpc__aggregate_body__pack
(const Tari__Rpc__AggregateBody *message,
uint8_t *out);
size_t tari__rpc__aggregate_body__pack_to_buffer
(const Tari__Rpc__AggregateBody *message,
ProtobufCBuffer *buffer);
Tari__Rpc__AggregateBody *
tari__rpc__aggregate_body__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__aggregate_body__free_unpacked
(Tari__Rpc__AggregateBody *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__Transaction methods */
void tari__rpc__transaction__init
(Tari__Rpc__Transaction *message);
size_t tari__rpc__transaction__get_packed_size
(const Tari__Rpc__Transaction *message);
size_t tari__rpc__transaction__pack
(const Tari__Rpc__Transaction *message,
uint8_t *out);
size_t tari__rpc__transaction__pack_to_buffer
(const Tari__Rpc__Transaction *message,
ProtobufCBuffer *buffer);
Tari__Rpc__Transaction *
tari__rpc__transaction__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__transaction__free_unpacked
(Tari__Rpc__Transaction *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__UnblindedOutput methods */
void tari__rpc__unblinded_output__init
(Tari__Rpc__UnblindedOutput *message);
size_t tari__rpc__unblinded_output__get_packed_size
(const Tari__Rpc__UnblindedOutput *message);
size_t tari__rpc__unblinded_output__pack
(const Tari__Rpc__UnblindedOutput *message,
uint8_t *out);
size_t tari__rpc__unblinded_output__pack_to_buffer
(const Tari__Rpc__UnblindedOutput *message,
ProtobufCBuffer *buffer);
Tari__Rpc__UnblindedOutput *
tari__rpc__unblinded_output__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__unblinded_output__free_unpacked
(Tari__Rpc__UnblindedOutput *message,
ProtobufCAllocator *allocator);
/* --- per-message closures --- */
typedef void (*Tari__Rpc__TransactionKernel_Closure)
(const Tari__Rpc__TransactionKernel *message,
void *closure_data);
typedef void (*Tari__Rpc__TransactionInput_Closure)
(const Tari__Rpc__TransactionInput *message,
void *closure_data);
typedef void (*Tari__Rpc__TransactionOutput_Closure)
(const Tari__Rpc__TransactionOutput *message,
void *closure_data);
typedef void (*Tari__Rpc__OutputFeatures_Closure)
(const Tari__Rpc__OutputFeatures *message,
void *closure_data);
typedef void (*Tari__Rpc__AggregateBody_Closure)
(const Tari__Rpc__AggregateBody *message,
void *closure_data);
typedef void (*Tari__Rpc__Transaction_Closure)
(const Tari__Rpc__Transaction *message,
void *closure_data);
typedef void (*Tari__Rpc__UnblindedOutput_Closure)
(const Tari__Rpc__UnblindedOutput *message,
void *closure_data);
/* --- services --- */
/* --- descriptors --- */
extern const ProtobufCMessageDescriptor tari__rpc__transaction_kernel__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__transaction_input__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__transaction_output__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__output_features__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__aggregate_body__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__transaction__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__unblinded_output__descriptor;
PROTOBUF_C__END_DECLS
#endif /* PROTOBUF_C_transaction_2eproto__INCLUDED */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,570 @@
/* Generated by the protocol buffer compiler. DO NOT EDIT! */
/* Generated from: types.proto */
#ifndef PROTOBUF_C_types_2eproto__INCLUDED
#define PROTOBUF_C_types_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 _Tari__Rpc__Range Tari__Rpc__Range;
typedef struct _Tari__Rpc__Empty Tari__Rpc__Empty;
typedef struct _Tari__Rpc__BlockHeight Tari__Rpc__BlockHeight;
typedef struct _Tari__Rpc__Signature Tari__Rpc__Signature;
typedef struct _Tari__Rpc__ComAndPubSignature Tari__Rpc__ComAndPubSignature;
typedef struct _Tari__Rpc__CommitmentSignature Tari__Rpc__CommitmentSignature;
typedef struct _Tari__Rpc__PowAlgorithmConstants Tari__Rpc__PowAlgorithmConstants;
typedef struct _Tari__Rpc__WeightParams Tari__Rpc__WeightParams;
typedef struct _Tari__Rpc__OutputsVersion Tari__Rpc__OutputsVersion;
typedef struct _Tari__Rpc__PermittedRangeProofs Tari__Rpc__PermittedRangeProofs;
typedef struct _Tari__Rpc__RangeProof Tari__Rpc__RangeProof;
typedef struct _Tari__Rpc__ConsensusConstants Tari__Rpc__ConsensusConstants;
typedef struct _Tari__Rpc__ConsensusConstants__ProofOfWorkEntry Tari__Rpc__ConsensusConstants__ProofOfWorkEntry;
/* --- enums --- */
/*
* / Output types
*/
typedef enum _Tari__Rpc__OutputType {
TARI__RPC__OUTPUT_TYPE__STANDARD = 0,
TARI__RPC__OUTPUT_TYPE__COINBASE = 1,
TARI__RPC__OUTPUT_TYPE__BURN = 2,
TARI__RPC__OUTPUT_TYPE__VALIDATOR_NODE_REGISTRATION = 3,
TARI__RPC__OUTPUT_TYPE__CODE_TEMPLATE_REGISTRATION = 4
PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(TARI__RPC__OUTPUT_TYPE)
} Tari__Rpc__OutputType;
/*
* / Range proof types
*/
typedef enum _Tari__Rpc__RangeProofType {
TARI__RPC__RANGE_PROOF_TYPE__BULLETPROOF_PLUS = 0,
TARI__RPC__RANGE_PROOF_TYPE__REVEALED_VALUE = 1
PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(TARI__RPC__RANGE_PROOF_TYPE)
} Tari__Rpc__RangeProofType;
/* --- messages --- */
/*
* / An unsigned range interface to more accurately represent Rust native Range's
*/
struct _Tari__Rpc__Range
{
ProtobufCMessage base;
uint64_t min;
uint64_t max;
};
#define TARI__RPC__RANGE__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__range__descriptor) \
, 0, 0 }
/*
* / An Empty placeholder for endpoints without request parameters
*/
struct _Tari__Rpc__Empty
{
ProtobufCMessage base;
};
#define TARI__RPC__EMPTY__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__empty__descriptor) \
}
/*
* / Define an interface for block height
*/
struct _Tari__Rpc__BlockHeight
{
ProtobufCMessage base;
uint64_t block_height;
};
#define TARI__RPC__BLOCK_HEIGHT__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__block_height__descriptor) \
, 0 }
/*
* Define the explicit Signature implementation for the Minotari base layer. A different signature scheme can be
* employed by redefining this type.
*/
struct _Tari__Rpc__Signature
{
ProtobufCMessage base;
ProtobufCBinaryData public_nonce;
ProtobufCBinaryData signature;
};
#define TARI__RPC__SIGNATURE__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__signature__descriptor) \
, {0,NULL}, {0,NULL} }
/*
* Define the explicit ComAndPubSignature implementation for the Minotari base layer. A different signature scheme can be
* employed by redefining this type.
*/
struct _Tari__Rpc__ComAndPubSignature
{
ProtobufCMessage base;
ProtobufCBinaryData ephemeral_commitment;
ProtobufCBinaryData ephemeral_pubkey;
ProtobufCBinaryData u_a;
ProtobufCBinaryData u_x;
ProtobufCBinaryData u_y;
};
#define TARI__RPC__COM_AND_PUB_SIGNATURE__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__com_and_pub_signature__descriptor) \
, {0,NULL}, {0,NULL}, {0,NULL}, {0,NULL}, {0,NULL} }
/*
* Define the explicit CommitmentSignature implementation for the Minotari base layer. A different signature scheme can be
* employed by redefining this type
*/
struct _Tari__Rpc__CommitmentSignature
{
ProtobufCMessage base;
ProtobufCBinaryData public_nonce;
ProtobufCBinaryData u;
ProtobufCBinaryData v;
};
#define TARI__RPC__COMMITMENT_SIGNATURE__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__commitment_signature__descriptor) \
, {0,NULL}, {0,NULL}, {0,NULL} }
/*
* / PoW Algorithm constants
*/
struct _Tari__Rpc__PowAlgorithmConstants
{
ProtobufCMessage base;
uint64_t min_difficulty;
uint64_t max_difficulty;
uint64_t target_time;
};
#define TARI__RPC__POW_ALGORITHM_CONSTANTS__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__pow_algorithm_constants__descriptor) \
, 0, 0, 0 }
/*
* / Weight params
*/
struct _Tari__Rpc__WeightParams
{
ProtobufCMessage base;
uint64_t kernel_weight;
uint64_t input_weight;
uint64_t output_weight;
uint64_t features_and_scripts_bytes_per_gram;
};
#define TARI__RPC__WEIGHT_PARAMS__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__weight_params__descriptor) \
, 0, 0, 0, 0 }
/*
* / Output version
*/
struct _Tari__Rpc__OutputsVersion
{
ProtobufCMessage base;
Tari__Rpc__Range *outputs;
Tari__Rpc__Range *features;
};
#define TARI__RPC__OUTPUTS_VERSION__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__outputs_version__descriptor) \
, NULL, NULL }
struct _Tari__Rpc__PermittedRangeProofs
{
ProtobufCMessage base;
Tari__Rpc__OutputType output_type;
size_t n_range_proof_types;
Tari__Rpc__RangeProofType *range_proof_types;
};
#define TARI__RPC__PERMITTED_RANGE_PROOFS__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__permitted_range_proofs__descriptor) \
, TARI__RPC__OUTPUT_TYPE__STANDARD, 0,NULL }
/*
* / Range proof
*/
struct _Tari__Rpc__RangeProof
{
ProtobufCMessage base;
ProtobufCBinaryData proof_bytes;
};
#define TARI__RPC__RANGE_PROOF__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__range_proof__descriptor) \
, {0,NULL} }
struct _Tari__Rpc__ConsensusConstants__ProofOfWorkEntry
{
ProtobufCMessage base;
uint32_t key;
Tari__Rpc__PowAlgorithmConstants *value;
};
#define TARI__RPC__CONSENSUS_CONSTANTS__PROOF_OF_WORK_ENTRY__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__consensus_constants__proof_of_work_entry__descriptor) \
, 0, NULL }
/*
* / Consensus Constants response
*/
struct _Tari__Rpc__ConsensusConstants
{
ProtobufCMessage base;
uint64_t coinbase_min_maturity;
uint32_t blockchain_version;
uint64_t future_time_limit;
uint64_t difficulty_block_window;
uint64_t max_block_transaction_weight;
uint64_t pow_algo_count;
uint64_t median_timestamp_count;
uint64_t emission_initial;
size_t n_emission_decay;
uint64_t *emission_decay;
uint64_t emission_tail;
uint64_t min_sha3x_pow_difficulty;
uint64_t block_weight_inputs;
uint64_t block_weight_outputs;
uint64_t block_weight_kernels;
uint64_t faucet_value;
uint64_t max_script_byte_size;
uint64_t validator_node_validity_period;
uint64_t effective_from_height;
Tari__Rpc__Range *valid_blockchain_version_range;
uint64_t max_randomx_seed_height;
size_t n_proof_of_work;
Tari__Rpc__ConsensusConstants__ProofOfWorkEntry **proof_of_work;
Tari__Rpc__WeightParams *transaction_weight;
Tari__Rpc__Range *input_version_range;
Tari__Rpc__OutputsVersion *output_version_range;
Tari__Rpc__Range *kernel_version_range;
size_t n_permitted_output_types;
Tari__Rpc__OutputType *permitted_output_types;
uint64_t epoch_length;
uint64_t validator_node_registration_min_deposit_amount;
uint64_t validator_node_registration_min_lock_height;
uint64_t validator_node_registration_shuffle_interval_epoch;
size_t n_permitted_range_proof_types;
Tari__Rpc__PermittedRangeProofs **permitted_range_proof_types;
};
#define TARI__RPC__CONSENSUS_CONSTANTS__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&tari__rpc__consensus_constants__descriptor) \
, 0, 0, 0, 0, 0, 0, 0, 0, 0,NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 0,NULL, NULL, NULL, NULL, NULL, 0,NULL, 0, 0, 0, 0, 0,NULL }
/* Tari__Rpc__Range methods */
void tari__rpc__range__init
(Tari__Rpc__Range *message);
size_t tari__rpc__range__get_packed_size
(const Tari__Rpc__Range *message);
size_t tari__rpc__range__pack
(const Tari__Rpc__Range *message,
uint8_t *out);
size_t tari__rpc__range__pack_to_buffer
(const Tari__Rpc__Range *message,
ProtobufCBuffer *buffer);
Tari__Rpc__Range *
tari__rpc__range__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__range__free_unpacked
(Tari__Rpc__Range *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__Empty methods */
void tari__rpc__empty__init
(Tari__Rpc__Empty *message);
size_t tari__rpc__empty__get_packed_size
(const Tari__Rpc__Empty *message);
size_t tari__rpc__empty__pack
(const Tari__Rpc__Empty *message,
uint8_t *out);
size_t tari__rpc__empty__pack_to_buffer
(const Tari__Rpc__Empty *message,
ProtobufCBuffer *buffer);
Tari__Rpc__Empty *
tari__rpc__empty__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__empty__free_unpacked
(Tari__Rpc__Empty *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__BlockHeight methods */
void tari__rpc__block_height__init
(Tari__Rpc__BlockHeight *message);
size_t tari__rpc__block_height__get_packed_size
(const Tari__Rpc__BlockHeight *message);
size_t tari__rpc__block_height__pack
(const Tari__Rpc__BlockHeight *message,
uint8_t *out);
size_t tari__rpc__block_height__pack_to_buffer
(const Tari__Rpc__BlockHeight *message,
ProtobufCBuffer *buffer);
Tari__Rpc__BlockHeight *
tari__rpc__block_height__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__block_height__free_unpacked
(Tari__Rpc__BlockHeight *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__Signature methods */
void tari__rpc__signature__init
(Tari__Rpc__Signature *message);
size_t tari__rpc__signature__get_packed_size
(const Tari__Rpc__Signature *message);
size_t tari__rpc__signature__pack
(const Tari__Rpc__Signature *message,
uint8_t *out);
size_t tari__rpc__signature__pack_to_buffer
(const Tari__Rpc__Signature *message,
ProtobufCBuffer *buffer);
Tari__Rpc__Signature *
tari__rpc__signature__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__signature__free_unpacked
(Tari__Rpc__Signature *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__ComAndPubSignature methods */
void tari__rpc__com_and_pub_signature__init
(Tari__Rpc__ComAndPubSignature *message);
size_t tari__rpc__com_and_pub_signature__get_packed_size
(const Tari__Rpc__ComAndPubSignature *message);
size_t tari__rpc__com_and_pub_signature__pack
(const Tari__Rpc__ComAndPubSignature *message,
uint8_t *out);
size_t tari__rpc__com_and_pub_signature__pack_to_buffer
(const Tari__Rpc__ComAndPubSignature *message,
ProtobufCBuffer *buffer);
Tari__Rpc__ComAndPubSignature *
tari__rpc__com_and_pub_signature__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__com_and_pub_signature__free_unpacked
(Tari__Rpc__ComAndPubSignature *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__CommitmentSignature methods */
void tari__rpc__commitment_signature__init
(Tari__Rpc__CommitmentSignature *message);
size_t tari__rpc__commitment_signature__get_packed_size
(const Tari__Rpc__CommitmentSignature *message);
size_t tari__rpc__commitment_signature__pack
(const Tari__Rpc__CommitmentSignature *message,
uint8_t *out);
size_t tari__rpc__commitment_signature__pack_to_buffer
(const Tari__Rpc__CommitmentSignature *message,
ProtobufCBuffer *buffer);
Tari__Rpc__CommitmentSignature *
tari__rpc__commitment_signature__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__commitment_signature__free_unpacked
(Tari__Rpc__CommitmentSignature *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__PowAlgorithmConstants methods */
void tari__rpc__pow_algorithm_constants__init
(Tari__Rpc__PowAlgorithmConstants *message);
size_t tari__rpc__pow_algorithm_constants__get_packed_size
(const Tari__Rpc__PowAlgorithmConstants *message);
size_t tari__rpc__pow_algorithm_constants__pack
(const Tari__Rpc__PowAlgorithmConstants *message,
uint8_t *out);
size_t tari__rpc__pow_algorithm_constants__pack_to_buffer
(const Tari__Rpc__PowAlgorithmConstants *message,
ProtobufCBuffer *buffer);
Tari__Rpc__PowAlgorithmConstants *
tari__rpc__pow_algorithm_constants__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__pow_algorithm_constants__free_unpacked
(Tari__Rpc__PowAlgorithmConstants *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__WeightParams methods */
void tari__rpc__weight_params__init
(Tari__Rpc__WeightParams *message);
size_t tari__rpc__weight_params__get_packed_size
(const Tari__Rpc__WeightParams *message);
size_t tari__rpc__weight_params__pack
(const Tari__Rpc__WeightParams *message,
uint8_t *out);
size_t tari__rpc__weight_params__pack_to_buffer
(const Tari__Rpc__WeightParams *message,
ProtobufCBuffer *buffer);
Tari__Rpc__WeightParams *
tari__rpc__weight_params__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__weight_params__free_unpacked
(Tari__Rpc__WeightParams *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__OutputsVersion methods */
void tari__rpc__outputs_version__init
(Tari__Rpc__OutputsVersion *message);
size_t tari__rpc__outputs_version__get_packed_size
(const Tari__Rpc__OutputsVersion *message);
size_t tari__rpc__outputs_version__pack
(const Tari__Rpc__OutputsVersion *message,
uint8_t *out);
size_t tari__rpc__outputs_version__pack_to_buffer
(const Tari__Rpc__OutputsVersion *message,
ProtobufCBuffer *buffer);
Tari__Rpc__OutputsVersion *
tari__rpc__outputs_version__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__outputs_version__free_unpacked
(Tari__Rpc__OutputsVersion *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__PermittedRangeProofs methods */
void tari__rpc__permitted_range_proofs__init
(Tari__Rpc__PermittedRangeProofs *message);
size_t tari__rpc__permitted_range_proofs__get_packed_size
(const Tari__Rpc__PermittedRangeProofs *message);
size_t tari__rpc__permitted_range_proofs__pack
(const Tari__Rpc__PermittedRangeProofs *message,
uint8_t *out);
size_t tari__rpc__permitted_range_proofs__pack_to_buffer
(const Tari__Rpc__PermittedRangeProofs *message,
ProtobufCBuffer *buffer);
Tari__Rpc__PermittedRangeProofs *
tari__rpc__permitted_range_proofs__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__permitted_range_proofs__free_unpacked
(Tari__Rpc__PermittedRangeProofs *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__RangeProof methods */
void tari__rpc__range_proof__init
(Tari__Rpc__RangeProof *message);
size_t tari__rpc__range_proof__get_packed_size
(const Tari__Rpc__RangeProof *message);
size_t tari__rpc__range_proof__pack
(const Tari__Rpc__RangeProof *message,
uint8_t *out);
size_t tari__rpc__range_proof__pack_to_buffer
(const Tari__Rpc__RangeProof *message,
ProtobufCBuffer *buffer);
Tari__Rpc__RangeProof *
tari__rpc__range_proof__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__range_proof__free_unpacked
(Tari__Rpc__RangeProof *message,
ProtobufCAllocator *allocator);
/* Tari__Rpc__ConsensusConstants__ProofOfWorkEntry methods */
void tari__rpc__consensus_constants__proof_of_work_entry__init
(Tari__Rpc__ConsensusConstants__ProofOfWorkEntry *message);
/* Tari__Rpc__ConsensusConstants methods */
void tari__rpc__consensus_constants__init
(Tari__Rpc__ConsensusConstants *message);
size_t tari__rpc__consensus_constants__get_packed_size
(const Tari__Rpc__ConsensusConstants *message);
size_t tari__rpc__consensus_constants__pack
(const Tari__Rpc__ConsensusConstants *message,
uint8_t *out);
size_t tari__rpc__consensus_constants__pack_to_buffer
(const Tari__Rpc__ConsensusConstants *message,
ProtobufCBuffer *buffer);
Tari__Rpc__ConsensusConstants *
tari__rpc__consensus_constants__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void tari__rpc__consensus_constants__free_unpacked
(Tari__Rpc__ConsensusConstants *message,
ProtobufCAllocator *allocator);
/* --- per-message closures --- */
typedef void (*Tari__Rpc__Range_Closure)
(const Tari__Rpc__Range *message,
void *closure_data);
typedef void (*Tari__Rpc__Empty_Closure)
(const Tari__Rpc__Empty *message,
void *closure_data);
typedef void (*Tari__Rpc__BlockHeight_Closure)
(const Tari__Rpc__BlockHeight *message,
void *closure_data);
typedef void (*Tari__Rpc__Signature_Closure)
(const Tari__Rpc__Signature *message,
void *closure_data);
typedef void (*Tari__Rpc__ComAndPubSignature_Closure)
(const Tari__Rpc__ComAndPubSignature *message,
void *closure_data);
typedef void (*Tari__Rpc__CommitmentSignature_Closure)
(const Tari__Rpc__CommitmentSignature *message,
void *closure_data);
typedef void (*Tari__Rpc__PowAlgorithmConstants_Closure)
(const Tari__Rpc__PowAlgorithmConstants *message,
void *closure_data);
typedef void (*Tari__Rpc__WeightParams_Closure)
(const Tari__Rpc__WeightParams *message,
void *closure_data);
typedef void (*Tari__Rpc__OutputsVersion_Closure)
(const Tari__Rpc__OutputsVersion *message,
void *closure_data);
typedef void (*Tari__Rpc__PermittedRangeProofs_Closure)
(const Tari__Rpc__PermittedRangeProofs *message,
void *closure_data);
typedef void (*Tari__Rpc__RangeProof_Closure)
(const Tari__Rpc__RangeProof *message,
void *closure_data);
typedef void (*Tari__Rpc__ConsensusConstants__ProofOfWorkEntry_Closure)
(const Tari__Rpc__ConsensusConstants__ProofOfWorkEntry *message,
void *closure_data);
typedef void (*Tari__Rpc__ConsensusConstants_Closure)
(const Tari__Rpc__ConsensusConstants *message,
void *closure_data);
/* --- services --- */
/* --- descriptors --- */
extern const ProtobufCEnumDescriptor tari__rpc__output_type__descriptor;
extern const ProtobufCEnumDescriptor tari__rpc__range_proof_type__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__range__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__empty__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__block_height__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__signature__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__com_and_pub_signature__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__commitment_signature__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__pow_algorithm_constants__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__weight_params__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__outputs_version__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__permitted_range_proofs__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__range_proof__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__consensus_constants__descriptor;
extern const ProtobufCMessageDescriptor tari__rpc__consensus_constants__proof_of_work_entry__descriptor;
PROTOBUF_C__END_DECLS
#endif /* PROTOBUF_C_types_2eproto__INCLUDED */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1 +0,0 @@
Subproject commit 48d4239946152d5a82381df9ab2089f64bbe9dd4

@ -0,0 +1 @@
Subproject commit 8c201f6e47a53feaab773922a743091eb6c8972a
Loading…
Cancel
Save