+ * Set this feature as required.
+ */
+void InitFeatures_set_anchors_zero_fee_htlc_tx_required(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool InitFeatures_supports_anchors_zero_fee_htlc_tx(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void NodeFeatures_set_anchors_zero_fee_htlc_tx_optional(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void NodeFeatures_set_anchors_zero_fee_htlc_tx_required(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool NodeFeatures_supports_anchors_zero_fee_htlc_tx(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void ChannelTypeFeatures_set_anchors_zero_fee_htlc_tx_optional(struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void ChannelTypeFeatures_set_anchors_zero_fee_htlc_tx_required(struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool ChannelTypeFeatures_supports_anchors_zero_fee_htlc_tx(const struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool InitFeatures_requires_anchors_zero_fee_htlc_tx(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool NodeFeatures_requires_anchors_zero_fee_htlc_tx(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool ChannelTypeFeatures_requires_anchors_zero_fee_htlc_tx(const struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void InitFeatures_set_route_blinding_optional(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void InitFeatures_set_route_blinding_required(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool InitFeatures_supports_route_blinding(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void NodeFeatures_set_route_blinding_optional(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void NodeFeatures_set_route_blinding_required(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool NodeFeatures_supports_route_blinding(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool InitFeatures_requires_route_blinding(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool NodeFeatures_requires_route_blinding(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void InitFeatures_set_shutdown_any_segwit_optional(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void InitFeatures_set_shutdown_any_segwit_required(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool InitFeatures_supports_shutdown_anysegwit(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void NodeFeatures_set_shutdown_any_segwit_optional(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void NodeFeatures_set_shutdown_any_segwit_required(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool NodeFeatures_supports_shutdown_anysegwit(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool InitFeatures_requires_shutdown_anysegwit(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool NodeFeatures_requires_shutdown_anysegwit(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void InitFeatures_set_taproot_optional(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void InitFeatures_set_taproot_required(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool InitFeatures_supports_taproot(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void NodeFeatures_set_taproot_optional(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void NodeFeatures_set_taproot_required(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool NodeFeatures_supports_taproot(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void ChannelTypeFeatures_set_taproot_optional(struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void ChannelTypeFeatures_set_taproot_required(struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool ChannelTypeFeatures_supports_taproot(const struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool InitFeatures_requires_taproot(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool NodeFeatures_requires_taproot(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool ChannelTypeFeatures_requires_taproot(const struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void InitFeatures_set_onion_messages_optional(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void InitFeatures_set_onion_messages_required(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool InitFeatures_supports_onion_messages(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void NodeFeatures_set_onion_messages_optional(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void NodeFeatures_set_onion_messages_required(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool NodeFeatures_supports_onion_messages(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool InitFeatures_requires_onion_messages(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool NodeFeatures_requires_onion_messages(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void InitFeatures_set_channel_type_optional(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void InitFeatures_set_channel_type_required(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool InitFeatures_supports_channel_type(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void NodeFeatures_set_channel_type_optional(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void NodeFeatures_set_channel_type_required(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool NodeFeatures_supports_channel_type(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool InitFeatures_requires_channel_type(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool NodeFeatures_requires_channel_type(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void InitFeatures_set_scid_privacy_optional(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void InitFeatures_set_scid_privacy_required(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool InitFeatures_supports_scid_privacy(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void NodeFeatures_set_scid_privacy_optional(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void NodeFeatures_set_scid_privacy_required(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool NodeFeatures_supports_scid_privacy(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void ChannelTypeFeatures_set_scid_privacy_optional(struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void ChannelTypeFeatures_set_scid_privacy_required(struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool ChannelTypeFeatures_supports_scid_privacy(const struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool InitFeatures_requires_scid_privacy(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool NodeFeatures_requires_scid_privacy(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool ChannelTypeFeatures_requires_scid_privacy(const struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void Bolt11InvoiceFeatures_set_payment_metadata_optional(struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void Bolt11InvoiceFeatures_set_payment_metadata_required(struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool Bolt11InvoiceFeatures_supports_payment_metadata(const struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool Bolt11InvoiceFeatures_requires_payment_metadata(const struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void InitFeatures_set_zero_conf_optional(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void InitFeatures_set_zero_conf_required(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool InitFeatures_supports_zero_conf(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void NodeFeatures_set_zero_conf_optional(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void NodeFeatures_set_zero_conf_required(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool NodeFeatures_supports_zero_conf(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void ChannelTypeFeatures_set_zero_conf_optional(struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void ChannelTypeFeatures_set_zero_conf_required(struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool ChannelTypeFeatures_supports_zero_conf(const struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool InitFeatures_requires_zero_conf(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool NodeFeatures_requires_zero_conf(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool ChannelTypeFeatures_requires_zero_conf(const struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void NodeFeatures_set_keysend_optional(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void NodeFeatures_set_keysend_required(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool NodeFeatures_supports_keysend(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool NodeFeatures_requires_keysend(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void InitFeatures_set_trampoline_routing_optional(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void InitFeatures_set_trampoline_routing_required(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool InitFeatures_supports_trampoline_routing(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void NodeFeatures_set_trampoline_routing_optional(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void NodeFeatures_set_trampoline_routing_required(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool NodeFeatures_supports_trampoline_routing(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void Bolt11InvoiceFeatures_set_trampoline_routing_optional(struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void Bolt11InvoiceFeatures_set_trampoline_routing_required(struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool Bolt11InvoiceFeatures_supports_trampoline_routing(const struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool InitFeatures_requires_trampoline_routing(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool NodeFeatures_requires_trampoline_routing(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool Bolt11InvoiceFeatures_requires_trampoline_routing(const struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Frees any resources used by the ShutdownScript, if is_owned is set and inner is non-NULL.
+ */
+void ShutdownScript_free(struct LDKShutdownScript this_obj);
+
+/**
+ * Creates a copy of the ShutdownScript
+ */
+struct LDKShutdownScript ShutdownScript_clone(const struct LDKShutdownScript *NONNULL_PTR orig);
+
+/**
+ * Checks if two ShutdownScripts contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool ShutdownScript_eq(const struct LDKShutdownScript *NONNULL_PTR a, const struct LDKShutdownScript *NONNULL_PTR b);
+
+/**
+ * Frees any resources used by the InvalidShutdownScript, if is_owned is set and inner is non-NULL.
+ */
+void InvalidShutdownScript_free(struct LDKInvalidShutdownScript this_obj);
+
+/**
+ * The script that did not meet the requirements from [BOLT #2].
+ *
+ * [BOLT #2]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md
+ */
+struct LDKCVec_u8Z InvalidShutdownScript_get_script(const struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr);
+
+/**
+ * The script that did not meet the requirements from [BOLT #2].
+ *
+ * [BOLT #2]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md
+ */
+void InvalidShutdownScript_set_script(struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
+
+/**
+ * Constructs a new InvalidShutdownScript given each field
+ */
+MUST_USE_RES struct LDKInvalidShutdownScript InvalidShutdownScript_new(struct LDKCVec_u8Z script_arg);
+
+/**
+ * Creates a copy of the InvalidShutdownScript
+ */
+struct LDKInvalidShutdownScript InvalidShutdownScript_clone(const struct LDKInvalidShutdownScript *NONNULL_PTR orig);
+
+/**
+ * Serialize the ShutdownScript object into a byte array which can be read by ShutdownScript_read
+ */
+struct LDKCVec_u8Z ShutdownScript_write(const struct LDKShutdownScript *NONNULL_PTR obj);
+
+/**
+ * Read a ShutdownScript from a byte array, created by ShutdownScript_write
+ */
+struct LDKCResult_ShutdownScriptDecodeErrorZ ShutdownScript_read(struct LDKu8slice ser);
+
+/**
+ * Generates a P2WPKH script pubkey from the given [`WPubkeyHash`].
+ */
+MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wpkh(const uint8_t (*pubkey_hash)[20]);
+
+/**
+ * Generates a P2WSH script pubkey from the given [`WScriptHash`].
+ */
+MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wsh(const uint8_t (*script_hash)[32]);
+
+/**
+ * Generates a witness script pubkey from the given segwit version and program.
+ *
+ * Note for version-zero witness scripts you must use [`ShutdownScript::new_p2wpkh`] or
+ * [`ShutdownScript::new_p2wsh`] instead.
+ *
+ * # Errors
+ *
+ * This function may return an error if `program` is invalid for the segwit `version`.
+ */
+MUST_USE_RES struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ ShutdownScript_new_witness_program(struct LDKWitnessProgram witness_program);
+
+/**
+ * Converts the shutdown script into the underlying [`ScriptBuf`].
+ */
+MUST_USE_RES struct LDKCVec_u8Z ShutdownScript_into_inner(struct LDKShutdownScript this_arg);
+
+/**
+ * Returns the [`PublicKey`] used for a P2WPKH shutdown script if constructed directly from it.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPublicKey ShutdownScript_as_legacy_pubkey(const struct LDKShutdownScript *NONNULL_PTR this_arg);
+
+/**
+ * Returns whether the shutdown script is compatible with the features as defined by BOLT #2.
+ *
+ * Specifically, checks for compliance with feature `option_shutdown_anysegwit`.
+ */
+MUST_USE_RES bool ShutdownScript_is_compatible(const struct LDKShutdownScript *NONNULL_PTR this_arg, const struct LDKInitFeatures *NONNULL_PTR features);
+
+/**
+ * Get the string representation of a ShutdownScript object
+ */
+struct LDKStr ShutdownScript_to_str(const struct LDKShutdownScript *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the ChannelId, if is_owned is set and inner is non-NULL.
+ */
+void ChannelId_free(struct LDKChannelId this_obj);
+
+const uint8_t (*ChannelId_get_a(const struct LDKChannelId *NONNULL_PTR this_ptr))[32];
+
+void ChannelId_set_a(struct LDKChannelId *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+
+/**
+ * Constructs a new ChannelId given each field
+ */
+MUST_USE_RES struct LDKChannelId ChannelId_new(struct LDKThirtyTwoBytes a_arg);
+
+/**
+ * Creates a copy of the ChannelId
+ */
+struct LDKChannelId ChannelId_clone(const struct LDKChannelId *NONNULL_PTR orig);
+
+/**
+ * Checks if two ChannelIds contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool ChannelId_eq(const struct LDKChannelId *NONNULL_PTR a, const struct LDKChannelId *NONNULL_PTR b);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the ChannelId.
+ */
+uint64_t ChannelId_hash(const struct LDKChannelId *NONNULL_PTR o);
+
+/**
+ * Create _v1_ channel ID based on a funding TX ID and output index
+ */
+MUST_USE_RES struct LDKChannelId ChannelId_v1_from_funding_txid(const uint8_t (*txid)[32], uint16_t output_index);
+
+/**
+ * Create _v1_ channel ID from a funding tx outpoint
+ */
+MUST_USE_RES struct LDKChannelId ChannelId_v1_from_funding_outpoint(struct LDKOutPoint outpoint);
+
+/**
+ * Create a _temporary_ channel ID randomly, based on an entropy source.
+ */
+MUST_USE_RES struct LDKChannelId ChannelId_temporary_from_entropy_source(const struct LDKEntropySource *NONNULL_PTR entropy_source);
+
+/**
+ * Generic constructor; create a new channel ID from the provided data.
+ * Use a more specific `*_from_*` constructor when possible.
+ */
+MUST_USE_RES struct LDKChannelId ChannelId_from_bytes(struct LDKThirtyTwoBytes data);
+
+/**
+ * Create a channel ID consisting of all-zeros data (e.g. when uninitialized or a placeholder).
+ */
+MUST_USE_RES struct LDKChannelId ChannelId_new_zero(void);
+
+/**
+ * Check whether ID is consisting of all zeros (uninitialized)
+ */
+MUST_USE_RES bool ChannelId_is_zero(const struct LDKChannelId *NONNULL_PTR this_arg);
+
+/**
+ * Create _v2_ channel ID by concatenating the holder revocation basepoint with the counterparty
+ * revocation basepoint and hashing the result. The basepoints will be concatenated in increasing
+ * sorted order.
+ */
+MUST_USE_RES struct LDKChannelId ChannelId_v2_from_revocation_basepoints(const struct LDKRevocationBasepoint *NONNULL_PTR ours, const struct LDKRevocationBasepoint *NONNULL_PTR theirs);
+
+/**
+ * Create temporary _v2_ channel ID by concatenating a zeroed out basepoint with the holder
+ * revocation basepoint and hashing the result.
+ */
+MUST_USE_RES struct LDKChannelId ChannelId_temporary_v2_from_revocation_basepoint(const struct LDKRevocationBasepoint *NONNULL_PTR our_revocation_basepoint);
+
+/**
+ * Serialize the ChannelId object into a byte array which can be read by ChannelId_read
+ */
+struct LDKCVec_u8Z ChannelId_write(const struct LDKChannelId *NONNULL_PTR obj);
+
+/**
+ * Read a ChannelId from a byte array, created by ChannelId_write
+ */
+struct LDKCResult_ChannelIdDecodeErrorZ ChannelId_read(struct LDKu8slice ser);
+
+/**
+ * Get the string representation of a ChannelId object
+ */
+struct LDKStr ChannelId_to_str(const struct LDKChannelId *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the Retry
+ */
+void Retry_free(struct LDKRetry this_ptr);
+
+/**
+ * Creates a copy of the Retry
+ */
+struct LDKRetry Retry_clone(const struct LDKRetry *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new Attempts-variant Retry
+ */
+struct LDKRetry Retry_attempts(uint32_t a);
+
+/**
+ * Utility method to constructs a new Timeout-variant Retry
+ */
+struct LDKRetry Retry_timeout(uint64_t a);
+
+/**
+ * Checks if two Retrys contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+bool Retry_eq(const struct LDKRetry *NONNULL_PTR a, const struct LDKRetry *NONNULL_PTR b);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the Retry.
+ */
+uint64_t Retry_hash(const struct LDKRetry *NONNULL_PTR o);
+
+/**
+ * Serialize the Retry object into a byte array which can be read by Retry_read
+ */
+struct LDKCVec_u8Z Retry_write(const struct LDKRetry *NONNULL_PTR obj);
+
+/**
+ * Read a Retry from a byte array, created by Retry_write
+ */
+struct LDKCResult_RetryDecodeErrorZ Retry_read(struct LDKu8slice ser);
+
+/**
+ * Creates a copy of the RetryableSendFailure
+ */
+enum LDKRetryableSendFailure RetryableSendFailure_clone(const enum LDKRetryableSendFailure *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new PaymentExpired-variant RetryableSendFailure
+ */
+enum LDKRetryableSendFailure RetryableSendFailure_payment_expired(void);
+
+/**
+ * Utility method to constructs a new RouteNotFound-variant RetryableSendFailure
+ */
+enum LDKRetryableSendFailure RetryableSendFailure_route_not_found(void);
+
+/**
+ * Utility method to constructs a new DuplicatePayment-variant RetryableSendFailure
+ */
+enum LDKRetryableSendFailure RetryableSendFailure_duplicate_payment(void);
+
+/**
+ * Checks if two RetryableSendFailures contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+bool RetryableSendFailure_eq(const enum LDKRetryableSendFailure *NONNULL_PTR a, const enum LDKRetryableSendFailure *NONNULL_PTR b);
+
+/**
+ * Frees any resources used by the PaymentSendFailure
+ */
+void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
+
+/**
+ * Creates a copy of the PaymentSendFailure
+ */
+struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new ParameterError-variant PaymentSendFailure
+ */
+struct LDKPaymentSendFailure PaymentSendFailure_parameter_error(struct LDKAPIError a);
+
+/**
+ * Utility method to constructs a new PathParameterError-variant PaymentSendFailure
+ */
+struct LDKPaymentSendFailure PaymentSendFailure_path_parameter_error(struct LDKCVec_CResult_NoneAPIErrorZZ a);
+
+/**
+ * Utility method to constructs a new AllFailedResendSafe-variant PaymentSendFailure
+ */
+struct LDKPaymentSendFailure PaymentSendFailure_all_failed_resend_safe(struct LDKCVec_APIErrorZ a);
+
+/**
+ * Utility method to constructs a new DuplicatePayment-variant PaymentSendFailure
+ */
+struct LDKPaymentSendFailure PaymentSendFailure_duplicate_payment(void);
+
+/**
+ * Utility method to constructs a new PartialFailure-variant PaymentSendFailure
+ */
+struct LDKPaymentSendFailure PaymentSendFailure_partial_failure(struct LDKCVec_CResult_NoneAPIErrorZZ results, struct LDKRouteParameters failed_paths_retry, struct LDKThirtyTwoBytes payment_id);
+
+/**
+ * Checks if two PaymentSendFailures contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+bool PaymentSendFailure_eq(const struct LDKPaymentSendFailure *NONNULL_PTR a, const struct LDKPaymentSendFailure *NONNULL_PTR b);
+
+/**
+ * Frees any resources used by the ProbeSendFailure
+ */
+void ProbeSendFailure_free(struct LDKProbeSendFailure this_ptr);
+
+/**
+ * Creates a copy of the ProbeSendFailure
+ */
+struct LDKProbeSendFailure ProbeSendFailure_clone(const struct LDKProbeSendFailure *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new RouteNotFound-variant ProbeSendFailure
+ */
+struct LDKProbeSendFailure ProbeSendFailure_route_not_found(void);
+
+/**
+ * Utility method to constructs a new SendingFailed-variant ProbeSendFailure
+ */
+struct LDKProbeSendFailure ProbeSendFailure_sending_failed(struct LDKPaymentSendFailure a);
+
+/**
+ * Checks if two ProbeSendFailures contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+bool ProbeSendFailure_eq(const struct LDKProbeSendFailure *NONNULL_PTR a, const struct LDKProbeSendFailure *NONNULL_PTR b);
+
+/**
+ * Frees any resources used by the RecipientOnionFields, if is_owned is set and inner is non-NULL.
+ */
+void RecipientOnionFields_free(struct LDKRecipientOnionFields this_obj);
+
+/**
+ * The [`PaymentSecret`] is an arbitrary 32 bytes provided by the recipient for us to repeat
+ * in the onion. It is unrelated to `payment_hash` (or [`PaymentPreimage`]) and exists to
+ * authenticate the sender to the recipient and prevent payment-probing (deanonymization)
+ * attacks.
+ *
+ * If you do not have one, the [`Route`] you pay over must not contain multiple paths as
+ * multi-path payments require a recipient-provided secret.
+ *
+ * Some implementations may reject spontaneous payments with payment secrets, so you may only
+ * want to provide a secret for a spontaneous payment if MPP is needed and you know your
+ * recipient will not reject it.
+ */
+struct LDKCOption_ThirtyTwoBytesZ RecipientOnionFields_get_payment_secret(const struct LDKRecipientOnionFields *NONNULL_PTR this_ptr);
+
+/**
+ * The [`PaymentSecret`] is an arbitrary 32 bytes provided by the recipient for us to repeat
+ * in the onion. It is unrelated to `payment_hash` (or [`PaymentPreimage`]) and exists to
+ * authenticate the sender to the recipient and prevent payment-probing (deanonymization)
+ * attacks.
+ *
+ * If you do not have one, the [`Route`] you pay over must not contain multiple paths as
+ * multi-path payments require a recipient-provided secret.
+ *
+ * Some implementations may reject spontaneous payments with payment secrets, so you may only
+ * want to provide a secret for a spontaneous payment if MPP is needed and you know your
+ * recipient will not reject it.
+ */
+void RecipientOnionFields_set_payment_secret(struct LDKRecipientOnionFields *NONNULL_PTR this_ptr, struct LDKCOption_ThirtyTwoBytesZ val);
+
+/**
+ * The payment metadata serves a similar purpose as [`Self::payment_secret`] but is of
+ * arbitrary length. This gives recipients substantially more flexibility to receive
+ * additional data.
+ *
+ * In LDK, while the [`Self::payment_secret`] is fixed based on an internal authentication
+ * scheme to authenticate received payments against expected payments and invoices, this field
+ * is not used in LDK for received payments, and can be used to store arbitrary data in
+ * invoices which will be received with the payment.
+ *
+ * Note that this field was added to the lightning specification more recently than
+ * [`Self::payment_secret`] and while nearly all lightning senders support secrets, metadata
+ * may not be supported as universally.
+ *
+ * Returns a copy of the field.
+ */
+struct LDKCOption_CVec_u8ZZ RecipientOnionFields_get_payment_metadata(const struct LDKRecipientOnionFields *NONNULL_PTR this_ptr);
+
+/**
+ * The payment metadata serves a similar purpose as [`Self::payment_secret`] but is of
+ * arbitrary length. This gives recipients substantially more flexibility to receive
+ * additional data.
+ *
+ * In LDK, while the [`Self::payment_secret`] is fixed based on an internal authentication
+ * scheme to authenticate received payments against expected payments and invoices, this field
+ * is not used in LDK for received payments, and can be used to store arbitrary data in
+ * invoices which will be received with the payment.
+ *
+ * Note that this field was added to the lightning specification more recently than
+ * [`Self::payment_secret`] and while nearly all lightning senders support secrets, metadata
+ * may not be supported as universally.
+ */
+void RecipientOnionFields_set_payment_metadata(struct LDKRecipientOnionFields *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val);
+
+/**
+ * Creates a copy of the RecipientOnionFields
+ */
+struct LDKRecipientOnionFields RecipientOnionFields_clone(const struct LDKRecipientOnionFields *NONNULL_PTR orig);
+
+/**
+ * Checks if two RecipientOnionFieldss contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool RecipientOnionFields_eq(const struct LDKRecipientOnionFields *NONNULL_PTR a, const struct LDKRecipientOnionFields *NONNULL_PTR b);
+
+/**
+ * Serialize the RecipientOnionFields object into a byte array which can be read by RecipientOnionFields_read
+ */
+struct LDKCVec_u8Z RecipientOnionFields_write(const struct LDKRecipientOnionFields *NONNULL_PTR obj);
+
+/**
+ * Read a RecipientOnionFields from a byte array, created by RecipientOnionFields_write
+ */
+struct LDKCResult_RecipientOnionFieldsDecodeErrorZ RecipientOnionFields_read(struct LDKu8slice ser);
+
+/**
+ * Creates a [`RecipientOnionFields`] from only a [`PaymentSecret`]. This is the most common
+ * set of onion fields for today's BOLT11 invoices - most nodes require a [`PaymentSecret`]
+ * but do not require or provide any further data.
+ */
+MUST_USE_RES struct LDKRecipientOnionFields RecipientOnionFields_secret_only(struct LDKThirtyTwoBytes payment_secret);
+
+/**
+ * Creates a new [`RecipientOnionFields`] with no fields. This generally does not create
+ * payable HTLCs except for single-path spontaneous payments, i.e. this should generally
+ * only be used for calls to [`ChannelManager::send_spontaneous_payment`]. If you are sending
+ * a spontaneous MPP this will not work as all MPP require payment secrets; you may
+ * instead want to use [`RecipientOnionFields::secret_only`].
+ *
+ * [`ChannelManager::send_spontaneous_payment`]: super::channelmanager::ChannelManager::send_spontaneous_payment
+ * [`RecipientOnionFields::secret_only`]: RecipientOnionFields::secret_only
+ */
+MUST_USE_RES struct LDKRecipientOnionFields RecipientOnionFields_spontaneous_empty(void);
+
+/**
+ * Creates a new [`RecipientOnionFields`] from an existing one, adding custom TLVs. Each
+ * TLV is provided as a `(u64, Vec<u8>)` for the type number and serialized value
+ * respectively. TLV type numbers must be unique and within the range
+ * reserved for custom types, i.e. >= 2^16, otherwise this method will return `Err(())`.
+ *
+ * This method will also error for types in the experimental range which have been
+ * standardized within the protocol, which only includes 5482373484 (keysend) for now.
+ *
+ * See [`Self::custom_tlvs`] for more info.
+ */
+MUST_USE_RES struct LDKCResult_RecipientOnionFieldsNoneZ RecipientOnionFields_with_custom_tlvs(struct LDKRecipientOnionFields this_arg, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs);
+
+/**
+ * Gets the custom TLVs that will be sent or have been received.
+ *
+ * Custom TLVs allow sending extra application-specific data with a payment. They provide
+ * additional flexibility on top of payment metadata, as while other implementations may
+ * require `payment_metadata` to reflect metadata provided in an invoice, custom TLVs
+ * do not have this restriction.
+ *
+ * Note that if this field is non-empty, it will contain strictly increasing TLVs, each
+ * represented by a `(u64, Vec<u8>)` for its type number and serialized value respectively.
+ * This is validated when setting this field using [`Self::with_custom_tlvs`].
+ */
+MUST_USE_RES struct LDKCVec_C2Tuple_u64CVec_u8ZZZ RecipientOnionFields_custom_tlvs(const struct LDKRecipientOnionFields *NONNULL_PTR this_arg);
+
+/**
+ * Calls the free function if one is set
+ */
+void CustomMessageReader_free(struct LDKCustomMessageReader this_ptr);
+
+/**
+ * Creates a copy of a Type
+ */
+struct LDKType Type_clone(const struct LDKType *NONNULL_PTR orig);
+
+/**
+ * Calls the free function if one is set
+ */
+void Type_free(struct LDKType this_ptr);
+
+/**
+ * Frees any resources used by the OfferId, if is_owned is set and inner is non-NULL.
+ */
+void OfferId_free(struct LDKOfferId this_obj);
+
+const uint8_t (*OfferId_get_a(const struct LDKOfferId *NONNULL_PTR this_ptr))[32];
+
+void OfferId_set_a(struct LDKOfferId *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+
+/**
+ * Constructs a new OfferId given each field
+ */
+MUST_USE_RES struct LDKOfferId OfferId_new(struct LDKThirtyTwoBytes a_arg);
+
+/**
+ * Creates a copy of the OfferId
+ */
+struct LDKOfferId OfferId_clone(const struct LDKOfferId *NONNULL_PTR orig);
+
+/**
+ * Checks if two OfferIds contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool OfferId_eq(const struct LDKOfferId *NONNULL_PTR a, const struct LDKOfferId *NONNULL_PTR b);
+
+/**
+ * Serialize the OfferId object into a byte array which can be read by OfferId_read
+ */
+struct LDKCVec_u8Z OfferId_write(const struct LDKOfferId *NONNULL_PTR obj);
+
+/**
+ * Read a OfferId from a byte array, created by OfferId_write
+ */
+struct LDKCResult_OfferIdDecodeErrorZ OfferId_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the OfferWithExplicitMetadataBuilder, if is_owned is set and inner is non-NULL.
+ */
+void OfferWithExplicitMetadataBuilder_free(struct LDKOfferWithExplicitMetadataBuilder this_obj);
+
+/**
+ * Creates a copy of the OfferWithExplicitMetadataBuilder
+ */
+struct LDKOfferWithExplicitMetadataBuilder OfferWithExplicitMetadataBuilder_clone(const struct LDKOfferWithExplicitMetadataBuilder *NONNULL_PTR orig);
+
+/**
+ * Frees any resources used by the OfferWithDerivedMetadataBuilder, if is_owned is set and inner is non-NULL.
+ */
+void OfferWithDerivedMetadataBuilder_free(struct LDKOfferWithDerivedMetadataBuilder this_obj);
+
+/**
+ * Creates a copy of the OfferWithDerivedMetadataBuilder
+ */
+struct LDKOfferWithDerivedMetadataBuilder OfferWithDerivedMetadataBuilder_clone(const struct LDKOfferWithDerivedMetadataBuilder *NONNULL_PTR orig);
+
+/**
+ * Creates a new builder for an offer using the [`Offer::signing_pubkey`] for signing invoices.
+ * The associated secret key must be remembered while the offer is valid.
+ *
+ * Use a different pubkey per offer to avoid correlating offers.
+ *
+ * # Note
+ *
+ * If constructing an [`Offer`] for use with a [`ChannelManager`], use
+ * [`ChannelManager::create_offer_builder`] instead of [`OfferBuilder::new`].
+ *
+ * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
+ * [`ChannelManager::create_offer_builder`]: crate::ln::channelmanager::ChannelManager::create_offer_builder
+ */
+MUST_USE_RES struct LDKOfferWithExplicitMetadataBuilder OfferWithExplicitMetadataBuilder_new(struct LDKPublicKey signing_pubkey);
+
+/**
+ * Sets the [`Offer::metadata`] to the given bytes.
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ OfferWithExplicitMetadataBuilder_metadata(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKCVec_u8Z metadata);
+
+/**
+ * Adds the chain hash of the given [`Network`] to [`Offer::chains`]. If not called,
+ * the chain hash of [`Network::Bitcoin`] is assumed to be the only one supported.
+ *
+ * See [`Offer::chains`] on how this relates to the payment currency.
+ *
+ * Successive calls to this method will add another chain hash.
+ */
+MUST_USE_RES void OfferWithExplicitMetadataBuilder_chain(struct LDKOfferWithExplicitMetadataBuilder this_arg, enum LDKNetwork network);
+
+/**
+ * Sets the [`Offer::amount`] as an [`Amount::Bitcoin`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void OfferWithExplicitMetadataBuilder_amount_msats(struct LDKOfferWithExplicitMetadataBuilder this_arg, uint64_t amount_msats);
+
+/**
+ * Sets the [`Offer::absolute_expiry`] as seconds since the Unix epoch. Any expiry that has
+ * already passed is valid and can be checked for using [`Offer::is_expired`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void OfferWithExplicitMetadataBuilder_absolute_expiry(struct LDKOfferWithExplicitMetadataBuilder this_arg, uint64_t absolute_expiry);
+
+/**
+ * Sets the [`Offer::description`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void OfferWithExplicitMetadataBuilder_description(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKStr description);
+
+/**
+ * Sets the [`Offer::issuer`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void OfferWithExplicitMetadataBuilder_issuer(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKStr issuer);
+
+/**
+ * Adds a blinded path to [`Offer::paths`]. Must include at least one path if only connected by
+ * private channels or if [`Offer::signing_pubkey`] is not a public node id.
+ *
+ * Successive calls to this method will add another blinded path. Caller is responsible for not
+ * adding duplicate paths.
+ */
+MUST_USE_RES void OfferWithExplicitMetadataBuilder_path(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKBlindedPath path);
+
+/**
+ * Sets the quantity of items for [`Offer::supported_quantity`]. If not called, defaults to
+ * [`Quantity::One`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void OfferWithExplicitMetadataBuilder_supported_quantity(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKQuantity quantity);
+
+/**
+ * Builds an [`Offer`] from the builder's settings.
+ */
+MUST_USE_RES struct LDKCResult_OfferBolt12SemanticErrorZ OfferWithExplicitMetadataBuilder_build(struct LDKOfferWithExplicitMetadataBuilder this_arg);
+
+/**
+ * Similar to [`OfferBuilder::new`] except, if [`OfferBuilder::path`] is called, the signing
+ * pubkey is derived from the given [`ExpandedKey`] and [`EntropySource`]. This provides
+ * recipient privacy by using a different signing pubkey for each offer. Otherwise, the
+ * provided `node_id` is used for the signing pubkey.
+ *
+ * Also, sets the metadata when [`OfferBuilder::build`] is called such that it can be used by
+ * [`InvoiceRequest::verify`] to determine if the request was produced for the offer given an
+ * [`ExpandedKey`].
+ *
+ * [`InvoiceRequest::verify`]: crate::offers::invoice_request::InvoiceRequest::verify
+ * [`ExpandedKey`]: crate::ln::inbound_payment::ExpandedKey
+ */
+MUST_USE_RES struct LDKOfferWithDerivedMetadataBuilder OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(struct LDKPublicKey node_id, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source);
+
+/**
+ * Adds the chain hash of the given [`Network`] to [`Offer::chains`]. If not called,
+ * the chain hash of [`Network::Bitcoin`] is assumed to be the only one supported.
+ *
+ * See [`Offer::chains`] on how this relates to the payment currency.
+ *
+ * Successive calls to this method will add another chain hash.
+ */
+MUST_USE_RES void OfferWithDerivedMetadataBuilder_chain(struct LDKOfferWithDerivedMetadataBuilder this_arg, enum LDKNetwork network);
+
+/**
+ * Sets the [`Offer::amount`] as an [`Amount::Bitcoin`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void OfferWithDerivedMetadataBuilder_amount_msats(struct LDKOfferWithDerivedMetadataBuilder this_arg, uint64_t amount_msats);
+
+/**
+ * Sets the [`Offer::absolute_expiry`] as seconds since the Unix epoch. Any expiry that has
+ * already passed is valid and can be checked for using [`Offer::is_expired`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void OfferWithDerivedMetadataBuilder_absolute_expiry(struct LDKOfferWithDerivedMetadataBuilder this_arg, uint64_t absolute_expiry);
+
+/**
+ * Sets the [`Offer::description`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void OfferWithDerivedMetadataBuilder_description(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKStr description);
+
+/**
+ * Sets the [`Offer::issuer`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void OfferWithDerivedMetadataBuilder_issuer(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKStr issuer);
+
+/**
+ * Adds a blinded path to [`Offer::paths`]. Must include at least one path if only connected by
+ * private channels or if [`Offer::signing_pubkey`] is not a public node id.
+ *
+ * Successive calls to this method will add another blinded path. Caller is responsible for not
+ * adding duplicate paths.
+ */
+MUST_USE_RES void OfferWithDerivedMetadataBuilder_path(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKBlindedPath path);
+
+/**
+ * Sets the quantity of items for [`Offer::supported_quantity`]. If not called, defaults to
+ * [`Quantity::One`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void OfferWithDerivedMetadataBuilder_supported_quantity(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKQuantity quantity);
+
+/**
+ * Builds an [`Offer`] from the builder's settings.
+ */
+MUST_USE_RES struct LDKCResult_OfferBolt12SemanticErrorZ OfferWithDerivedMetadataBuilder_build(struct LDKOfferWithDerivedMetadataBuilder this_arg);
+
+/**
+ * Frees any resources used by the Offer, if is_owned is set and inner is non-NULL.
+ */
+void Offer_free(struct LDKOffer this_obj);
+
+/**
+ * Creates a copy of the Offer
+ */
+struct LDKOffer Offer_clone(const struct LDKOffer *NONNULL_PTR orig);
+
+/**
+ * The chains that may be used when paying a requested invoice (e.g., bitcoin mainnet).
+ * Payments must be denominated in units of the minimal lightning-payable unit (e.g., msats)
+ * for the selected chain.
+ */
+MUST_USE_RES struct LDKCVec_ThirtyTwoBytesZ Offer_chains(const struct LDKOffer *NONNULL_PTR this_arg);
+
+/**
+ * Opaque bytes set by the originator. Useful for authentication and validating fields since it
+ * is reflected in `invoice_request` messages along with all the other fields from the `offer`.
+ */
+MUST_USE_RES struct LDKCOption_CVec_u8ZZ Offer_metadata(const struct LDKOffer *NONNULL_PTR this_arg);
+
+/**
+ * The minimum amount required for a successful payment of a single item.
+ */
+MUST_USE_RES struct LDKCOption_AmountZ Offer_amount(const struct LDKOffer *NONNULL_PTR this_arg);
+
+/**
+ * A complete description of the purpose of the payment. Intended to be displayed to the user
+ * but with the caveat that it has not been verified in any way.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPrintableString Offer_description(const struct LDKOffer *NONNULL_PTR this_arg);
+
+/**
+ * Features pertaining to the offer.
+ */
+MUST_USE_RES struct LDKOfferFeatures Offer_offer_features(const struct LDKOffer *NONNULL_PTR this_arg);
+
+/**
+ * Duration since the Unix epoch when an invoice should no longer be requested.
+ *
+ * If `None`, the offer does not expire.
+ */
+MUST_USE_RES struct LDKCOption_u64Z Offer_absolute_expiry(const struct LDKOffer *NONNULL_PTR this_arg);
+
+/**
+ * The issuer of the offer, possibly beginning with `user@domain` or `domain`. Intended to be
+ * displayed to the user but with the caveat that it has not been verified in any way.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPrintableString Offer_issuer(const struct LDKOffer *NONNULL_PTR this_arg);
+
+/**
+ * Paths to the recipient originating from publicly reachable nodes. Blinded paths provide
+ * recipient privacy by obfuscating its node id.
+ */
+MUST_USE_RES struct LDKCVec_BlindedPathZ Offer_paths(const struct LDKOffer *NONNULL_PTR this_arg);
+
+/**
+ * The quantity of items supported.
+ */
+MUST_USE_RES struct LDKQuantity Offer_supported_quantity(const struct LDKOffer *NONNULL_PTR this_arg);
+
+/**
+ * The public key used by the recipient to sign invoices.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPublicKey Offer_signing_pubkey(const struct LDKOffer *NONNULL_PTR this_arg);
+
+/**
+ * Returns the id of the offer.
+ */
+MUST_USE_RES struct LDKOfferId Offer_id(const struct LDKOffer *NONNULL_PTR this_arg);
+
+/**
+ * Returns whether the given chain is supported by the offer.
+ */
+MUST_USE_RES bool Offer_supports_chain(const struct LDKOffer *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes chain);
+
+/**
+ * Whether the offer has expired.
+ */
+MUST_USE_RES bool Offer_is_expired(const struct LDKOffer *NONNULL_PTR this_arg);
+
+/**
+ * Whether the offer has expired given the duration since the Unix epoch.
+ */
+MUST_USE_RES bool Offer_is_expired_no_std(const struct LDKOffer *NONNULL_PTR this_arg, uint64_t duration_since_epoch);
+
+/**
+ * Returns whether the given quantity is valid for the offer.
+ */
+MUST_USE_RES bool Offer_is_valid_quantity(const struct LDKOffer *NONNULL_PTR this_arg, uint64_t quantity);
+
+/**
+ * Returns whether a quantity is expected in an [`InvoiceRequest`] for the offer.
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ */
+MUST_USE_RES bool Offer_expects_quantity(const struct LDKOffer *NONNULL_PTR this_arg);
+
+/**
+ * Similar to [`Offer::request_invoice`] except it:
+ * - derives the [`InvoiceRequest::payer_id`] such that a different key can be used for each
+ * request,
+ * - sets [`InvoiceRequest::payer_metadata`] when [`InvoiceRequestBuilder::build`] is called
+ * such that it can be used by [`Bolt12Invoice::verify`] to determine if the invoice was
+ * requested using a base [`ExpandedKey`] from which the payer id was derived, and
+ * - includes the [`PaymentId`] encrypted in [`InvoiceRequest::payer_metadata`] so that it can
+ * be used when sending the payment for the requested invoice.
+ *
+ * Useful to protect the sender's privacy.
+ *
+ * [`InvoiceRequest::payer_id`]: crate::offers::invoice_request::InvoiceRequest::payer_id
+ * [`InvoiceRequest::payer_metadata`]: crate::offers::invoice_request::InvoiceRequest::payer_metadata
+ * [`Bolt12Invoice::verify`]: crate::offers::invoice::Bolt12Invoice::verify
+ * [`ExpandedKey`]: crate::ln::inbound_payment::ExpandedKey
+ */
+MUST_USE_RES struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ Offer_request_invoice_deriving_payer_id(const struct LDKOffer *NONNULL_PTR this_arg, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source, struct LDKThirtyTwoBytes payment_id);
+
+/**
+ * Similar to [`Offer::request_invoice_deriving_payer_id`] except uses `payer_id` for the
+ * [`InvoiceRequest::payer_id`] instead of deriving a different key for each request.
+ *
+ * Useful for recurring payments using the same `payer_id` with different invoices.
+ *
+ * [`InvoiceRequest::payer_id`]: crate::offers::invoice_request::InvoiceRequest::payer_id
+ */
+MUST_USE_RES struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ Offer_request_invoice_deriving_metadata(const struct LDKOffer *NONNULL_PTR this_arg, struct LDKPublicKey payer_id, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source, struct LDKThirtyTwoBytes payment_id);
+
+/**
+ * Creates an [`InvoiceRequestBuilder`] for the offer with the given `metadata` and `payer_id`,
+ * which will be reflected in the `Bolt12Invoice` response.
+ *
+ * The `metadata` is useful for including information about the derivation of `payer_id` such
+ * that invoice response handling can be stateless. Also serves as payer-provided entropy while
+ * hashing in the signature calculation.
+ *
+ * This should not leak any information such as by using a simple BIP-32 derivation path.
+ * Otherwise, payments may be correlated.
+ *
+ * Errors if the offer contains unknown required features.
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ */
+MUST_USE_RES struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ Offer_request_invoice(const struct LDKOffer *NONNULL_PTR this_arg, struct LDKCVec_u8Z metadata, struct LDKPublicKey payer_id);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the Offer.
+ */
+uint64_t Offer_hash(const struct LDKOffer *NONNULL_PTR o);
+
+/**
+ * Serialize the Offer object into a byte array which can be read by Offer_read
+ */
+struct LDKCVec_u8Z Offer_write(const struct LDKOffer *NONNULL_PTR obj);
+
+/**
+ * Frees any resources used by the Amount
+ */
+void Amount_free(struct LDKAmount this_ptr);
+
+/**
+ * Creates a copy of the Amount
+ */
+struct LDKAmount Amount_clone(const struct LDKAmount *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new Bitcoin-variant Amount
+ */
+struct LDKAmount Amount_bitcoin(uint64_t amount_msats);
+
+/**
+ * Utility method to constructs a new Currency-variant Amount
+ */
+struct LDKAmount Amount_currency(struct LDKThreeBytes iso4217_code, uint64_t amount);
+
+/**
+ * Frees any resources used by the Quantity
+ */
+void Quantity_free(struct LDKQuantity this_ptr);
+
+/**
+ * Creates a copy of the Quantity
+ */
+struct LDKQuantity Quantity_clone(const struct LDKQuantity *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new Bounded-variant Quantity
+ */
+struct LDKQuantity Quantity_bounded(uint64_t a);
+
+/**
+ * Utility method to constructs a new Unbounded-variant Quantity
+ */
+struct LDKQuantity Quantity_unbounded(void);
+
+/**
+ * Utility method to constructs a new One-variant Quantity
+ */
+struct LDKQuantity Quantity_one(void);
+
+/**
+ * Read a Offer object from a string
+ */
+struct LDKCResult_OfferBolt12ParseErrorZ Offer_from_str(struct LDKStr s);
+
+/**
+ * Get the string representation of a Offer object
+ */
+struct LDKStr Offer_to_str(const struct LDKOffer *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the InvoiceWithExplicitSigningPubkeyBuilder, if is_owned is set and inner is non-NULL.
+ */
+void InvoiceWithExplicitSigningPubkeyBuilder_free(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_obj);
+
+/**
+ * Frees any resources used by the InvoiceWithDerivedSigningPubkeyBuilder, if is_owned is set and inner is non-NULL.
+ */
+void InvoiceWithDerivedSigningPubkeyBuilder_free(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_obj);
+
+/**
+ * Builds an unsigned [`Bolt12Invoice`] after checking for valid semantics. It can be signed by
+ * [`UnsignedBolt12Invoice::sign`].
+ */
+MUST_USE_RES struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ InvoiceWithExplicitSigningPubkeyBuilder_build(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg);
+
+/**
+ * Sets the [`Bolt12Invoice::relative_expiry`] as seconds since [`Bolt12Invoice::created_at`].
+ * Any expiry that has already passed is valid and can be checked for using
+ * [`Bolt12Invoice::is_expired`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, uint32_t relative_expiry_secs);
+
+/**
+ * Adds a P2WSH address to [`Bolt12Invoice::fallbacks`].
+ *
+ * Successive calls to this method will add another address. Caller is responsible for not
+ * adding duplicate addresses and only calling if capable of receiving to P2WSH addresses.
+ */
+MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, const uint8_t (*script_hash)[32]);
+
+/**
+ * Adds a P2WPKH address to [`Bolt12Invoice::fallbacks`].
+ *
+ * Successive calls to this method will add another address. Caller is responsible for not
+ * adding duplicate addresses and only calling if capable of receiving to P2WPKH addresses.
+ */
+MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, const uint8_t (*pubkey_hash)[20]);
+
+/**
+ * Adds a P2TR address to [`Bolt12Invoice::fallbacks`].
+ *
+ * Successive calls to this method will add another address. Caller is responsible for not
+ * adding duplicate addresses and only calling if capable of receiving to P2TR addresses.
+ */
+MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, struct LDKTweakedPublicKey output_key);
+
+/**
+ * Sets [`Bolt12Invoice::invoice_features`] to indicate MPP may be used. Otherwise, MPP is
+ * disallowed.
+ */
+MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg);
+
+/**
+ * Builds a signed [`Bolt12Invoice`] after checking for valid semantics.
+ */
+MUST_USE_RES struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg);
+
+/**
+ * Sets the [`Bolt12Invoice::relative_expiry`] as seconds since [`Bolt12Invoice::created_at`].
+ * Any expiry that has already passed is valid and can be checked for using
+ * [`Bolt12Invoice::is_expired`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, uint32_t relative_expiry_secs);
+
+/**
+ * Adds a P2WSH address to [`Bolt12Invoice::fallbacks`].
+ *
+ * Successive calls to this method will add another address. Caller is responsible for not
+ * adding duplicate addresses and only calling if capable of receiving to P2WSH addresses.
+ */
+MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, const uint8_t (*script_hash)[32]);
+
+/**
+ * Adds a P2WPKH address to [`Bolt12Invoice::fallbacks`].
+ *
+ * Successive calls to this method will add another address. Caller is responsible for not
+ * adding duplicate addresses and only calling if capable of receiving to P2WPKH addresses.
+ */
+MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, const uint8_t (*pubkey_hash)[20]);
+
+/**
+ * Adds a P2TR address to [`Bolt12Invoice::fallbacks`].
+ *
+ * Successive calls to this method will add another address. Caller is responsible for not
+ * adding duplicate addresses and only calling if capable of receiving to P2TR addresses.
+ */
+MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, struct LDKTweakedPublicKey output_key);
+
+/**
+ * Sets [`Bolt12Invoice::invoice_features`] to indicate MPP may be used. Otherwise, MPP is
+ * disallowed.
+ */
+MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg);
+
+/**
+ * Frees any resources used by the UnsignedBolt12Invoice, if is_owned is set and inner is non-NULL.
+ */
+void UnsignedBolt12Invoice_free(struct LDKUnsignedBolt12Invoice this_obj);
+
+/**
+ * Creates a copy of the UnsignedBolt12Invoice
+ */
+struct LDKUnsignedBolt12Invoice UnsignedBolt12Invoice_clone(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR orig);
+
+/**
+ * Calls the free function if one is set
+ */
+void SignBolt12InvoiceFn_free(struct LDKSignBolt12InvoiceFn this_ptr);
+
+/**
+ * Returns the [`TaggedHash`] of the invoice to sign.
+ */
+MUST_USE_RES struct LDKTaggedHash UnsignedBolt12Invoice_tagged_hash(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * Frees any resources used by the Bolt12Invoice, if is_owned is set and inner is non-NULL.
+ */
+void Bolt12Invoice_free(struct LDKBolt12Invoice this_obj);
+
+/**
+ * Creates a copy of the Bolt12Invoice
+ */
+struct LDKBolt12Invoice Bolt12Invoice_clone(const struct LDKBolt12Invoice *NONNULL_PTR orig);
+
+/**
+ * The chains that may be used when paying a requested invoice.
+ *
+ * From [`Offer::chains`]; `None` if the invoice was created in response to a [`Refund`].
+ *
+ * [`Offer::chains`]: crate::offers::offer::Offer::chains
+ */
+MUST_USE_RES struct LDKCOption_CVec_ThirtyTwoBytesZZ UnsignedBolt12Invoice_offer_chains(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * The chain that must be used when paying the invoice; selected from [`offer_chains`] if the
+ * invoice originated from an offer.
+ *
+ * From [`InvoiceRequest::chain`] or [`Refund::chain`].
+ *
+ * [`offer_chains`]: Self::offer_chains
+ * [`InvoiceRequest::chain`]: crate::offers::invoice_request::InvoiceRequest::chain
+ */
+MUST_USE_RES struct LDKThirtyTwoBytes UnsignedBolt12Invoice_chain(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * Opaque bytes set by the originating [`Offer`].
+ *
+ * From [`Offer::metadata`]; `None` if the invoice was created in response to a [`Refund`] or
+ * if the [`Offer`] did not set it.
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ * [`Offer::metadata`]: crate::offers::offer::Offer::metadata
+ */
+MUST_USE_RES struct LDKCOption_CVec_u8ZZ UnsignedBolt12Invoice_metadata(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * The minimum amount required for a successful payment of a single item.
+ *
+ * From [`Offer::amount`]; `None` if the invoice was created in response to a [`Refund`] or if
+ * the [`Offer`] did not set it.
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ * [`Offer::amount`]: crate::offers::offer::Offer::amount
+ */
+MUST_USE_RES struct LDKCOption_AmountZ UnsignedBolt12Invoice_amount(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * Features pertaining to the originating [`Offer`].
+ *
+ * From [`Offer::offer_features`]; `None` if the invoice was created in response to a
+ * [`Refund`].
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ * [`Offer::offer_features`]: crate::offers::offer::Offer::offer_features
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKOfferFeatures UnsignedBolt12Invoice_offer_features(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * A complete description of the purpose of the originating offer or refund.
+ *
+ * From [`Offer::description`] or [`Refund::description`].
+ *
+ * [`Offer::description`]: crate::offers::offer::Offer::description
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPrintableString UnsignedBolt12Invoice_description(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * Duration since the Unix epoch when an invoice should no longer be requested.
+ *
+ * From [`Offer::absolute_expiry`] or [`Refund::absolute_expiry`].
+ *
+ * [`Offer::absolute_expiry`]: crate::offers::offer::Offer::absolute_expiry
+ */
+MUST_USE_RES struct LDKCOption_u64Z UnsignedBolt12Invoice_absolute_expiry(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * The issuer of the offer or refund.
+ *
+ * From [`Offer::issuer`] or [`Refund::issuer`].
+ *
+ * [`Offer::issuer`]: crate::offers::offer::Offer::issuer
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPrintableString UnsignedBolt12Invoice_issuer(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * Paths to the recipient originating from publicly reachable nodes.
+ *
+ * From [`Offer::paths`] or [`Refund::paths`].
+ *
+ * [`Offer::paths`]: crate::offers::offer::Offer::paths
+ */
+MUST_USE_RES struct LDKCVec_BlindedPathZ UnsignedBolt12Invoice_message_paths(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * The quantity of items supported.
+ *
+ * From [`Offer::supported_quantity`]; `None` if the invoice was created in response to a
+ * [`Refund`].
+ *
+ * [`Offer::supported_quantity`]: crate::offers::offer::Offer::supported_quantity
+ */
+MUST_USE_RES struct LDKCOption_QuantityZ UnsignedBolt12Invoice_supported_quantity(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * An unpredictable series of bytes from the payer.
+ *
+ * From [`InvoiceRequest::payer_metadata`] or [`Refund::payer_metadata`].
+ */
+MUST_USE_RES struct LDKu8slice UnsignedBolt12Invoice_payer_metadata(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * Features pertaining to requesting an invoice.
+ *
+ * From [`InvoiceRequest::invoice_request_features`] or [`Refund::features`].
+ */
+MUST_USE_RES struct LDKInvoiceRequestFeatures UnsignedBolt12Invoice_invoice_request_features(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * The quantity of items requested or refunded for.
+ *
+ * From [`InvoiceRequest::quantity`] or [`Refund::quantity`].
+ */
+MUST_USE_RES struct LDKCOption_u64Z UnsignedBolt12Invoice_quantity(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * A possibly transient pubkey used to sign the invoice request or to send an invoice for a
+ * refund in case there are no [`message_paths`].
+ *
+ * [`message_paths`]: Self::message_paths
+ */
+MUST_USE_RES struct LDKPublicKey UnsignedBolt12Invoice_payer_id(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * A payer-provided note reflected back in the invoice.
+ *
+ * From [`InvoiceRequest::payer_note`] or [`Refund::payer_note`].
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPrintableString UnsignedBolt12Invoice_payer_note(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * Duration since the Unix epoch when the invoice was created.
+ */
+MUST_USE_RES uint64_t UnsignedBolt12Invoice_created_at(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * Duration since [`Bolt12Invoice::created_at`] when the invoice has expired and therefore
+ * should no longer be paid.
+ */
+MUST_USE_RES uint64_t UnsignedBolt12Invoice_relative_expiry(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * Whether the invoice has expired.
+ */
+MUST_USE_RES bool UnsignedBolt12Invoice_is_expired(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * SHA256 hash of the payment preimage that will be given in return for paying the invoice.
+ */
+MUST_USE_RES struct LDKThirtyTwoBytes UnsignedBolt12Invoice_payment_hash(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * The minimum amount required for a successful payment of the invoice.
+ */
+MUST_USE_RES uint64_t UnsignedBolt12Invoice_amount_msats(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * Features pertaining to paying an invoice.
+ */
+MUST_USE_RES struct LDKBolt12InvoiceFeatures UnsignedBolt12Invoice_invoice_features(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * The public key corresponding to the key used to sign the invoice.
+ */
+MUST_USE_RES struct LDKPublicKey UnsignedBolt12Invoice_signing_pubkey(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * The chains that may be used when paying a requested invoice.
+ *
+ * From [`Offer::chains`]; `None` if the invoice was created in response to a [`Refund`].
+ *
+ * [`Offer::chains`]: crate::offers::offer::Offer::chains
+ */
+MUST_USE_RES struct LDKCOption_CVec_ThirtyTwoBytesZZ Bolt12Invoice_offer_chains(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * The chain that must be used when paying the invoice; selected from [`offer_chains`] if the
+ * invoice originated from an offer.
+ *
+ * From [`InvoiceRequest::chain`] or [`Refund::chain`].
+ *
+ * [`offer_chains`]: Self::offer_chains
+ * [`InvoiceRequest::chain`]: crate::offers::invoice_request::InvoiceRequest::chain
+ */
+MUST_USE_RES struct LDKThirtyTwoBytes Bolt12Invoice_chain(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * Opaque bytes set by the originating [`Offer`].
+ *
+ * From [`Offer::metadata`]; `None` if the invoice was created in response to a [`Refund`] or
+ * if the [`Offer`] did not set it.
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ * [`Offer::metadata`]: crate::offers::offer::Offer::metadata
+ */
+MUST_USE_RES struct LDKCOption_CVec_u8ZZ Bolt12Invoice_metadata(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * The minimum amount required for a successful payment of a single item.
+ *
+ * From [`Offer::amount`]; `None` if the invoice was created in response to a [`Refund`] or if
+ * the [`Offer`] did not set it.
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ * [`Offer::amount`]: crate::offers::offer::Offer::amount
+ */
+MUST_USE_RES struct LDKCOption_AmountZ Bolt12Invoice_amount(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * Features pertaining to the originating [`Offer`].
+ *
+ * From [`Offer::offer_features`]; `None` if the invoice was created in response to a
+ * [`Refund`].
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ * [`Offer::offer_features`]: crate::offers::offer::Offer::offer_features
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKOfferFeatures Bolt12Invoice_offer_features(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * A complete description of the purpose of the originating offer or refund.
+ *
+ * From [`Offer::description`] or [`Refund::description`].
+ *
+ * [`Offer::description`]: crate::offers::offer::Offer::description
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPrintableString Bolt12Invoice_description(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * Duration since the Unix epoch when an invoice should no longer be requested.
+ *
+ * From [`Offer::absolute_expiry`] or [`Refund::absolute_expiry`].
+ *
+ * [`Offer::absolute_expiry`]: crate::offers::offer::Offer::absolute_expiry
+ */
+MUST_USE_RES struct LDKCOption_u64Z Bolt12Invoice_absolute_expiry(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * The issuer of the offer or refund.
+ *
+ * From [`Offer::issuer`] or [`Refund::issuer`].
+ *
+ * [`Offer::issuer`]: crate::offers::offer::Offer::issuer
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPrintableString Bolt12Invoice_issuer(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * Paths to the recipient originating from publicly reachable nodes.
+ *
+ * From [`Offer::paths`] or [`Refund::paths`].
+ *
+ * [`Offer::paths`]: crate::offers::offer::Offer::paths
+ */
+MUST_USE_RES struct LDKCVec_BlindedPathZ Bolt12Invoice_message_paths(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * The quantity of items supported.
+ *
+ * From [`Offer::supported_quantity`]; `None` if the invoice was created in response to a
+ * [`Refund`].
+ *
+ * [`Offer::supported_quantity`]: crate::offers::offer::Offer::supported_quantity
+ */
+MUST_USE_RES struct LDKCOption_QuantityZ Bolt12Invoice_supported_quantity(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * An unpredictable series of bytes from the payer.
+ *
+ * From [`InvoiceRequest::payer_metadata`] or [`Refund::payer_metadata`].
+ */
+MUST_USE_RES struct LDKu8slice Bolt12Invoice_payer_metadata(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * Features pertaining to requesting an invoice.
+ *
+ * From [`InvoiceRequest::invoice_request_features`] or [`Refund::features`].
+ */
+MUST_USE_RES struct LDKInvoiceRequestFeatures Bolt12Invoice_invoice_request_features(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * The quantity of items requested or refunded for.
+ *
+ * From [`InvoiceRequest::quantity`] or [`Refund::quantity`].
+ */
+MUST_USE_RES struct LDKCOption_u64Z Bolt12Invoice_quantity(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * A possibly transient pubkey used to sign the invoice request or to send an invoice for a
+ * refund in case there are no [`message_paths`].
+ *
+ * [`message_paths`]: Self::message_paths
+ */
+MUST_USE_RES struct LDKPublicKey Bolt12Invoice_payer_id(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * A payer-provided note reflected back in the invoice.
+ *
+ * From [`InvoiceRequest::payer_note`] or [`Refund::payer_note`].
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPrintableString Bolt12Invoice_payer_note(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * Duration since the Unix epoch when the invoice was created.
+ */
+MUST_USE_RES uint64_t Bolt12Invoice_created_at(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * Duration since [`Bolt12Invoice::created_at`] when the invoice has expired and therefore
+ * should no longer be paid.
+ */
+MUST_USE_RES uint64_t Bolt12Invoice_relative_expiry(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * Whether the invoice has expired.
+ */
+MUST_USE_RES bool Bolt12Invoice_is_expired(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * SHA256 hash of the payment preimage that will be given in return for paying the invoice.
+ */
+MUST_USE_RES struct LDKThirtyTwoBytes Bolt12Invoice_payment_hash(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * The minimum amount required for a successful payment of the invoice.
+ */
+MUST_USE_RES uint64_t Bolt12Invoice_amount_msats(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * Features pertaining to paying an invoice.
+ */
+MUST_USE_RES struct LDKBolt12InvoiceFeatures Bolt12Invoice_invoice_features(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * The public key corresponding to the key used to sign the invoice.
+ */
+MUST_USE_RES struct LDKPublicKey Bolt12Invoice_signing_pubkey(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * Signature of the invoice verified using [`Bolt12Invoice::signing_pubkey`].
+ */
+MUST_USE_RES struct LDKSchnorrSignature Bolt12Invoice_signature(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * Hash that was used for signing the invoice.
+ */
+MUST_USE_RES struct LDKThirtyTwoBytes Bolt12Invoice_signable_hash(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+
+/**
+ * Verifies that the invoice was for a request or refund created using the given key. Returns
+ * the associated [`PaymentId`] to use when sending the payment.
+ */
+MUST_USE_RES struct LDKCResult_ThirtyTwoBytesNoneZ Bolt12Invoice_verify(const struct LDKBolt12Invoice *NONNULL_PTR this_arg, const struct LDKExpandedKey *NONNULL_PTR key);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the Bolt12Invoice.
+ */
+uint64_t Bolt12Invoice_hash(const struct LDKBolt12Invoice *NONNULL_PTR o);
+
+/**
+ * Serialize the UnsignedBolt12Invoice object into a byte array which can be read by UnsignedBolt12Invoice_read
+ */
+struct LDKCVec_u8Z UnsignedBolt12Invoice_write(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR obj);
+
+/**
+ * Serialize the Bolt12Invoice object into a byte array which can be read by Bolt12Invoice_read
+ */
+struct LDKCVec_u8Z Bolt12Invoice_write(const struct LDKBolt12Invoice *NONNULL_PTR obj);
+
+/**
+ * Frees any resources used by the BlindedPayInfo, if is_owned is set and inner is non-NULL.
+ */
+void BlindedPayInfo_free(struct LDKBlindedPayInfo this_obj);
+
+/**
+ * Base fee charged (in millisatoshi) for the entire blinded path.
+ */
+uint32_t BlindedPayInfo_get_fee_base_msat(const struct LDKBlindedPayInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Base fee charged (in millisatoshi) for the entire blinded path.
+ */
+void BlindedPayInfo_set_fee_base_msat(struct LDKBlindedPayInfo *NONNULL_PTR this_ptr, uint32_t val);
+
+/**
+ * Liquidity fee charged (in millionths of the amount transferred) for the entire blinded path
+ * (i.e., 10,000 is 1%).
+ */
+uint32_t BlindedPayInfo_get_fee_proportional_millionths(const struct LDKBlindedPayInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Liquidity fee charged (in millionths of the amount transferred) for the entire blinded path
+ * (i.e., 10,000 is 1%).
+ */
+void BlindedPayInfo_set_fee_proportional_millionths(struct LDKBlindedPayInfo *NONNULL_PTR this_ptr, uint32_t val);
+
+/**
+ * Number of blocks subtracted from an incoming HTLC's `cltv_expiry` for the entire blinded
+ * path.
+ */
+uint16_t BlindedPayInfo_get_cltv_expiry_delta(const struct LDKBlindedPayInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Number of blocks subtracted from an incoming HTLC's `cltv_expiry` for the entire blinded
+ * path.
+ */
+void BlindedPayInfo_set_cltv_expiry_delta(struct LDKBlindedPayInfo *NONNULL_PTR this_ptr, uint16_t val);
+
+/**
+ * The minimum HTLC value (in millisatoshi) that is acceptable to all channel peers on the
+ * blinded path from the introduction node to the recipient, accounting for any fees, i.e., as
+ * seen by the recipient.
+ */
+uint64_t BlindedPayInfo_get_htlc_minimum_msat(const struct LDKBlindedPayInfo *NONNULL_PTR this_ptr);
+
+/**
+ * The minimum HTLC value (in millisatoshi) that is acceptable to all channel peers on the
+ * blinded path from the introduction node to the recipient, accounting for any fees, i.e., as
+ * seen by the recipient.
+ */
+void BlindedPayInfo_set_htlc_minimum_msat(struct LDKBlindedPayInfo *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * The maximum HTLC value (in millisatoshi) that is acceptable to all channel peers on the
+ * blinded path from the introduction node to the recipient, accounting for any fees, i.e., as
+ * seen by the recipient.
+ */
+uint64_t BlindedPayInfo_get_htlc_maximum_msat(const struct LDKBlindedPayInfo *NONNULL_PTR this_ptr);
+
+/**
+ * The maximum HTLC value (in millisatoshi) that is acceptable to all channel peers on the
+ * blinded path from the introduction node to the recipient, accounting for any fees, i.e., as
+ * seen by the recipient.
+ */
+void BlindedPayInfo_set_htlc_maximum_msat(struct LDKBlindedPayInfo *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * Features set in `encrypted_data_tlv` for the `encrypted_recipient_data` TLV record in an
+ * onion payload.
+ */
+struct LDKBlindedHopFeatures BlindedPayInfo_get_features(const struct LDKBlindedPayInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Features set in `encrypted_data_tlv` for the `encrypted_recipient_data` TLV record in an
+ * onion payload.
+ */
+void BlindedPayInfo_set_features(struct LDKBlindedPayInfo *NONNULL_PTR this_ptr, struct LDKBlindedHopFeatures val);
+
+/**
+ * Constructs a new BlindedPayInfo given each field
+ */
+MUST_USE_RES struct LDKBlindedPayInfo BlindedPayInfo_new(uint32_t fee_base_msat_arg, uint32_t fee_proportional_millionths_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg, uint64_t htlc_maximum_msat_arg, struct LDKBlindedHopFeatures features_arg);
+
+/**
+ * Creates a copy of the BlindedPayInfo
+ */
+struct LDKBlindedPayInfo BlindedPayInfo_clone(const struct LDKBlindedPayInfo *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the BlindedPayInfo.
+ */
+uint64_t BlindedPayInfo_hash(const struct LDKBlindedPayInfo *NONNULL_PTR o);
+
+/**
+ * Checks if two BlindedPayInfos contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool BlindedPayInfo_eq(const struct LDKBlindedPayInfo *NONNULL_PTR a, const struct LDKBlindedPayInfo *NONNULL_PTR b);
+
+/**
+ * Serialize the BlindedPayInfo object into a byte array which can be read by BlindedPayInfo_read
+ */
+struct LDKCVec_u8Z BlindedPayInfo_write(const struct LDKBlindedPayInfo *NONNULL_PTR obj);
+
+/**
+ * Read a BlindedPayInfo from a byte array, created by BlindedPayInfo_write
+ */
+struct LDKCResult_BlindedPayInfoDecodeErrorZ BlindedPayInfo_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the InvoiceError, if is_owned is set and inner is non-NULL.
+ */
+void InvoiceError_free(struct LDKInvoiceError this_obj);
+
+/**
+ * The field in the [`InvoiceRequest`] or the [`Bolt12Invoice`] that contained an error.
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKErroneousField InvoiceError_get_erroneous_field(const struct LDKInvoiceError *NONNULL_PTR this_ptr);
+
+/**
+ * The field in the [`InvoiceRequest`] or the [`Bolt12Invoice`] that contained an error.
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void InvoiceError_set_erroneous_field(struct LDKInvoiceError *NONNULL_PTR this_ptr, struct LDKErroneousField val);
+
+/**
+ * An explanation of the error.
+ */
+struct LDKUntrustedString InvoiceError_get_message(const struct LDKInvoiceError *NONNULL_PTR this_ptr);
+
+/**
+ * An explanation of the error.
+ */
+void InvoiceError_set_message(struct LDKInvoiceError *NONNULL_PTR this_ptr, struct LDKUntrustedString val);
+
+/**
+ * Constructs a new InvoiceError given each field
+ *
+ * Note that erroneous_field_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKInvoiceError InvoiceError_new(struct LDKErroneousField erroneous_field_arg, struct LDKUntrustedString message_arg);
+
+/**
+ * Creates a copy of the InvoiceError
+ */
+struct LDKInvoiceError InvoiceError_clone(const struct LDKInvoiceError *NONNULL_PTR orig);
+
+/**
+ * Frees any resources used by the ErroneousField, if is_owned is set and inner is non-NULL.
+ */
+void ErroneousField_free(struct LDKErroneousField this_obj);
+
+/**
+ * The type number of the TLV field containing the error.
+ */
+uint64_t ErroneousField_get_tlv_fieldnum(const struct LDKErroneousField *NONNULL_PTR this_ptr);
+
+/**
+ * The type number of the TLV field containing the error.
+ */
+void ErroneousField_set_tlv_fieldnum(struct LDKErroneousField *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * A value to use for the TLV field to avoid the error.
+ *
+ * Returns a copy of the field.
+ */
+struct LDKCOption_CVec_u8ZZ ErroneousField_get_suggested_value(const struct LDKErroneousField *NONNULL_PTR this_ptr);
+
+/**
+ * A value to use for the TLV field to avoid the error.
+ */
+void ErroneousField_set_suggested_value(struct LDKErroneousField *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val);
+
+/**
+ * Constructs a new ErroneousField given each field
+ */
+MUST_USE_RES struct LDKErroneousField ErroneousField_new(uint64_t tlv_fieldnum_arg, struct LDKCOption_CVec_u8ZZ suggested_value_arg);
+
+/**
+ * Creates a copy of the ErroneousField
+ */
+struct LDKErroneousField ErroneousField_clone(const struct LDKErroneousField *NONNULL_PTR orig);
+
+/**
+ * Creates an [`InvoiceError`] with the given message.
+ */
+MUST_USE_RES struct LDKInvoiceError InvoiceError_from_string(struct LDKStr s);
+
+/**
+ * Get the string representation of a InvoiceError object
+ */
+struct LDKStr InvoiceError_to_str(const struct LDKInvoiceError *NONNULL_PTR o);
+
+/**
+ * Serialize the InvoiceError object into a byte array which can be read by InvoiceError_read
+ */
+struct LDKCVec_u8Z InvoiceError_write(const struct LDKInvoiceError *NONNULL_PTR obj);
+
+/**
+ * Read a InvoiceError from a byte array, created by InvoiceError_write
+ */
+struct LDKCResult_InvoiceErrorDecodeErrorZ InvoiceError_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the InvoiceRequestWithExplicitPayerIdBuilder, if is_owned is set and inner is non-NULL.
+ */
+void InvoiceRequestWithExplicitPayerIdBuilder_free(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_obj);
+
+/**
+ * Frees any resources used by the InvoiceRequestWithDerivedPayerIdBuilder, if is_owned is set and inner is non-NULL.
+ */
+void InvoiceRequestWithDerivedPayerIdBuilder_free(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_obj);
+
+/**
+ * Builds an unsigned [`InvoiceRequest`] after checking for valid semantics. It can be signed
+ * by [`UnsignedInvoiceRequest::sign`].
+ */
+MUST_USE_RES struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_build(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg);
+
+/**
+ * Sets the [`InvoiceRequest::chain`] of the given [`Network`] for paying an invoice. If not
+ * called, [`Network::Bitcoin`] is assumed. Errors if the chain for `network` is not supported
+ * by the offer.
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_chain(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, enum LDKNetwork network);
+
+/**
+ * Sets the [`InvoiceRequest::amount_msats`] for paying an invoice. Errors if `amount_msats` is
+ * not at least the expected invoice amount (i.e., [`Offer::amount`] times [`quantity`]).
+ *
+ * Successive calls to this method will override the previous setting.
+ *
+ * [`quantity`]: Self::quantity
+ */
+MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, uint64_t amount_msats);
+
+/**
+ * Sets [`InvoiceRequest::quantity`] of items. If not set, `1` is assumed. Errors if `quantity`
+ * does not conform to [`Offer::is_valid_quantity`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_quantity(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, uint64_t quantity);
+
+/**
+ * Sets the [`InvoiceRequest::payer_note`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void InvoiceRequestWithExplicitPayerIdBuilder_payer_note(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, struct LDKStr payer_note);
+
+/**
+ * Builds a signed [`InvoiceRequest`] after checking for valid semantics.
+ */
+MUST_USE_RES struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg);
+
+/**
+ * Sets the [`InvoiceRequest::chain`] of the given [`Network`] for paying an invoice. If not
+ * called, [`Network::Bitcoin`] is assumed. Errors if the chain for `network` is not supported
+ * by the offer.
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_chain(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, enum LDKNetwork network);
+
+/**
+ * Sets the [`InvoiceRequest::amount_msats`] for paying an invoice. Errors if `amount_msats` is
+ * not at least the expected invoice amount (i.e., [`Offer::amount`] times [`quantity`]).
+ *
+ * Successive calls to this method will override the previous setting.
+ *
+ * [`quantity`]: Self::quantity
+ */
+MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, uint64_t amount_msats);
+
+/**
+ * Sets [`InvoiceRequest::quantity`] of items. If not set, `1` is assumed. Errors if `quantity`
+ * does not conform to [`Offer::is_valid_quantity`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_quantity(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, uint64_t quantity);
+
+/**
+ * Sets the [`InvoiceRequest::payer_note`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void InvoiceRequestWithDerivedPayerIdBuilder_payer_note(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, struct LDKStr payer_note);
+
+/**
+ * Frees any resources used by the UnsignedInvoiceRequest, if is_owned is set and inner is non-NULL.
+ */
+void UnsignedInvoiceRequest_free(struct LDKUnsignedInvoiceRequest this_obj);
+
+/**
+ * Creates a copy of the UnsignedInvoiceRequest
+ */
+struct LDKUnsignedInvoiceRequest UnsignedInvoiceRequest_clone(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR orig);
+
+/**
+ * Calls the free function if one is set
+ */
+void SignInvoiceRequestFn_free(struct LDKSignInvoiceRequestFn this_ptr);
+
+/**
+ * Returns the [`TaggedHash`] of the invoice to sign.
+ */
+MUST_USE_RES struct LDKTaggedHash UnsignedInvoiceRequest_tagged_hash(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * Frees any resources used by the InvoiceRequest, if is_owned is set and inner is non-NULL.
+ */
+void InvoiceRequest_free(struct LDKInvoiceRequest this_obj);
+
+/**
+ * Creates a copy of the InvoiceRequest
+ */
+struct LDKInvoiceRequest InvoiceRequest_clone(const struct LDKInvoiceRequest *NONNULL_PTR orig);
+
+/**
+ * Frees any resources used by the VerifiedInvoiceRequest, if is_owned is set and inner is non-NULL.
+ */
+void VerifiedInvoiceRequest_free(struct LDKVerifiedInvoiceRequest this_obj);
+
+/**
+ * The identifier of the [`Offer`] for which the [`InvoiceRequest`] was made.
+ */
+struct LDKOfferId VerifiedInvoiceRequest_get_offer_id(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr);
+
+/**
+ * The identifier of the [`Offer`] for which the [`InvoiceRequest`] was made.
+ */
+void VerifiedInvoiceRequest_set_offer_id(struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr, struct LDKOfferId val);
+
+/**
+ * Keys used for signing a [`Bolt12Invoice`] if they can be derived.
+ *
+ * If `Some`, must call [`respond_using_derived_keys`] when responding. Otherwise, call
+ * [`respond_with`].
+ *
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ * [`respond_using_derived_keys`]: Self::respond_using_derived_keys
+ * [`respond_with`]: Self::respond_with
+ */
+struct LDKCOption_SecretKeyZ VerifiedInvoiceRequest_get_keys(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr);
+
+/**
+ * Keys used for signing a [`Bolt12Invoice`] if they can be derived.
+ *
+ * If `Some`, must call [`respond_using_derived_keys`] when responding. Otherwise, call
+ * [`respond_with`].
+ *
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ * [`respond_using_derived_keys`]: Self::respond_using_derived_keys
+ * [`respond_with`]: Self::respond_with
+ */
+void VerifiedInvoiceRequest_set_keys(struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr, struct LDKCOption_SecretKeyZ val);
+
+/**
+ * Creates a copy of the VerifiedInvoiceRequest
+ */
+struct LDKVerifiedInvoiceRequest VerifiedInvoiceRequest_clone(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR orig);
+
+/**
+ * The chains that may be used when paying a requested invoice (e.g., bitcoin mainnet).
+ * Payments must be denominated in units of the minimal lightning-payable unit (e.g., msats)
+ * for the selected chain.
+ */
+MUST_USE_RES struct LDKCVec_ThirtyTwoBytesZ UnsignedInvoiceRequest_chains(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * Opaque bytes set by the originator. Useful for authentication and validating fields since it
+ * is reflected in `invoice_request` messages along with all the other fields from the `offer`.
+ */
+MUST_USE_RES struct LDKCOption_CVec_u8ZZ UnsignedInvoiceRequest_metadata(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * The minimum amount required for a successful payment of a single item.
+ */
+MUST_USE_RES struct LDKCOption_AmountZ UnsignedInvoiceRequest_amount(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * A complete description of the purpose of the payment. Intended to be displayed to the user
+ * but with the caveat that it has not been verified in any way.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPrintableString UnsignedInvoiceRequest_description(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * Features pertaining to the offer.
+ */
+MUST_USE_RES struct LDKOfferFeatures UnsignedInvoiceRequest_offer_features(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * Duration since the Unix epoch when an invoice should no longer be requested.
+ *
+ * If `None`, the offer does not expire.
+ */
+MUST_USE_RES struct LDKCOption_u64Z UnsignedInvoiceRequest_absolute_expiry(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * The issuer of the offer, possibly beginning with `user@domain` or `domain`. Intended to be
+ * displayed to the user but with the caveat that it has not been verified in any way.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPrintableString UnsignedInvoiceRequest_issuer(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * Paths to the recipient originating from publicly reachable nodes. Blinded paths provide
+ * recipient privacy by obfuscating its node id.
+ */
+MUST_USE_RES struct LDKCVec_BlindedPathZ UnsignedInvoiceRequest_paths(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * The quantity of items supported.
+ */
+MUST_USE_RES struct LDKQuantity UnsignedInvoiceRequest_supported_quantity(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * The public key used by the recipient to sign invoices.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPublicKey UnsignedInvoiceRequest_signing_pubkey(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * An unpredictable series of bytes, typically containing information about the derivation of
+ * [`payer_id`].
+ *
+ * [`payer_id`]: Self::payer_id
+ */
+MUST_USE_RES struct LDKu8slice UnsignedInvoiceRequest_payer_metadata(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * A chain from [`Offer::chains`] that the offer is valid for.
+ */
+MUST_USE_RES struct LDKThirtyTwoBytes UnsignedInvoiceRequest_chain(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * The amount to pay in msats (i.e., the minimum lightning-payable unit for [`chain`]), which
+ * must be greater than or equal to [`Offer::amount`], converted if necessary.
+ *
+ * [`chain`]: Self::chain
+ */
+MUST_USE_RES struct LDKCOption_u64Z UnsignedInvoiceRequest_amount_msats(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * Features pertaining to requesting an invoice.
+ */
+MUST_USE_RES struct LDKInvoiceRequestFeatures UnsignedInvoiceRequest_invoice_request_features(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * The quantity of the offer's item conforming to [`Offer::is_valid_quantity`].
+ */
+MUST_USE_RES struct LDKCOption_u64Z UnsignedInvoiceRequest_quantity(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * A possibly transient pubkey used to sign the invoice request.
+ */
+MUST_USE_RES struct LDKPublicKey UnsignedInvoiceRequest_payer_id(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * A payer-provided note which will be seen by the recipient and reflected back in the invoice
+ * response.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPrintableString UnsignedInvoiceRequest_payer_note(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * The chains that may be used when paying a requested invoice (e.g., bitcoin mainnet).
+ * Payments must be denominated in units of the minimal lightning-payable unit (e.g., msats)
+ * for the selected chain.
+ */
+MUST_USE_RES struct LDKCVec_ThirtyTwoBytesZ InvoiceRequest_chains(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * Opaque bytes set by the originator. Useful for authentication and validating fields since it
+ * is reflected in `invoice_request` messages along with all the other fields from the `offer`.
+ */
+MUST_USE_RES struct LDKCOption_CVec_u8ZZ InvoiceRequest_metadata(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * The minimum amount required for a successful payment of a single item.
+ */
+MUST_USE_RES struct LDKCOption_AmountZ InvoiceRequest_amount(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * A complete description of the purpose of the payment. Intended to be displayed to the user
+ * but with the caveat that it has not been verified in any way.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPrintableString InvoiceRequest_description(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * Features pertaining to the offer.
+ */
+MUST_USE_RES struct LDKOfferFeatures InvoiceRequest_offer_features(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * Duration since the Unix epoch when an invoice should no longer be requested.
+ *
+ * If `None`, the offer does not expire.
+ */
+MUST_USE_RES struct LDKCOption_u64Z InvoiceRequest_absolute_expiry(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * The issuer of the offer, possibly beginning with `user@domain` or `domain`. Intended to be
+ * displayed to the user but with the caveat that it has not been verified in any way.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPrintableString InvoiceRequest_issuer(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * Paths to the recipient originating from publicly reachable nodes. Blinded paths provide
+ * recipient privacy by obfuscating its node id.
+ */
+MUST_USE_RES struct LDKCVec_BlindedPathZ InvoiceRequest_paths(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * The quantity of items supported.
+ */
+MUST_USE_RES struct LDKQuantity InvoiceRequest_supported_quantity(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * The public key used by the recipient to sign invoices.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPublicKey InvoiceRequest_signing_pubkey(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * An unpredictable series of bytes, typically containing information about the derivation of
+ * [`payer_id`].
+ *
+ * [`payer_id`]: Self::payer_id
+ */
+MUST_USE_RES struct LDKu8slice InvoiceRequest_payer_metadata(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * A chain from [`Offer::chains`] that the offer is valid for.
+ */
+MUST_USE_RES struct LDKThirtyTwoBytes InvoiceRequest_chain(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * The amount to pay in msats (i.e., the minimum lightning-payable unit for [`chain`]), which
+ * must be greater than or equal to [`Offer::amount`], converted if necessary.
+ *
+ * [`chain`]: Self::chain
+ */
+MUST_USE_RES struct LDKCOption_u64Z InvoiceRequest_amount_msats(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * Features pertaining to requesting an invoice.
+ */
+MUST_USE_RES struct LDKInvoiceRequestFeatures InvoiceRequest_invoice_request_features(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * The quantity of the offer's item conforming to [`Offer::is_valid_quantity`].
+ */
+MUST_USE_RES struct LDKCOption_u64Z InvoiceRequest_quantity(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * A possibly transient pubkey used to sign the invoice request.
+ */
+MUST_USE_RES struct LDKPublicKey InvoiceRequest_payer_id(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * A payer-provided note which will be seen by the recipient and reflected back in the invoice
+ * response.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPrintableString InvoiceRequest_payer_note(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * Creates an [`InvoiceBuilder`] for the request with the given required fields and using the
+ * [`Duration`] since [`std::time::SystemTime::UNIX_EPOCH`] as the creation time.
+ *
+ * See [`InvoiceRequest::respond_with_no_std`] for further details where the aforementioned
+ * creation time is used for the `created_at` parameter.
+ *
+ * [`Duration`]: core::time::Duration
+ */
+MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ InvoiceRequest_respond_with(const struct LDKInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash);
+
+/**
+ * Creates an [`InvoiceBuilder`] for the request with the given required fields.
+ *
+ * Unless [`InvoiceBuilder::relative_expiry`] is set, the invoice will expire two hours after
+ * `created_at`, which is used to set [`Bolt12Invoice::created_at`]. Useful for `no-std` builds
+ * where [`std::time::SystemTime`] is not available.
+ *
+ * The caller is expected to remember the preimage of `payment_hash` in order to claim a payment
+ * for the invoice.
+ *
+ * The `payment_paths` parameter is useful for maintaining the payment recipient's privacy. It
+ * must contain one or more elements ordered from most-preferred to least-preferred, if there's
+ * a preference. Note, however, that any privacy is lost if a public node id was used for
+ * [`Offer::signing_pubkey`].
+ *
+ * Errors if the request contains unknown required features.
+ *
+ * # Note
+ *
+ * If the originating [`Offer`] was created using [`OfferBuilder::deriving_signing_pubkey`],
+ * then use [`InvoiceRequest::verify`] and [`VerifiedInvoiceRequest`] methods instead.
+ *
+ * [`Bolt12Invoice::created_at`]: crate::offers::invoice::Bolt12Invoice::created_at
+ * [`OfferBuilder::deriving_signing_pubkey`]: crate::offers::offer::OfferBuilder::deriving_signing_pubkey
+ */
+MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ InvoiceRequest_respond_with_no_std(const struct LDKInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash, uint64_t created_at);
+
+/**
+ * Verifies that the request was for an offer created using the given key. Returns the verified
+ * request which contains the derived keys needed to sign a [`Bolt12Invoice`] for the request
+ * if they could be extracted from the metadata.
+ *
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ */
+MUST_USE_RES struct LDKCResult_VerifiedInvoiceRequestNoneZ InvoiceRequest_verify(struct LDKInvoiceRequest this_arg, const struct LDKExpandedKey *NONNULL_PTR key);
+
+/**
+ * Signature of the invoice request using [`payer_id`].
+ *
+ * [`payer_id`]: Self::payer_id
+ */
+MUST_USE_RES struct LDKSchnorrSignature InvoiceRequest_signature(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * The chains that may be used when paying a requested invoice (e.g., bitcoin mainnet).
+ * Payments must be denominated in units of the minimal lightning-payable unit (e.g., msats)
+ * for the selected chain.
+ */
+MUST_USE_RES struct LDKCVec_ThirtyTwoBytesZ VerifiedInvoiceRequest_chains(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * Opaque bytes set by the originator. Useful for authentication and validating fields since it
+ * is reflected in `invoice_request` messages along with all the other fields from the `offer`.
+ */
+MUST_USE_RES struct LDKCOption_CVec_u8ZZ VerifiedInvoiceRequest_metadata(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * The minimum amount required for a successful payment of a single item.
+ */
+MUST_USE_RES struct LDKCOption_AmountZ VerifiedInvoiceRequest_amount(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * A complete description of the purpose of the payment. Intended to be displayed to the user
+ * but with the caveat that it has not been verified in any way.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPrintableString VerifiedInvoiceRequest_description(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * Features pertaining to the offer.
+ */
+MUST_USE_RES struct LDKOfferFeatures VerifiedInvoiceRequest_offer_features(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * Duration since the Unix epoch when an invoice should no longer be requested.
+ *
+ * If `None`, the offer does not expire.
+ */
+MUST_USE_RES struct LDKCOption_u64Z VerifiedInvoiceRequest_absolute_expiry(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * The issuer of the offer, possibly beginning with `user@domain` or `domain`. Intended to be
+ * displayed to the user but with the caveat that it has not been verified in any way.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPrintableString VerifiedInvoiceRequest_issuer(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * Paths to the recipient originating from publicly reachable nodes. Blinded paths provide
+ * recipient privacy by obfuscating its node id.
+ */
+MUST_USE_RES struct LDKCVec_BlindedPathZ VerifiedInvoiceRequest_paths(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * The quantity of items supported.
+ */
+MUST_USE_RES struct LDKQuantity VerifiedInvoiceRequest_supported_quantity(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * The public key used by the recipient to sign invoices.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPublicKey VerifiedInvoiceRequest_signing_pubkey(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * An unpredictable series of bytes, typically containing information about the derivation of
+ * [`payer_id`].
+ *
+ * [`payer_id`]: Self::payer_id
+ */
+MUST_USE_RES struct LDKu8slice VerifiedInvoiceRequest_payer_metadata(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * A chain from [`Offer::chains`] that the offer is valid for.
+ */
+MUST_USE_RES struct LDKThirtyTwoBytes VerifiedInvoiceRequest_chain(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * The amount to pay in msats (i.e., the minimum lightning-payable unit for [`chain`]), which
+ * must be greater than or equal to [`Offer::amount`], converted if necessary.
+ *
+ * [`chain`]: Self::chain
+ */
+MUST_USE_RES struct LDKCOption_u64Z VerifiedInvoiceRequest_amount_msats(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * Features pertaining to requesting an invoice.
+ */
+MUST_USE_RES struct LDKInvoiceRequestFeatures VerifiedInvoiceRequest_invoice_request_features(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * The quantity of the offer's item conforming to [`Offer::is_valid_quantity`].
+ */
+MUST_USE_RES struct LDKCOption_u64Z VerifiedInvoiceRequest_quantity(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * A possibly transient pubkey used to sign the invoice request.
+ */
+MUST_USE_RES struct LDKPublicKey VerifiedInvoiceRequest_payer_id(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * A payer-provided note which will be seen by the recipient and reflected back in the invoice
+ * response.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPrintableString VerifiedInvoiceRequest_payer_note(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * Creates an [`InvoiceBuilder`] for the request with the given required fields and using the
+ * [`Duration`] since [`std::time::SystemTime::UNIX_EPOCH`] as the creation time.
+ *
+ * See [`InvoiceRequest::respond_with_no_std`] for further details where the aforementioned
+ * creation time is used for the `created_at` parameter.
+ *
+ * [`Duration`]: core::time::Duration
+ */
+MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_with(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash);
+
+/**
+ * Creates an [`InvoiceBuilder`] for the request with the given required fields.
+ *
+ * Unless [`InvoiceBuilder::relative_expiry`] is set, the invoice will expire two hours after
+ * `created_at`, which is used to set [`Bolt12Invoice::created_at`]. Useful for `no-std` builds
+ * where [`std::time::SystemTime`] is not available.
+ *
+ * The caller is expected to remember the preimage of `payment_hash` in order to claim a payment
+ * for the invoice.
+ *
+ * The `payment_paths` parameter is useful for maintaining the payment recipient's privacy. It
+ * must contain one or more elements ordered from most-preferred to least-preferred, if there's
+ * a preference. Note, however, that any privacy is lost if a public node id was used for
+ * [`Offer::signing_pubkey`].
+ *
+ * Errors if the request contains unknown required features.
+ *
+ * # Note
+ *
+ * If the originating [`Offer`] was created using [`OfferBuilder::deriving_signing_pubkey`],
+ * then use [`InvoiceRequest::verify`] and [`VerifiedInvoiceRequest`] methods instead.
+ *
+ * [`Bolt12Invoice::created_at`]: crate::offers::invoice::Bolt12Invoice::created_at
+ * [`OfferBuilder::deriving_signing_pubkey`]: crate::offers::offer::OfferBuilder::deriving_signing_pubkey
+ */
+MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_with_no_std(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash, uint64_t created_at);
+
+/**
+ * Creates an [`InvoiceBuilder`] for the request using the given required fields and that uses
+ * derived signing keys from the originating [`Offer`] to sign the [`Bolt12Invoice`]. Must use
+ * the same [`ExpandedKey`] as the one used to create the offer.
+ *
+ * See [`InvoiceRequest::respond_with`] for further details.
+ *
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ */
+MUST_USE_RES struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_using_derived_keys(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash);
+
+/**
+ * Creates an [`InvoiceBuilder`] for the request using the given required fields and that uses
+ * derived signing keys from the originating [`Offer`] to sign the [`Bolt12Invoice`]. Must use
+ * the same [`ExpandedKey`] as the one used to create the offer.
+ *
+ * See [`InvoiceRequest::respond_with_no_std`] for further details.
+ *
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ */
+MUST_USE_RES struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_using_derived_keys_no_std(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash, uint64_t created_at);
+
+/**
+ * Serialize the UnsignedInvoiceRequest object into a byte array which can be read by UnsignedInvoiceRequest_read
+ */
+struct LDKCVec_u8Z UnsignedInvoiceRequest_write(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR obj);
+
+/**
+ * Serialize the InvoiceRequest object into a byte array which can be read by InvoiceRequest_read
+ */
+struct LDKCVec_u8Z InvoiceRequest_write(const struct LDKInvoiceRequest *NONNULL_PTR obj);
+
+/**
+ * Frees any resources used by the InvoiceRequestFields, if is_owned is set and inner is non-NULL.
+ */
+void InvoiceRequestFields_free(struct LDKInvoiceRequestFields this_obj);
+
+/**
+ * A possibly transient pubkey used to sign the invoice request.
+ */
+struct LDKPublicKey InvoiceRequestFields_get_payer_id(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr);
+
+/**
+ * A possibly transient pubkey used to sign the invoice request.
+ */
+void InvoiceRequestFields_set_payer_id(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * The quantity of the offer's item conforming to [`Offer::is_valid_quantity`].
+ */
+struct LDKCOption_u64Z InvoiceRequestFields_get_quantity(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr);
+
+/**
+ * The quantity of the offer's item conforming to [`Offer::is_valid_quantity`].
+ */
+void InvoiceRequestFields_set_quantity(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+
+/**
+ * A payer-provided note which will be seen by the recipient and reflected back in the invoice
+ * response. Truncated to [`PAYER_NOTE_LIMIT`] characters.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKUntrustedString InvoiceRequestFields_get_payer_note_truncated(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr);
+
+/**
+ * A payer-provided note which will be seen by the recipient and reflected back in the invoice
+ * response. Truncated to [`PAYER_NOTE_LIMIT`] characters.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void InvoiceRequestFields_set_payer_note_truncated(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKUntrustedString val);
+
+/**
+ * Constructs a new InvoiceRequestFields given each field
+ *
+ * Note that payer_note_truncated_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKInvoiceRequestFields InvoiceRequestFields_new(struct LDKPublicKey payer_id_arg, struct LDKCOption_u64Z quantity_arg, struct LDKUntrustedString payer_note_truncated_arg);
+
+/**
+ * Creates a copy of the InvoiceRequestFields
+ */
+struct LDKInvoiceRequestFields InvoiceRequestFields_clone(const struct LDKInvoiceRequestFields *NONNULL_PTR orig);
+
+/**
+ * Checks if two InvoiceRequestFieldss contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool InvoiceRequestFields_eq(const struct LDKInvoiceRequestFields *NONNULL_PTR a, const struct LDKInvoiceRequestFields *NONNULL_PTR b);
+
+/**
+ * Serialize the InvoiceRequestFields object into a byte array which can be read by InvoiceRequestFields_read
+ */
+struct LDKCVec_u8Z InvoiceRequestFields_write(const struct LDKInvoiceRequestFields *NONNULL_PTR obj);
+
+/**
+ * Read a InvoiceRequestFields from a byte array, created by InvoiceRequestFields_write
+ */
+struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ InvoiceRequestFields_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the TaggedHash, if is_owned is set and inner is non-NULL.
+ */
+void TaggedHash_free(struct LDKTaggedHash this_obj);
+
+/**
+ * Creates a copy of the TaggedHash
+ */
+struct LDKTaggedHash TaggedHash_clone(const struct LDKTaggedHash *NONNULL_PTR orig);
+
+/**
+ * Returns the digest to sign.
+ */
+MUST_USE_RES const uint8_t (*TaggedHash_as_digest(const struct LDKTaggedHash *NONNULL_PTR this_arg))[32];
+
+/**
+ * Returns the tag used in the tagged hash.
+ */
+MUST_USE_RES struct LDKStr TaggedHash_tag(const struct LDKTaggedHash *NONNULL_PTR this_arg);
+
+/**
+ * Returns the merkle root used in the tagged hash.
+ */
+MUST_USE_RES struct LDKThirtyTwoBytes TaggedHash_merkle_root(const struct LDKTaggedHash *NONNULL_PTR this_arg);
+
+/**
+ * Frees any resources used by the SignError
+ */
+void SignError_free(struct LDKSignError this_ptr);
+
+/**
+ * Creates a copy of the SignError
+ */
+struct LDKSignError SignError_clone(const struct LDKSignError *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new Signing-variant SignError
+ */
+struct LDKSignError SignError_signing(void);
+
+/**
+ * Utility method to constructs a new Verification-variant SignError
+ */
+struct LDKSignError SignError_verification(enum LDKSecp256k1Error a);
+
+/**
+ * Frees any resources used by the Bolt12ParseError, if is_owned is set and inner is non-NULL.
+ */
+void Bolt12ParseError_free(struct LDKBolt12ParseError this_obj);
+
+/**
+ * Creates a copy of the Bolt12ParseError
+ */
+struct LDKBolt12ParseError Bolt12ParseError_clone(const struct LDKBolt12ParseError *NONNULL_PTR orig);
+
+/**
+ * Creates a copy of the Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_clone(const enum LDKBolt12SemanticError *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new AlreadyExpired-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_already_expired(void);
+
+/**
+ * Utility method to constructs a new UnsupportedChain-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_unsupported_chain(void);
+
+/**
+ * Utility method to constructs a new UnexpectedChain-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_chain(void);
+
+/**
+ * Utility method to constructs a new MissingAmount-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_missing_amount(void);
+
+/**
+ * Utility method to constructs a new InvalidAmount-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_invalid_amount(void);
+
+/**
+ * Utility method to constructs a new InsufficientAmount-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_insufficient_amount(void);
+
+/**
+ * Utility method to constructs a new UnexpectedAmount-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_amount(void);
+
+/**
+ * Utility method to constructs a new UnsupportedCurrency-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_unsupported_currency(void);
+
+/**
+ * Utility method to constructs a new UnknownRequiredFeatures-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_unknown_required_features(void);
+
+/**
+ * Utility method to constructs a new UnexpectedFeatures-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_features(void);
+
+/**
+ * Utility method to constructs a new MissingDescription-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_missing_description(void);
+
+/**
+ * Utility method to constructs a new MissingSigningPubkey-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_missing_signing_pubkey(void);
+
+/**
+ * Utility method to constructs a new InvalidSigningPubkey-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_invalid_signing_pubkey(void);
+
+/**
+ * Utility method to constructs a new UnexpectedSigningPubkey-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_signing_pubkey(void);
+
+/**
+ * Utility method to constructs a new MissingQuantity-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_missing_quantity(void);
+
+/**
+ * Utility method to constructs a new InvalidQuantity-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_invalid_quantity(void);
+
+/**
+ * Utility method to constructs a new UnexpectedQuantity-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_quantity(void);
+
+/**
+ * Utility method to constructs a new InvalidMetadata-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_invalid_metadata(void);
+
+/**
+ * Utility method to constructs a new UnexpectedMetadata-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_metadata(void);
+
+/**
+ * Utility method to constructs a new MissingPayerMetadata-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_missing_payer_metadata(void);
+
+/**
+ * Utility method to constructs a new MissingPayerId-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_missing_payer_id(void);
+
+/**
+ * Utility method to constructs a new DuplicatePaymentId-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_duplicate_payment_id(void);
+
+/**
+ * Utility method to constructs a new MissingPaths-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_missing_paths(void);
+
+/**
+ * Utility method to constructs a new UnexpectedPaths-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_paths(void);
+
+/**
+ * Utility method to constructs a new InvalidPayInfo-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_invalid_pay_info(void);
+
+/**
+ * Utility method to constructs a new MissingCreationTime-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_missing_creation_time(void);
+
+/**
+ * Utility method to constructs a new MissingPaymentHash-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_missing_payment_hash(void);
+
+/**
+ * Utility method to constructs a new MissingSignature-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_missing_signature(void);
+
+/**
+ * Frees any resources used by the RefundMaybeWithDerivedMetadataBuilder, if is_owned is set and inner is non-NULL.
+ */
+void RefundMaybeWithDerivedMetadataBuilder_free(struct LDKRefundMaybeWithDerivedMetadataBuilder this_obj);
+
+/**
+ * Creates a copy of the RefundMaybeWithDerivedMetadataBuilder
+ */
+struct LDKRefundMaybeWithDerivedMetadataBuilder RefundMaybeWithDerivedMetadataBuilder_clone(const struct LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR orig);
+
+/**
+ * Creates a new builder for a refund using the [`Refund::payer_id`] for the public node id to
+ * send to if no [`Refund::paths`] are set. Otherwise, it may be a transient pubkey.
+ *
+ * Additionally, sets the required (empty) [`Refund::description`], [`Refund::payer_metadata`],
+ * and [`Refund::amount_msats`].
+ *
+ * # Note
+ *
+ * If constructing a [`Refund`] for use with a [`ChannelManager`], use
+ * [`ChannelManager::create_refund_builder`] instead of [`RefundBuilder::new`].
+ *
+ * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
+ * [`ChannelManager::create_refund_builder`]: crate::ln::channelmanager::ChannelManager::create_refund_builder
+ */
+MUST_USE_RES struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ RefundMaybeWithDerivedMetadataBuilder_new(struct LDKCVec_u8Z metadata, struct LDKPublicKey payer_id, uint64_t amount_msats);
+
+/**
+ * Similar to [`RefundBuilder::new`] except, if [`RefundBuilder::path`] is called, the payer id
+ * is derived from the given [`ExpandedKey`] and nonce. This provides sender privacy by using a
+ * different payer id for each refund, assuming a different nonce is used. Otherwise, the
+ * provided `node_id` is used for the payer id.
+ *
+ * Also, sets the metadata when [`RefundBuilder::build`] is called such that it can be used to
+ * verify that an [`InvoiceRequest`] was produced for the refund given an [`ExpandedKey`].
+ *
+ * The `payment_id` is encrypted in the metadata and should be unique. This ensures that only
+ * one invoice will be paid for the refund and that payments can be uniquely identified.
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`ExpandedKey`]: crate::ln::inbound_payment::ExpandedKey
+ */
+MUST_USE_RES struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(struct LDKPublicKey node_id, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source, uint64_t amount_msats, struct LDKThirtyTwoBytes payment_id);
+
+/**
+ * Sets the [`Refund::description`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_description(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKStr description);
+
+/**
+ * Sets the [`Refund::absolute_expiry`] as seconds since the Unix epoch. Any expiry that has
+ * already passed is valid and can be checked for using [`Refund::is_expired`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, uint64_t absolute_expiry);
+
+/**
+ * Sets the [`Refund::issuer`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_issuer(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKStr issuer);
+
+/**
+ * Adds a blinded path to [`Refund::paths`]. Must include at least one path if only connected
+ * by private channels or if [`Refund::payer_id`] is not a public node id.
+ *
+ * Successive calls to this method will add another blinded path. Caller is responsible for not
+ * adding duplicate paths.
+ */
+MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_path(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKBlindedPath path);
+
+/**
+ * Sets the [`Refund::chain`] of the given [`Network`] for paying an invoice. If not
+ * called, [`Network::Bitcoin`] is assumed.
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_chain(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, enum LDKNetwork network);
+
+/**
+ * Sets [`Refund::quantity`] of items. This is purely for informational purposes. It is useful
+ * when the refund pertains to a [`Bolt12Invoice`] that paid for more than one item from an
+ * [`Offer`] as specified by [`InvoiceRequest::quantity`].
+ *
+ * Successive calls to this method will override the previous setting.
+ *
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ * [`InvoiceRequest::quantity`]: crate::offers::invoice_request::InvoiceRequest::quantity
+ * [`Offer`]: crate::offers::offer::Offer
+ */
+MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_quantity(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, uint64_t quantity);
+
+/**
+ * Sets the [`Refund::payer_note`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_payer_note(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKStr payer_note);
+
+/**
+ * Builds a [`Refund`] after checking for valid semantics.
+ */
+MUST_USE_RES struct LDKCResult_RefundBolt12SemanticErrorZ RefundMaybeWithDerivedMetadataBuilder_build(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg);
+
+/**
+ * Frees any resources used by the Refund, if is_owned is set and inner is non-NULL.
+ */
+void Refund_free(struct LDKRefund this_obj);
+
+/**
+ * Creates a copy of the Refund
+ */
+struct LDKRefund Refund_clone(const struct LDKRefund *NONNULL_PTR orig);
+
+/**
+ * A complete description of the purpose of the refund. Intended to be displayed to the user
+ * but with the caveat that it has not been verified in any way.
+ */
+MUST_USE_RES struct LDKPrintableString Refund_description(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * Duration since the Unix epoch when an invoice should no longer be sent.
+ *
+ * If `None`, the refund does not expire.
+ */
+MUST_USE_RES struct LDKCOption_u64Z Refund_absolute_expiry(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * Whether the refund has expired.
+ */
+MUST_USE_RES bool Refund_is_expired(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * Whether the refund has expired given the duration since the Unix epoch.
+ */
+MUST_USE_RES bool Refund_is_expired_no_std(const struct LDKRefund *NONNULL_PTR this_arg, uint64_t duration_since_epoch);
+
+/**
+ * The issuer of the refund, possibly beginning with `user@domain` or `domain`. Intended to be
+ * displayed to the user but with the caveat that it has not been verified in any way.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPrintableString Refund_issuer(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * Paths to the sender originating from publicly reachable nodes. Blinded paths provide sender
+ * privacy by obfuscating its node id.
+ */
+MUST_USE_RES struct LDKCVec_BlindedPathZ Refund_paths(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * An unpredictable series of bytes, typically containing information about the derivation of
+ * [`payer_id`].
+ *
+ * [`payer_id`]: Self::payer_id
+ */
+MUST_USE_RES struct LDKu8slice Refund_payer_metadata(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * A chain that the refund is valid for.
+ */
+MUST_USE_RES struct LDKThirtyTwoBytes Refund_chain(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * The amount to refund in msats (i.e., the minimum lightning-payable unit for [`chain`]).
+ *
+ * [`chain`]: Self::chain
+ */
+MUST_USE_RES uint64_t Refund_amount_msats(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * Features pertaining to requesting an invoice.
+ */
+MUST_USE_RES struct LDKInvoiceRequestFeatures Refund_features(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * The quantity of an item that refund is for.
+ */
+MUST_USE_RES struct LDKCOption_u64Z Refund_quantity(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * A public node id to send to in the case where there are no [`paths`]. Otherwise, a possibly
+ * transient pubkey.
+ *
+ * [`paths`]: Self::paths
+ */
+MUST_USE_RES struct LDKPublicKey Refund_payer_id(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * Payer provided note to include in the invoice.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPrintableString Refund_payer_note(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the Refund.
+ */
+uint64_t Refund_hash(const struct LDKRefund *NONNULL_PTR o);
+
+/**
+ * Serialize the Refund object into a byte array which can be read by Refund_read
+ */
+struct LDKCVec_u8Z Refund_write(const struct LDKRefund *NONNULL_PTR obj);
+
+/**
+ * Read a Refund object from a string
+ */
+struct LDKCResult_RefundBolt12ParseErrorZ Refund_from_str(struct LDKStr s);
+
+/**
+ * Get the string representation of a Refund object
+ */
+struct LDKStr Refund_to_str(const struct LDKRefund *NONNULL_PTR o);
+
+/**
+ * Creates a copy of the UtxoLookupError
+ */
+enum LDKUtxoLookupError UtxoLookupError_clone(const enum LDKUtxoLookupError *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new UnknownChain-variant UtxoLookupError
+ */
+enum LDKUtxoLookupError UtxoLookupError_unknown_chain(void);
+
+/**
+ * Utility method to constructs a new UnknownTx-variant UtxoLookupError
+ */
+enum LDKUtxoLookupError UtxoLookupError_unknown_tx(void);
+
+/**
+ * Frees any resources used by the UtxoResult
+ */
+void UtxoResult_free(struct LDKUtxoResult this_ptr);
+
+/**
+ * Creates a copy of the UtxoResult
+ */
+struct LDKUtxoResult UtxoResult_clone(const struct LDKUtxoResult *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new Sync-variant UtxoResult
+ */
+struct LDKUtxoResult UtxoResult_sync(struct LDKCResult_TxOutUtxoLookupErrorZ a);
+
+/**
+ * Utility method to constructs a new Async-variant UtxoResult
+ */
+struct LDKUtxoResult UtxoResult_async(struct LDKUtxoFuture a);
+
+/**
+ * Calls the free function if one is set
+ */
+void UtxoLookup_free(struct LDKUtxoLookup this_ptr);
+
+/**
+ * Frees any resources used by the UtxoFuture, if is_owned is set and inner is non-NULL.
+ */
+void UtxoFuture_free(struct LDKUtxoFuture this_obj);
+
+/**
+ * Creates a copy of the UtxoFuture
+ */
+struct LDKUtxoFuture UtxoFuture_clone(const struct LDKUtxoFuture *NONNULL_PTR orig);
+
+/**
+ * Builds a new future for later resolution.
+ */
+MUST_USE_RES struct LDKUtxoFuture UtxoFuture_new(void);
+
+/**
+ * Resolves this future against the given `graph` and with the given `result`.
+ *
+ * This is identical to calling [`UtxoFuture::resolve`] with a dummy `gossip`, disabling
+ * forwarding the validated gossip message onwards to peers.
+ *
+ * Because this may cause the [`NetworkGraph`]'s [`processing_queue_high`] to flip, in order
+ * to allow us to interact with peers again, you should call [`PeerManager::process_events`]
+ * after this.
+ *
+ * [`processing_queue_high`]: crate::ln::msgs::RoutingMessageHandler::processing_queue_high
+ * [`PeerManager::process_events`]: crate::ln::peer_handler::PeerManager::process_events
+ */
+void UtxoFuture_resolve_without_forwarding(const struct LDKUtxoFuture *NONNULL_PTR this_arg, const struct LDKNetworkGraph *NONNULL_PTR graph, struct LDKCResult_TxOutUtxoLookupErrorZ result);
+
+/**
+ * Resolves this future against the given `graph` and with the given `result`.
+ *
+ * The given `gossip` is used to broadcast any validated messages onwards to all peers which
+ * have available buffer space.
+ *
+ * Because this may cause the [`NetworkGraph`]'s [`processing_queue_high`] to flip, in order
+ * to allow us to interact with peers again, you should call [`PeerManager::process_events`]
+ * after this.
+ *
+ * [`processing_queue_high`]: crate::ln::msgs::RoutingMessageHandler::processing_queue_high
+ * [`PeerManager::process_events`]: crate::ln::peer_handler::PeerManager::process_events
+ */
+void UtxoFuture_resolve(const struct LDKUtxoFuture *NONNULL_PTR this_arg, const struct LDKNetworkGraph *NONNULL_PTR graph, const struct LDKP2PGossipSync *NONNULL_PTR gossip, struct LDKCResult_TxOutUtxoLookupErrorZ result);
+
+/**
+ * Frees any resources used by the NodeId, if is_owned is set and inner is non-NULL.
+ */
+void NodeId_free(struct LDKNodeId this_obj);
+
+/**
+ * Creates a copy of the NodeId
+ */
+struct LDKNodeId NodeId_clone(const struct LDKNodeId *NONNULL_PTR orig);
+
+/**
+ * Create a new NodeId from a public key
+ */
+MUST_USE_RES struct LDKNodeId NodeId_from_pubkey(struct LDKPublicKey pubkey);
+
+/**
+ * Create a new NodeId from a slice of bytes
+ */
+MUST_USE_RES struct LDKCResult_NodeIdDecodeErrorZ NodeId_from_slice(struct LDKu8slice bytes);
+
+/**
+ * Get the public key slice from this NodeId
+ */
+MUST_USE_RES struct LDKu8slice NodeId_as_slice(const struct LDKNodeId *NONNULL_PTR this_arg);
+
+/**
+ * Get the public key as an array from this NodeId
+ */
+MUST_USE_RES const uint8_t (*NodeId_as_array(const struct LDKNodeId *NONNULL_PTR this_arg))[33];
+
+/**
+ * Get the public key from this NodeId
+ */
+MUST_USE_RES struct LDKCResult_PublicKeySecp256k1ErrorZ NodeId_as_pubkey(const struct LDKNodeId *NONNULL_PTR this_arg);
+
+/**
+ * Get the string representation of a NodeId object
+ */
+struct LDKStr NodeId_to_str(const struct LDKNodeId *NONNULL_PTR o);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the NodeId.
+ */
+uint64_t NodeId_hash(const struct LDKNodeId *NONNULL_PTR o);
+
+/**
+ * Serialize the NodeId object into a byte array which can be read by NodeId_read
+ */
+struct LDKCVec_u8Z NodeId_write(const struct LDKNodeId *NONNULL_PTR obj);
+
+/**
+ * Read a NodeId from a byte array, created by NodeId_write
+ */
+struct LDKCResult_NodeIdDecodeErrorZ NodeId_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the NetworkGraph, if is_owned is set and inner is non-NULL.
+ */
+void NetworkGraph_free(struct LDKNetworkGraph this_obj);
+
+/**
+ * Frees any resources used by the ReadOnlyNetworkGraph, if is_owned is set and inner is non-NULL.
+ */
+void ReadOnlyNetworkGraph_free(struct LDKReadOnlyNetworkGraph this_obj);
+
+/**
+ * Frees any resources used by the NetworkUpdate
+ */
+void NetworkUpdate_free(struct LDKNetworkUpdate this_ptr);
+
+/**
+ * Creates a copy of the NetworkUpdate
+ */
+struct LDKNetworkUpdate NetworkUpdate_clone(const struct LDKNetworkUpdate *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new ChannelUpdateMessage-variant NetworkUpdate
+ */
+struct LDKNetworkUpdate NetworkUpdate_channel_update_message(struct LDKChannelUpdate msg);
+
+/**
+ * Utility method to constructs a new ChannelFailure-variant NetworkUpdate
+ */
+struct LDKNetworkUpdate NetworkUpdate_channel_failure(uint64_t short_channel_id, bool is_permanent);
+
+/**
+ * Utility method to constructs a new NodeFailure-variant NetworkUpdate
+ */
+struct LDKNetworkUpdate NetworkUpdate_node_failure(struct LDKPublicKey node_id, bool is_permanent);
+
+/**
+ * Checks if two NetworkUpdates contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+bool NetworkUpdate_eq(const struct LDKNetworkUpdate *NONNULL_PTR a, const struct LDKNetworkUpdate *NONNULL_PTR b);
+
+/**
+ * Serialize the NetworkUpdate object into a byte array which can be read by NetworkUpdate_read
+ */
+struct LDKCVec_u8Z NetworkUpdate_write(const struct LDKNetworkUpdate *NONNULL_PTR obj);
+
+/**
+ * Read a NetworkUpdate from a byte array, created by NetworkUpdate_write
+ */
+struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ NetworkUpdate_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the P2PGossipSync, if is_owned is set and inner is non-NULL.
+ */
+void P2PGossipSync_free(struct LDKP2PGossipSync this_obj);
+
+/**
+ * Creates a new tracker of the actual state of the network of channels and nodes,
+ * assuming an existing [`NetworkGraph`].
+ * UTXO lookup is used to make sure announced channels exist on-chain, channel data is
+ * correct, and the announcement is signed with channel owners' keys.
+ */
+MUST_USE_RES struct LDKP2PGossipSync P2PGossipSync_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKCOption_UtxoLookupZ utxo_lookup, struct LDKLogger logger);
+
+/**
+ * Adds a provider used to check new announcements. Does not affect
+ * existing announcements unless they are updated.
+ * Add, update or remove the provider would replace the current one.
+ */
+void P2PGossipSync_add_utxo_lookup(const struct LDKP2PGossipSync *NONNULL_PTR this_arg, struct LDKCOption_UtxoLookupZ utxo_lookup);
+
+/**
+ * Handles any network updates originating from [`Event`]s.
+ * Note that this will skip applying any [`NetworkUpdate::ChannelUpdateMessage`] to avoid
+ * leaking possibly identifying information of the sender to the public network.
+ *
+ * [`Event`]: crate::events::Event
+ */
+void NetworkGraph_handle_network_update(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNetworkUpdate *NONNULL_PTR network_update);
+
+/**
+ * Gets the chain hash for this network graph.
+ */
+MUST_USE_RES struct LDKThirtyTwoBytes NetworkGraph_get_chain_hash(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
+
+/**
+ * Verifies the signature of a [`NodeAnnouncement`].
+ *
+ * Returns an error if it is invalid.
+ */
+struct LDKCResult_NoneLightningErrorZ verify_node_announcement(const struct LDKNodeAnnouncement *NONNULL_PTR msg);
+
+/**
+ * Verifies all signatures included in a [`ChannelAnnouncement`].
+ *
+ * Returns an error if one of the signatures is invalid.
+ */
+struct LDKCResult_NoneLightningErrorZ verify_channel_announcement(const struct LDKChannelAnnouncement *NONNULL_PTR msg);
+
+/**
+ * Constructs a new RoutingMessageHandler which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned RoutingMessageHandler must be freed before this_arg is
+ */
+struct LDKRoutingMessageHandler P2PGossipSync_as_RoutingMessageHandler(const struct LDKP2PGossipSync *NONNULL_PTR this_arg);
+
+/**
+ * Constructs a new MessageSendEventsProvider which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned MessageSendEventsProvider must be freed before this_arg is
+ */
+struct LDKMessageSendEventsProvider P2PGossipSync_as_MessageSendEventsProvider(const struct LDKP2PGossipSync *NONNULL_PTR this_arg);
+
+/**
+ * Frees any resources used by the ChannelUpdateInfo, if is_owned is set and inner is non-NULL.
+ */
+void ChannelUpdateInfo_free(struct LDKChannelUpdateInfo this_obj);
+
+/**
+ * When the last update to the channel direction was issued.
+ * Value is opaque, as set in the announcement.
+ */
+uint32_t ChannelUpdateInfo_get_last_update(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
+
+/**
+ * When the last update to the channel direction was issued.
+ * Value is opaque, as set in the announcement.
+ */
+void ChannelUpdateInfo_set_last_update(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, uint32_t val);
+
+/**
+ * Whether the channel can be currently used for payments (in this one direction).
+ */
+bool ChannelUpdateInfo_get_enabled(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Whether the channel can be currently used for payments (in this one direction).
+ */
+void ChannelUpdateInfo_set_enabled(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, bool val);
+
+/**
+ * The difference in CLTV values that you must have when routing through this channel.
+ */
+uint16_t ChannelUpdateInfo_get_cltv_expiry_delta(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
+
+/**
+ * The difference in CLTV values that you must have when routing through this channel.
+ */
+void ChannelUpdateInfo_set_cltv_expiry_delta(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, uint16_t val);
+
+/**
+ * The minimum value, which must be relayed to the next hop via the channel
+ */
+uint64_t ChannelUpdateInfo_get_htlc_minimum_msat(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
+
+/**
+ * The minimum value, which must be relayed to the next hop via the channel
+ */
+void ChannelUpdateInfo_set_htlc_minimum_msat(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * The maximum value which may be relayed to the next hop via the channel.
+ */
+uint64_t ChannelUpdateInfo_get_htlc_maximum_msat(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
+
+/**
+ * The maximum value which may be relayed to the next hop via the channel.
+ */
+void ChannelUpdateInfo_set_htlc_maximum_msat(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * Fees charged when the channel is used for routing
+ */
+struct LDKRoutingFees ChannelUpdateInfo_get_fees(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Fees charged when the channel is used for routing
+ */
+void ChannelUpdateInfo_set_fees(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
+
+/**
+ * Most recent update for the channel received from the network
+ * Mostly redundant with the data we store in fields explicitly.
+ * Everything else is useful only for sending out for initial routing sync.
+ * Not stored if contains excess data to prevent DoS.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKChannelUpdate ChannelUpdateInfo_get_last_update_message(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Most recent update for the channel received from the network
+ * Mostly redundant with the data we store in fields explicitly.
+ * Everything else is useful only for sending out for initial routing sync.
+ * Not stored if contains excess data to prevent DoS.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void ChannelUpdateInfo_set_last_update_message(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
+
+/**
+ * Constructs a new ChannelUpdateInfo given each field
+ *
+ * Note that last_update_message_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKChannelUpdateInfo ChannelUpdateInfo_new(uint32_t last_update_arg, bool enabled_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg, uint64_t htlc_maximum_msat_arg, struct LDKRoutingFees fees_arg, struct LDKChannelUpdate last_update_message_arg);
+
+/**
+ * Creates a copy of the ChannelUpdateInfo
+ */
+struct LDKChannelUpdateInfo ChannelUpdateInfo_clone(const struct LDKChannelUpdateInfo *NONNULL_PTR orig);
+
+/**
+ * Checks if two ChannelUpdateInfos contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool ChannelUpdateInfo_eq(const struct LDKChannelUpdateInfo *NONNULL_PTR a, const struct LDKChannelUpdateInfo *NONNULL_PTR b);
+
+/**
+ * Get the string representation of a ChannelUpdateInfo object
+ */
+struct LDKStr ChannelUpdateInfo_to_str(const struct LDKChannelUpdateInfo *NONNULL_PTR o);
+
+/**
+ * Serialize the ChannelUpdateInfo object into a byte array which can be read by ChannelUpdateInfo_read
+ */
+struct LDKCVec_u8Z ChannelUpdateInfo_write(const struct LDKChannelUpdateInfo *NONNULL_PTR obj);
+
+/**
+ * Read a ChannelUpdateInfo from a byte array, created by ChannelUpdateInfo_write
+ */
+struct LDKCResult_ChannelUpdateInfoDecodeErrorZ ChannelUpdateInfo_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the ChannelInfo, if is_owned is set and inner is non-NULL.
+ */
+void ChannelInfo_free(struct LDKChannelInfo this_obj);
+
+/**
+ * Protocol features of a channel communicated during its announcement
+ */
+struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Protocol features of a channel communicated during its announcement
+ */
+void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
+
+/**
+ * Source node of the first direction of a channel
+ */
+struct LDKNodeId ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Source node of the first direction of a channel
+ */
+void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
+
+/**
+ * Details about the first direction of a channel
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKChannelUpdateInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Details about the first direction of a channel
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdateInfo val);
+
+/**
+ * Source node of the second direction of a channel
+ */
+struct LDKNodeId ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Source node of the second direction of a channel
+ */
+void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
+
+/**
+ * Details about the second direction of a channel
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKChannelUpdateInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Details about the second direction of a channel
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdateInfo val);
+
+/**
+ * The channel capacity as seen on-chain, if chain lookup is available.
+ */
+struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+
+/**
+ * The channel capacity as seen on-chain, if chain lookup is available.
+ */
+void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+
+/**
+ * An initial announcement of the channel
+ * Mostly redundant with the data we store in fields explicitly.
+ * Everything else is useful only for sending out for initial routing sync.
+ * Not stored if contains excess data to prevent DoS.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+
+/**
+ * An initial announcement of the channel
+ * Mostly redundant with the data we store in fields explicitly.
+ * Everything else is useful only for sending out for initial routing sync.
+ * Not stored if contains excess data to prevent DoS.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
+
+/**
+ * Creates a copy of the ChannelInfo
+ */
+struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
+
+/**
+ * Checks if two ChannelInfos contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool ChannelInfo_eq(const struct LDKChannelInfo *NONNULL_PTR a, const struct LDKChannelInfo *NONNULL_PTR b);
+
+/**
+ * Returns a [`ChannelUpdateInfo`] based on the direction implied by the channel_flag.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKChannelUpdateInfo ChannelInfo_get_directional_info(const struct LDKChannelInfo *NONNULL_PTR this_arg, uint8_t channel_flags);
+
+/**
+ * Get the string representation of a ChannelInfo object
+ */
+struct LDKStr ChannelInfo_to_str(const struct LDKChannelInfo *NONNULL_PTR o);
+
+/**
+ * Serialize the ChannelInfo object into a byte array which can be read by ChannelInfo_read
+ */
+struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
+
+/**
+ * Read a ChannelInfo from a byte array, created by ChannelInfo_write
+ */
+struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the DirectedChannelInfo, if is_owned is set and inner is non-NULL.
+ */
+void DirectedChannelInfo_free(struct LDKDirectedChannelInfo this_obj);
+
+/**
+ * Creates a copy of the DirectedChannelInfo
+ */
+struct LDKDirectedChannelInfo DirectedChannelInfo_clone(const struct LDKDirectedChannelInfo *NONNULL_PTR orig);
+
+/**
+ * Returns information for the channel.
+ */
+MUST_USE_RES struct LDKChannelInfo DirectedChannelInfo_channel(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg);
+
+/**
+ * Returns the [`EffectiveCapacity`] of the channel in the direction.
+ *
+ * This is either the total capacity from the funding transaction, if known, or the
+ * `htlc_maximum_msat` for the direction as advertised by the gossip network, if known,
+ * otherwise.
+ */
+MUST_USE_RES struct LDKEffectiveCapacity DirectedChannelInfo_effective_capacity(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg);
+
+/**
+ * Returns the `node_id` of the source hop.
+ *
+ * Refers to the `node_id` forwarding the payment to the next hop.
+ */
+MUST_USE_RES struct LDKNodeId DirectedChannelInfo_source(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg);
+
+/**
+ * Returns the `node_id` of the target hop.
+ *
+ * Refers to the `node_id` receiving the payment from the previous hop.
+ */
+MUST_USE_RES struct LDKNodeId DirectedChannelInfo_target(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg);
+
+/**
+ * Frees any resources used by the EffectiveCapacity
+ */
+void EffectiveCapacity_free(struct LDKEffectiveCapacity this_ptr);
+
+/**
+ * Creates a copy of the EffectiveCapacity
+ */
+struct LDKEffectiveCapacity EffectiveCapacity_clone(const struct LDKEffectiveCapacity *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new ExactLiquidity-variant EffectiveCapacity
+ */
+struct LDKEffectiveCapacity EffectiveCapacity_exact_liquidity(uint64_t liquidity_msat);
+
+/**
+ * Utility method to constructs a new AdvertisedMaxHTLC-variant EffectiveCapacity
+ */
+struct LDKEffectiveCapacity EffectiveCapacity_advertised_max_htlc(uint64_t amount_msat);
+
+/**
+ * Utility method to constructs a new Total-variant EffectiveCapacity
+ */
+struct LDKEffectiveCapacity EffectiveCapacity_total(uint64_t capacity_msat, uint64_t htlc_maximum_msat);
+
+/**
+ * Utility method to constructs a new Infinite-variant EffectiveCapacity
+ */
+struct LDKEffectiveCapacity EffectiveCapacity_infinite(void);
+
+/**
+ * Utility method to constructs a new HintMaxHTLC-variant EffectiveCapacity
+ */
+struct LDKEffectiveCapacity EffectiveCapacity_hint_max_htlc(uint64_t amount_msat);
+
+/**
+ * Utility method to constructs a new Unknown-variant EffectiveCapacity
+ */
+struct LDKEffectiveCapacity EffectiveCapacity_unknown(void);
+
+/**
+ * Returns the effective capacity denominated in millisatoshi.
+ */
+MUST_USE_RES uint64_t EffectiveCapacity_as_msat(const struct LDKEffectiveCapacity *NONNULL_PTR this_arg);
+
+/**
+ * Frees any resources used by the RoutingFees, if is_owned is set and inner is non-NULL.
+ */
+void RoutingFees_free(struct LDKRoutingFees this_obj);
+
+/**
+ * Flat routing fee in millisatoshis.
+ */
+uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
+
+/**
+ * Flat routing fee in millisatoshis.
+ */
+void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
+
+/**
+ * Liquidity-based routing fee in millionths of a routed amount.
+ * In other words, 10000 is 1%.
+ */
+uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
+
+/**
+ * Liquidity-based routing fee in millionths of a routed amount.
+ * In other words, 10000 is 1%.
+ */
+void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
+
+/**
+ * Constructs a new RoutingFees given each field
+ */
+MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
+
+/**
+ * Checks if two RoutingFeess contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b);
+
+/**
+ * Creates a copy of the RoutingFees
+ */
+struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the RoutingFees.
+ */
+uint64_t RoutingFees_hash(const struct LDKRoutingFees *NONNULL_PTR o);
+
+/**
+ * Serialize the RoutingFees object into a byte array which can be read by RoutingFees_read
+ */
+struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
+
+/**
+ * Read a RoutingFees from a byte array, created by RoutingFees_write
+ */
+struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the NodeAnnouncementInfo, if is_owned is set and inner is non-NULL.
+ */
+void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
+
+/**
+ * Protocol features the node announced support for
+ */
+struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Protocol features the node announced support for
+ */
+void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
+
+/**
+ * When the last known update to the node state was issued.
+ * Value is opaque, as set in the announcement.
+ */
+uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
+
+/**
+ * When the last known update to the node state was issued.
+ * Value is opaque, as set in the announcement.
+ */
+void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
+
+/**
+ * Color assigned to the node
+ */
+const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
+
+/**
+ * Color assigned to the node
+ */
+void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
+
+/**
+ * Moniker assigned to the node.
+ * May be invalid or malicious (eg control chars),
+ * should not be exposed to the user.
+ */
+struct LDKNodeAlias NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Moniker assigned to the node.
+ * May be invalid or malicious (eg control chars),
+ * should not be exposed to the user.
+ */
+void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAlias val);
+
+/**
+ * An initial announcement of the node
+ * Mostly redundant with the data we store in fields explicitly.
+ * Everything else is useful only for sending out for initial routing sync.
+ * Not stored if contains excess data to prevent DoS.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
+
+/**
+ * An initial announcement of the node
+ * Mostly redundant with the data we store in fields explicitly.
+ * Everything else is useful only for sending out for initial routing sync.
+ * Not stored if contains excess data to prevent DoS.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
+
+/**
+ * Constructs a new NodeAnnouncementInfo given each field
+ *
+ * Note that announcement_message_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_new(struct LDKNodeFeatures features_arg, uint32_t last_update_arg, struct LDKThreeBytes rgb_arg, struct LDKNodeAlias alias_arg, struct LDKNodeAnnouncement announcement_message_arg);
+
+/**
+ * Creates a copy of the NodeAnnouncementInfo
+ */
+struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
+
+/**
+ * Checks if two NodeAnnouncementInfos contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool NodeAnnouncementInfo_eq(const struct LDKNodeAnnouncementInfo *NONNULL_PTR a, const struct LDKNodeAnnouncementInfo *NONNULL_PTR b);
+
+/**
+ * Internet-level addresses via which one can connect to the node
+ */
+MUST_USE_RES struct LDKCVec_SocketAddressZ NodeAnnouncementInfo_addresses(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_arg);
+
+/**
+ * Serialize the NodeAnnouncementInfo object into a byte array which can be read by NodeAnnouncementInfo_read
+ */
+struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
+
+/**
+ * Read a NodeAnnouncementInfo from a byte array, created by NodeAnnouncementInfo_write
+ */
+struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the NodeAlias, if is_owned is set and inner is non-NULL.
+ */
+void NodeAlias_free(struct LDKNodeAlias this_obj);
+
+const uint8_t (*NodeAlias_get_a(const struct LDKNodeAlias *NONNULL_PTR this_ptr))[32];
+
+void NodeAlias_set_a(struct LDKNodeAlias *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+
+/**
+ * Constructs a new NodeAlias given each field
+ */
+MUST_USE_RES struct LDKNodeAlias NodeAlias_new(struct LDKThirtyTwoBytes a_arg);
+
+/**
+ * Creates a copy of the NodeAlias
+ */
+struct LDKNodeAlias NodeAlias_clone(const struct LDKNodeAlias *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the NodeAlias.
+ */
+uint64_t NodeAlias_hash(const struct LDKNodeAlias *NONNULL_PTR o);
+
+/**
+ * Checks if two NodeAliass contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool NodeAlias_eq(const struct LDKNodeAlias *NONNULL_PTR a, const struct LDKNodeAlias *NONNULL_PTR b);
+
+/**
+ * Get the string representation of a NodeAlias object
+ */
+struct LDKStr NodeAlias_to_str(const struct LDKNodeAlias *NONNULL_PTR o);
+
+/**
+ * Serialize the NodeAlias object into a byte array which can be read by NodeAlias_read
+ */
+struct LDKCVec_u8Z NodeAlias_write(const struct LDKNodeAlias *NONNULL_PTR obj);
+
+/**
+ * Read a NodeAlias from a byte array, created by NodeAlias_write
+ */
+struct LDKCResult_NodeAliasDecodeErrorZ NodeAlias_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the NodeInfo, if is_owned is set and inner is non-NULL.
+ */
+void NodeInfo_free(struct LDKNodeInfo this_obj);
+
+/**
+ * All valid channels a node has announced
+ *
+ * Returns a copy of the field.
+ */
+struct LDKCVec_u64Z NodeInfo_get_channels(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
+
+/**
+ * All valid channels a node has announced
+ */
+void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
+
+/**
+ * More information about a node from node_announcement.
+ * Optional because we store a Node entry after learning about it from
+ * a channel announcement, but before receiving a node announcement.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
+
+/**
+ * More information about a node from node_announcement.
+ * Optional because we store a Node entry after learning about it from
+ * a channel announcement, but before receiving a node announcement.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
+
+/**
+ * Constructs a new NodeInfo given each field
+ *
+ * Note that announcement_info_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
+
+/**
+ * Creates a copy of the NodeInfo
+ */
+struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
+
+/**
+ * Checks if two NodeInfos contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool NodeInfo_eq(const struct LDKNodeInfo *NONNULL_PTR a, const struct LDKNodeInfo *NONNULL_PTR b);
+
+/**
+ * Returns whether the node has only announced Tor addresses.
+ */
+MUST_USE_RES bool NodeInfo_is_tor_only(const struct LDKNodeInfo *NONNULL_PTR this_arg);
+
+/**
+ * Get the string representation of a NodeInfo object
+ */
+struct LDKStr NodeInfo_to_str(const struct LDKNodeInfo *NONNULL_PTR o);
+
+/**
+ * Serialize the NodeInfo object into a byte array which can be read by NodeInfo_read
+ */
+struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
+
+/**
+ * Read a NodeInfo from a byte array, created by NodeInfo_write
+ */
+struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
+
+/**
+ * Serialize the NetworkGraph object into a byte array which can be read by NetworkGraph_read
+ */
+struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
+
+/**
+ * Read a NetworkGraph from a byte array, created by NetworkGraph_write
+ */
+struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser, struct LDKLogger arg);
+
+/**
+ * Get the string representation of a NetworkGraph object
+ */
+struct LDKStr NetworkGraph_to_str(const struct LDKNetworkGraph *NONNULL_PTR o);
+
+/**
+ * Creates a new, empty, network graph.
+ */
+MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(enum LDKNetwork network, struct LDKLogger logger);
+
+/**
+ * Returns a read-only view of the network graph.
+ */
+MUST_USE_RES struct LDKReadOnlyNetworkGraph NetworkGraph_read_only(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
+
+/**
+ * The unix timestamp provided by the most recent rapid gossip sync.
+ * It will be set by the rapid sync process after every sync completion.
+ */
+MUST_USE_RES struct LDKCOption_u32Z NetworkGraph_get_last_rapid_gossip_sync_timestamp(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
+
+/**
+ * Update the unix timestamp provided by the most recent rapid gossip sync.
+ * This should be done automatically by the rapid sync process after every sync completion.
+ */
+void NetworkGraph_set_last_rapid_gossip_sync_timestamp(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint32_t last_rapid_gossip_sync_timestamp);
+
+/**
+ * For an already known node (from channel announcements), update its stored properties from a
+ * given node announcement.
+ *
+ * You probably don't want to call this directly, instead relying on a P2PGossipSync's
+ * RoutingMessageHandler implementation to call it indirectly. This may be useful to accept
+ * routing messages from a source using a protocol other than the lightning P2P protocol.
+ */
+MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
+
+/**
+ * For an already known node (from channel announcements), update its stored properties from a
+ * given node announcement without verifying the associated signatures. Because we aren't
+ * given the associated signatures here we cannot relay the node announcement to any of our
+ * peers.
+ */
+MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
+
+/**
+ * Store or update channel info from a channel announcement.
+ *
+ * You probably don't want to call this directly, instead relying on a [`P2PGossipSync`]'s
+ * [`RoutingMessageHandler`] implementation to call it indirectly. This may be useful to accept
+ * routing messages from a source using a protocol other than the lightning P2P protocol.
+ *
+ * If a [`UtxoLookup`] object is provided via `utxo_lookup`, it will be called to verify
+ * the corresponding UTXO exists on chain and is correctly-formatted.
+ */
+MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg, struct LDKCOption_UtxoLookupZ utxo_lookup);
+
+/**
+ * Store or update channel info from a channel announcement.
+ *
+ * You probably don't want to call this directly, instead relying on a [`P2PGossipSync`]'s
+ * [`RoutingMessageHandler`] implementation to call it indirectly. This may be useful to accept
+ * routing messages from a source using a protocol other than the lightning P2P protocol.
+ *
+ * This will skip verification of if the channel is actually on-chain.
+ */
+MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_announcement_no_lookup(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg);
+
+/**
+ * Store or update channel info from a channel announcement without verifying the associated
+ * signatures. Because we aren't given the associated signatures here we cannot relay the
+ * channel announcement to any of our peers.
+ *
+ * If a [`UtxoLookup`] object is provided via `utxo_lookup`, it will be called to verify
+ * the corresponding UTXO exists on chain and is correctly-formatted.
+ */
+MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_unsigned_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg, struct LDKCOption_UtxoLookupZ utxo_lookup);
+
+/**
+ * Update channel from partial announcement data received via rapid gossip sync
+ *
+ * `timestamp: u64`: Timestamp emulating the backdated original announcement receipt (by the
+ * rapid gossip sync server)
+ *
+ * All other parameters as used in [`msgs::UnsignedChannelAnnouncement`] fields.
+ */
+MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_add_channel_from_partial_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, uint64_t timestamp, struct LDKChannelFeatures features, struct LDKPublicKey node_id_1, struct LDKPublicKey node_id_2);
+
+/**
+ * Marks a channel in the graph as failed permanently.
+ *
+ * The channel and any node for which this was their last channel are removed from the graph.
+ */
+void NetworkGraph_channel_failed_permanent(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id);
+
+/**
+ * Marks a node in the graph as permanently failed, effectively removing it and its channels
+ * from local storage.
+ */
+void NetworkGraph_node_failed_permanent(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey node_id);
+
+/**
+ * Removes information about channels that we haven't heard any updates about in some time.
+ * This can be used regularly to prune the network graph of channels that likely no longer
+ * exist.
+ *
+ * While there is no formal requirement that nodes regularly re-broadcast their channel
+ * updates every two weeks, the non-normative section of BOLT 7 currently suggests that
+ * pruning occur for updates which are at least two weeks old, which we implement here.
+ *
+ * Note that for users of the `lightning-background-processor` crate this method may be
+ * automatically called regularly for you.
+ *
+ * This method will also cause us to stop tracking removed nodes and channels if they have been
+ * in the map for a while so that these can be resynced from gossip in the future.
+ *
+ * This method is only available with the `std` feature. See
+ * [`NetworkGraph::remove_stale_channels_and_tracking_with_time`] for `no-std` use.
+ */
+void NetworkGraph_remove_stale_channels_and_tracking(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
+
+/**
+ * Removes information about channels that we haven't heard any updates about in some time.
+ * This can be used regularly to prune the network graph of channels that likely no longer
+ * exist.
+ *
+ * While there is no formal requirement that nodes regularly re-broadcast their channel
+ * updates every two weeks, the non-normative section of BOLT 7 currently suggests that
+ * pruning occur for updates which are at least two weeks old, which we implement here.
+ *
+ * This method will also cause us to stop tracking removed nodes and channels if they have been
+ * in the map for a while so that these can be resynced from gossip in the future.
+ *
+ * This function takes the current unix time as an argument. For users with the `std` feature
+ * enabled, [`NetworkGraph::remove_stale_channels_and_tracking`] may be preferable.
+ */
+void NetworkGraph_remove_stale_channels_and_tracking_with_time(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t current_time_unix);
+
+/**
+ * For an already known (from announcement) channel, update info about one of the directions
+ * of the channel.
+ *
+ * You probably don't want to call this directly, instead relying on a [`P2PGossipSync`]'s
+ * [`RoutingMessageHandler`] implementation to call it indirectly. This may be useful to accept
+ * routing messages from a source using a protocol other than the lightning P2P protocol.
+ *
+ * If built with `no-std`, any updates with a timestamp more than two weeks in the past or
+ * materially in the future will be rejected.
+ */
+MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
+
+/**
+ * For an already known (from announcement) channel, update info about one of the directions
+ * of the channel without verifying the associated signatures. Because we aren't given the
+ * associated signatures here we cannot relay the channel update to any of our peers.
+ *
+ * If built with `no-std`, any updates with a timestamp more than two weeks in the past or
+ * materially in the future will be rejected.
+ */
+MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
+
+/**
+ * For an already known (from announcement) channel, verify the given [`ChannelUpdate`].
+ *
+ * This checks whether the update currently is applicable by [`Self::update_channel`].
+ *
+ * If built with `no-std`, any updates with a timestamp more than two weeks in the past or
+ * materially in the future will be rejected.
+ */
+MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_verify_channel_update(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
+
+/**
+ * Returns information on a channel with the given id.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKChannelInfo ReadOnlyNetworkGraph_channel(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id);
+
+/**
+ * Returns the list of channels in the graph
+ */
+MUST_USE_RES struct LDKCVec_u64Z ReadOnlyNetworkGraph_list_channels(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg);
+
+/**
+ * Returns information on a node with the given id.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKNodeInfo ReadOnlyNetworkGraph_node(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id);
+
+/**
+ * Returns the list of nodes in the graph
+ */
+MUST_USE_RES struct LDKCVec_NodeIdZ ReadOnlyNetworkGraph_list_nodes(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg);
+
+/**
+ * Get network addresses by node id.
+ * Returns None if the requested node is completely unknown,
+ * or if node announcement for the node was never received.
+ */
+MUST_USE_RES struct LDKCOption_CVec_SocketAddressZZ ReadOnlyNetworkGraph_get_addresses(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey pubkey);
+
+/**
+ * Frees any resources used by the DefaultRouter, if is_owned is set and inner is non-NULL.
+ */
+void DefaultRouter_free(struct LDKDefaultRouter this_obj);
+
+/**
+ * Creates a new router.
+ */
+MUST_USE_RES struct LDKDefaultRouter DefaultRouter_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKLogger logger, struct LDKEntropySource entropy_source, struct LDKLockableScore scorer, struct LDKProbabilisticScoringFeeParameters score_params);
+
+/**
+ * Constructs a new Router which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned Router must be freed before this_arg is
+ */
+struct LDKRouter DefaultRouter_as_Router(const struct LDKDefaultRouter *NONNULL_PTR this_arg);
+
+/**
+ * Constructs a new MessageRouter which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned MessageRouter must be freed before this_arg is
+ */
+struct LDKMessageRouter DefaultRouter_as_MessageRouter(const struct LDKDefaultRouter *NONNULL_PTR this_arg);
+
+/**
+ * Calls the free function if one is set
+ */
+void Router_free(struct LDKRouter this_ptr);
+
+/**
+ * Frees any resources used by the ScorerAccountingForInFlightHtlcs, if is_owned is set and inner is non-NULL.
+ */
+void ScorerAccountingForInFlightHtlcs_free(struct LDKScorerAccountingForInFlightHtlcs this_obj);
+
+/**
+ * Initialize a new `ScorerAccountingForInFlightHtlcs`.
+ */
+MUST_USE_RES struct LDKScorerAccountingForInFlightHtlcs ScorerAccountingForInFlightHtlcs_new(struct LDKScoreLookUp scorer, const struct LDKInFlightHtlcs *NONNULL_PTR inflight_htlcs);
+
+/**
+ * Constructs a new ScoreLookUp which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned ScoreLookUp must be freed before this_arg is
+ */
+struct LDKScoreLookUp ScorerAccountingForInFlightHtlcs_as_ScoreLookUp(const struct LDKScorerAccountingForInFlightHtlcs *NONNULL_PTR this_arg);
+
+/**
+ * Frees any resources used by the InFlightHtlcs, if is_owned is set and inner is non-NULL.
+ */
+void InFlightHtlcs_free(struct LDKInFlightHtlcs this_obj);
+
+/**
+ * Creates a copy of the InFlightHtlcs
+ */
+struct LDKInFlightHtlcs InFlightHtlcs_clone(const struct LDKInFlightHtlcs *NONNULL_PTR orig);
+
+/**
+ * Constructs an empty `InFlightHtlcs`.
+ */
+MUST_USE_RES struct LDKInFlightHtlcs InFlightHtlcs_new(void);
+
+/**
+ * Takes in a path with payer's node id and adds the path's details to `InFlightHtlcs`.
+ */
+void InFlightHtlcs_process_path(struct LDKInFlightHtlcs *NONNULL_PTR this_arg, const struct LDKPath *NONNULL_PTR path, struct LDKPublicKey payer_node_id);
+
+/**
+ * Adds a known HTLC given the public key of the HTLC source, target, and short channel
+ * id.
+ */
+void InFlightHtlcs_add_inflight_htlc(struct LDKInFlightHtlcs *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR source, const struct LDKNodeId *NONNULL_PTR target, uint64_t channel_scid, uint64_t used_msat);
+
+/**
+ * Returns liquidity in msat given the public key of the HTLC source, target, and short channel
+ * id.
+ */
+MUST_USE_RES struct LDKCOption_u64Z InFlightHtlcs_used_liquidity_msat(const struct LDKInFlightHtlcs *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR source, const struct LDKNodeId *NONNULL_PTR target, uint64_t channel_scid);
+
+/**
+ * Serialize the InFlightHtlcs object into a byte array which can be read by InFlightHtlcs_read
+ */
+struct LDKCVec_u8Z InFlightHtlcs_write(const struct LDKInFlightHtlcs *NONNULL_PTR obj);
+
+/**
+ * Read a InFlightHtlcs from a byte array, created by InFlightHtlcs_write
+ */
+struct LDKCResult_InFlightHtlcsDecodeErrorZ InFlightHtlcs_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the RouteHop, if is_owned is set and inner is non-NULL.
+ */
+void RouteHop_free(struct LDKRouteHop this_obj);
+
+/**
+ * The node_id of the node at this hop.
+ */
+struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+
+/**
+ * The node_id of the node at this hop.
+ */
+void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * The node_announcement features of the node at this hop. For the last hop, these may be
+ * amended to match the features present in the invoice this node generated.
+ */
+struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+
+/**
+ * The node_announcement features of the node at this hop. For the last hop, these may be
+ * amended to match the features present in the invoice this node generated.
+ */
+void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
+
+/**
+ * The channel that should be used from the previous hop to reach this node.
+ */
+uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+
+/**
+ * The channel that should be used from the previous hop to reach this node.
+ */
+void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * The channel_announcement features of the channel that should be used from the previous hop
+ * to reach this node.
+ */
+struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+
+/**
+ * The channel_announcement features of the channel that should be used from the previous hop
+ * to reach this node.
+ */
+void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
+
+/**
+ * The fee taken on this hop (for paying for the use of the *next* channel in the path).
+ * If this is the last hop in [`Path::hops`]:
+ * * if we're sending to a [`BlindedPath`], this is the fee paid for use of the entire blinded path
+ * * otherwise, this is the full value of this [`Path`]'s part of the payment
+ *
+ * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ */
+uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+
+/**
+ * The fee taken on this hop (for paying for the use of the *next* channel in the path).
+ * If this is the last hop in [`Path::hops`]:
+ * * if we're sending to a [`BlindedPath`], this is the fee paid for use of the entire blinded path
+ * * otherwise, this is the full value of this [`Path`]'s part of the payment
+ *
+ * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ */
+void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * The CLTV delta added for this hop.
+ * If this is the last hop in [`Path::hops`]:
+ * * if we're sending to a [`BlindedPath`], this is the CLTV delta for the entire blinded path
+ * * otherwise, this is the CLTV delta expected at the destination
+ *
+ * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ */
+uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+
+/**
+ * The CLTV delta added for this hop.
+ * If this is the last hop in [`Path::hops`]:
+ * * if we're sending to a [`BlindedPath`], this is the CLTV delta for the entire blinded path
+ * * otherwise, this is the CLTV delta expected at the destination
+ *
+ * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ */
+void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
+
+/**
+ * Indicates whether this hop is possibly announced in the public network graph.
+ *
+ * Will be `true` if there is a possibility that the channel is publicly known, i.e., if we
+ * either know for sure it's announced in the public graph, or if any public channels exist
+ * for which the given `short_channel_id` could be an alias for. Will be `false` if we believe
+ * the channel to be unannounced.
+ *
+ * Will be `true` for objects serialized with LDK version 0.0.116 and before.
+ */
+bool RouteHop_get_maybe_announced_channel(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+
+/**
+ * Indicates whether this hop is possibly announced in the public network graph.
+ *
+ * Will be `true` if there is a possibility that the channel is publicly known, i.e., if we
+ * either know for sure it's announced in the public graph, or if any public channels exist
+ * for which the given `short_channel_id` could be an alias for. Will be `false` if we believe
+ * the channel to be unannounced.
+ *
+ * Will be `true` for objects serialized with LDK version 0.0.116 and before.
+ */
+void RouteHop_set_maybe_announced_channel(struct LDKRouteHop *NONNULL_PTR this_ptr, bool val);
+
+/**
+ * Constructs a new RouteHop given each field
+ */
+MUST_USE_RES struct LDKRouteHop RouteHop_new(struct LDKPublicKey pubkey_arg, struct LDKNodeFeatures node_features_arg, uint64_t short_channel_id_arg, struct LDKChannelFeatures channel_features_arg, uint64_t fee_msat_arg, uint32_t cltv_expiry_delta_arg, bool maybe_announced_channel_arg);
+
+/**
+ * Creates a copy of the RouteHop
+ */
+struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the RouteHop.
+ */
+uint64_t RouteHop_hash(const struct LDKRouteHop *NONNULL_PTR o);
+
+/**
+ * Checks if two RouteHops contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool RouteHop_eq(const struct LDKRouteHop *NONNULL_PTR a, const struct LDKRouteHop *NONNULL_PTR b);
+
+/**
+ * Serialize the RouteHop object into a byte array which can be read by RouteHop_read
+ */
+struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
+
+/**
+ * Read a RouteHop from a byte array, created by RouteHop_write
+ */
+struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the BlindedTail, if is_owned is set and inner is non-NULL.
+ */
+void BlindedTail_free(struct LDKBlindedTail this_obj);
+
+/**
+ * The hops of the [`BlindedPath`] provided by the recipient.
+ *
+ * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ */
+struct LDKCVec_BlindedHopZ BlindedTail_get_hops(const struct LDKBlindedTail *NONNULL_PTR this_ptr);
+
+/**
+ * The hops of the [`BlindedPath`] provided by the recipient.
+ *
+ * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ */
+void BlindedTail_set_hops(struct LDKBlindedTail *NONNULL_PTR this_ptr, struct LDKCVec_BlindedHopZ val);
+
+/**
+ * The blinding point of the [`BlindedPath`] provided by the recipient.
+ *
+ * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ */
+struct LDKPublicKey BlindedTail_get_blinding_point(const struct LDKBlindedTail *NONNULL_PTR this_ptr);
+
+/**
+ * The blinding point of the [`BlindedPath`] provided by the recipient.
+ *
+ * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ */
+void BlindedTail_set_blinding_point(struct LDKBlindedTail *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * Excess CLTV delta added to the recipient's CLTV expiry to deter intermediate nodes from
+ * inferring the destination. May be 0.
+ */
+uint32_t BlindedTail_get_excess_final_cltv_expiry_delta(const struct LDKBlindedTail *NONNULL_PTR this_ptr);
+
+/**
+ * Excess CLTV delta added to the recipient's CLTV expiry to deter intermediate nodes from
+ * inferring the destination. May be 0.
+ */
+void BlindedTail_set_excess_final_cltv_expiry_delta(struct LDKBlindedTail *NONNULL_PTR this_ptr, uint32_t val);
+
+/**
+ * The total amount paid on this [`Path`], excluding the fees.
+ */
+uint64_t BlindedTail_get_final_value_msat(const struct LDKBlindedTail *NONNULL_PTR this_ptr);
+
+/**
+ * The total amount paid on this [`Path`], excluding the fees.
+ */
+void BlindedTail_set_final_value_msat(struct LDKBlindedTail *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * Constructs a new BlindedTail given each field
+ */
+MUST_USE_RES struct LDKBlindedTail BlindedTail_new(struct LDKCVec_BlindedHopZ hops_arg, struct LDKPublicKey blinding_point_arg, uint32_t excess_final_cltv_expiry_delta_arg, uint64_t final_value_msat_arg);
+
+/**
+ * Creates a copy of the BlindedTail
+ */
+struct LDKBlindedTail BlindedTail_clone(const struct LDKBlindedTail *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the BlindedTail.
+ */
+uint64_t BlindedTail_hash(const struct LDKBlindedTail *NONNULL_PTR o);
+
+/**
+ * Checks if two BlindedTails contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool BlindedTail_eq(const struct LDKBlindedTail *NONNULL_PTR a, const struct LDKBlindedTail *NONNULL_PTR b);
+
+/**
+ * Serialize the BlindedTail object into a byte array which can be read by BlindedTail_read
+ */
+struct LDKCVec_u8Z BlindedTail_write(const struct LDKBlindedTail *NONNULL_PTR obj);
+
+/**
+ * Read a BlindedTail from a byte array, created by BlindedTail_write
+ */
+struct LDKCResult_BlindedTailDecodeErrorZ BlindedTail_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the Path, if is_owned is set and inner is non-NULL.
+ */
+void Path_free(struct LDKPath this_obj);
+
+/**
+ * The list of unblinded hops in this [`Path`]. Must be at least length one.
+ */
+struct LDKCVec_RouteHopZ Path_get_hops(const struct LDKPath *NONNULL_PTR this_ptr);
+
+/**
+ * The list of unblinded hops in this [`Path`]. Must be at least length one.
+ */
+void Path_set_hops(struct LDKPath *NONNULL_PTR this_ptr, struct LDKCVec_RouteHopZ val);
+
+/**
+ * The blinded path at which this path terminates, if we're sending to one, and its metadata.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKBlindedTail Path_get_blinded_tail(const struct LDKPath *NONNULL_PTR this_ptr);
+
+/**
+ * The blinded path at which this path terminates, if we're sending to one, and its metadata.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void Path_set_blinded_tail(struct LDKPath *NONNULL_PTR this_ptr, struct LDKBlindedTail val);
+
+/**
+ * Constructs a new Path given each field
+ *
+ * Note that blinded_tail_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPath Path_new(struct LDKCVec_RouteHopZ hops_arg, struct LDKBlindedTail blinded_tail_arg);
+
+/**
+ * Creates a copy of the Path
+ */
+struct LDKPath Path_clone(const struct LDKPath *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the Path.
+ */
+uint64_t Path_hash(const struct LDKPath *NONNULL_PTR o);
+
+/**
+ * Checks if two Paths contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool Path_eq(const struct LDKPath *NONNULL_PTR a, const struct LDKPath *NONNULL_PTR b);
+
+/**
+ * Gets the fees for a given path, excluding any excess paid to the recipient.
+ */
+MUST_USE_RES uint64_t Path_fee_msat(const struct LDKPath *NONNULL_PTR this_arg);
+
+/**
+ * Gets the total amount paid on this [`Path`], excluding the fees.
+ */
+MUST_USE_RES uint64_t Path_final_value_msat(const struct LDKPath *NONNULL_PTR this_arg);
+
+/**
+ * Gets the final hop's CLTV expiry delta.
+ */
+MUST_USE_RES struct LDKCOption_u32Z Path_final_cltv_expiry_delta(const struct LDKPath *NONNULL_PTR this_arg);
+
+/**
+ * Frees any resources used by the Route, if is_owned is set and inner is non-NULL.
+ */
+void Route_free(struct LDKRoute this_obj);
+
+/**
+ * The list of [`Path`]s taken for a single (potentially-)multi-part payment. If no
+ * [`BlindedTail`]s are present, then the pubkey of the last [`RouteHop`] in each path must be
+ * the same.
+ */
+struct LDKCVec_PathZ Route_get_paths(const struct LDKRoute *NONNULL_PTR this_ptr);
+
+/**
+ * The list of [`Path`]s taken for a single (potentially-)multi-part payment. If no
+ * [`BlindedTail`]s are present, then the pubkey of the last [`RouteHop`] in each path must be
+ * the same.
+ */
+void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_PathZ val);
+
+/**
+ * The `route_params` parameter passed to [`find_route`].
+ *
+ * This is used by `ChannelManager` to track information which may be required for retries.
+ *
+ * Will be `None` for objects serialized with LDK versions prior to 0.0.117.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKRouteParameters Route_get_route_params(const struct LDKRoute *NONNULL_PTR this_ptr);
+
+/**
+ * The `route_params` parameter passed to [`find_route`].
+ *
+ * This is used by `ChannelManager` to track information which may be required for retries.
+ *
+ * Will be `None` for objects serialized with LDK versions prior to 0.0.117.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void Route_set_route_params(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKRouteParameters val);
+
+/**
+ * Constructs a new Route given each field
+ *
+ * Note that route_params_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_PathZ paths_arg, struct LDKRouteParameters route_params_arg);
+
+/**
+ * Creates a copy of the Route
+ */
+struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the Route.
+ */
+uint64_t Route_hash(const struct LDKRoute *NONNULL_PTR o);
+
+/**
+ * Checks if two Routes contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool Route_eq(const struct LDKRoute *NONNULL_PTR a, const struct LDKRoute *NONNULL_PTR b);
+
+/**
+ * Returns the total amount of fees paid on this [`Route`].
+ *
+ * For objects serialized with LDK 0.0.117 and after, this includes any extra payment made to
+ * the recipient, which can happen in excess of the amount passed to [`find_route`] via
+ * [`RouteParameters::final_value_msat`], if we had to reach the [`htlc_minimum_msat`] limits.
+ *
+ * [`htlc_minimum_msat`]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-channel_update-message
+ */
+MUST_USE_RES uint64_t Route_get_total_fees(const struct LDKRoute *NONNULL_PTR this_arg);
+
+/**
+ * Returns the total amount paid on this [`Route`], excluding the fees.
+ *
+ * Might be more than requested as part of the given [`RouteParameters::final_value_msat`] if
+ * we had to reach the [`htlc_minimum_msat`] limits.
+ *
+ * [`htlc_minimum_msat`]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-channel_update-message
+ */
+MUST_USE_RES uint64_t Route_get_total_amount(const struct LDKRoute *NONNULL_PTR this_arg);
+
+/**
+ * Get the string representation of a Route object
+ */
+struct LDKStr Route_to_str(const struct LDKRoute *NONNULL_PTR o);
+
+/**
+ * Serialize the Route object into a byte array which can be read by Route_read
+ */
+struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
+
+/**
+ * Read a Route from a byte array, created by Route_write
+ */
+struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the RouteParameters, if is_owned is set and inner is non-NULL.
+ */
+void RouteParameters_free(struct LDKRouteParameters this_obj);
+
+/**
+ * The parameters of the failed payment path.
+ */
+struct LDKPaymentParameters RouteParameters_get_payment_params(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
+
+/**
+ * The parameters of the failed payment path.
+ */
+void RouteParameters_set_payment_params(struct LDKRouteParameters *NONNULL_PTR this_ptr, struct LDKPaymentParameters val);
+
+/**
+ * The amount in msats sent on the failed payment path.
+ */
+uint64_t RouteParameters_get_final_value_msat(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
+
+/**
+ * The amount in msats sent on the failed payment path.
+ */
+void RouteParameters_set_final_value_msat(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * The maximum total fees, in millisatoshi, that may accrue during route finding.
+ *
+ * This limit also applies to the total fees that may arise while retrying failed payment
+ * paths.
+ *
+ * Note that values below a few sats may result in some paths being spuriously ignored.
+ */
+struct LDKCOption_u64Z RouteParameters_get_max_total_routing_fee_msat(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
+
+/**
+ * The maximum total fees, in millisatoshi, that may accrue during route finding.
+ *
+ * This limit also applies to the total fees that may arise while retrying failed payment
+ * paths.
+ *
+ * Note that values below a few sats may result in some paths being spuriously ignored.
+ */
+void RouteParameters_set_max_total_routing_fee_msat(struct LDKRouteParameters *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+
+/**
+ * Constructs a new RouteParameters given each field
+ */
+MUST_USE_RES struct LDKRouteParameters RouteParameters_new(struct LDKPaymentParameters payment_params_arg, uint64_t final_value_msat_arg, struct LDKCOption_u64Z max_total_routing_fee_msat_arg);
+
+/**
+ * Creates a copy of the RouteParameters
+ */
+struct LDKRouteParameters RouteParameters_clone(const struct LDKRouteParameters *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the RouteParameters.
+ */
+uint64_t RouteParameters_hash(const struct LDKRouteParameters *NONNULL_PTR o);
+
+/**
+ * Checks if two RouteParameterss contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool RouteParameters_eq(const struct LDKRouteParameters *NONNULL_PTR a, const struct LDKRouteParameters *NONNULL_PTR b);
+
+/**
+ * Constructs [`RouteParameters`] from the given [`PaymentParameters`] and a payment amount.
+ *
+ * [`Self::max_total_routing_fee_msat`] defaults to 1% of the payment amount + 50 sats
+ */
+MUST_USE_RES struct LDKRouteParameters RouteParameters_from_payment_params_and_value(struct LDKPaymentParameters payment_params, uint64_t final_value_msat);
+
+/**
+ * Serialize the RouteParameters object into a byte array which can be read by RouteParameters_read
+ */
+struct LDKCVec_u8Z RouteParameters_write(const struct LDKRouteParameters *NONNULL_PTR obj);
+
+/**
+ * Read a RouteParameters from a byte array, created by RouteParameters_write
+ */
+struct LDKCResult_RouteParametersDecodeErrorZ RouteParameters_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the PaymentParameters, if is_owned is set and inner is non-NULL.
+ */
+void PaymentParameters_free(struct LDKPaymentParameters this_obj);
+
+/**
+ * Information about the payee, such as their features and route hints for their channels.
+ */
+struct LDKPayee PaymentParameters_get_payee(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+
+/**
+ * Information about the payee, such as their features and route hints for their channels.
+ */
+void PaymentParameters_set_payee(struct LDKPaymentParameters *NONNULL_PTR this_ptr, struct LDKPayee val);
+
+/**
+ * Expiration of a payment to the payee, in seconds relative to the UNIX epoch.
+ */
+struct LDKCOption_u64Z PaymentParameters_get_expiry_time(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+
+/**
+ * Expiration of a payment to the payee, in seconds relative to the UNIX epoch.
+ */
+void PaymentParameters_set_expiry_time(struct LDKPaymentParameters *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+
+/**
+ * The maximum total CLTV delta we accept for the route.
+ * Defaults to [`DEFAULT_MAX_TOTAL_CLTV_EXPIRY_DELTA`].
+ */
+uint32_t PaymentParameters_get_max_total_cltv_expiry_delta(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+
+/**
+ * The maximum total CLTV delta we accept for the route.
+ * Defaults to [`DEFAULT_MAX_TOTAL_CLTV_EXPIRY_DELTA`].
+ */
+void PaymentParameters_set_max_total_cltv_expiry_delta(struct LDKPaymentParameters *NONNULL_PTR this_ptr, uint32_t val);
+
+/**
+ * The maximum number of paths that may be used by (MPP) payments.
+ * Defaults to [`DEFAULT_MAX_PATH_COUNT`].
+ */
+uint8_t PaymentParameters_get_max_path_count(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+
+/**
+ * The maximum number of paths that may be used by (MPP) payments.
+ * Defaults to [`DEFAULT_MAX_PATH_COUNT`].
+ */
+void PaymentParameters_set_max_path_count(struct LDKPaymentParameters *NONNULL_PTR this_ptr, uint8_t val);
+
+/**
+ * Selects the maximum share of a channel's total capacity which will be sent over a channel,
+ * as a power of 1/2. A higher value prefers to send the payment using more MPP parts whereas
+ * a lower value prefers to send larger MPP parts, potentially saturating channels and
+ * increasing failure probability for those paths.
+ *
+ * Note that this restriction will be relaxed during pathfinding after paths which meet this
+ * restriction have been found. While paths which meet this criteria will be searched for, it
+ * is ultimately up to the scorer to select them over other paths.
+ *
+ * A value of 0 will allow payments up to and including a channel's total announced usable
+ * capacity, a value of one will only use up to half its capacity, two 1/4, etc.
+ *
+ * Default value: 2
+ */
+uint8_t PaymentParameters_get_max_channel_saturation_power_of_half(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+
+/**
+ * Selects the maximum share of a channel's total capacity which will be sent over a channel,
+ * as a power of 1/2. A higher value prefers to send the payment using more MPP parts whereas
+ * a lower value prefers to send larger MPP parts, potentially saturating channels and
+ * increasing failure probability for those paths.
+ *
+ * Note that this restriction will be relaxed during pathfinding after paths which meet this
+ * restriction have been found. While paths which meet this criteria will be searched for, it
+ * is ultimately up to the scorer to select them over other paths.
+ *
+ * A value of 0 will allow payments up to and including a channel's total announced usable
+ * capacity, a value of one will only use up to half its capacity, two 1/4, etc.
+ *
+ * Default value: 2
+ */
+void PaymentParameters_set_max_channel_saturation_power_of_half(struct LDKPaymentParameters *NONNULL_PTR this_ptr, uint8_t val);
+
+/**
+ * A list of SCIDs which this payment was previously attempted over and which caused the
+ * payment to fail. Future attempts for the same payment shouldn't be relayed through any of
+ * these SCIDs.
+ *
+ * Returns a copy of the field.
+ */
+struct LDKCVec_u64Z PaymentParameters_get_previously_failed_channels(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+
+/**
+ * A list of SCIDs which this payment was previously attempted over and which caused the
+ * payment to fail. Future attempts for the same payment shouldn't be relayed through any of
+ * these SCIDs.
+ */
+void PaymentParameters_set_previously_failed_channels(struct LDKPaymentParameters *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
+
+/**
+ * A list of indices corresponding to blinded paths in [`Payee::Blinded::route_hints`] which this
+ * payment was previously attempted over and which caused the payment to fail. Future attempts
+ * for the same payment shouldn't be relayed through any of these blinded paths.
+ *
+ * Returns a copy of the field.
+ */
+struct LDKCVec_u64Z PaymentParameters_get_previously_failed_blinded_path_idxs(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+
+/**
+ * A list of indices corresponding to blinded paths in [`Payee::Blinded::route_hints`] which this
+ * payment was previously attempted over and which caused the payment to fail. Future attempts
+ * for the same payment shouldn't be relayed through any of these blinded paths.
+ */
+void PaymentParameters_set_previously_failed_blinded_path_idxs(struct LDKPaymentParameters *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
+
+/**
+ * Constructs a new PaymentParameters given each field
+ */
+MUST_USE_RES struct LDKPaymentParameters PaymentParameters_new(struct LDKPayee payee_arg, struct LDKCOption_u64Z expiry_time_arg, uint32_t max_total_cltv_expiry_delta_arg, uint8_t max_path_count_arg, uint8_t max_channel_saturation_power_of_half_arg, struct LDKCVec_u64Z previously_failed_channels_arg, struct LDKCVec_u64Z previously_failed_blinded_path_idxs_arg);
+
+/**
+ * Creates a copy of the PaymentParameters
+ */
+struct LDKPaymentParameters PaymentParameters_clone(const struct LDKPaymentParameters *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the PaymentParameters.
+ */
+uint64_t PaymentParameters_hash(const struct LDKPaymentParameters *NONNULL_PTR o);
+
+/**
+ * Checks if two PaymentParameterss contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool PaymentParameters_eq(const struct LDKPaymentParameters *NONNULL_PTR a, const struct LDKPaymentParameters *NONNULL_PTR b);
+
+/**
+ * Serialize the PaymentParameters object into a byte array which can be read by PaymentParameters_read
+ */
+struct LDKCVec_u8Z PaymentParameters_write(const struct LDKPaymentParameters *NONNULL_PTR obj);
+
+/**
+ * Read a PaymentParameters from a byte array, created by PaymentParameters_write
+ */
+struct LDKCResult_PaymentParametersDecodeErrorZ PaymentParameters_read(struct LDKu8slice ser, uint32_t arg);
+
+/**
+ * Creates a payee with the node id of the given `pubkey`.
+ *
+ * The `final_cltv_expiry_delta` should match the expected final CLTV delta the recipient has
+ * provided.
+ */
+MUST_USE_RES struct LDKPaymentParameters PaymentParameters_from_node_id(struct LDKPublicKey payee_pubkey, uint32_t final_cltv_expiry_delta);
+
+/**
+ * Creates a payee with the node id of the given `pubkey` to use for keysend payments.
+ *
+ * The `final_cltv_expiry_delta` should match the expected final CLTV delta the recipient has
+ * provided.
+ *
+ * Note that MPP keysend is not widely supported yet. The `allow_mpp` lets you choose
+ * whether your router will be allowed to find a multi-part route for this payment. If you
+ * set `allow_mpp` to true, you should ensure a payment secret is set on send, likely via
+ * [`RecipientOnionFields::secret_only`].
+ *
+ * [`RecipientOnionFields::secret_only`]: crate::ln::channelmanager::RecipientOnionFields::secret_only
+ */
+MUST_USE_RES struct LDKPaymentParameters PaymentParameters_for_keysend(struct LDKPublicKey payee_pubkey, uint32_t final_cltv_expiry_delta, bool allow_mpp);
+
+/**
+ * Creates parameters for paying to a blinded payee from the provided invoice. Sets
+ * [`Payee::Blinded::route_hints`], [`Payee::Blinded::features`], and
+ * [`PaymentParameters::expiry_time`].
+ */
+MUST_USE_RES struct LDKPaymentParameters PaymentParameters_from_bolt12_invoice(const struct LDKBolt12Invoice *NONNULL_PTR invoice);
+
+/**
+ * Creates parameters for paying to a blinded payee from the provided blinded route hints.
+ */
+MUST_USE_RES struct LDKPaymentParameters PaymentParameters_blinded(struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ blinded_route_hints);
+
+/**
+ * Frees any resources used by the Payee
+ */
+void Payee_free(struct LDKPayee this_ptr);
+
+/**
+ * Creates a copy of the Payee
+ */
+struct LDKPayee Payee_clone(const struct LDKPayee *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new Blinded-variant Payee
+ */
+struct LDKPayee Payee_blinded(struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ route_hints, struct LDKBolt12InvoiceFeatures features);
+
+/**
+ * Utility method to constructs a new Clear-variant Payee
+ */
+struct LDKPayee Payee_clear(struct LDKPublicKey node_id, struct LDKCVec_RouteHintZ route_hints, struct LDKBolt11InvoiceFeatures features, uint32_t final_cltv_expiry_delta);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the Payee.
+ */
+uint64_t Payee_hash(const struct LDKPayee *NONNULL_PTR o);
+
+/**
+ * Checks if two Payees contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+bool Payee_eq(const struct LDKPayee *NONNULL_PTR a, const struct LDKPayee *NONNULL_PTR b);
+
+/**
+ * Frees any resources used by the RouteHint, if is_owned is set and inner is non-NULL.
+ */
+void RouteHint_free(struct LDKRouteHint this_obj);
+
+struct LDKCVec_RouteHintHopZ RouteHint_get_a(const struct LDKRouteHint *NONNULL_PTR this_ptr);
+
+void RouteHint_set_a(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintHopZ val);
+
+/**
+ * Constructs a new RouteHint given each field
+ */
+MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKCVec_RouteHintHopZ a_arg);
+
+/**
+ * Creates a copy of the RouteHint
+ */
+struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the RouteHint.
+ */
+uint64_t RouteHint_hash(const struct LDKRouteHint *NONNULL_PTR o);
+
+/**
+ * Checks if two RouteHints contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
+
+/**
+ * Serialize the RouteHint object into a byte array which can be read by RouteHint_read
+ */
+struct LDKCVec_u8Z RouteHint_write(const struct LDKRouteHint *NONNULL_PTR obj);
+
+/**
+ * Read a RouteHint from a byte array, created by RouteHint_write
+ */
+struct LDKCResult_RouteHintDecodeErrorZ RouteHint_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the RouteHintHop, if is_owned is set and inner is non-NULL.
+ */
+void RouteHintHop_free(struct LDKRouteHintHop this_obj);
+
+/**
+ * The node_id of the non-target end of the route
+ */
+struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+
+/**
+ * The node_id of the non-target end of the route
+ */
+void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * The short_channel_id of this channel
+ */
+uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+
+/**
+ * The short_channel_id of this channel
+ */
+void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * The fees which must be paid to use this channel
+ */
+struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+
+/**
+ * The fees which must be paid to use this channel
+ */
+void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
+
+/**
+ * The difference in CLTV values between this node and the next node.
+ */
+uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+
+/**
+ * The difference in CLTV values between this node and the next node.
+ */
+void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
+
+/**
+ * The minimum value, in msat, which must be relayed to the next hop.
+ */
+struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+
+/**
+ * The minimum value, in msat, which must be relayed to the next hop.
+ */
+void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+
+/**
+ * The maximum value in msat available for routing with a single HTLC.
+ */
+struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+
+/**
+ * The maximum value in msat available for routing with a single HTLC.
+ */
+void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+
+/**
+ * Constructs a new RouteHintHop given each field
+ */
+MUST_USE_RES struct LDKRouteHintHop RouteHintHop_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, struct LDKCOption_u64Z htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg);
+
+/**
+ * Creates a copy of the RouteHintHop
+ */
+struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the RouteHintHop.
+ */
+uint64_t RouteHintHop_hash(const struct LDKRouteHintHop *NONNULL_PTR o);
+
+/**
+ * Checks if two RouteHintHops contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
+
+/**
+ * Serialize the RouteHintHop object into a byte array which can be read by RouteHintHop_read
+ */
+struct LDKCVec_u8Z RouteHintHop_write(const struct LDKRouteHintHop *NONNULL_PTR obj);
+
+/**
+ * Read a RouteHintHop from a byte array, created by RouteHintHop_write
+ */
+struct LDKCResult_RouteHintHopDecodeErrorZ RouteHintHop_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the FirstHopCandidate, if is_owned is set and inner is non-NULL.
+ */
+void FirstHopCandidate_free(struct LDKFirstHopCandidate this_obj);
+
+/**
+ * Creates a copy of the FirstHopCandidate
+ */
+struct LDKFirstHopCandidate FirstHopCandidate_clone(const struct LDKFirstHopCandidate *NONNULL_PTR orig);
+
+/**
+ * Frees any resources used by the PublicHopCandidate, if is_owned is set and inner is non-NULL.
+ */
+void PublicHopCandidate_free(struct LDKPublicHopCandidate this_obj);
+
+/**
+ * The short channel ID of the channel, i.e. the identifier by which we refer to this
+ * channel.
+ */
+uint64_t PublicHopCandidate_get_short_channel_id(const struct LDKPublicHopCandidate *NONNULL_PTR this_ptr);
+
+/**
+ * The short channel ID of the channel, i.e. the identifier by which we refer to this
+ * channel.
+ */
+void PublicHopCandidate_set_short_channel_id(struct LDKPublicHopCandidate *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * Creates a copy of the PublicHopCandidate
+ */
+struct LDKPublicHopCandidate PublicHopCandidate_clone(const struct LDKPublicHopCandidate *NONNULL_PTR orig);
+
+/**
+ * Frees any resources used by the PrivateHopCandidate, if is_owned is set and inner is non-NULL.
+ */
+void PrivateHopCandidate_free(struct LDKPrivateHopCandidate this_obj);
+
+/**
+ * Creates a copy of the PrivateHopCandidate
+ */
+struct LDKPrivateHopCandidate PrivateHopCandidate_clone(const struct LDKPrivateHopCandidate *NONNULL_PTR orig);
+
+/**
+ * Frees any resources used by the BlindedPathCandidate, if is_owned is set and inner is non-NULL.
+ */
+void BlindedPathCandidate_free(struct LDKBlindedPathCandidate this_obj);
+
+/**
+ * Creates a copy of the BlindedPathCandidate
+ */
+struct LDKBlindedPathCandidate BlindedPathCandidate_clone(const struct LDKBlindedPathCandidate *NONNULL_PTR orig);
+
+/**
+ * Frees any resources used by the OneHopBlindedPathCandidate, if is_owned is set and inner is non-NULL.
+ */
+void OneHopBlindedPathCandidate_free(struct LDKOneHopBlindedPathCandidate this_obj);
+
+/**
+ * Creates a copy of the OneHopBlindedPathCandidate
+ */
+struct LDKOneHopBlindedPathCandidate OneHopBlindedPathCandidate_clone(const struct LDKOneHopBlindedPathCandidate *NONNULL_PTR orig);
+
+/**
+ * Frees any resources used by the CandidateRouteHop
+ */
+void CandidateRouteHop_free(struct LDKCandidateRouteHop this_ptr);
+
+/**
+ * Creates a copy of the CandidateRouteHop
+ */
+struct LDKCandidateRouteHop CandidateRouteHop_clone(const struct LDKCandidateRouteHop *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new FirstHop-variant CandidateRouteHop
+ */
+struct LDKCandidateRouteHop CandidateRouteHop_first_hop(struct LDKFirstHopCandidate a);
+
+/**
+ * Utility method to constructs a new PublicHop-variant CandidateRouteHop
+ */
+struct LDKCandidateRouteHop CandidateRouteHop_public_hop(struct LDKPublicHopCandidate a);
+
+/**
+ * Utility method to constructs a new PrivateHop-variant CandidateRouteHop
+ */
+struct LDKCandidateRouteHop CandidateRouteHop_private_hop(struct LDKPrivateHopCandidate a);
+
+/**
+ * Utility method to constructs a new Blinded-variant CandidateRouteHop
+ */
+struct LDKCandidateRouteHop CandidateRouteHop_blinded(struct LDKBlindedPathCandidate a);
+
+/**
+ * Utility method to constructs a new OneHopBlinded-variant CandidateRouteHop
+ */
+struct LDKCandidateRouteHop CandidateRouteHop_one_hop_blinded(struct LDKOneHopBlindedPathCandidate a);
+
+/**
+ * Returns the globally unique short channel ID for this hop, if one is known.
+ *
+ * This only returns `Some` if the channel is public (either our own, or one we've learned
+ * from the public network graph), and thus the short channel ID we have for this channel is
+ * globally unique and identifies this channel in a global namespace.
+ */
+MUST_USE_RES struct LDKCOption_u64Z CandidateRouteHop_globally_unique_short_channel_id(const struct LDKCandidateRouteHop *NONNULL_PTR this_arg);
+
+/**
+ * Returns the required difference in HTLC CLTV expiry between the [`Self::source`] and the
+ * next-hop for an HTLC taking this hop.
+ *
+ * This is the time that the node(s) in this hop have to claim the HTLC on-chain if the
+ * next-hop goes on chain with a payment preimage.
+ */
+MUST_USE_RES uint32_t CandidateRouteHop_cltv_expiry_delta(const struct LDKCandidateRouteHop *NONNULL_PTR this_arg);
+
+/**
+ * Returns the minimum amount that can be sent over this hop, in millisatoshis.
+ */
+MUST_USE_RES uint64_t CandidateRouteHop_htlc_minimum_msat(const struct LDKCandidateRouteHop *NONNULL_PTR this_arg);
+
+/**
+ * Returns the fees that must be paid to route an HTLC over this channel.
+ */
+MUST_USE_RES struct LDKRoutingFees CandidateRouteHop_fees(const struct LDKCandidateRouteHop *NONNULL_PTR this_arg);
+
+/**
+ * Returns the source node id of current hop.
+ *
+ * Source node id refers to the node forwarding the HTLC through this hop.
+ *
+ * For [`Self::FirstHop`] we return payer's node id.
+ */
+MUST_USE_RES struct LDKNodeId CandidateRouteHop_source(const struct LDKCandidateRouteHop *NONNULL_PTR this_arg);
+
+/**
+ * Returns the target node id of this hop, if known.
+ *
+ * Target node id refers to the node receiving the HTLC after this hop.
+ *
+ * For [`Self::Blinded`] we return `None` because the ultimate destination after the blinded
+ * path is unknown.
+ *
+ * For [`Self::OneHopBlinded`] we return `None` because the target is the same as the source,
+ * and such a return value would be somewhat nonsensical.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKNodeId CandidateRouteHop_target(const struct LDKCandidateRouteHop *NONNULL_PTR this_arg);
+
+/**
+ * Finds a route from us (payer) to the given target node (payee).
+ *
+ * If the payee provided features in their invoice, they should be provided via the `payee` field
+ * in the given [`RouteParameters::payment_params`].
+ * Without this, MPP will only be used if the payee's features are available in the network graph.
+ *
+ * Private routing paths between a public node and the target may be included in the `payee` field
+ * of [`RouteParameters::payment_params`].
+ *
+ * If some channels aren't announced, it may be useful to fill in `first_hops` with the results
+ * from [`ChannelManager::list_usable_channels`]. If it is filled in, the view of these channels
+ * from `network_graph` will be ignored, and only those in `first_hops` will be used.
+ *
+ * The fees on channels from us to the next hop are ignored as they are assumed to all be equal.
+ * However, the enabled/disabled bit on such channels as well as the `htlc_minimum_msat` /
+ * `htlc_maximum_msat` *are* checked as they may change based on the receiving node.
+ *
+ * # Panics
+ *
+ * Panics if first_hops contains channels without `short_channel_id`s;
+ * [`ChannelManager::list_usable_channels`] will never include such channels.
+ *
+ * [`ChannelManager::list_usable_channels`]: crate::ln::channelmanager::ChannelManager::list_usable_channels
+ * [`Event::PaymentPathFailed`]: crate::events::Event::PaymentPathFailed
+ * [`NetworkGraph`]: crate::routing::gossip::NetworkGraph
+ *
+ * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKCResult_RouteLightningErrorZ find_route(struct LDKPublicKey our_node_pubkey, const struct LDKRouteParameters *NONNULL_PTR route_params, const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKLogger logger, const struct LDKScoreLookUp *NONNULL_PTR scorer, const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR score_params, const uint8_t (*random_seed_bytes)[32]);
+
+/**
+ * Construct a route from us (payer) to the target node (payee) via the given hops (which should
+ * exclude the payer, but include the payee). This may be useful, e.g., for probing the chosen path.
+ *
+ * Re-uses logic from `find_route`, so the restrictions described there also apply here.
+ */
+struct LDKCResult_RouteLightningErrorZ build_route_from_hops(struct LDKPublicKey our_node_pubkey, struct LDKCVec_PublicKeyZ hops, const struct LDKRouteParameters *NONNULL_PTR route_params, const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKLogger logger, const uint8_t (*random_seed_bytes)[32]);
+
+/**
+ * Calls the free function if one is set
+ */
+void ScoreLookUp_free(struct LDKScoreLookUp this_ptr);
+
+/**
+ * Calls the free function if one is set
+ */
+void ScoreUpdate_free(struct LDKScoreUpdate this_ptr);
+
+/**
+ * Calls the free function if one is set
+ */
+void Score_free(struct LDKScore this_ptr);
+
+/**
+ * Calls the free function if one is set
+ */
+void LockableScore_free(struct LDKLockableScore this_ptr);
+
+/**
+ * Calls the free function if one is set
+ */
+void WriteableScore_free(struct LDKWriteableScore this_ptr);
+
+/**
+ * Frees any resources used by the MultiThreadedLockableScore, if is_owned is set and inner is non-NULL.
+ */
+void MultiThreadedLockableScore_free(struct LDKMultiThreadedLockableScore this_obj);
+
+/**
+ * Constructs a new LockableScore which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned LockableScore must be freed before this_arg is
+ */
+struct LDKLockableScore MultiThreadedLockableScore_as_LockableScore(const struct LDKMultiThreadedLockableScore *NONNULL_PTR this_arg);
+
+/**
+ * Serialize the MultiThreadedLockableScore object into a byte array which can be read by MultiThreadedLockableScore_read
+ */
+struct LDKCVec_u8Z MultiThreadedLockableScore_write(const struct LDKMultiThreadedLockableScore *NONNULL_PTR obj);
+
+/**
+ * Constructs a new WriteableScore which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned WriteableScore must be freed before this_arg is
+ */
+struct LDKWriteableScore MultiThreadedLockableScore_as_WriteableScore(const struct LDKMultiThreadedLockableScore *NONNULL_PTR this_arg);
+
+/**
+ * Creates a new [`MultiThreadedLockableScore`] given an underlying [`Score`].
+ */
+MUST_USE_RES struct LDKMultiThreadedLockableScore MultiThreadedLockableScore_new(struct LDKScore score);
+
+/**
+ * Frees any resources used by the MultiThreadedScoreLockRead, if is_owned is set and inner is non-NULL.
+ */
+void MultiThreadedScoreLockRead_free(struct LDKMultiThreadedScoreLockRead this_obj);
+
+/**
+ * Frees any resources used by the MultiThreadedScoreLockWrite, if is_owned is set and inner is non-NULL.
+ */
+void MultiThreadedScoreLockWrite_free(struct LDKMultiThreadedScoreLockWrite this_obj);
+
+/**
+ * Constructs a new ScoreLookUp which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned ScoreLookUp must be freed before this_arg is
+ */
+struct LDKScoreLookUp MultiThreadedScoreLockRead_as_ScoreLookUp(const struct LDKMultiThreadedScoreLockRead *NONNULL_PTR this_arg);
+
+/**
+ * Serialize the MultiThreadedScoreLockWrite object into a byte array which can be read by MultiThreadedScoreLockWrite_read
+ */
+struct LDKCVec_u8Z MultiThreadedScoreLockWrite_write(const struct LDKMultiThreadedScoreLockWrite *NONNULL_PTR obj);
+
+/**
+ * Constructs a new ScoreUpdate which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned ScoreUpdate must be freed before this_arg is
+ */
+struct LDKScoreUpdate MultiThreadedScoreLockWrite_as_ScoreUpdate(const struct LDKMultiThreadedScoreLockWrite *NONNULL_PTR this_arg);
+
+/**
+ * Frees any resources used by the ChannelUsage, if is_owned is set and inner is non-NULL.
+ */
+void ChannelUsage_free(struct LDKChannelUsage this_obj);
+
+/**
+ * The amount to send through the channel, denominated in millisatoshis.
+ */
+uint64_t ChannelUsage_get_amount_msat(const struct LDKChannelUsage *NONNULL_PTR this_ptr);
+
+/**
+ * The amount to send through the channel, denominated in millisatoshis.
+ */
+void ChannelUsage_set_amount_msat(struct LDKChannelUsage *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * Total amount, denominated in millisatoshis, already allocated to send through the channel
+ * as part of a multi-path payment.
+ */
+uint64_t ChannelUsage_get_inflight_htlc_msat(const struct LDKChannelUsage *NONNULL_PTR this_ptr);
+
+/**
+ * Total amount, denominated in millisatoshis, already allocated to send through the channel
+ * as part of a multi-path payment.
+ */
+void ChannelUsage_set_inflight_htlc_msat(struct LDKChannelUsage *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * The effective capacity of the channel.
+ */
+struct LDKEffectiveCapacity ChannelUsage_get_effective_capacity(const struct LDKChannelUsage *NONNULL_PTR this_ptr);
+
+/**
+ * The effective capacity of the channel.
+ */
+void ChannelUsage_set_effective_capacity(struct LDKChannelUsage *NONNULL_PTR this_ptr, struct LDKEffectiveCapacity val);
+
+/**
+ * Constructs a new ChannelUsage given each field
+ */
+MUST_USE_RES struct LDKChannelUsage ChannelUsage_new(uint64_t amount_msat_arg, uint64_t inflight_htlc_msat_arg, struct LDKEffectiveCapacity effective_capacity_arg);
+
+/**
+ * Creates a copy of the ChannelUsage
+ */
+struct LDKChannelUsage ChannelUsage_clone(const struct LDKChannelUsage *NONNULL_PTR orig);
+
+/**
+ * Frees any resources used by the FixedPenaltyScorer, if is_owned is set and inner is non-NULL.
+ */
+void FixedPenaltyScorer_free(struct LDKFixedPenaltyScorer this_obj);
+
+/**
+ * Creates a copy of the FixedPenaltyScorer
+ */
+struct LDKFixedPenaltyScorer FixedPenaltyScorer_clone(const struct LDKFixedPenaltyScorer *NONNULL_PTR orig);
+
+/**
+ * Creates a new scorer using `penalty_msat`.
+ */
+MUST_USE_RES struct LDKFixedPenaltyScorer FixedPenaltyScorer_with_penalty(uint64_t penalty_msat);
+
+/**
+ * Constructs a new ScoreLookUp which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned ScoreLookUp must be freed before this_arg is
+ */
+struct LDKScoreLookUp FixedPenaltyScorer_as_ScoreLookUp(const struct LDKFixedPenaltyScorer *NONNULL_PTR this_arg);
+
+/**
+ * Constructs a new ScoreUpdate which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned ScoreUpdate must be freed before this_arg is
+ */
+struct LDKScoreUpdate FixedPenaltyScorer_as_ScoreUpdate(const struct LDKFixedPenaltyScorer *NONNULL_PTR this_arg);
+
+/**
+ * Serialize the FixedPenaltyScorer object into a byte array which can be read by FixedPenaltyScorer_read
+ */
+struct LDKCVec_u8Z FixedPenaltyScorer_write(const struct LDKFixedPenaltyScorer *NONNULL_PTR obj);
+
+/**
+ * Read a FixedPenaltyScorer from a byte array, created by FixedPenaltyScorer_write
+ */
+struct LDKCResult_FixedPenaltyScorerDecodeErrorZ FixedPenaltyScorer_read(struct LDKu8slice ser, uint64_t arg);
+
+/**
+ * Frees any resources used by the ProbabilisticScorer, if is_owned is set and inner is non-NULL.
+ */
+void ProbabilisticScorer_free(struct LDKProbabilisticScorer this_obj);
+
+/**
+ * Frees any resources used by the ProbabilisticScoringFeeParameters, if is_owned is set and inner is non-NULL.
+ */
+void ProbabilisticScoringFeeParameters_free(struct LDKProbabilisticScoringFeeParameters this_obj);
+
+/**
+ * A fixed penalty in msats to apply to each channel.
+ *
+ * Default value: 500 msat
+ */
+uint64_t ProbabilisticScoringFeeParameters_get_base_penalty_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+
+/**
+ * A fixed penalty in msats to apply to each channel.
+ *
+ * Default value: 500 msat
+ */
+void ProbabilisticScoringFeeParameters_set_base_penalty_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * A multiplier used with the total amount flowing over a channel to calculate a fixed penalty
+ * applied to each channel, in excess of the [`base_penalty_msat`].
+ *
+ * The purpose of the amount penalty is to avoid having fees dominate the channel cost (i.e.,
+ * fees plus penalty) for large payments. The penalty is computed as the product of this
+ * multiplier and `2^30`ths of the total amount flowing over a channel (i.e. the payment
+ * amount plus the amount of any other HTLCs flowing we sent over the same channel).
+ *
+ * ie `base_penalty_amount_multiplier_msat * amount_msat / 2^30`
+ *
+ * Default value: 8,192 msat
+ *
+ * [`base_penalty_msat`]: Self::base_penalty_msat
+ */
+uint64_t ProbabilisticScoringFeeParameters_get_base_penalty_amount_multiplier_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+
+/**
+ * A multiplier used with the total amount flowing over a channel to calculate a fixed penalty
+ * applied to each channel, in excess of the [`base_penalty_msat`].
+ *
+ * The purpose of the amount penalty is to avoid having fees dominate the channel cost (i.e.,
+ * fees plus penalty) for large payments. The penalty is computed as the product of this
+ * multiplier and `2^30`ths of the total amount flowing over a channel (i.e. the payment
+ * amount plus the amount of any other HTLCs flowing we sent over the same channel).
+ *
+ * ie `base_penalty_amount_multiplier_msat * amount_msat / 2^30`
+ *
+ * Default value: 8,192 msat
+ *
+ * [`base_penalty_msat`]: Self::base_penalty_msat
+ */
+void ProbabilisticScoringFeeParameters_set_base_penalty_amount_multiplier_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * A multiplier used in conjunction with the negative `log10` of the channel's success
+ * probability for a payment, as determined by our latest estimates of the channel's
+ * liquidity, to determine the liquidity penalty.
+ *
+ * The penalty is based in part on the knowledge learned from prior successful and unsuccessful
+ * payments. This knowledge is decayed over time based on [`liquidity_offset_half_life`]. The
+ * penalty is effectively limited to `2 * liquidity_penalty_multiplier_msat` (corresponding to
+ * lower bounding the success probability to `0.01`) when the amount falls within the
+ * uncertainty bounds of the channel liquidity balance. Amounts above the upper bound will
+ * result in a `u64::max_value` penalty, however.
+ *
+ * `-log10(success_probability) * liquidity_penalty_multiplier_msat`
+ *
+ * Default value: 30,000 msat
+ *
+ * [`liquidity_offset_half_life`]: ProbabilisticScoringDecayParameters::liquidity_offset_half_life
+ */
+uint64_t ProbabilisticScoringFeeParameters_get_liquidity_penalty_multiplier_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+
+/**
+ * A multiplier used in conjunction with the negative `log10` of the channel's success
+ * probability for a payment, as determined by our latest estimates of the channel's
+ * liquidity, to determine the liquidity penalty.
+ *
+ * The penalty is based in part on the knowledge learned from prior successful and unsuccessful
+ * payments. This knowledge is decayed over time based on [`liquidity_offset_half_life`]. The
+ * penalty is effectively limited to `2 * liquidity_penalty_multiplier_msat` (corresponding to
+ * lower bounding the success probability to `0.01`) when the amount falls within the
+ * uncertainty bounds of the channel liquidity balance. Amounts above the upper bound will
+ * result in a `u64::max_value` penalty, however.
+ *
+ * `-log10(success_probability) * liquidity_penalty_multiplier_msat`
+ *
+ * Default value: 30,000 msat
+ *
+ * [`liquidity_offset_half_life`]: ProbabilisticScoringDecayParameters::liquidity_offset_half_life
+ */
+void ProbabilisticScoringFeeParameters_set_liquidity_penalty_multiplier_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * A multiplier used in conjunction with the total amount flowing over a channel and the
+ * negative `log10` of the channel's success probability for the payment, as determined by our
+ * latest estimates of the channel's liquidity, to determine the amount penalty.
+ *
+ * The purpose of the amount penalty is to avoid having fees dominate the channel cost (i.e.,
+ * fees plus penalty) for large payments. The penalty is computed as the product of this
+ * multiplier and `2^20`ths of the amount flowing over this channel, weighted by the negative
+ * `log10` of the success probability.
+ *
+ * `-log10(success_probability) * liquidity_penalty_amount_multiplier_msat * amount_msat / 2^20`
+ *
+ * In practice, this means for 0.1 success probability (`-log10(0.1) == 1`) each `2^20`th of
+ * the amount will result in a penalty of the multiplier. And, as the success probability
+ * decreases, the negative `log10` weighting will increase dramatically. For higher success
+ * probabilities, the multiplier will have a decreasing effect as the negative `log10` will
+ * fall below `1`.
+ *
+ * Default value: 192 msat
+ */
+uint64_t ProbabilisticScoringFeeParameters_get_liquidity_penalty_amount_multiplier_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+
+/**
+ * A multiplier used in conjunction with the total amount flowing over a channel and the
+ * negative `log10` of the channel's success probability for the payment, as determined by our
+ * latest estimates of the channel's liquidity, to determine the amount penalty.
+ *
+ * The purpose of the amount penalty is to avoid having fees dominate the channel cost (i.e.,
+ * fees plus penalty) for large payments. The penalty is computed as the product of this
+ * multiplier and `2^20`ths of the amount flowing over this channel, weighted by the negative
+ * `log10` of the success probability.
+ *
+ * `-log10(success_probability) * liquidity_penalty_amount_multiplier_msat * amount_msat / 2^20`
+ *
+ * In practice, this means for 0.1 success probability (`-log10(0.1) == 1`) each `2^20`th of
+ * the amount will result in a penalty of the multiplier. And, as the success probability
+ * decreases, the negative `log10` weighting will increase dramatically. For higher success
+ * probabilities, the multiplier will have a decreasing effect as the negative `log10` will
+ * fall below `1`.
+ *
+ * Default value: 192 msat
+ */
+void ProbabilisticScoringFeeParameters_set_liquidity_penalty_amount_multiplier_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * A multiplier used in conjunction with the negative `log10` of the channel's success
+ * probability for the payment, as determined based on the history of our estimates of the
+ * channel's available liquidity, to determine a penalty.
+ *
+ * This penalty is similar to [`liquidity_penalty_multiplier_msat`], however, instead of using
+ * only our latest estimate for the current liquidity available in the channel, it estimates
+ * success probability based on the estimated liquidity available in the channel through
+ * history. Specifically, every time we update our liquidity bounds on a given channel, we
+ * track which of several buckets those bounds fall into, exponentially decaying the
+ * probability of each bucket as new samples are added.
+ *
+ * Default value: 10,000 msat
+ *
+ * [`liquidity_penalty_multiplier_msat`]: Self::liquidity_penalty_multiplier_msat
+ */
+uint64_t ProbabilisticScoringFeeParameters_get_historical_liquidity_penalty_multiplier_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+
+/**
+ * A multiplier used in conjunction with the negative `log10` of the channel's success
+ * probability for the payment, as determined based on the history of our estimates of the
+ * channel's available liquidity, to determine a penalty.
+ *
+ * This penalty is similar to [`liquidity_penalty_multiplier_msat`], however, instead of using
+ * only our latest estimate for the current liquidity available in the channel, it estimates
+ * success probability based on the estimated liquidity available in the channel through
+ * history. Specifically, every time we update our liquidity bounds on a given channel, we
+ * track which of several buckets those bounds fall into, exponentially decaying the
+ * probability of each bucket as new samples are added.
+ *
+ * Default value: 10,000 msat
+ *
+ * [`liquidity_penalty_multiplier_msat`]: Self::liquidity_penalty_multiplier_msat
+ */
+void ProbabilisticScoringFeeParameters_set_historical_liquidity_penalty_multiplier_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * A multiplier used in conjunction with the total amount flowing over a channel and the
+ * negative `log10` of the channel's success probability for the payment, as determined based
+ * on the history of our estimates of the channel's available liquidity, to determine a
+ * penalty.
+ *
+ * The purpose of the amount penalty is to avoid having fees dominate the channel cost for
+ * large payments. The penalty is computed as the product of this multiplier and `2^20`ths
+ * of the amount flowing over this channel, weighted by the negative `log10` of the success
+ * probability.
+ *
+ * This penalty is similar to [`liquidity_penalty_amount_multiplier_msat`], however, instead
+ * of using only our latest estimate for the current liquidity available in the channel, it
+ * estimates success probability based on the estimated liquidity available in the channel
+ * through history. Specifically, every time we update our liquidity bounds on a given
+ * channel, we track which of several buckets those bounds fall into, exponentially decaying
+ * the probability of each bucket as new samples are added.
+ *
+ * Default value: 64 msat
+ *
+ * [`liquidity_penalty_amount_multiplier_msat`]: Self::liquidity_penalty_amount_multiplier_msat
+ */
+uint64_t ProbabilisticScoringFeeParameters_get_historical_liquidity_penalty_amount_multiplier_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+
+/**
+ * A multiplier used in conjunction with the total amount flowing over a channel and the
+ * negative `log10` of the channel's success probability for the payment, as determined based
+ * on the history of our estimates of the channel's available liquidity, to determine a
+ * penalty.
+ *
+ * The purpose of the amount penalty is to avoid having fees dominate the channel cost for
+ * large payments. The penalty is computed as the product of this multiplier and `2^20`ths
+ * of the amount flowing over this channel, weighted by the negative `log10` of the success
+ * probability.
+ *
+ * This penalty is similar to [`liquidity_penalty_amount_multiplier_msat`], however, instead
+ * of using only our latest estimate for the current liquidity available in the channel, it
+ * estimates success probability based on the estimated liquidity available in the channel
+ * through history. Specifically, every time we update our liquidity bounds on a given
+ * channel, we track which of several buckets those bounds fall into, exponentially decaying
+ * the probability of each bucket as new samples are added.
+ *
+ * Default value: 64 msat
+ *
+ * [`liquidity_penalty_amount_multiplier_msat`]: Self::liquidity_penalty_amount_multiplier_msat
+ */
+void ProbabilisticScoringFeeParameters_set_historical_liquidity_penalty_amount_multiplier_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * This penalty is applied when `htlc_maximum_msat` is equal to or larger than half of the
+ * channel's capacity, (ie. htlc_maximum_msat >= 0.5 * channel_capacity) which makes us
+ * prefer nodes with a smaller `htlc_maximum_msat`. We treat such nodes preferentially
+ * as this makes balance discovery attacks harder to execute, thereby creating an incentive
+ * to restrict `htlc_maximum_msat` and improve privacy.
+ *
+ * Default value: 250 msat
+ */
+uint64_t ProbabilisticScoringFeeParameters_get_anti_probing_penalty_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+
+/**
+ * This penalty is applied when `htlc_maximum_msat` is equal to or larger than half of the
+ * channel's capacity, (ie. htlc_maximum_msat >= 0.5 * channel_capacity) which makes us
+ * prefer nodes with a smaller `htlc_maximum_msat`. We treat such nodes preferentially
+ * as this makes balance discovery attacks harder to execute, thereby creating an incentive
+ * to restrict `htlc_maximum_msat` and improve privacy.
+ *
+ * Default value: 250 msat
+ */
+void ProbabilisticScoringFeeParameters_set_anti_probing_penalty_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * This penalty is applied when the total amount flowing over a channel exceeds our current
+ * estimate of the channel's available liquidity. The total amount is the amount of the
+ * current HTLC plus any HTLCs which we've sent over the same channel.
+ *
+ * Note that in this case all other penalties, including the
+ * [`liquidity_penalty_multiplier_msat`] and [`liquidity_penalty_amount_multiplier_msat`]-based
+ * penalties, as well as the [`base_penalty_msat`] and the [`anti_probing_penalty_msat`], if
+ * applicable, are still included in the overall penalty.
+ *
+ * If you wish to avoid creating paths with such channels entirely, setting this to a value of
+ * `u64::max_value()` will guarantee that.
+ *
+ * Default value: 1_0000_0000_000 msat (1 Bitcoin)
+ *
+ * [`liquidity_penalty_multiplier_msat`]: Self::liquidity_penalty_multiplier_msat
+ * [`liquidity_penalty_amount_multiplier_msat`]: Self::liquidity_penalty_amount_multiplier_msat
+ * [`base_penalty_msat`]: Self::base_penalty_msat
+ * [`anti_probing_penalty_msat`]: Self::anti_probing_penalty_msat
+ */
+uint64_t ProbabilisticScoringFeeParameters_get_considered_impossible_penalty_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+
+/**
+ * This penalty is applied when the total amount flowing over a channel exceeds our current
+ * estimate of the channel's available liquidity. The total amount is the amount of the
+ * current HTLC plus any HTLCs which we've sent over the same channel.
+ *
+ * Note that in this case all other penalties, including the
+ * [`liquidity_penalty_multiplier_msat`] and [`liquidity_penalty_amount_multiplier_msat`]-based
+ * penalties, as well as the [`base_penalty_msat`] and the [`anti_probing_penalty_msat`], if
+ * applicable, are still included in the overall penalty.
+ *
+ * If you wish to avoid creating paths with such channels entirely, setting this to a value of
+ * `u64::max_value()` will guarantee that.
+ *
+ * Default value: 1_0000_0000_000 msat (1 Bitcoin)
+ *
+ * [`liquidity_penalty_multiplier_msat`]: Self::liquidity_penalty_multiplier_msat
+ * [`liquidity_penalty_amount_multiplier_msat`]: Self::liquidity_penalty_amount_multiplier_msat
+ * [`base_penalty_msat`]: Self::base_penalty_msat
+ * [`anti_probing_penalty_msat`]: Self::anti_probing_penalty_msat
+ */
+void ProbabilisticScoringFeeParameters_set_considered_impossible_penalty_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * In order to calculate most of the scores above, we must first convert a lower and upper
+ * bound on the available liquidity in a channel into the probability that we think a payment
+ * will succeed. That probability is derived from a Probability Density Function for where we
+ * think the liquidity in a channel likely lies, given such bounds.
+ *
+ * If this flag is set, that PDF is simply a constant - we assume that the actual available
+ * liquidity in a channel is just as likely to be at any point between our lower and upper
+ * bounds.
+ *
+ * If this flag is *not* set, that PDF is `(x - 0.5*capacity) ^ 2`. That is, we use an
+ * exponential curve which expects the liquidity of a channel to lie \"at the edges\". This
+ * matches experimental results - most routing nodes do not aggressively rebalance their
+ * channels and flows in the network are often unbalanced, leaving liquidity usually
+ * unavailable.
+ *
+ * Thus, for the \"best\" routes, leave this flag `false`. However, the flag does imply a number
+ * of floating-point multiplications in the hottest routing code, which may lead to routing
+ * performance degradation on some machines.
+ *
+ * Default value: false
+ */
+bool ProbabilisticScoringFeeParameters_get_linear_success_probability(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+
+/**
+ * In order to calculate most of the scores above, we must first convert a lower and upper
+ * bound on the available liquidity in a channel into the probability that we think a payment
+ * will succeed. That probability is derived from a Probability Density Function for where we
+ * think the liquidity in a channel likely lies, given such bounds.
+ *
+ * If this flag is set, that PDF is simply a constant - we assume that the actual available
+ * liquidity in a channel is just as likely to be at any point between our lower and upper
+ * bounds.
+ *
+ * If this flag is *not* set, that PDF is `(x - 0.5*capacity) ^ 2`. That is, we use an
+ * exponential curve which expects the liquidity of a channel to lie \"at the edges\". This
+ * matches experimental results - most routing nodes do not aggressively rebalance their
+ * channels and flows in the network are often unbalanced, leaving liquidity usually
+ * unavailable.
+ *
+ * Thus, for the \"best\" routes, leave this flag `false`. However, the flag does imply a number
+ * of floating-point multiplications in the hottest routing code, which may lead to routing
+ * performance degradation on some machines.
+ *
+ * Default value: false
+ */
+void ProbabilisticScoringFeeParameters_set_linear_success_probability(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, bool val);
+
+/**
+ * Creates a copy of the ProbabilisticScoringFeeParameters
+ */
+struct LDKProbabilisticScoringFeeParameters ProbabilisticScoringFeeParameters_clone(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR orig);
+
+/**
+ * Creates a "default" ProbabilisticScoringFeeParameters. See struct and individual field documentaiton for details on which values are used.
+ */
+MUST_USE_RES struct LDKProbabilisticScoringFeeParameters ProbabilisticScoringFeeParameters_default(void);
+
+/**
+ * Marks the node with the given `node_id` as banned,
+ * i.e it will be avoided during path finding.
+ */
+void ProbabilisticScoringFeeParameters_add_banned(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id);
+
+/**
+ * Marks all nodes in the given list as banned, i.e.,
+ * they will be avoided during path finding.
+ */
+void ProbabilisticScoringFeeParameters_add_banned_from_list(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_arg, struct LDKCVec_NodeIdZ node_ids);
+
+/**
+ * Removes the node with the given `node_id` from the list of nodes to avoid.
+ */
+void ProbabilisticScoringFeeParameters_remove_banned(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id);
+
+/**
+ * Sets a manual penalty for the given node.
+ */
+void ProbabilisticScoringFeeParameters_set_manual_penalty(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id, uint64_t penalty);
+
+/**
+ * Removes the node with the given `node_id` from the list of manual penalties.
+ */
+void ProbabilisticScoringFeeParameters_remove_manual_penalty(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id);
+
+/**
+ * Clears the list of manual penalties that are applied during path finding.
+ */
+void ProbabilisticScoringFeeParameters_clear_manual_penalties(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_arg);
+
+/**
+ * Frees any resources used by the ProbabilisticScoringDecayParameters, if is_owned is set and inner is non-NULL.
+ */
+void ProbabilisticScoringDecayParameters_free(struct LDKProbabilisticScoringDecayParameters this_obj);
+
+/**
+ * If we aren't learning any new datapoints for a channel, the historical liquidity bounds
+ * tracking can simply live on with increasingly stale data. Instead, when a channel has not
+ * seen a liquidity estimate update for this amount of time, the historical datapoints are
+ * decayed by half.
+ * For an example of historical_no_updates_half_life being used see [`historical_estimated_channel_liquidity_probabilities`]
+ *
+ * Note that after 16 or more half lives all historical data will be completely gone.
+ *
+ * Default value: 14 days
+ *
+ * [`historical_estimated_channel_liquidity_probabilities`]: ProbabilisticScorer::historical_estimated_channel_liquidity_probabilities
+ */
+uint64_t ProbabilisticScoringDecayParameters_get_historical_no_updates_half_life(const struct LDKProbabilisticScoringDecayParameters *NONNULL_PTR this_ptr);
+
+/**
+ * If we aren't learning any new datapoints for a channel, the historical liquidity bounds
+ * tracking can simply live on with increasingly stale data. Instead, when a channel has not
+ * seen a liquidity estimate update for this amount of time, the historical datapoints are
+ * decayed by half.
+ * For an example of historical_no_updates_half_life being used see [`historical_estimated_channel_liquidity_probabilities`]
+ *
+ * Note that after 16 or more half lives all historical data will be completely gone.
+ *
+ * Default value: 14 days
+ *
+ * [`historical_estimated_channel_liquidity_probabilities`]: ProbabilisticScorer::historical_estimated_channel_liquidity_probabilities
+ */
+void ProbabilisticScoringDecayParameters_set_historical_no_updates_half_life(struct LDKProbabilisticScoringDecayParameters *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * Whenever this amount of time elapses since the last update to a channel's liquidity bounds,
+ * the distance from the bounds to \"zero\" is cut in half. In other words, the lower-bound on
+ * the available liquidity is halved and the upper-bound moves half-way to the channel's total
+ * capacity.
+ *
+ * Because halving the liquidity bounds grows the uncertainty on the channel's liquidity,
+ * the penalty for an amount within the new bounds may change. See the [`ProbabilisticScorer`]
+ * struct documentation for more info on the way the liquidity bounds are used.
+ *
+ * For example, if the channel's capacity is 1 million sats, and the current upper and lower
+ * liquidity bounds are 200,000 sats and 600,000 sats, after this amount of time the upper
+ * and lower liquidity bounds will be decayed to 100,000 and 800,000 sats.
+ *
+ * Default value: 6 hours
+ *
+ * # Note
+ *
+ * When built with the `no-std` feature, time will never elapse. Therefore, the channel
+ * liquidity knowledge will never decay except when the bounds cross.
+ */
+uint64_t ProbabilisticScoringDecayParameters_get_liquidity_offset_half_life(const struct LDKProbabilisticScoringDecayParameters *NONNULL_PTR this_ptr);
+
+/**
+ * Whenever this amount of time elapses since the last update to a channel's liquidity bounds,
+ * the distance from the bounds to \"zero\" is cut in half. In other words, the lower-bound on
+ * the available liquidity is halved and the upper-bound moves half-way to the channel's total
+ * capacity.
+ *
+ * Because halving the liquidity bounds grows the uncertainty on the channel's liquidity,
+ * the penalty for an amount within the new bounds may change. See the [`ProbabilisticScorer`]
+ * struct documentation for more info on the way the liquidity bounds are used.
+ *
+ * For example, if the channel's capacity is 1 million sats, and the current upper and lower
+ * liquidity bounds are 200,000 sats and 600,000 sats, after this amount of time the upper
+ * and lower liquidity bounds will be decayed to 100,000 and 800,000 sats.
+ *
+ * Default value: 6 hours
+ *
+ * # Note
+ *
+ * When built with the `no-std` feature, time will never elapse. Therefore, the channel
+ * liquidity knowledge will never decay except when the bounds cross.