+/**
+ * Represents a valid secp256k1 public key serialized in "compressed form" as a 33 byte array.
+ */
+typedef struct LDKPublicKey {
+ /**
+ * The bytes of the public key
+ */
+ uint8_t compressed_form[33];
+} LDKPublicKey;
+
+/**
+ * A dynamically-allocated array of crate::c_types::PublicKeys of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_PublicKeyZ {
+ /**
+ * The elements in the array.
+ * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+ */
+ struct LDKPublicKey *data;
+ /**
+ * The number of elements pointed to by `data`.
+ */
+ uintptr_t datalen;
+} LDKCVec_PublicKeyZ;
+
+
+
+/**
+ * Onion messages can be sent and received to blinded routes, which serve to hide the identity of
+ * the recipient.
+ */
+typedef struct MUST_USE_STRUCT LDKBlindedRoute {
+ /**
+ * A pointer to the opaque Rust object.
+ * Nearly everywhere, inner must be non-null, however in places where
+ * the Rust equivalent takes an Option, it may be set to null to indicate None.
+ */
+ LDKnativeBlindedRoute *inner;
+ /**
+ * Indicates that this is the only struct which contains the same pointer.
+ * Rust functions which take ownership of an object provided via an argument require
+ * this to be true and invalidate the object pointed to by inner.
+ */
+ bool is_owned;
+} LDKBlindedRoute;
+
+/**
+ * The contents of CResult_BlindedRouteNoneZ
+ */
+typedef union LDKCResult_BlindedRouteNoneZPtr {
+ /**
+ * A pointer to the contents in the success state.
+ * Reading from this pointer when `result_ok` is not set is undefined.
+ */
+ struct LDKBlindedRoute *result;
+ /**
+ * Note that this value is always NULL, as there are no contents in the Err variant
+ */
+ void *err;
+} LDKCResult_BlindedRouteNoneZPtr;
+
+/**
+ * A CResult_BlindedRouteNoneZ represents the result of a fallible operation,
+ * containing a crate::lightning::onion_message::blinded_route::BlindedRoute on success and a () on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_BlindedRouteNoneZ {
+ /**
+ * The contents of this CResult_BlindedRouteNoneZ, accessible via either
+ * `err` or `result` depending on the state of `result_ok`.
+ */
+ union LDKCResult_BlindedRouteNoneZPtr contents;
+ /**
+ * Whether this CResult_BlindedRouteNoneZ represents a success state.
+ */
+ bool result_ok;
+} LDKCResult_BlindedRouteNoneZ;
+
+/**
+ * An error in decoding a message or struct.
+ */
+typedef enum LDKDecodeError_Tag {
+ /**
+ * A version byte specified something we don't know how to handle.
+ * Includes unknown realm byte in an OnionHopData packet
+ */
+ LDKDecodeError_UnknownVersion,
+ /**
+ * Unknown feature mandating we fail to parse message (eg TLV with an even, unknown type)
+ */
+ LDKDecodeError_UnknownRequiredFeature,
+ /**
+ * Value was invalid, eg a byte which was supposed to be a bool was something other than a 0
+ * or 1, a public key/private key/signature was invalid, text wasn't UTF-8, TLV was
+ * syntactically incorrect, etc
+ */
+ LDKDecodeError_InvalidValue,
+ /**
+ * Buffer too short
+ */
+ LDKDecodeError_ShortRead,
+ /**
+ * A length descriptor in the packet didn't describe the later data correctly
+ */
+ LDKDecodeError_BadLengthDescriptor,
+ /**
+ * Error from std::io
+ */
+ LDKDecodeError_Io,
+ /**
+ * The message included zlib-compressed values, which we don't support.
+ */
+ LDKDecodeError_UnsupportedCompression,
+ /**
+ * Must be last for serialization purposes
+ */
+ LDKDecodeError_Sentinel,
+} LDKDecodeError_Tag;
+
+typedef struct MUST_USE_STRUCT LDKDecodeError {
+ LDKDecodeError_Tag tag;
+ union {
+ struct {
+ enum LDKIOError io;
+ };
+ };
+} LDKDecodeError;
+
+/**
+ * The contents of CResult_BlindedRouteDecodeErrorZ
+ */
+typedef union LDKCResult_BlindedRouteDecodeErrorZPtr {
+ /**
+ * A pointer to the contents in the success state.
+ * Reading from this pointer when `result_ok` is not set is undefined.
+ */
+ struct LDKBlindedRoute *result;
+ /**
+ * A pointer to the contents in the error state.
+ * Reading from this pointer when `result_ok` is set is undefined.
+ */
+ struct LDKDecodeError *err;
+} LDKCResult_BlindedRouteDecodeErrorZPtr;
+
+/**
+ * A CResult_BlindedRouteDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::onion_message::blinded_route::BlindedRoute on success and a crate::lightning::ln::msgs::DecodeError on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_BlindedRouteDecodeErrorZ {
+ /**
+ * The contents of this CResult_BlindedRouteDecodeErrorZ, accessible via either
+ * `err` or `result` depending on the state of `result_ok`.
+ */
+ union LDKCResult_BlindedRouteDecodeErrorZPtr contents;
+ /**
+ * Whether this CResult_BlindedRouteDecodeErrorZ represents a success state.
+ */
+ bool result_ok;
+} LDKCResult_BlindedRouteDecodeErrorZ;
+
+
+
+/**
+ * Used to construct the blinded hops portion of a blinded route. These hops cannot be identified
+ * by outside observers and thus can be used to hide the identity of the recipient.
+ */
+typedef struct MUST_USE_STRUCT LDKBlindedHop {
+ /**
+ * A pointer to the opaque Rust object.
+ * Nearly everywhere, inner must be non-null, however in places where
+ * the Rust equivalent takes an Option, it may be set to null to indicate None.
+ */
+ LDKnativeBlindedHop *inner;
+ /**
+ * Indicates that this is the only struct which contains the same pointer.
+ * Rust functions which take ownership of an object provided via an argument require
+ * this to be true and invalidate the object pointed to by inner.
+ */
+ bool is_owned;
+} LDKBlindedHop;
+
+/**
+ * The contents of CResult_BlindedHopDecodeErrorZ
+ */
+typedef union LDKCResult_BlindedHopDecodeErrorZPtr {
+ /**
+ * A pointer to the contents in the success state.
+ * Reading from this pointer when `result_ok` is not set is undefined.
+ */
+ struct LDKBlindedHop *result;
+ /**
+ * A pointer to the contents in the error state.
+ * Reading from this pointer when `result_ok` is set is undefined.
+ */
+ struct LDKDecodeError *err;
+} LDKCResult_BlindedHopDecodeErrorZPtr;
+
+/**
+ * A CResult_BlindedHopDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::onion_message::blinded_route::BlindedHop on success and a crate::lightning::ln::msgs::DecodeError on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_BlindedHopDecodeErrorZ {
+ /**
+ * The contents of this CResult_BlindedHopDecodeErrorZ, accessible via either
+ * `err` or `result` depending on the state of `result_ok`.
+ */
+ union LDKCResult_BlindedHopDecodeErrorZPtr contents;
+ /**
+ * Whether this CResult_BlindedHopDecodeErrorZ represents a success state.
+ */
+ bool result_ok;
+} LDKCResult_BlindedHopDecodeErrorZ;
+