Serializes a C object into a byte vector using its to_bytes callback.
Declared in <kernel/bitcoinkernel_wrapper.h>
template<typename T>
std::vector<std::byte>
write_bytes(
T const* object,
int(* to_bytes)(T const*, btck_WriteBytes, void*));
The serialized bytes.
| Name | Description |
|---|---|
| object | The C object to serialize. |
| to_bytes | The btck_*_to_bytes function that streams the object's bytes. |