14 sizeof(((UTXO*)0)->amt) + \
15 sizeof(((UTXO*)0)->public_key_hash) \
25ssize_t ser_utxo(
unsigned char *dest,
UTXO *utxo);
35unsigned char *ser_utxo_alloc(ssize_t *written,
UTXO *utxo);
44ssize_t deser_utxo(
UTXO *dest,
unsigned char *src);
53UTXO *deser_utxo_alloc(ssize_t* read,
unsigned char *src);
59#define INPUT_SER_LEN \
62 sizeof(((Input*)0)->sig_len) + \
65 sizeof(((Input*)0)->prev_utxo_output) \
75ssize_t ser_input(
unsigned char *dest,
Input *input);
85unsigned char *ser_input_alloc(ssize_t *written,
Input *input);
94ssize_t deser_input(
Input *dest,
unsigned char *src);
103Input *deser_input_alloc(ssize_t *read,
unsigned char *src);
124ssize_t ser_tx(
unsigned char *dest,
Transaction *tx);
134unsigned char *ser_tx_alloc(ssize_t *written,
Transaction *tx);
143ssize_t deser_tx(
Transaction *dest,
unsigned char *src);
152Transaction* deser_tx_alloc(ssize_t *read,
unsigned char *src);