]> git.bitcoin.ninja Git - ldk-java/commitdiff
[Java] Update auto-generated bindings to LDK 0.0.123
authorMatt Corallo <git@bluematt.me>
Sun, 12 May 2024 19:48:39 +0000 (19:48 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 13 May 2024 18:35:20 +0000 (18:35 +0000)
561 files changed:
src/main/java/org/ldk/enums/Bolt12SemanticError.java
src/main/java/org/ldk/enums/ConfirmationTarget.java
src/main/java/org/ldk/enums/Direction.java [new file with mode: 0644]
src/main/java/org/ldk/enums/PaymentFailureReason.java
src/main/java/org/ldk/enums/ShortChannelIdError.java [new file with mode: 0644]
src/main/java/org/ldk/impl/bindings.java
src/main/java/org/ldk/structs/APIError.java
src/main/java/org/ldk/structs/AcceptChannel.java
src/main/java/org/ldk/structs/AcceptChannelV2.java
src/main/java/org/ldk/structs/Amount.java
src/main/java/org/ldk/structs/AnchorDescriptor.java
src/main/java/org/ldk/structs/AnnouncementSignatures.java
src/main/java/org/ldk/structs/BackgroundProcessor.java
src/main/java/org/ldk/structs/Balance.java
src/main/java/org/ldk/structs/BestBlock.java
src/main/java/org/ldk/structs/BigSize.java
src/main/java/org/ldk/structs/BlindedForward.java
src/main/java/org/ldk/structs/BlindedHop.java
src/main/java/org/ldk/structs/BlindedHopFeatures.java
src/main/java/org/ldk/structs/BlindedPath.java
src/main/java/org/ldk/structs/BlindedPayInfo.java
src/main/java/org/ldk/structs/BlindedTail.java
src/main/java/org/ldk/structs/Bolt11Invoice.java
src/main/java/org/ldk/structs/Bolt11InvoiceFeatures.java
src/main/java/org/ldk/structs/Bolt11InvoiceSignature.java
src/main/java/org/ldk/structs/Bolt11ParseError.java
src/main/java/org/ldk/structs/Bolt12Invoice.java
src/main/java/org/ldk/structs/Bolt12InvoiceFeatures.java
src/main/java/org/ldk/structs/Bolt12OfferContext.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Bolt12RefundContext.java [new file with mode: 0644]
src/main/java/org/ldk/structs/BumpTransactionEvent.java
src/main/java/org/ldk/structs/BumpTransactionEventHandler.java
src/main/java/org/ldk/structs/CandidateRouteHop.java
src/main/java/org/ldk/structs/ChainMonitor.java
src/main/java/org/ldk/structs/ChainParameters.java
src/main/java/org/ldk/structs/ChangeDestinationSource.java [new file with mode: 0644]
src/main/java/org/ldk/structs/ChannelAnnouncement.java
src/main/java/org/ldk/structs/ChannelConfig.java
src/main/java/org/ldk/structs/ChannelCounterparty.java
src/main/java/org/ldk/structs/ChannelDerivationParameters.java
src/main/java/org/ldk/structs/ChannelDetails.java
src/main/java/org/ldk/structs/ChannelFeatures.java
src/main/java/org/ldk/structs/ChannelId.java [new file with mode: 0644]
src/main/java/org/ldk/structs/ChannelInfo.java
src/main/java/org/ldk/structs/ChannelManager.java
src/main/java/org/ldk/structs/ChannelManagerReadArgs.java
src/main/java/org/ldk/structs/ChannelMessageHandler.java
src/main/java/org/ldk/structs/ChannelMonitor.java
src/main/java/org/ldk/structs/ChannelMonitorUpdate.java
src/main/java/org/ldk/structs/ChannelPublicKeys.java
src/main/java/org/ldk/structs/ChannelReady.java
src/main/java/org/ldk/structs/ChannelReestablish.java
src/main/java/org/ldk/structs/ChannelSigner.java
src/main/java/org/ldk/structs/ChannelTransactionParameters.java
src/main/java/org/ldk/structs/ChannelTypeFeatures.java
src/main/java/org/ldk/structs/ChannelUpdate.java
src/main/java/org/ldk/structs/ChannelUpdateInfo.java
src/main/java/org/ldk/structs/ClaimedHTLC.java
src/main/java/org/ldk/structs/ClosingSigned.java
src/main/java/org/ldk/structs/ClosingSignedFeeRange.java
src/main/java/org/ldk/structs/ClosingTransaction.java
src/main/java/org/ldk/structs/ClosureReason.java
src/main/java/org/ldk/structs/CoinSelection.java
src/main/java/org/ldk/structs/CoinSelectionSource.java
src/main/java/org/ldk/structs/CommitmentSigned.java
src/main/java/org/ldk/structs/CommitmentTransaction.java
src/main/java/org/ldk/structs/CommitmentUpdate.java
src/main/java/org/ldk/structs/CommonAcceptChannelFields.java [new file with mode: 0644]
src/main/java/org/ldk/structs/CommonOpenChannelFields.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Confirm.java
src/main/java/org/ldk/structs/CounterpartyChannelTransactionParameters.java
src/main/java/org/ldk/structs/CustomMessageHandler.java
src/main/java/org/ldk/structs/CustomMessageReader.java
src/main/java/org/ldk/structs/CustomOnionMessageHandler.java
src/main/java/org/ldk/structs/DecodeError.java
src/main/java/org/ldk/structs/DefaultMessageRouter.java
src/main/java/org/ldk/structs/DefaultRouter.java
src/main/java/org/ldk/structs/DelayedPaymentBasepoint.java
src/main/java/org/ldk/structs/DelayedPaymentKey.java
src/main/java/org/ldk/structs/DelayedPaymentOutputDescriptor.java
src/main/java/org/ldk/structs/Description.java
src/main/java/org/ldk/structs/Destination.java
src/main/java/org/ldk/structs/DirectedChannelInfo.java
src/main/java/org/ldk/structs/EcdsaChannelSigner.java
src/main/java/org/ldk/structs/EmptyNodeIdLookUp.java [new file with mode: 0644]
src/main/java/org/ldk/structs/ErrorAction.java
src/main/java/org/ldk/structs/ErrorMessage.java
src/main/java/org/ldk/structs/Event.java
src/main/java/org/ldk/structs/ExpiryTime.java
src/main/java/org/ldk/structs/Fallback.java
src/main/java/org/ldk/structs/FeeEstimator.java
src/main/java/org/ldk/structs/Filter.java
src/main/java/org/ldk/structs/ForwardNode.java
src/main/java/org/ldk/structs/ForwardTlvs.java
src/main/java/org/ldk/structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/FundingCreated.java
src/main/java/org/ldk/structs/FundingSigned.java
src/main/java/org/ldk/structs/Future.java
src/main/java/org/ldk/structs/GossipSync.java
src/main/java/org/ldk/structs/GossipTimestampFilter.java
src/main/java/org/ldk/structs/GraphSyncError.java
src/main/java/org/ldk/structs/HTLCDescriptor.java
src/main/java/org/ldk/structs/HTLCDestination.java
src/main/java/org/ldk/structs/HTLCOutputInCommitment.java
src/main/java/org/ldk/structs/HTLCUpdate.java
src/main/java/org/ldk/structs/HolderCommitmentTransaction.java
src/main/java/org/ldk/structs/Hostname.java
src/main/java/org/ldk/structs/HtlcBasepoint.java
src/main/java/org/ldk/structs/HtlcKey.java
src/main/java/org/ldk/structs/InFlightHtlcs.java
src/main/java/org/ldk/structs/InMemorySigner.java
src/main/java/org/ldk/structs/InboundHTLCErr.java
src/main/java/org/ldk/structs/Init.java
src/main/java/org/ldk/structs/InitFeatures.java
src/main/java/org/ldk/structs/Input.java
src/main/java/org/ldk/structs/IntroductionNode.java [new file with mode: 0644]
src/main/java/org/ldk/structs/InvoiceError.java
src/main/java/org/ldk/structs/InvoiceRequest.java
src/main/java/org/ldk/structs/InvoiceRequestFeatures.java
src/main/java/org/ldk/structs/InvoiceRequestFields.java [new file with mode: 0644]
src/main/java/org/ldk/structs/InvoiceRequestWithDerivedPayerIdBuilder.java [new file with mode: 0644]
src/main/java/org/ldk/structs/InvoiceRequestWithExplicitPayerIdBuilder.java [new file with mode: 0644]
src/main/java/org/ldk/structs/InvoiceWithDerivedSigningPubkeyBuilder.java [new file with mode: 0644]
src/main/java/org/ldk/structs/InvoiceWithExplicitSigningPubkeyBuilder.java [new file with mode: 0644]
src/main/java/org/ldk/structs/KVStore.java
src/main/java/org/ldk/structs/KeysManager.java
src/main/java/org/ldk/structs/Listen.java
src/main/java/org/ldk/structs/MaxDustHTLCExposure.java
src/main/java/org/ldk/structs/MessageRouter.java
src/main/java/org/ldk/structs/MessageSendEvent.java
src/main/java/org/ldk/structs/MessageSendEventsProvider.java
src/main/java/org/ldk/structs/MinFinalCltvExpiryDelta.java
src/main/java/org/ldk/structs/MonitorEvent.java
src/main/java/org/ldk/structs/MonitorUpdateId.java
src/main/java/org/ldk/structs/NetworkGraph.java
src/main/java/org/ldk/structs/NetworkUpdate.java
src/main/java/org/ldk/structs/NextMessageHop.java [new file with mode: 0644]
src/main/java/org/ldk/structs/NodeAlias.java
src/main/java/org/ldk/structs/NodeAnnouncement.java
src/main/java/org/ldk/structs/NodeAnnouncementInfo.java
src/main/java/org/ldk/structs/NodeFeatures.java
src/main/java/org/ldk/structs/NodeId.java
src/main/java/org/ldk/structs/NodeIdLookUp.java [new file with mode: 0644]
src/main/java/org/ldk/structs/NodeInfo.java
src/main/java/org/ldk/structs/NodeSigner.java
src/main/java/org/ldk/structs/Offer.java
src/main/java/org/ldk/structs/OfferFeatures.java
src/main/java/org/ldk/structs/OfferId.java [new file with mode: 0644]
src/main/java/org/ldk/structs/OfferWithDerivedMetadataBuilder.java [new file with mode: 0644]
src/main/java/org/ldk/structs/OfferWithExplicitMetadataBuilder.java [new file with mode: 0644]
src/main/java/org/ldk/structs/OffersMessage.java
src/main/java/org/ldk/structs/OffersMessageHandler.java
src/main/java/org/ldk/structs/OnionMessage.java
src/main/java/org/ldk/structs/OnionMessageHandler.java
src/main/java/org/ldk/structs/OnionMessagePath.java
src/main/java/org/ldk/structs/OnionMessenger.java
src/main/java/org/ldk/structs/OnionPacket.java
src/main/java/org/ldk/structs/OpenChannel.java
src/main/java/org/ldk/structs/OpenChannelV2.java
src/main/java/org/ldk/structs/Option_AmountZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Option_BigEndianScalarZ.java
src/main/java/org/ldk/structs/Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.java
src/main/java/org/ldk/structs/Option_C2Tuple_u64u16ZZ.java
src/main/java/org/ldk/structs/Option_C2Tuple_u64u64ZZ.java
src/main/java/org/ldk/structs/Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.java
src/main/java/org/ldk/structs/Option_ECDSASignatureZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Option_PaymentContextZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Option_QuantityZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/OutPoint.java
src/main/java/org/ldk/structs/OutputSpendStatus.java [new file with mode: 0644]
src/main/java/org/ldk/structs/OutputSpender.java [new file with mode: 0644]
src/main/java/org/ldk/structs/OutputSweeper.java [new file with mode: 0644]
src/main/java/org/ldk/structs/P2PGossipSync.java
src/main/java/org/ldk/structs/Packet.java
src/main/java/org/ldk/structs/ParseOrSemanticError.java
src/main/java/org/ldk/structs/Path.java
src/main/java/org/ldk/structs/PathFailure.java
src/main/java/org/ldk/structs/Payee.java
src/main/java/org/ldk/structs/PayeePubKey.java
src/main/java/org/ldk/structs/PaymentContext.java [new file with mode: 0644]
src/main/java/org/ldk/structs/PaymentParameters.java
src/main/java/org/ldk/structs/PaymentPurpose.java
src/main/java/org/ldk/structs/PaymentSendFailure.java
src/main/java/org/ldk/structs/PeeledOnion.java
src/main/java/org/ldk/structs/PeerDetails.java [new file with mode: 0644]
src/main/java/org/ldk/structs/PeerManager.java
src/main/java/org/ldk/structs/PendingHTLCRouting.java
src/main/java/org/ldk/structs/Persist.java
src/main/java/org/ldk/structs/Persister.java
src/main/java/org/ldk/structs/PhantomKeysManager.java
src/main/java/org/ldk/structs/PhantomRouteHints.java
src/main/java/org/ldk/structs/Ping.java
src/main/java/org/ldk/structs/Pong.java
src/main/java/org/ldk/structs/PositiveTimestamp.java
src/main/java/org/ldk/structs/PrivateRoute.java
src/main/java/org/ldk/structs/ProbabilisticScorer.java
src/main/java/org/ldk/structs/ProbabilisticScoringFeeParameters.java
src/main/java/org/ldk/structs/ProbeSendFailure.java
src/main/java/org/ldk/structs/Quantity.java
src/main/java/org/ldk/structs/QueryChannelRange.java
src/main/java/org/ldk/structs/QueryShortChannelIds.java
src/main/java/org/ldk/structs/RandomBytes.java [new file with mode: 0644]
src/main/java/org/ldk/structs/RapidGossipSync.java
src/main/java/org/ldk/structs/RawBolt11Invoice.java
src/main/java/org/ldk/structs/RawDataPart.java
src/main/java/org/ldk/structs/ReadOnlyNetworkGraph.java
src/main/java/org/ldk/structs/ReceiveTlvs.java
src/main/java/org/ldk/structs/RecipientOnionFields.java
src/main/java/org/ldk/structs/Record.java
src/main/java/org/ldk/structs/Refund.java
src/main/java/org/ldk/structs/RefundMaybeWithDerivedMetadataBuilder.java [new file with mode: 0644]
src/main/java/org/ldk/structs/ReplyChannelRange.java
src/main/java/org/ldk/structs/ReplyShortChannelIdsEnd.java
src/main/java/org/ldk/structs/Result_AcceptChannelDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_AcceptChannelV2DecodeErrorZ.java
src/main/java/org/ldk/structs/Result_AnnouncementSignaturesDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_BestBlockDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_BigSizeDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_BlindedFailureDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_BlindedForwardDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_BlindedHopDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_BlindedHopFeaturesDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_BlindedPathDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_BlindedPathNoneZ.java
src/main/java/org/ldk/structs/Result_BlindedPayInfoDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_BlindedTailDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_Bolt11InvoiceBolt11SemanticErrorZ.java
src/main/java/org/ldk/structs/Result_Bolt11InvoiceFeaturesDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_Bolt11InvoiceParseOrSemanticErrorZ.java
src/main/java/org/ldk/structs/Result_Bolt11InvoiceSignOrCreationErrorZ.java
src/main/java/org/ldk/structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_Bolt12InvoiceFeaturesDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_Bolt12OfferContextDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_Bolt12RefundContextDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.java
src/main/java/org/ldk/structs/Result_C2Tuple_CVec_u8Zu64ZNoneZ.java
src/main/java/org/ldk/structs/Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.java
src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.java
src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.java
src/main/java/org/ldk/structs/Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.java
src/main/java/org/ldk/structs/Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.java
src/main/java/org/ldk/structs/Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.java
src/main/java/org/ldk/structs/Result_COption_APIErrorZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_COption_ClosureReasonZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_COption_EventZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_COption_HTLCDestinationZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_COption_MonitorEventZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_COption_NetworkUpdateZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_COption_OnionMessageContentsZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_COption_PathFailureZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_COption_TypeZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_CVec_BlindedPathZNoneZ.java
src/main/java/org/ldk/structs/Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.java
src/main/java/org/ldk/structs/Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.java
src/main/java/org/ldk/structs/Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.java
src/main/java/org/ldk/structs/Result_CVec_ECDSASignatureZNoneZ.java
src/main/java/org/ldk/structs/Result_CVec_StrZIOErrorZ.java
src/main/java/org/ldk/structs/Result_CVec_UtxoZNoneZ.java
src/main/java/org/ldk/structs/Result_CVec_u8ZIOErrorZ.java
src/main/java/org/ldk/structs/Result_CVec_u8ZNoneZ.java
src/main/java/org/ldk/structs/Result_CVec_u8ZPeerHandleErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelAnnouncementDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelConfigDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelCounterpartyDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelDerivationParametersDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelDetailsDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelFeaturesDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelIdAPIErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_ChannelIdDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_ChannelInfoDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelMonitorUpdateDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelMonitorUpdateStatusNoneZ.java
src/main/java/org/ldk/structs/Result_ChannelPublicKeysDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelReadyDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelReestablishDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelShutdownStateDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelTransactionParametersDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelTypeFeaturesDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelUpdateDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ChannelUpdateInfoDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ClaimedHTLCDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ClosingSignedDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ClosingSignedFeeRangeDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_CoinSelectionNoneZ.java
src/main/java/org/ldk/structs/Result_CommitmentSignedDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_CommitmentTransactionDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_CounterpartyCommitmentSecretsDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_CounterpartyForwardingInfoDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_DelayedPaymentBasepointDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_DelayedPaymentKeyDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_DescriptionCreationErrorZ.java
src/main/java/org/ldk/structs/Result_ECDSASignatureNoneZ.java
src/main/java/org/ldk/structs/Result_ErrorMessageDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_FinalOnionHopDataDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_FixedPenaltyScorerDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_FundingCreatedDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_FundingSignedDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_GossipTimestampFilterDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_HTLCDescriptorDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_HTLCUpdateDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_HolderCommitmentTransactionDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_HostnameDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_HtlcBasepointDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_HtlcKeyDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_InFlightHtlcsDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_InMemorySignerDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_InitDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_InitFeaturesDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_InvoiceErrorDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_InvoiceRequestBolt12SemanticErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_InvoiceRequestFieldsDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_LockedChannelMonitorNoneZ.java
src/main/java/org/ldk/structs/Result_MaxDustHTLCExposureDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NetworkGraphDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NodeAliasDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NodeAnnouncementDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NodeAnnouncementInfoDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NodeFeaturesDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NodeIdDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NodeInfoDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NoneAPIErrorZ.java
src/main/java/org/ldk/structs/Result_NoneBolt11SemanticErrorZ.java
src/main/java/org/ldk/structs/Result_NoneBolt12SemanticErrorZ.java
src/main/java/org/ldk/structs/Result_NoneIOErrorZ.java
src/main/java/org/ldk/structs/Result_NoneLightningErrorZ.java
src/main/java/org/ldk/structs/Result_NoneNoneZ.java
src/main/java/org/ldk/structs/Result_NonePaymentSendFailureZ.java
src/main/java/org/ldk/structs/Result_NonePeerHandleErrorZ.java
src/main/java/org/ldk/structs/Result_NoneRetryableSendFailureZ.java
src/main/java/org/ldk/structs/Result_OfferBolt12ParseErrorZ.java
src/main/java/org/ldk/structs/Result_OfferBolt12SemanticErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_OfferIdDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_OffersMessageDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_OnionMessageDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_OnionMessagePathNoneZ.java
src/main/java/org/ldk/structs/Result_OnionPacketDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_OpenChannelDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_OpenChannelV2DecodeErrorZ.java
src/main/java/org/ldk/structs/Result_OutPointDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_OutputSpendStatusDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_OutputSweeperDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_PayeePubKeySecp256k1ErrorZ.java
src/main/java/org/ldk/structs/Result_PaymentConstraintsDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_PaymentContextDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_PaymentFailureReasonDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_PaymentParametersDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_PaymentPurposeDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_PaymentRelayDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_PeeledOnionNoneZ.java
src/main/java/org/ldk/structs/Result_PendingHTLCInfoDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_PendingHTLCInfoInboundHTLCErrZ.java
src/main/java/org/ldk/structs/Result_PendingHTLCRoutingDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_PhantomRouteHintsDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_PingDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_PongDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_PositiveTimestampCreationErrorZ.java
src/main/java/org/ldk/structs/Result_PrivateRouteCreationErrorZ.java
src/main/java/org/ldk/structs/Result_ProbabilisticScorerDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_PublicKeyNoneZ.java
src/main/java/org/ldk/structs/Result_PublicKeySecp256k1ErrorZ.java
src/main/java/org/ldk/structs/Result_QueryChannelRangeDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_QueryShortChannelIdsDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_RecipientOnionFieldsDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_RecipientOnionFieldsNoneZ.java
src/main/java/org/ldk/structs/Result_RecoverableSignatureNoneZ.java
src/main/java/org/ldk/structs/Result_RefundBolt12ParseErrorZ.java
src/main/java/org/ldk/structs/Result_RefundBolt12SemanticErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_ReplyChannelRangeDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ReplyShortChannelIdsEndDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_RetryDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_RevocationBasepointDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_RevocationKeyDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_RevokeAndACKDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_RouteDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_RouteHintDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_RouteHintHopDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_RouteHopDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_RouteLightningErrorZ.java
src/main/java/org/ldk/structs/Result_RouteParametersDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_RoutingFeesDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_SchnorrSignatureNoneZ.java
src/main/java/org/ldk/structs/Result_SendSuccessSendErrorZ.java
src/main/java/org/ldk/structs/Result_ShutdownDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ShutdownScriptDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_ShutdownScriptInvalidShutdownScriptZ.java
src/main/java/org/ldk/structs/Result_ShutdownScriptNoneZ.java
src/main/java/org/ldk/structs/Result_SiPrefixBolt11ParseErrorZ.java
src/main/java/org/ldk/structs/Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.java
src/main/java/org/ldk/structs/Result_SocketAddressDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_SocketAddressSocketAddressParseErrorZ.java
src/main/java/org/ldk/structs/Result_SpendableOutputDescriptorDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_SpliceAckDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_SpliceDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_SpliceLockedDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_StaticPaymentOutputDescriptorDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_StfuDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_StrSecp256k1ErrorZ.java
src/main/java/org/ldk/structs/Result_ThirtyTwoBytesAPIErrorZ.java
src/main/java/org/ldk/structs/Result_ThirtyTwoBytesNoneZ.java
src/main/java/org/ldk/structs/Result_ThirtyTwoBytesPaymentSendFailureZ.java
src/main/java/org/ldk/structs/Result_ThirtyTwoBytesRetryableSendFailureZ.java
src/main/java/org/ldk/structs/Result_TrackedSpendableOutputDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_TransactionNoneZ.java
src/main/java/org/ldk/structs/Result_TransactionU16LenLimitedDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_TransactionU16LenLimitedNoneZ.java
src/main/java/org/ldk/structs/Result_TrustedClosingTransactionNoneZ.java
src/main/java/org/ldk/structs/Result_TrustedCommitmentTransactionNoneZ.java
src/main/java/org/ldk/structs/Result_TxAbortDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_TxAckRbfDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_TxAddInputDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_TxAddOutputDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_TxCompleteDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_TxCreationKeysDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_TxInitRbfDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_TxOutUtxoLookupErrorZ.java
src/main/java/org/ldk/structs/Result_TxRemoveInputDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_TxRemoveOutputDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_TxSignaturesDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UnknownPaymentContextDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_UnsignedChannelAnnouncementDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UnsignedChannelUpdateDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_UnsignedNodeAnnouncementDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UntrustedStringDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UpdateAddHTLCDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UpdateFailHTLCDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UpdateFeeDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_UpdateFulfillHTLCDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_VerifiedInvoiceRequestNoneZ.java
src/main/java/org/ldk/structs/Result_WarningMessageDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_WitnessNoneZ.java
src/main/java/org/ldk/structs/Result_WriteableEcdsaChannelSignerDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_boolLightningErrorZ.java
src/main/java/org/ldk/structs/Result_boolPeerHandleErrorZ.java
src/main/java/org/ldk/structs/Result_u32GraphSyncErrorZ.java
src/main/java/org/ldk/structs/Result_u64ShortChannelIdErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Retry.java
src/main/java/org/ldk/structs/RevocationBasepoint.java
src/main/java/org/ldk/structs/RevocationKey.java
src/main/java/org/ldk/structs/RevokeAndACK.java
src/main/java/org/ldk/structs/Route.java
src/main/java/org/ldk/structs/RouteHint.java
src/main/java/org/ldk/structs/RouteHintHop.java
src/main/java/org/ldk/structs/RouteHop.java
src/main/java/org/ldk/structs/RouteParameters.java
src/main/java/org/ldk/structs/Router.java
src/main/java/org/ldk/structs/RoutingFees.java
src/main/java/org/ldk/structs/RoutingMessageHandler.java
src/main/java/org/ldk/structs/ScoreLookUp.java
src/main/java/org/ldk/structs/ScoreUpdate.java
src/main/java/org/ldk/structs/ScorerAccountingForInFlightHtlcs.java
src/main/java/org/ldk/structs/SendError.java
src/main/java/org/ldk/structs/SendSuccess.java
src/main/java/org/ldk/structs/Sha256.java
src/main/java/org/ldk/structs/Shutdown.java
src/main/java/org/ldk/structs/ShutdownScript.java
src/main/java/org/ldk/structs/SignBolt12InvoiceFn.java [new file with mode: 0644]
src/main/java/org/ldk/structs/SignError.java [new file with mode: 0644]
src/main/java/org/ldk/structs/SignInvoiceRequestFn.java [new file with mode: 0644]
src/main/java/org/ldk/structs/SignOrCreationError.java
src/main/java/org/ldk/structs/SignedRawBolt11Invoice.java
src/main/java/org/ldk/structs/SignerProvider.java
src/main/java/org/ldk/structs/Sleeper.java
src/main/java/org/ldk/structs/SocketAddress.java
src/main/java/org/ldk/structs/SpendableOutputDescriptor.java
src/main/java/org/ldk/structs/SpendingDelay.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Splice.java
src/main/java/org/ldk/structs/SpliceAck.java
src/main/java/org/ldk/structs/SpliceLocked.java
src/main/java/org/ldk/structs/StaticPaymentOutputDescriptor.java
src/main/java/org/ldk/structs/Stfu.java
src/main/java/org/ldk/structs/ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.java
src/main/java/org/ldk/structs/ThreeTuple_OffersMessageDestinationBlindedPathZ.java
src/main/java/org/ldk/structs/ThreeTuple_OnionMessageContentsDestinationBlindedPathZ.java
src/main/java/org/ldk/structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.java [deleted file]
src/main/java/org/ldk/structs/ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.java
src/main/java/org/ldk/structs/ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ.java
src/main/java/org/ldk/structs/ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.java
src/main/java/org/ldk/structs/TrackedSpendableOutput.java [new file with mode: 0644]
src/main/java/org/ldk/structs/TrampolineOnionPacket.java [new file with mode: 0644]
src/main/java/org/ldk/structs/TransactionU16LenLimited.java
src/main/java/org/ldk/structs/TrustedCommitmentTransaction.java
src/main/java/org/ldk/structs/TwoTuple_BestBlockOutputSweeperZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/TwoTuple_BlindedPayInfoBlindedPathZ.java
src/main/java/org/ldk/structs/TwoTuple_ChannelIdPublicKeyZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/TwoTuple_OutPointCVec_MonitorUpdateIdZZ.java
src/main/java/org/ldk/structs/TwoTuple_OutPointCVec_u8ZZ.java
src/main/java/org/ldk/structs/TwoTuple_OutPointChannelIdZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.java [deleted file]
src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.java
src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.java
src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesChannelManagerZ.java
src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesChannelMonitorZ.java
src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.java [deleted file]
src/main/java/org/ldk/structs/TxAbort.java
src/main/java/org/ldk/structs/TxAckRbf.java
src/main/java/org/ldk/structs/TxAddInput.java
src/main/java/org/ldk/structs/TxAddOutput.java
src/main/java/org/ldk/structs/TxComplete.java
src/main/java/org/ldk/structs/TxCreationKeys.java
src/main/java/org/ldk/structs/TxInitRbf.java
src/main/java/org/ldk/structs/TxRemoveInput.java
src/main/java/org/ldk/structs/TxRemoveOutput.java
src/main/java/org/ldk/structs/TxSignatures.java
src/main/java/org/ldk/structs/UnknownPaymentContext.java [new file with mode: 0644]
src/main/java/org/ldk/structs/UnsignedBolt12Invoice.java
src/main/java/org/ldk/structs/UnsignedChannelAnnouncement.java
src/main/java/org/ldk/structs/UnsignedChannelUpdate.java
src/main/java/org/ldk/structs/UnsignedGossipMessage.java
src/main/java/org/ldk/structs/UnsignedInvoiceRequest.java
src/main/java/org/ldk/structs/UnsignedNodeAnnouncement.java
src/main/java/org/ldk/structs/UntrustedString.java
src/main/java/org/ldk/structs/UpdateAddHTLC.java
src/main/java/org/ldk/structs/UpdateFailHTLC.java
src/main/java/org/ldk/structs/UpdateFailMalformedHTLC.java
src/main/java/org/ldk/structs/UpdateFee.java
src/main/java/org/ldk/structs/UpdateFulfillHTLC.java
src/main/java/org/ldk/structs/UserConfig.java
src/main/java/org/ldk/structs/UtilMethods.java
src/main/java/org/ldk/structs/Utxo.java
src/main/java/org/ldk/structs/UtxoFuture.java
src/main/java/org/ldk/structs/UtxoLookup.java
src/main/java/org/ldk/structs/UtxoResult.java
src/main/java/org/ldk/structs/VerifiedInvoiceRequest.java
src/main/java/org/ldk/structs/WalletSource.java
src/main/java/org/ldk/structs/WarningMessage.java
src/main/java/org/ldk/structs/Watch.java
src/main/java/org/ldk/structs/WatchedOutput.java
src/main/java/org/ldk/structs/WriteableEcdsaChannelSigner.java
src/main/jni/bindings.c
src/main/jni/bindings.c.body
src/main/jni/org_ldk_enums_Direction.h [new file with mode: 0644]
src/main/jni/org_ldk_enums_ShortChannelIdError.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings.h
src/main/jni/org_ldk_impl_bindings_LDKAmount.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKCOption_AmountZ.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKCOption_ECDSASignatureZ.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKCOption_PaymentContextZ.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKCOption_QuantityZ.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKIntroductionNode.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKNextMessageHop.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKOutputSpendStatus.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKPaymentContext.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKQuantity.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKSignError.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKSpendingDelay.h [new file with mode: 0644]

index 3fe0c2a32cd867e24cb3a46ed6ab97e6df40e749..ca52e917a4652d1a5a24d6c9a3036e28747cb478 100644 (file)
@@ -96,6 +96,10 @@ public enum Bolt12SemanticError {
         * Blinded paths were expected but were missing.
         */
        LDKBolt12SemanticError_MissingPaths,
+       /**
+        * Blinded paths were provided but were not expected.
+        */
+       LDKBolt12SemanticError_UnexpectedPaths,
        /**
         * The blinded payinfo given does not match the number of blinded path hops.
         */
index 25479835f66f9b094a271736ed4222e3424f0ac8..30f36343cb8a58b30f410a9e6cc8d33027dd260e 100644 (file)
@@ -92,6 +92,19 @@ public enum ConfirmationTarget {
         * [`ChannelManager::close_channel_with_feerate_and_script`]: crate::ln::channelmanager::ChannelManager::close_channel_with_feerate_and_script
         */
        LDKConfirmationTarget_ChannelCloseMinimum,
+       /**
+        * The feerate [`OutputSweeper`] will use on transactions spending
+        * [`SpendableOutputDescriptor`]s after a channel closure.
+        * 
+        * Generally spending these outputs is safe as long as they eventually confirm, so a value
+        * (slightly above) the mempool minimum should suffice. However, as this value will influence
+        * how long funds will be unavailable after channel closure, [`FeeEstimator`] implementors
+        * might want to choose a higher feerate to regain control over funds faster.
+        * 
+        * [`OutputSweeper`]: crate::util::sweep::OutputSweeper
+        * [`SpendableOutputDescriptor`]: crate::sign::SpendableOutputDescriptor
+        */
+       LDKConfirmationTarget_OutputSpendingFee,
        ; static native void init();
        static { org.ldk.impl.bindings.run_statics(); init(); }
 }
\ No newline at end of file
diff --git a/src/main/java/org/ldk/enums/Direction.java b/src/main/java/org/ldk/enums/Direction.java
new file mode 100644 (file)
index 0000000..34b6b74
--- /dev/null
@@ -0,0 +1,21 @@
+package org.ldk.enums;
+
+/**
+ * The side of a channel that is the [`IntroductionNode`] in a [`BlindedPath`]. [BOLT 7] defines
+ * which nodes is which in the [`ChannelAnnouncement`] message.
+ * 
+ * [BOLT 7]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-channel_announcement-message
+ * [`ChannelAnnouncement`]: crate::ln::msgs::ChannelAnnouncement
+ */
+public enum Direction {
+       /**
+        * The lesser node id when compared lexicographically in ascending order.
+        */
+       LDKDirection_NodeOne,
+       /**
+        * The greater node id when compared lexicographically in ascending order.
+        */
+       LDKDirection_NodeTwo,
+       ; static native void init();
+       static { org.ldk.impl.bindings.run_statics(); init(); }
+}
\ No newline at end of file
index b9cec19c0428c95a6386eaa07efaf183db1cee67..ea07d0ba33b6ffe740d2935bcafb4c9bde8b6fa6 100644 (file)
@@ -32,6 +32,10 @@ public enum PaymentFailureReason {
        LDKPaymentFailureReason_PaymentExpired,
        /**
         * We failed to find a route while retrying the payment.
+        * 
+        * Note that this generally indicates that we've exhausted the available set of possible
+        * routes - we tried the payment over a few routes but were not able to find any further
+        * candidate routes beyond those.
         */
        LDKPaymentFailureReason_RouteNotFound,
        /**
diff --git a/src/main/java/org/ldk/enums/ShortChannelIdError.java b/src/main/java/org/ldk/enums/ShortChannelIdError.java
new file mode 100644 (file)
index 0000000..e0d4d0d
--- /dev/null
@@ -0,0 +1,21 @@
+package org.ldk.enums;
+
+/**
+ * A `short_channel_id` construction error
+ */
+public enum ShortChannelIdError {
+       /**
+        * Block height too high
+        */
+       LDKShortChannelIdError_BlockOverflow,
+       /**
+        * Tx index too high
+        */
+       LDKShortChannelIdError_TxIndexOverflow,
+       /**
+        * Vout index too high
+        */
+       LDKShortChannelIdError_VoutIndexOverflow,
+       ; static native void init();
+       static { org.ldk.impl.bindings.run_statics(); init(); }
+}
\ No newline at end of file
index a979e69d09becc65cd91fb86e04edece2fdd3c67..4d4fd2357b386f92df787761d6a675589b62d633 100644 (file)
@@ -55,6 +55,7 @@ public class bindings {
        static { ConfirmationTarget.values(); /* Force enum statics to run */ }
        static { CreationError.values(); /* Force enum statics to run */ }
        static { Currency.values(); /* Force enum statics to run */ }
+       static { Direction.values(); /* Force enum statics to run */ }
        static { HTLCClaim.values(); /* Force enum statics to run */ }
        static { IOError.values(); /* Force enum statics to run */ }
        static { Level.values(); /* Force enum statics to run */ }
@@ -63,6 +64,7 @@ public class bindings {
        static { Recipient.values(); /* Force enum statics to run */ }
        static { RetryableSendFailure.values(); /* Force enum statics to run */ }
        static { Secp256k1Error.values(); /* Force enum statics to run */ }
+       static { ShortChannelIdError.values(); /* Force enum statics to run */ }
        static { SiPrefix.values(); /* Force enum statics to run */ }
        static { SocketAddressParseError.values(); /* Force enum statics to run */ }
        static { UtxoLookupError.values(); /* Force enum statics to run */ }
@@ -99,6 +101,14 @@ public class bindings {
        }
        static { LDKBech32Error.init(); }
        public static native LDKBech32Error LDKBech32Error_ref_from_ptr(long ptr);
+       // struct LDKRefundMaybeWithDerivedMetadataBuilder CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native long CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(long owner);
+       // enum LDKBolt12SemanticError CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native Bolt12SemanticError CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(long owner);
+       // struct LDKRefund CResult_RefundBolt12SemanticErrorZ_get_ok(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native long CResult_RefundBolt12SemanticErrorZ_get_ok(long owner);
+       // enum LDKBolt12SemanticError CResult_RefundBolt12SemanticErrorZ_get_err(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native Bolt12SemanticError CResult_RefundBolt12SemanticErrorZ_get_err(long owner);
        public static class LDKCOption_u64Z {
                private LDKCOption_u64Z() {}
                public final static class Some extends LDKCOption_u64Z {
@@ -154,6 +164,9 @@ public class bindings {
                public final static class UnsupportedCompression extends LDKDecodeError {
                        UnsupportedCompression() { }
                }
+               public final static class DangerousValue extends LDKDecodeError {
+                       DangerousValue() { }
+               }
                static native void init();
        }
        static { LDKDecodeError.init(); }
@@ -234,6 +247,18 @@ public class bindings {
        public static native long CResult_RecipientOnionFieldsNoneZ_get_ok(long owner);
        // void CResult_RecipientOnionFieldsNoneZ_get_err(LDKCResult_RecipientOnionFieldsNoneZ *NONNULL_PTR owner);
        public static native void CResult_RecipientOnionFieldsNoneZ_get_err(long owner);
+       // struct LDKUnsignedBolt12Invoice CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native long CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(long owner);
+       // enum LDKBolt12SemanticError CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native Bolt12SemanticError CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(long owner);
+       // struct LDKBolt12Invoice CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native long CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(long owner);
+       // enum LDKBolt12SemanticError CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native Bolt12SemanticError CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(long owner);
+       // struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner);
+       public static native byte[] CResult_SchnorrSignatureNoneZ_get_ok(long owner);
+       // void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner);
+       public static native void CResult_SchnorrSignatureNoneZ_get_err(long owner);
        public static class LDKCOption_CVec_ThirtyTwoBytesZZ {
                private LDKCOption_CVec_ThirtyTwoBytesZZ() {}
                public final static class Some extends LDKCOption_CVec_ThirtyTwoBytesZZ {
@@ -247,6 +272,63 @@ public class bindings {
        }
        static { LDKCOption_CVec_ThirtyTwoBytesZZ.init(); }
        public static native LDKCOption_CVec_ThirtyTwoBytesZZ LDKCOption_CVec_ThirtyTwoBytesZZ_ref_from_ptr(long ptr);
+       public static class LDKAmount {
+               private LDKAmount() {}
+               public final static class Bitcoin extends LDKAmount {
+                       public long amount_msats;
+                       Bitcoin(long amount_msats) { this.amount_msats = amount_msats; }
+               }
+               public final static class Currency extends LDKAmount {
+                       public byte[] iso4217_code;
+                       public long amount;
+                       Currency(byte[] iso4217_code, long amount) { this.iso4217_code = iso4217_code; this.amount = amount; }
+               }
+               static native void init();
+       }
+       static { LDKAmount.init(); }
+       public static native LDKAmount LDKAmount_ref_from_ptr(long ptr);
+       public static class LDKCOption_AmountZ {
+               private LDKCOption_AmountZ() {}
+               public final static class Some extends LDKCOption_AmountZ {
+                       public long some;
+                       Some(long some) { this.some = some; }
+               }
+               public final static class None extends LDKCOption_AmountZ {
+                       None() { }
+               }
+               static native void init();
+       }
+       static { LDKCOption_AmountZ.init(); }
+       public static native LDKCOption_AmountZ LDKCOption_AmountZ_ref_from_ptr(long ptr);
+       public static class LDKQuantity {
+               private LDKQuantity() {}
+               public final static class Bounded extends LDKQuantity {
+                       public long bounded;
+                       Bounded(long bounded) { this.bounded = bounded; }
+               }
+               public final static class Unbounded extends LDKQuantity {
+                       Unbounded() { }
+               }
+               public final static class One extends LDKQuantity {
+                       One() { }
+               }
+               static native void init();
+       }
+       static { LDKQuantity.init(); }
+       public static native LDKQuantity LDKQuantity_ref_from_ptr(long ptr);
+       public static class LDKCOption_QuantityZ {
+               private LDKCOption_QuantityZ() {}
+               public final static class Some extends LDKCOption_QuantityZ {
+                       public long some;
+                       Some(long some) { this.some = some; }
+               }
+               public final static class None extends LDKCOption_QuantityZ {
+                       None() { }
+               }
+               static native void init();
+       }
+       static { LDKCOption_QuantityZ.init(); }
+       public static native LDKCOption_QuantityZ LDKCOption_QuantityZ_ref_from_ptr(long ptr);
        // struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesNoneZ_get_ok(LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR owner);
        public static native byte[] CResult_ThirtyTwoBytesNoneZ_get_ok(long owner);
        // void CResult_ThirtyTwoBytesNoneZ_get_err(LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR owner);
@@ -341,14 +423,14 @@ public class bindings {
        public static native byte[] CResult_RecoverableSignatureNoneZ_get_ok(long owner);
        // void CResult_RecoverableSignatureNoneZ_get_err(LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR owner);
        public static native void CResult_RecoverableSignatureNoneZ_get_err(long owner);
-       // struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner);
-       public static native byte[] CResult_SchnorrSignatureNoneZ_get_ok(long owner);
-       // void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner);
-       public static native void CResult_SchnorrSignatureNoneZ_get_err(long owner);
        // struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner);
        public static native byte[] CResult_ECDSASignatureNoneZ_get_ok(long owner);
        // void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner);
        public static native void CResult_ECDSASignatureNoneZ_get_err(long owner);
+       // struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner);
+       public static native byte[] CResult_TransactionNoneZ_get_ok(long owner);
+       // void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner);
+       public static native void CResult_TransactionNoneZ_get_err(long owner);
        // struct LDKECDSASignature C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR owner);
        public static native byte[] C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(long owner);
        // struct LDKCVec_ECDSASignatureZ C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_b(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR owner);
@@ -465,10 +547,6 @@ public class bindings {
        public static native long CResult_InMemorySignerDecodeErrorZ_get_ok(long owner);
        // struct LDKDecodeError CResult_InMemorySignerDecodeErrorZ_get_err(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR owner);
        public static native long CResult_InMemorySignerDecodeErrorZ_get_err(long owner);
-       // struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner);
-       public static native byte[] CResult_TransactionNoneZ_get_ok(long owner);
-       // void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner);
-       public static native void CResult_TransactionNoneZ_get_err(long owner);
        public static class LDKCandidateRouteHop {
                private LDKCandidateRouteHop() {}
                public final static class FirstHop extends LDKCandidateRouteHop {
@@ -667,6 +745,10 @@ public class bindings {
        public static native long CResult_ProbabilisticScorerDecodeErrorZ_get_ok(long owner);
        // struct LDKDecodeError CResult_ProbabilisticScorerDecodeErrorZ_get_err(LDKCResult_ProbabilisticScorerDecodeErrorZ *NONNULL_PTR owner);
        public static native long CResult_ProbabilisticScorerDecodeErrorZ_get_err(long owner);
+       // struct LDKBestBlock CResult_BestBlockDecodeErrorZ_get_ok(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_BestBlockDecodeErrorZ_get_ok(long owner);
+       // struct LDKDecodeError CResult_BestBlockDecodeErrorZ_get_err(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_BestBlockDecodeErrorZ_get_err(long owner);
        // uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner);
        public static native long C2Tuple_usizeTransactionZ_get_a(long owner);
        // struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner);
@@ -681,31 +763,87 @@ public class bindings {
        public static native ChannelMonitorUpdateStatus CResult_ChannelMonitorUpdateStatusNoneZ_get_ok(long owner);
        // void CResult_ChannelMonitorUpdateStatusNoneZ_get_err(LDKCResult_ChannelMonitorUpdateStatusNoneZ *NONNULL_PTR owner);
        public static native void CResult_ChannelMonitorUpdateStatusNoneZ_get_err(long owner);
+       public static class LDKClosureReason {
+               private LDKClosureReason() {}
+               public final static class CounterpartyForceClosed extends LDKClosureReason {
+                       public long peer_msg;
+                       CounterpartyForceClosed(long peer_msg) { this.peer_msg = peer_msg; }
+               }
+               public final static class HolderForceClosed extends LDKClosureReason {
+                       HolderForceClosed() { }
+               }
+               public final static class LegacyCooperativeClosure extends LDKClosureReason {
+                       LegacyCooperativeClosure() { }
+               }
+               public final static class CounterpartyInitiatedCooperativeClosure extends LDKClosureReason {
+                       CounterpartyInitiatedCooperativeClosure() { }
+               }
+               public final static class LocallyInitiatedCooperativeClosure extends LDKClosureReason {
+                       LocallyInitiatedCooperativeClosure() { }
+               }
+               public final static class CommitmentTxConfirmed extends LDKClosureReason {
+                       CommitmentTxConfirmed() { }
+               }
+               public final static class FundingTimedOut extends LDKClosureReason {
+                       FundingTimedOut() { }
+               }
+               public final static class ProcessingError extends LDKClosureReason {
+                       public java.lang.String err;
+                       ProcessingError(java.lang.String err) { this.err = err; }
+               }
+               public final static class DisconnectedPeer extends LDKClosureReason {
+                       DisconnectedPeer() { }
+               }
+               public final static class OutdatedChannelManager extends LDKClosureReason {
+                       OutdatedChannelManager() { }
+               }
+               public final static class CounterpartyCoopClosedUnfundedChannel extends LDKClosureReason {
+                       CounterpartyCoopClosedUnfundedChannel() { }
+               }
+               public final static class FundingBatchClosure extends LDKClosureReason {
+                       FundingBatchClosure() { }
+               }
+               public final static class HTLCsTimedOut extends LDKClosureReason {
+                       HTLCsTimedOut() { }
+               }
+               static native void init();
+       }
+       static { LDKClosureReason.init(); }
+       public static native LDKClosureReason LDKClosureReason_ref_from_ptr(long ptr);
        public static class LDKMonitorEvent {
                private LDKMonitorEvent() {}
                public final static class HTLCEvent extends LDKMonitorEvent {
                        public long htlc_event;
                        HTLCEvent(long htlc_event) { this.htlc_event = htlc_event; }
                }
+               public final static class HolderForceClosedWithInfo extends LDKMonitorEvent {
+                       public long reason;
+                       public long outpoint;
+                       public long channel_id;
+                       HolderForceClosedWithInfo(long reason, long outpoint, long channel_id) { this.reason = reason; this.outpoint = outpoint; this.channel_id = channel_id; }
+               }
                public final static class HolderForceClosed extends LDKMonitorEvent {
                        public long holder_force_closed;
                        HolderForceClosed(long holder_force_closed) { this.holder_force_closed = holder_force_closed; }
                }
                public final static class Completed extends LDKMonitorEvent {
                        public long funding_txo;
+                       public long channel_id;
                        public long monitor_update_id;
-                       Completed(long funding_txo, long monitor_update_id) { this.funding_txo = funding_txo; this.monitor_update_id = monitor_update_id; }
+                       Completed(long funding_txo, long channel_id, long monitor_update_id) { this.funding_txo = funding_txo; this.channel_id = channel_id; this.monitor_update_id = monitor_update_id; }
                }
                static native void init();
        }
        static { LDKMonitorEvent.init(); }
        public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
-       // struct LDKOutPoint C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner);
-       public static native long C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(long owner);
-       // struct LDKCVec_MonitorEventZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner);
-       public static native long[] C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(long owner);
-       // struct LDKPublicKey C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner);
-       public static native byte[] C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(long owner);
+       // struct LDKOutPoint C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner);
+       public static native long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(long owner);
+       // struct LDKChannelId C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner);
+       public static native long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(long owner);
+       // struct LDKCVec_MonitorEventZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner);
+       public static native long[] C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(long owner);
+       // struct LDKPublicKey C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner);
+       public static native byte[] C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(long owner);
        // struct LDKInitFeatures CResult_InitFeaturesDecodeErrorZ_get_ok(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner);
        public static native long CResult_InitFeaturesDecodeErrorZ_get_ok(long owner);
        // struct LDKDecodeError CResult_InitFeaturesDecodeErrorZ_get_err(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner);
@@ -734,18 +872,38 @@ public class bindings {
        public static native long CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(long owner);
        // struct LDKDecodeError CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner);
        public static native long CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(long owner);
+       // struct LDKOfferId CResult_OfferIdDecodeErrorZ_get_ok(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_OfferIdDecodeErrorZ_get_ok(long owner);
+       // struct LDKDecodeError CResult_OfferIdDecodeErrorZ_get_err(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_OfferIdDecodeErrorZ_get_err(long owner);
+       // void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native void CResult_NoneBolt12SemanticErrorZ_get_ok(long owner);
+       // enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native Bolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(long owner);
+       // struct LDKOffer CResult_OfferBolt12SemanticErrorZ_get_ok(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native long CResult_OfferBolt12SemanticErrorZ_get_ok(long owner);
+       // enum LDKBolt12SemanticError CResult_OfferBolt12SemanticErrorZ_get_err(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native Bolt12SemanticError CResult_OfferBolt12SemanticErrorZ_get_err(long owner);
+       // struct LDKInvoiceRequestWithDerivedPayerIdBuilder CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native long CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(long owner);
+       // enum LDKBolt12SemanticError CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native Bolt12SemanticError CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(long owner);
+       // struct LDKInvoiceRequestWithExplicitPayerIdBuilder CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native long CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(long owner);
+       // enum LDKBolt12SemanticError CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native Bolt12SemanticError CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(long owner);
        // struct LDKOffer CResult_OfferBolt12ParseErrorZ_get_ok(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR owner);
        public static native long CResult_OfferBolt12ParseErrorZ_get_ok(long owner);
        // struct LDKBolt12ParseError CResult_OfferBolt12ParseErrorZ_get_err(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR owner);
        public static native long CResult_OfferBolt12ParseErrorZ_get_err(long owner);
-       // struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner);
-       public static native byte[] CResult_PublicKeySecp256k1ErrorZ_get_ok(long owner);
-       // enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner);
-       public static native Secp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(long owner);
        // struct LDKNodeId CResult_NodeIdDecodeErrorZ_get_ok(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner);
        public static native long CResult_NodeIdDecodeErrorZ_get_ok(long owner);
        // struct LDKDecodeError CResult_NodeIdDecodeErrorZ_get_err(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner);
        public static native long CResult_NodeIdDecodeErrorZ_get_err(long owner);
+       // struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner);
+       public static native byte[] CResult_PublicKeySecp256k1ErrorZ_get_ok(long owner);
+       // enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner);
+       public static native Secp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(long owner);
        public static class LDKNetworkUpdate {
                private LDKNetworkUpdate() {}
                public final static class ChannelUpdateMessage extends LDKNetworkUpdate {
@@ -1138,6 +1296,10 @@ public class bindings {
        }
        static { LDKCOption_CVec_SocketAddressZZ.init(); }
        public static native LDKCOption_CVec_SocketAddressZZ LDKCOption_CVec_SocketAddressZZ_ref_from_ptr(long ptr);
+       // uint64_t CResult_u64ShortChannelIdErrorZ_get_ok(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner);
+       public static native long CResult_u64ShortChannelIdErrorZ_get_ok(long owner);
+       // enum LDKShortChannelIdError CResult_u64ShortChannelIdErrorZ_get_err(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner);
+       public static native ShortChannelIdError CResult_u64ShortChannelIdErrorZ_get_err(long owner);
        // struct LDKPendingHTLCInfo CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR owner);
        public static native long CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok(long owner);
        // struct LDKInboundHTLCErr CResult_PendingHTLCInfoInboundHTLCErrZ_get_err(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR owner);
@@ -1163,6 +1325,37 @@ public class bindings {
        public static native long[] CResult_CVec_UtxoZNoneZ_get_ok(long owner);
        // void CResult_CVec_UtxoZNoneZ_get_err(LDKCResult_CVec_UtxoZNoneZ *NONNULL_PTR owner);
        public static native void CResult_CVec_UtxoZNoneZ_get_err(long owner);
+       public static class LDKPaymentContext {
+               private LDKPaymentContext() {}
+               public final static class Unknown extends LDKPaymentContext {
+                       public long unknown;
+                       Unknown(long unknown) { this.unknown = unknown; }
+               }
+               public final static class Bolt12Offer extends LDKPaymentContext {
+                       public long bolt12_offer;
+                       Bolt12Offer(long bolt12_offer) { this.bolt12_offer = bolt12_offer; }
+               }
+               public final static class Bolt12Refund extends LDKPaymentContext {
+                       public long bolt12_refund;
+                       Bolt12Refund(long bolt12_refund) { this.bolt12_refund = bolt12_refund; }
+               }
+               static native void init();
+       }
+       static { LDKPaymentContext.init(); }
+       public static native LDKPaymentContext LDKPaymentContext_ref_from_ptr(long ptr);
+       public static class LDKCOption_PaymentContextZ {
+               private LDKCOption_PaymentContextZ() {}
+               public final static class Some extends LDKCOption_PaymentContextZ {
+                       public long some;
+                       Some(long some) { this.some = some; }
+               }
+               public final static class None extends LDKCOption_PaymentContextZ {
+                       None() { }
+               }
+               static native void init();
+       }
+       static { LDKCOption_PaymentContextZ.init(); }
+       public static native LDKCOption_PaymentContextZ LDKCOption_PaymentContextZ_ref_from_ptr(long ptr);
        // uint64_t C2Tuple_u64u16Z_get_a(LDKC2Tuple_u64u16Z *NONNULL_PTR owner);
        public static native long C2Tuple_u64u16Z_get_a(long owner);
        // uint16_t C2Tuple_u64u16Z_get_b(LDKC2Tuple_u64u16Z *NONNULL_PTR owner);
@@ -1193,10 +1386,10 @@ public class bindings {
        }
        static { LDKCOption_ChannelShutdownStateZ.init(); }
        public static native LDKCOption_ChannelShutdownStateZ LDKCOption_ChannelShutdownStateZ_ref_from_ptr(long ptr);
-       // struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner);
-       public static native byte[] CResult_ThirtyTwoBytesAPIErrorZ_get_ok(long owner);
-       // struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner);
-       public static native long CResult_ThirtyTwoBytesAPIErrorZ_get_err(long owner);
+       // struct LDKChannelId CResult_ChannelIdAPIErrorZ_get_ok(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner);
+       public static native long CResult_ChannelIdAPIErrorZ_get_ok(long owner);
+       // struct LDKAPIError CResult_ChannelIdAPIErrorZ_get_err(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner);
+       public static native long CResult_ChannelIdAPIErrorZ_get_err(long owner);
        public static class LDKRecentPaymentDetails {
                private LDKRecentPaymentDetails() {}
                public final static class AwaitingInvoice extends LDKRecentPaymentDetails {
@@ -1291,10 +1484,14 @@ public class bindings {
        public static native long[] CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_get_ok(long owner);
        // struct LDKProbeSendFailure CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_get_err(LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ *NONNULL_PTR owner);
        public static native long CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_get_err(long owner);
-       // struct LDKThirtyTwoBytes C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner);
-       public static native byte[] C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(long owner);
-       // struct LDKPublicKey C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner);
-       public static native byte[] C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(long owner);
+       // struct LDKChannelId C2Tuple_ChannelIdPublicKeyZ_get_a(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner);
+       public static native long C2Tuple_ChannelIdPublicKeyZ_get_a(long owner);
+       // struct LDKPublicKey C2Tuple_ChannelIdPublicKeyZ_get_b(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner);
+       public static native byte[] C2Tuple_ChannelIdPublicKeyZ_get_b(long owner);
+       // struct LDKOfferWithDerivedMetadataBuilder CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native long CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(long owner);
+       // enum LDKBolt12SemanticError CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native Bolt12SemanticError CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(long owner);
        public static class LDKCOption_StrZ {
                private LDKCOption_StrZ() {}
                public final static class Some extends LDKCOption_StrZ {
@@ -1308,14 +1505,14 @@ public class bindings {
        }
        static { LDKCOption_StrZ.init(); }
        public static native LDKCOption_StrZ LDKCOption_StrZ_ref_from_ptr(long ptr);
-       // void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner);
-       public static native void CResult_NoneBolt12SemanticErrorZ_get_ok(long owner);
-       // enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner);
-       public static native Bolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(long owner);
        // struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_ok(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR owner);
        public static native long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_ok(long owner);
        // void CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR owner);
        public static native void CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err(long owner);
+       // struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner);
+       public static native byte[] CResult_ThirtyTwoBytesAPIErrorZ_get_ok(long owner);
+       // struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner);
+       public static native long CResult_ThirtyTwoBytesAPIErrorZ_get_err(long owner);
        public static class LDKOffersMessage {
                private LDKOffersMessage() {}
                public final static class InvoiceRequest extends LDKOffersMessage {
@@ -1398,11 +1595,12 @@ public class bindings {
                public final static class Receive extends LDKPendingHTLCRouting {
                        public long payment_data;
                        public long payment_metadata;
+                       public long payment_context;
                        public int incoming_cltv_expiry;
                        public byte[] phantom_shared_secret;
                        public long[] custom_tlvs;
                        public boolean requires_blinded_error;
-                       Receive(long payment_data, long payment_metadata, int incoming_cltv_expiry, byte[] phantom_shared_secret, long[] custom_tlvs, boolean requires_blinded_error) { this.payment_data = payment_data; this.payment_metadata = payment_metadata; this.incoming_cltv_expiry = incoming_cltv_expiry; this.phantom_shared_secret = phantom_shared_secret; this.custom_tlvs = custom_tlvs; this.requires_blinded_error = requires_blinded_error; }
+                       Receive(long payment_data, long payment_metadata, long payment_context, int incoming_cltv_expiry, byte[] phantom_shared_secret, long[] custom_tlvs, boolean requires_blinded_error) { this.payment_data = payment_data; this.payment_metadata = payment_metadata; this.payment_context = payment_context; this.incoming_cltv_expiry = incoming_cltv_expiry; this.phantom_shared_secret = phantom_shared_secret; this.custom_tlvs = custom_tlvs; this.requires_blinded_error = requires_blinded_error; }
                }
                public final static class ReceiveKeysend extends LDKPendingHTLCRouting {
                        public long payment_data;
@@ -1410,7 +1608,8 @@ public class bindings {
                        public long payment_metadata;
                        public int incoming_cltv_expiry;
                        public long[] custom_tlvs;
-                       ReceiveKeysend(long payment_data, byte[] payment_preimage, long payment_metadata, int incoming_cltv_expiry, long[] custom_tlvs) { this.payment_data = payment_data; this.payment_preimage = payment_preimage; this.payment_metadata = payment_metadata; this.incoming_cltv_expiry = incoming_cltv_expiry; this.custom_tlvs = custom_tlvs; }
+                       public boolean requires_blinded_error;
+                       ReceiveKeysend(long payment_data, byte[] payment_preimage, long payment_metadata, int incoming_cltv_expiry, long[] custom_tlvs, boolean requires_blinded_error) { this.payment_data = payment_data; this.payment_preimage = payment_preimage; this.payment_metadata = payment_metadata; this.incoming_cltv_expiry = incoming_cltv_expiry; this.custom_tlvs = custom_tlvs; this.requires_blinded_error = requires_blinded_error; }
                }
                static native void init();
        }
@@ -1442,7 +1641,7 @@ public class bindings {
        public static native long Watch_watch_channel(long this_arg, long funding_txo, long monitor);
        // LDKChannelMonitorUpdateStatus Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, const struct LDKChannelMonitorUpdate *NONNULL_PTR update
        public static native ChannelMonitorUpdateStatus Watch_update_channel(long this_arg, long funding_txo, long update);
-       // LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
+       // LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
        public static native long[] Watch_release_pending_monitor_events(long this_arg);
        public interface LDKBroadcasterInterface {
                 void broadcast_transactions(byte[][] txs);
@@ -1780,10 +1979,6 @@ public class bindings {
        }
        static { LDKCOption_SocketAddressZ.init(); }
        public static native LDKCOption_SocketAddressZ LDKCOption_SocketAddressZ_ref_from_ptr(long ptr);
-       // struct LDKPublicKey C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner);
-       public static native byte[] C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(long owner);
-       // struct LDKCOption_SocketAddressZ C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner);
-       public static native long C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(long owner);
        // struct LDKCVec_u8Z CResult_CVec_u8ZPeerHandleErrorZ_get_ok(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner);
        public static native byte[] CResult_CVec_u8ZPeerHandleErrorZ_get_ok(long owner);
        // struct LDKPeerHandleError CResult_CVec_u8ZPeerHandleErrorZ_get_err(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner);
@@ -1830,6 +2025,14 @@ public class bindings {
        public static native long CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_ok(long owner);
        // enum LDKIOError CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_err(LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ *NONNULL_PTR owner);
        public static native IOError CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_err(long owner);
+       // struct LDKUnsignedInvoiceRequest CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(long owner);
+       // enum LDKBolt12SemanticError CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native Bolt12SemanticError CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(long owner);
+       // struct LDKInvoiceRequest CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native long CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(long owner);
+       // enum LDKBolt12SemanticError CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native Bolt12SemanticError CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(long owner);
        public static class LDKCOption_SecretKeyZ {
                private LDKCOption_SecretKeyZ() {}
                public final static class Some extends LDKCOption_SecretKeyZ {
@@ -1843,10 +2046,35 @@ public class bindings {
        }
        static { LDKCOption_SecretKeyZ.init(); }
        public static native LDKCOption_SecretKeyZ LDKCOption_SecretKeyZ_ref_from_ptr(long ptr);
+       // struct LDKInvoiceWithExplicitSigningPubkeyBuilder CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native long CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(long owner);
+       // enum LDKBolt12SemanticError CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native Bolt12SemanticError CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(long owner);
        // struct LDKVerifiedInvoiceRequest CResult_VerifiedInvoiceRequestNoneZ_get_ok(LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR owner);
        public static native long CResult_VerifiedInvoiceRequestNoneZ_get_ok(long owner);
        // void CResult_VerifiedInvoiceRequestNoneZ_get_err(LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR owner);
        public static native void CResult_VerifiedInvoiceRequestNoneZ_get_err(long owner);
+       // struct LDKInvoiceWithDerivedSigningPubkeyBuilder CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native long CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(long owner);
+       // enum LDKBolt12SemanticError CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+       public static native Bolt12SemanticError CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(long owner);
+       // struct LDKInvoiceRequestFields CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(long owner);
+       // struct LDKDecodeError CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(long owner);
+       public static class LDKCOption_ECDSASignatureZ {
+               private LDKCOption_ECDSASignatureZ() {}
+               public final static class Some extends LDKCOption_ECDSASignatureZ {
+                       public byte[] some;
+                       Some(byte[] some) { this.some = some; }
+               }
+               public final static class None extends LDKCOption_ECDSASignatureZ {
+                       None() { }
+               }
+               static native void init();
+       }
+       static { LDKCOption_ECDSASignatureZ.init(); }
+       public static native LDKCOption_ECDSASignatureZ LDKCOption_ECDSASignatureZ_ref_from_ptr(long ptr);
        public static class LDKCOption_i64Z {
                private LDKCOption_i64Z() {}
                public final static class Some extends LDKCOption_i64Z {
@@ -2177,10 +2405,22 @@ public class bindings {
        public static native long CResult_ShutdownScriptInvalidShutdownScriptZ_get_err(long owner);
        public static class LDKPaymentPurpose {
                private LDKPaymentPurpose() {}
-               public final static class InvoicePayment extends LDKPaymentPurpose {
+               public final static class Bolt11InvoicePayment extends LDKPaymentPurpose {
+                       public long payment_preimage;
+                       public byte[] payment_secret;
+                       Bolt11InvoicePayment(long payment_preimage, byte[] payment_secret) { this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; }
+               }
+               public final static class Bolt12OfferPayment extends LDKPaymentPurpose {
                        public long payment_preimage;
                        public byte[] payment_secret;
-                       InvoicePayment(long payment_preimage, byte[] payment_secret) { this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; }
+                       public long payment_context;
+                       Bolt12OfferPayment(long payment_preimage, byte[] payment_secret, long payment_context) { this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; this.payment_context = payment_context; }
+               }
+               public final static class Bolt12RefundPayment extends LDKPaymentPurpose {
+                       public long payment_preimage;
+                       public byte[] payment_secret;
+                       public long payment_context;
+                       Bolt12RefundPayment(long payment_preimage, byte[] payment_secret, long payment_context) { this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; this.payment_context = payment_context; }
                }
                public final static class SpontaneousPayment extends LDKPaymentPurpose {
                        public byte[] spontaneous_payment;
@@ -2229,44 +2469,6 @@ public class bindings {
        public static native long CResult_COption_PathFailureZDecodeErrorZ_get_ok(long owner);
        // struct LDKDecodeError CResult_COption_PathFailureZDecodeErrorZ_get_err(LDKCResult_COption_PathFailureZDecodeErrorZ *NONNULL_PTR owner);
        public static native long CResult_COption_PathFailureZDecodeErrorZ_get_err(long owner);
-       public static class LDKClosureReason {
-               private LDKClosureReason() {}
-               public final static class CounterpartyForceClosed extends LDKClosureReason {
-                       public long peer_msg;
-                       CounterpartyForceClosed(long peer_msg) { this.peer_msg = peer_msg; }
-               }
-               public final static class HolderForceClosed extends LDKClosureReason {
-                       HolderForceClosed() { }
-               }
-               public final static class CooperativeClosure extends LDKClosureReason {
-                       CooperativeClosure() { }
-               }
-               public final static class CommitmentTxConfirmed extends LDKClosureReason {
-                       CommitmentTxConfirmed() { }
-               }
-               public final static class FundingTimedOut extends LDKClosureReason {
-                       FundingTimedOut() { }
-               }
-               public final static class ProcessingError extends LDKClosureReason {
-                       public java.lang.String err;
-                       ProcessingError(java.lang.String err) { this.err = err; }
-               }
-               public final static class DisconnectedPeer extends LDKClosureReason {
-                       DisconnectedPeer() { }
-               }
-               public final static class OutdatedChannelManager extends LDKClosureReason {
-                       OutdatedChannelManager() { }
-               }
-               public final static class CounterpartyCoopClosedUnfundedChannel extends LDKClosureReason {
-                       CounterpartyCoopClosedUnfundedChannel() { }
-               }
-               public final static class FundingBatchClosure extends LDKClosureReason {
-                       FundingBatchClosure() { }
-               }
-               static native void init();
-       }
-       static { LDKClosureReason.init(); }
-       public static native LDKClosureReason LDKClosureReason_ref_from_ptr(long ptr);
        public static class LDKCOption_ClosureReasonZ {
                private LDKCOption_ClosureReasonZ() {}
                public final static class Some extends LDKCOption_ClosureReasonZ {
@@ -2288,8 +2490,8 @@ public class bindings {
                private LDKHTLCDestination() {}
                public final static class NextHopChannel extends LDKHTLCDestination {
                        public byte[] node_id;
-                       public byte[] channel_id;
-                       NextHopChannel(byte[] node_id, byte[] channel_id) { this.node_id = node_id; this.channel_id = channel_id; }
+                       public long channel_id;
+                       NextHopChannel(byte[] node_id, long channel_id) { this.node_id = node_id; this.channel_id = channel_id; }
                }
                public final static class UnknownNextHop extends LDKHTLCDestination {
                        public long requested_forward_scid;
@@ -2299,6 +2501,9 @@ public class bindings {
                        public long requested_forward_scid;
                        InvalidForward(long requested_forward_scid) { this.requested_forward_scid = requested_forward_scid; }
                }
+               public final static class InvalidOnion extends LDKHTLCDestination {
+                       InvalidOnion() { }
+               }
                public final static class FailedPayment extends LDKHTLCDestination {
                        public byte[] payment_hash;
                        FailedPayment(byte[] payment_hash) { this.payment_hash = payment_hash; }
@@ -2357,20 +2562,24 @@ public class bindings {
        public static class LDKBumpTransactionEvent {
                private LDKBumpTransactionEvent() {}
                public final static class ChannelClose extends LDKBumpTransactionEvent {
+                       public long channel_id;
+                       public byte[] counterparty_node_id;
                        public byte[] claim_id;
                        public int package_target_feerate_sat_per_1000_weight;
                        public byte[] commitment_tx;
                        public long commitment_tx_fee_satoshis;
                        public long anchor_descriptor;
                        public long[] pending_htlcs;
-                       ChannelClose(byte[] claim_id, int package_target_feerate_sat_per_1000_weight, byte[] commitment_tx, long commitment_tx_fee_satoshis, long anchor_descriptor, long[] pending_htlcs) { this.claim_id = claim_id; this.package_target_feerate_sat_per_1000_weight = package_target_feerate_sat_per_1000_weight; this.commitment_tx = commitment_tx; this.commitment_tx_fee_satoshis = commitment_tx_fee_satoshis; this.anchor_descriptor = anchor_descriptor; this.pending_htlcs = pending_htlcs; }
+                       ChannelClose(long channel_id, byte[] counterparty_node_id, byte[] claim_id, int package_target_feerate_sat_per_1000_weight, byte[] commitment_tx, long commitment_tx_fee_satoshis, long anchor_descriptor, long[] pending_htlcs) { this.channel_id = channel_id; this.counterparty_node_id = counterparty_node_id; this.claim_id = claim_id; this.package_target_feerate_sat_per_1000_weight = package_target_feerate_sat_per_1000_weight; this.commitment_tx = commitment_tx; this.commitment_tx_fee_satoshis = commitment_tx_fee_satoshis; this.anchor_descriptor = anchor_descriptor; this.pending_htlcs = pending_htlcs; }
                }
                public final static class HTLCResolution extends LDKBumpTransactionEvent {
+                       public long channel_id;
+                       public byte[] counterparty_node_id;
                        public byte[] claim_id;
                        public int target_feerate_sat_per_1000_weight;
                        public long[] htlc_descriptors;
                        public int tx_lock_time;
-                       HTLCResolution(byte[] claim_id, int target_feerate_sat_per_1000_weight, long[] htlc_descriptors, int tx_lock_time) { this.claim_id = claim_id; this.target_feerate_sat_per_1000_weight = target_feerate_sat_per_1000_weight; this.htlc_descriptors = htlc_descriptors; this.tx_lock_time = tx_lock_time; }
+                       HTLCResolution(long channel_id, byte[] counterparty_node_id, byte[] claim_id, int target_feerate_sat_per_1000_weight, long[] htlc_descriptors, int tx_lock_time) { this.channel_id = channel_id; this.counterparty_node_id = counterparty_node_id; this.claim_id = claim_id; this.target_feerate_sat_per_1000_weight = target_feerate_sat_per_1000_weight; this.htlc_descriptors = htlc_descriptors; this.tx_lock_time = tx_lock_time; }
                }
                static native void init();
        }
@@ -2379,12 +2588,12 @@ public class bindings {
        public static class LDKEvent {
                private LDKEvent() {}
                public final static class FundingGenerationReady extends LDKEvent {
-                       public byte[] temporary_channel_id;
+                       public long temporary_channel_id;
                        public byte[] counterparty_node_id;
                        public long channel_value_satoshis;
                        public byte[] output_script;
                        public byte[] user_channel_id;
-                       FundingGenerationReady(byte[] temporary_channel_id, byte[] counterparty_node_id, long channel_value_satoshis, byte[] output_script, byte[] user_channel_id) { this.temporary_channel_id = temporary_channel_id; this.counterparty_node_id = counterparty_node_id; this.channel_value_satoshis = channel_value_satoshis; this.output_script = output_script; this.user_channel_id = user_channel_id; }
+                       FundingGenerationReady(long temporary_channel_id, byte[] counterparty_node_id, long channel_value_satoshis, byte[] output_script, byte[] user_channel_id) { this.temporary_channel_id = temporary_channel_id; this.counterparty_node_id = counterparty_node_id; this.channel_value_satoshis = channel_value_satoshis; this.output_script = output_script; this.user_channel_id = user_channel_id; }
                }
                public final static class PaymentClaimable extends LDKEvent {
                        public byte[] receiver_node_id;
@@ -2477,52 +2686,56 @@ public class bindings {
                public final static class PaymentForwarded extends LDKEvent {
                        public long prev_channel_id;
                        public long next_channel_id;
-                       public long fee_earned_msat;
+                       public long prev_user_channel_id;
+                       public long next_user_channel_id;
+                       public long total_fee_earned_msat;
+                       public long skimmed_fee_msat;
                        public boolean claim_from_onchain_tx;
                        public long outbound_amount_forwarded_msat;
-                       PaymentForwarded(long prev_channel_id, long next_channel_id, long fee_earned_msat, boolean claim_from_onchain_tx, long outbound_amount_forwarded_msat) { this.prev_channel_id = prev_channel_id; this.next_channel_id = next_channel_id; this.fee_earned_msat = fee_earned_msat; this.claim_from_onchain_tx = claim_from_onchain_tx; this.outbound_amount_forwarded_msat = outbound_amount_forwarded_msat; }
+                       PaymentForwarded(long prev_channel_id, long next_channel_id, long prev_user_channel_id, long next_user_channel_id, long total_fee_earned_msat, long skimmed_fee_msat, boolean claim_from_onchain_tx, long outbound_amount_forwarded_msat) { this.prev_channel_id = prev_channel_id; this.next_channel_id = next_channel_id; this.prev_user_channel_id = prev_user_channel_id; this.next_user_channel_id = next_user_channel_id; this.total_fee_earned_msat = total_fee_earned_msat; this.skimmed_fee_msat = skimmed_fee_msat; this.claim_from_onchain_tx = claim_from_onchain_tx; this.outbound_amount_forwarded_msat = outbound_amount_forwarded_msat; }
                }
                public final static class ChannelPending extends LDKEvent {
-                       public byte[] channel_id;
+                       public long channel_id;
                        public byte[] user_channel_id;
                        public long former_temporary_channel_id;
                        public byte[] counterparty_node_id;
                        public long funding_txo;
-                       ChannelPending(byte[] channel_id, byte[] user_channel_id, long former_temporary_channel_id, byte[] counterparty_node_id, long funding_txo) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.former_temporary_channel_id = former_temporary_channel_id; this.counterparty_node_id = counterparty_node_id; this.funding_txo = funding_txo; }
+                       public long channel_type;
+                       ChannelPending(long channel_id, byte[] user_channel_id, long former_temporary_channel_id, byte[] counterparty_node_id, long funding_txo, long channel_type) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.former_temporary_channel_id = former_temporary_channel_id; this.counterparty_node_id = counterparty_node_id; this.funding_txo = funding_txo; this.channel_type = channel_type; }
                }
                public final static class ChannelReady extends LDKEvent {
-                       public byte[] channel_id;
+                       public long channel_id;
                        public byte[] user_channel_id;
                        public byte[] counterparty_node_id;
                        public long channel_type;
-                       ChannelReady(byte[] channel_id, byte[] user_channel_id, byte[] counterparty_node_id, long channel_type) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.counterparty_node_id = counterparty_node_id; this.channel_type = channel_type; }
+                       ChannelReady(long channel_id, byte[] user_channel_id, byte[] counterparty_node_id, long channel_type) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.counterparty_node_id = counterparty_node_id; this.channel_type = channel_type; }
                }
                public final static class ChannelClosed extends LDKEvent {
-                       public byte[] channel_id;
+                       public long channel_id;
                        public byte[] user_channel_id;
                        public long reason;
                        public byte[] counterparty_node_id;
                        public long channel_capacity_sats;
                        public long channel_funding_txo;
-                       ChannelClosed(byte[] channel_id, byte[] user_channel_id, long reason, byte[] counterparty_node_id, long channel_capacity_sats, long channel_funding_txo) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.reason = reason; this.counterparty_node_id = counterparty_node_id; this.channel_capacity_sats = channel_capacity_sats; this.channel_funding_txo = channel_funding_txo; }
+                       ChannelClosed(long channel_id, byte[] user_channel_id, long reason, byte[] counterparty_node_id, long channel_capacity_sats, long channel_funding_txo) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.reason = reason; this.counterparty_node_id = counterparty_node_id; this.channel_capacity_sats = channel_capacity_sats; this.channel_funding_txo = channel_funding_txo; }
                }
                public final static class DiscardFunding extends LDKEvent {
-                       public byte[] channel_id;
+                       public long channel_id;
                        public byte[] transaction;
-                       DiscardFunding(byte[] channel_id, byte[] transaction) { this.channel_id = channel_id; this.transaction = transaction; }
+                       DiscardFunding(long channel_id, byte[] transaction) { this.channel_id = channel_id; this.transaction = transaction; }
                }
                public final static class OpenChannelRequest extends LDKEvent {
-                       public byte[] temporary_channel_id;
+                       public long temporary_channel_id;
                        public byte[] counterparty_node_id;
                        public long funding_satoshis;
                        public long push_msat;
                        public long channel_type;
-                       OpenChannelRequest(byte[] temporary_channel_id, byte[] counterparty_node_id, long funding_satoshis, long push_msat, long channel_type) { this.temporary_channel_id = temporary_channel_id; this.counterparty_node_id = counterparty_node_id; this.funding_satoshis = funding_satoshis; this.push_msat = push_msat; this.channel_type = channel_type; }
+                       OpenChannelRequest(long temporary_channel_id, byte[] counterparty_node_id, long funding_satoshis, long push_msat, long channel_type) { this.temporary_channel_id = temporary_channel_id; this.counterparty_node_id = counterparty_node_id; this.funding_satoshis = funding_satoshis; this.push_msat = push_msat; this.channel_type = channel_type; }
                }
                public final static class HTLCHandlingFailed extends LDKEvent {
-                       public byte[] prev_channel_id;
+                       public long prev_channel_id;
                        public long failed_next_destination;
-                       HTLCHandlingFailed(byte[] prev_channel_id, long failed_next_destination) { this.prev_channel_id = prev_channel_id; this.failed_next_destination = failed_next_destination; }
+                       HTLCHandlingFailed(long prev_channel_id, long failed_next_destination) { this.prev_channel_id = prev_channel_id; this.failed_next_destination = failed_next_destination; }
                }
                public final static class BumpTransaction extends LDKEvent {
                        public long bump_transaction;
@@ -2694,6 +2907,10 @@ public class bindings {
        public static native long CResult_UntrustedStringDecodeErrorZ_get_ok(long owner);
        // struct LDKDecodeError CResult_UntrustedStringDecodeErrorZ_get_err(LDKCResult_UntrustedStringDecodeErrorZ *NONNULL_PTR owner);
        public static native long CResult_UntrustedStringDecodeErrorZ_get_err(long owner);
+       // struct LDKChannelId CResult_ChannelIdDecodeErrorZ_get_ok(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_ChannelIdDecodeErrorZ_get_ok(long owner);
+       // struct LDKDecodeError CResult_ChannelIdDecodeErrorZ_get_err(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_ChannelIdDecodeErrorZ_get_err(long owner);
        // struct LDKThirtyTwoBytes C2Tuple__u832u16Z_get_a(LDKC2Tuple__u832u16Z *NONNULL_PTR owner);
        public static native byte[] C2Tuple__u832u16Z_get_a(long owner);
        // uint16_t C2Tuple__u832u16Z_get_b(LDKC2Tuple__u832u16Z *NONNULL_PTR owner);
@@ -2706,6 +2923,26 @@ public class bindings {
        public static native long CResult_PaymentConstraintsDecodeErrorZ_get_ok(long owner);
        // struct LDKDecodeError CResult_PaymentConstraintsDecodeErrorZ_get_err(LDKCResult_PaymentConstraintsDecodeErrorZ *NONNULL_PTR owner);
        public static native long CResult_PaymentConstraintsDecodeErrorZ_get_err(long owner);
+       // struct LDKPaymentContext CResult_PaymentContextDecodeErrorZ_get_ok(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_PaymentContextDecodeErrorZ_get_ok(long owner);
+       // struct LDKDecodeError CResult_PaymentContextDecodeErrorZ_get_err(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_PaymentContextDecodeErrorZ_get_err(long owner);
+       // struct LDKUnknownPaymentContext CResult_UnknownPaymentContextDecodeErrorZ_get_ok(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_UnknownPaymentContextDecodeErrorZ_get_ok(long owner);
+       // struct LDKDecodeError CResult_UnknownPaymentContextDecodeErrorZ_get_err(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_UnknownPaymentContextDecodeErrorZ_get_err(long owner);
+       // struct LDKBolt12OfferContext CResult_Bolt12OfferContextDecodeErrorZ_get_ok(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_Bolt12OfferContextDecodeErrorZ_get_ok(long owner);
+       // struct LDKDecodeError CResult_Bolt12OfferContextDecodeErrorZ_get_err(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_Bolt12OfferContextDecodeErrorZ_get_err(long owner);
+       // struct LDKBolt12RefundContext CResult_Bolt12RefundContextDecodeErrorZ_get_ok(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_Bolt12RefundContextDecodeErrorZ_get_ok(long owner);
+       // struct LDKDecodeError CResult_Bolt12RefundContextDecodeErrorZ_get_err(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_Bolt12RefundContextDecodeErrorZ_get_err(long owner);
+       // struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner);
+       public static native String CResult_StrSecp256k1ErrorZ_get_ok(long owner);
+       // enum LDKSecp256k1Error CResult_StrSecp256k1ErrorZ_get_err(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner);
+       public static native Secp256k1Error CResult_StrSecp256k1ErrorZ_get_err(long owner);
        // struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner);
        public static native byte[] C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(long owner);
        // struct LDKRecipientOnionFields C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner);
@@ -2716,10 +2953,6 @@ public class bindings {
        public static native long CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(long owner);
        // void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner);
        public static native void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(long owner);
-       // struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner);
-       public static native String CResult_StrSecp256k1ErrorZ_get_ok(long owner);
-       // enum LDKSecp256k1Error CResult_StrSecp256k1ErrorZ_get_err(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner);
-       public static native Secp256k1Error CResult_StrSecp256k1ErrorZ_get_err(long owner);
        // struct LDKPublicKey C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR owner);
        public static native byte[] C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a(long owner);
        // struct LDKOnionMessage C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_b(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR owner);
@@ -2754,6 +2987,9 @@ public class bindings {
                public final static class GetNodeIdFailed extends LDKSendError {
                        GetNodeIdFailed() { }
                }
+               public final static class UnresolvedIntroductionNode extends LDKSendError {
+                       UnresolvedIntroductionNode() { }
+               }
                public final static class BlindedPathAdvanceFailed extends LDKSendError {
                        BlindedPathAdvanceFailed() { }
                }
@@ -2765,6 +3001,20 @@ public class bindings {
        public static native long CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_get_ok(long owner);
        // struct LDKSendError CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_get_err(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR owner);
        public static native long CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_get_err(long owner);
+       public static class LDKNextMessageHop {
+               private LDKNextMessageHop() {}
+               public final static class NodeId extends LDKNextMessageHop {
+                       public byte[] node_id;
+                       NodeId(byte[] node_id) { this.node_id = node_id; }
+               }
+               public final static class ShortChannelId extends LDKNextMessageHop {
+                       public long short_channel_id;
+                       ShortChannelId(long short_channel_id) { this.short_channel_id = short_channel_id; }
+               }
+               static native void init();
+       }
+       static { LDKNextMessageHop.init(); }
+       public static native LDKNextMessageHop LDKNextMessageHop_ref_from_ptr(long ptr);
        public static class LDKParsedOnionMessageContents {
                private LDKParsedOnionMessageContents() {}
                public final static class Offers extends LDKParsedOnionMessageContents {
@@ -2782,9 +3032,9 @@ public class bindings {
        public static class LDKPeeledOnion {
                private LDKPeeledOnion() {}
                public final static class Forward extends LDKPeeledOnion {
-                       public byte[] _0;
+                       public long _0;
                        public long _1;
-                       Forward(byte[] _0, long _1) { this._0 = _0; this._1 = _1; }
+                       Forward(long _0, long _1) { this._0 = _0; this._1 = _1; }
                }
                public final static class Receive extends LDKPeeledOnion {
                        public long _0;
@@ -2837,30 +3087,38 @@ public class bindings {
        public static native long CResult_InvoiceErrorDecodeErrorZ_get_ok(long owner);
        // struct LDKDecodeError CResult_InvoiceErrorDecodeErrorZ_get_err(LDKCResult_InvoiceErrorDecodeErrorZ *NONNULL_PTR owner);
        public static native long CResult_InvoiceErrorDecodeErrorZ_get_err(long owner);
-       // struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner);
-       public static native long CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(long owner);
-       // struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner);
-       public static native long CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(long owner);
-       // struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner);
-       public static native long CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(long owner);
-       // struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner);
-       public static native long CResult_DelayedPaymentKeyDecodeErrorZ_get_err(long owner);
-       // struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner);
-       public static native long CResult_HtlcBasepointDecodeErrorZ_get_ok(long owner);
-       // struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner);
-       public static native long CResult_HtlcBasepointDecodeErrorZ_get_err(long owner);
-       // struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner);
-       public static native long CResult_HtlcKeyDecodeErrorZ_get_ok(long owner);
-       // struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner);
-       public static native long CResult_HtlcKeyDecodeErrorZ_get_err(long owner);
-       // struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner);
-       public static native long CResult_RevocationBasepointDecodeErrorZ_get_ok(long owner);
-       // struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner);
-       public static native long CResult_RevocationBasepointDecodeErrorZ_get_err(long owner);
-       // struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner);
-       public static native long CResult_RevocationKeyDecodeErrorZ_get_ok(long owner);
-       // struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner);
-       public static native long CResult_RevocationKeyDecodeErrorZ_get_err(long owner);
+       // struct LDKTrackedSpendableOutput CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(long owner);
+       // struct LDKDecodeError CResult_TrackedSpendableOutputDecodeErrorZ_get_err(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_TrackedSpendableOutputDecodeErrorZ_get_err(long owner);
+       public static class LDKOutputSpendStatus {
+               private LDKOutputSpendStatus() {}
+               public final static class PendingInitialBroadcast extends LDKOutputSpendStatus {
+                       public long delayed_until_height;
+                       PendingInitialBroadcast(long delayed_until_height) { this.delayed_until_height = delayed_until_height; }
+               }
+               public final static class PendingFirstConfirmation extends LDKOutputSpendStatus {
+                       public byte[] first_broadcast_hash;
+                       public int latest_broadcast_height;
+                       public byte[] latest_spending_tx;
+                       PendingFirstConfirmation(byte[] first_broadcast_hash, int latest_broadcast_height, byte[] latest_spending_tx) { this.first_broadcast_hash = first_broadcast_hash; this.latest_broadcast_height = latest_broadcast_height; this.latest_spending_tx = latest_spending_tx; }
+               }
+               public final static class PendingThresholdConfirmations extends LDKOutputSpendStatus {
+                       public byte[] first_broadcast_hash;
+                       public int latest_broadcast_height;
+                       public byte[] latest_spending_tx;
+                       public int confirmation_height;
+                       public byte[] confirmation_hash;
+                       PendingThresholdConfirmations(byte[] first_broadcast_hash, int latest_broadcast_height, byte[] latest_spending_tx, int confirmation_height, byte[] confirmation_hash) { this.first_broadcast_hash = first_broadcast_hash; this.latest_broadcast_height = latest_broadcast_height; this.latest_spending_tx = latest_spending_tx; this.confirmation_height = confirmation_height; this.confirmation_hash = confirmation_hash; }
+               }
+               static native void init();
+       }
+       static { LDKOutputSpendStatus.init(); }
+       public static native LDKOutputSpendStatus LDKOutputSpendStatus_ref_from_ptr(long ptr);
+       // struct LDKOutputSpendStatus CResult_OutputSpendStatusDecodeErrorZ_get_ok(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_OutputSpendStatusDecodeErrorZ_get_ok(long owner);
+       // struct LDKDecodeError CResult_OutputSpendStatusDecodeErrorZ_get_err(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_OutputSpendStatusDecodeErrorZ_get_err(long owner);
        public interface LDKFilter {
                 void register_tx(byte[] txid, byte[] script_pubkey);
                 void register_output(long output);
@@ -2883,14 +3141,12 @@ public class bindings {
        }
        static { LDKCOption_FilterZ.init(); }
        public static native LDKCOption_FilterZ LDKCOption_FilterZ_ref_from_ptr(long ptr);
-       // struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner);
-       public static native long CResult_LockedChannelMonitorNoneZ_get_ok(long owner);
-       // void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner);
-       public static native void CResult_LockedChannelMonitorNoneZ_get_err(long owner);
-       // struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner);
-       public static native long C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(long owner);
-       // struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner);
-       public static native long[] C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(long owner);
+       public interface LDKChangeDestinationSource {
+                long get_change_destination_script();
+       }
+       public static native long LDKChangeDestinationSource_new(LDKChangeDestinationSource impl);
+       // LDKCResult_CVec_u8ZNoneZ ChangeDestinationSource_get_change_destination_script LDKChangeDestinationSource *NONNULL_PTR this_arg
+       public static native long ChangeDestinationSource_get_change_destination_script(long this_arg);
        public interface LDKKVStore {
                 long read(String primary_namespace, String secondary_namespace, String key);
                 long write(String primary_namespace, String secondary_namespace, String key, byte[] buf);
@@ -2906,6 +3162,60 @@ public class bindings {
        public static native long KVStore_remove(long this_arg, String primary_namespace, String secondary_namespace, String key, boolean lazy);
        // LDKCResult_CVec_StrZIOErrorZ KVStore_list LDKKVStore *NONNULL_PTR this_arg, struct LDKStr primary_namespace, struct LDKStr secondary_namespace
        public static native long KVStore_list(long this_arg, String primary_namespace, String secondary_namespace);
+       public interface LDKOutputSpender {
+                long spend_spendable_outputs(long[] descriptors, long[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, long locktime);
+       }
+       public static native long LDKOutputSpender_new(LDKOutputSpender impl);
+       // LDKCResult_TransactionNoneZ OutputSpender_spend_spendable_outputs LDKOutputSpender *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, struct LDKCOption_u32Z locktime
+       public static native long OutputSpender_spend_spendable_outputs(long this_arg, long[] descriptors, long[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, long locktime);
+       // struct LDKOutputSweeper CResult_OutputSweeperDecodeErrorZ_get_ok(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_OutputSweeperDecodeErrorZ_get_ok(long owner);
+       // struct LDKDecodeError CResult_OutputSweeperDecodeErrorZ_get_err(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_OutputSweeperDecodeErrorZ_get_err(long owner);
+       // struct LDKBestBlock C2Tuple_BestBlockOutputSweeperZ_get_a(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner);
+       public static native long C2Tuple_BestBlockOutputSweeperZ_get_a(long owner);
+       // struct LDKOutputSweeper C2Tuple_BestBlockOutputSweeperZ_get_b(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner);
+       public static native long C2Tuple_BestBlockOutputSweeperZ_get_b(long owner);
+       // struct LDKC2Tuple_BestBlockOutputSweeperZ *CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(long owner);
+       // struct LDKDecodeError CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(long owner);
+       // struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(long owner);
+       // struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(long owner);
+       // struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(long owner);
+       // struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_DelayedPaymentKeyDecodeErrorZ_get_err(long owner);
+       // struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_HtlcBasepointDecodeErrorZ_get_ok(long owner);
+       // struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_HtlcBasepointDecodeErrorZ_get_err(long owner);
+       // struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_HtlcKeyDecodeErrorZ_get_ok(long owner);
+       // struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_HtlcKeyDecodeErrorZ_get_err(long owner);
+       // struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_RevocationBasepointDecodeErrorZ_get_ok(long owner);
+       // struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_RevocationBasepointDecodeErrorZ_get_err(long owner);
+       // struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_RevocationKeyDecodeErrorZ_get_ok(long owner);
+       // struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner);
+       public static native long CResult_RevocationKeyDecodeErrorZ_get_err(long owner);
+       // struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner);
+       public static native long CResult_LockedChannelMonitorNoneZ_get_ok(long owner);
+       // void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner);
+       public static native void CResult_LockedChannelMonitorNoneZ_get_err(long owner);
+       // struct LDKOutPoint C2Tuple_OutPointChannelIdZ_get_a(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner);
+       public static native long C2Tuple_OutPointChannelIdZ_get_a(long owner);
+       // struct LDKChannelId C2Tuple_OutPointChannelIdZ_get_b(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner);
+       public static native long C2Tuple_OutPointChannelIdZ_get_b(long owner);
+       // struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner);
+       public static native long C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(long owner);
+       // struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner);
+       public static native long[] C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(long owner);
        public interface LDKPersister {
                 long persist_manager(long channel_manager);
                 long persist_graph(long network_graph);
@@ -2919,20 +3229,17 @@ public class bindings {
        // LDKCResult_NoneIOErrorZ Persister_persist_scorer LDKPersister *NONNULL_PTR this_arg, const struct LDKWriteableScore *NONNULL_PTR scorer
        public static native long Persister_persist_scorer(long this_arg, long scorer);
        public interface LDKPersist {
-                ChannelMonitorUpdateStatus persist_new_channel(long channel_id, long data, long update_id);
-                ChannelMonitorUpdateStatus update_persisted_channel(long channel_id, long update, long data, long update_id);
+                ChannelMonitorUpdateStatus persist_new_channel(long channel_funding_outpoint, long data, long update_id);
+                ChannelMonitorUpdateStatus update_persisted_channel(long channel_funding_outpoint, long update, long data, long update_id);
+                void archive_persisted_channel(long channel_funding_outpoint);
        }
        public static native long LDKPersist_new(LDKPersist impl);
-       // LDKChannelMonitorUpdateStatus Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
-       public static native ChannelMonitorUpdateStatus Persist_persist_new_channel(long this_arg, long channel_id, long data, long update_id);
-       // LDKChannelMonitorUpdateStatus Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, struct LDKChannelMonitorUpdate update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
-       public static native ChannelMonitorUpdateStatus Persist_update_persisted_channel(long this_arg, long channel_id, long update, long data, long update_id);
-       public interface LDKFutureCallback {
-                void call();
-       }
-       public static native long LDKFutureCallback_new(LDKFutureCallback impl);
-       // void FutureCallback_call LDKFutureCallback *NONNULL_PTR this_arg
-       public static native void FutureCallback_call(long this_arg);
+       // LDKChannelMonitorUpdateStatus Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_funding_outpoint, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
+       public static native ChannelMonitorUpdateStatus Persist_persist_new_channel(long this_arg, long channel_funding_outpoint, long data, long update_id);
+       // LDKChannelMonitorUpdateStatus Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_funding_outpoint, struct LDKChannelMonitorUpdate update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
+       public static native ChannelMonitorUpdateStatus Persist_update_persisted_channel(long this_arg, long channel_funding_outpoint, long update, long data, long update_id);
+       // void Persist_archive_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_funding_outpoint
+       public static native void Persist_archive_persisted_channel(long this_arg, long channel_funding_outpoint);
        public interface LDKListen {
                 void filtered_block_connected(byte[] header, long[] txdata, int height);
                 void block_connected(byte[] block, int height);
@@ -2960,6 +3267,26 @@ public class bindings {
        public static native void Confirm_best_block_updated(long this_arg, byte[] header, int height);
        // LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
        public static native long[] Confirm_get_relevant_txids(long this_arg);
+       public static class LDKSpendingDelay {
+               private LDKSpendingDelay() {}
+               public final static class Relative extends LDKSpendingDelay {
+                       public int num_blocks;
+                       Relative(int num_blocks) { this.num_blocks = num_blocks; }
+               }
+               public final static class Absolute extends LDKSpendingDelay {
+                       public int height;
+                       Absolute(int height) { this.height = height; }
+               }
+               static native void init();
+       }
+       static { LDKSpendingDelay.init(); }
+       public static native LDKSpendingDelay LDKSpendingDelay_ref_from_ptr(long ptr);
+       public interface LDKFutureCallback {
+                void call();
+       }
+       public static native long LDKFutureCallback_new(LDKFutureCallback impl);
+       // void FutureCallback_call LDKFutureCallback *NONNULL_PTR this_arg
+       public static native void FutureCallback_call(long this_arg);
        public interface LDKEventHandler {
                 void handle_event(long event);
        }
@@ -3008,9 +3335,6 @@ public class bindings {
                 void handle_shutdown(byte[] their_node_id, long msg);
                 void handle_closing_signed(byte[] their_node_id, long msg);
                 void handle_stfu(byte[] their_node_id, long msg);
-                void handle_splice(byte[] their_node_id, long msg);
-                void handle_splice_ack(byte[] their_node_id, long msg);
-                void handle_splice_locked(byte[] their_node_id, long msg);
                 void handle_tx_add_input(byte[] their_node_id, long msg);
                 void handle_tx_add_output(byte[] their_node_id, long msg);
                 void handle_tx_remove_input(byte[] their_node_id, long msg);
@@ -3059,12 +3383,6 @@ public class bindings {
        public static native void ChannelMessageHandler_handle_closing_signed(long this_arg, byte[] their_node_id, long msg);
        // void ChannelMessageHandler_handle_stfu LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKStfu *NONNULL_PTR msg
        public static native void ChannelMessageHandler_handle_stfu(long this_arg, byte[] their_node_id, long msg);
-       // void ChannelMessageHandler_handle_splice LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKSplice *NONNULL_PTR msg
-       public static native void ChannelMessageHandler_handle_splice(long this_arg, byte[] their_node_id, long msg);
-       // void ChannelMessageHandler_handle_splice_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKSpliceAck *NONNULL_PTR msg
-       public static native void ChannelMessageHandler_handle_splice_ack(long this_arg, byte[] their_node_id, long msg);
-       // void ChannelMessageHandler_handle_splice_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKSpliceLocked *NONNULL_PTR msg
-       public static native void ChannelMessageHandler_handle_splice_locked(long this_arg, byte[] their_node_id, long msg);
        // void ChannelMessageHandler_handle_tx_add_input LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKTxAddInput *NONNULL_PTR msg
        public static native void ChannelMessageHandler_handle_tx_add_input(long this_arg, byte[] their_node_id, long msg);
        // void ChannelMessageHandler_handle_tx_add_output LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKTxAddOutput *NONNULL_PTR msg
@@ -3124,6 +3442,12 @@ public class bindings {
        public static native long OffersMessageHandler_handle_message(long this_arg, long message);
        // LDKCVec_C3Tuple_OffersMessageDestinationBlindedPathZZ OffersMessageHandler_release_pending_messages LDKOffersMessageHandler *NONNULL_PTR this_arg
        public static native long[] OffersMessageHandler_release_pending_messages(long this_arg);
+       public interface LDKNodeIdLookUp {
+                byte[] next_node_id(long short_channel_id);
+       }
+       public static native long LDKNodeIdLookUp_new(LDKNodeIdLookUp impl);
+       // LDKPublicKey NodeIdLookUp_next_node_id LDKNodeIdLookUp *NONNULL_PTR this_arg, uint64_t short_channel_id
+       public static native byte[] NodeIdLookUp_next_node_id(long this_arg, long short_channel_id);
        public interface LDKRoutingMessageHandler {
                 long handle_node_announcement(long msg);
                 long handle_channel_announcement(long msg);
@@ -3241,6 +3565,31 @@ public class bindings {
        public static native void SocketDescriptor_disconnect_socket(long this_arg);
        // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
        public static native long SocketDescriptor_hash(long this_arg);
+       public interface LDKSignBolt12InvoiceFn {
+                long sign_invoice(long message);
+       }
+       public static native long LDKSignBolt12InvoiceFn_new(LDKSignBolt12InvoiceFn impl);
+       // LDKCResult_SchnorrSignatureNoneZ SignBolt12InvoiceFn_sign_invoice LDKSignBolt12InvoiceFn *NONNULL_PTR this_arg, const struct LDKUnsignedBolt12Invoice *NONNULL_PTR message
+       public static native long SignBolt12InvoiceFn_sign_invoice(long this_arg, long message);
+       public interface LDKSignInvoiceRequestFn {
+                long sign_invoice_request(long message);
+       }
+       public static native long LDKSignInvoiceRequestFn_new(LDKSignInvoiceRequestFn impl);
+       // LDKCResult_SchnorrSignatureNoneZ SignInvoiceRequestFn_sign_invoice_request LDKSignInvoiceRequestFn *NONNULL_PTR this_arg, const struct LDKUnsignedInvoiceRequest *NONNULL_PTR message
+       public static native long SignInvoiceRequestFn_sign_invoice_request(long this_arg, long message);
+       public static class LDKSignError {
+               private LDKSignError() {}
+               public final static class Signing extends LDKSignError {
+                       Signing() { }
+               }
+               public final static class Verification extends LDKSignError {
+                       public org.ldk.enums.Secp256k1Error verification;
+                       Verification(org.ldk.enums.Secp256k1Error verification) { this.verification = verification; }
+               }
+               static native void init();
+       }
+       static { LDKSignError.init(); }
+       public static native LDKSignError LDKSignError_ref_from_ptr(long ptr);
        public static class LDKEffectiveCapacity {
                private LDKEffectiveCapacity() {}
                public final static class ExactLiquidity extends LDKEffectiveCapacity {
@@ -3296,6 +3645,21 @@ public class bindings {
        public static native long LDKScore_get_ScoreUpdate(long arg);
        // LDKCVec_u8Z Score_write LDKScore *NONNULL_PTR this_arg
        public static native byte[] Score_write(long this_arg);
+       public static class LDKIntroductionNode {
+               private LDKIntroductionNode() {}
+               public final static class NodeId extends LDKIntroductionNode {
+                       public byte[] node_id;
+                       NodeId(byte[] node_id) { this.node_id = node_id; }
+               }
+               public final static class DirectedShortChannelId extends LDKIntroductionNode {
+                       public org.ldk.enums.Direction _0;
+                       public long _1;
+                       DirectedShortChannelId(org.ldk.enums.Direction _0, long _1) { this._0 = _0; this._1 = _1; }
+               }
+               static native void init();
+       }
+       static { LDKIntroductionNode.init(); }
+       public static native LDKIntroductionNode LDKIntroductionNode_ref_from_ptr(long ptr);
        public interface LDKCoinSelectionSource {
                 long select_confirmed_utxos(byte[] claim_id, long[] must_spend, long[] must_pay_to, int target_feerate_sat_per_1000_weight);
                 long sign_psbt(byte[] psbt);
@@ -3375,6 +3739,10 @@ public class bindings {
        public static native void WitnessProgram_free(long o);
        // struct LDKBigEndianScalar BigEndianScalar_new(struct LDKThirtyTwoBytes big_endian_bytes);
        public static native long BigEndianScalar_new(byte[] big_endian_bytes);
+       // uint64_t BigEndianScalar_clone_ptr(LDKBigEndianScalar *NONNULL_PTR arg);
+       public static native long BigEndianScalar_clone_ptr(long arg);
+       // struct LDKBigEndianScalar BigEndianScalar_clone(const struct LDKBigEndianScalar *NONNULL_PTR orig);
+       public static native long BigEndianScalar_clone(long orig);
        // uint64_t Bech32Error_clone_ptr(LDKBech32Error *NONNULL_PTR arg);
        public static native long Bech32Error_clone_ptr(long arg);
        // struct LDKBech32Error Bech32Error_clone(const struct LDKBech32Error *NONNULL_PTR orig);
@@ -3413,6 +3781,32 @@ public class bindings {
        public static native long TxOut_clone(long orig);
        // void Str_free(struct LDKStr _res);
        public static native void Str_free(String _res);
+       // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
+       public static native void CVec_u8Z_free(byte[] _res);
+       // struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(struct LDKRefundMaybeWithDerivedMetadataBuilder o);
+       public static native long CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(long o);
+       // struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+       public static native long CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+       // bool CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(long o);
+       // void CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ _res);
+       public static native void CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(long _res);
+       // uint64_t CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg);
+       public static native long CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(const struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR orig);
+       public static native long CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(long orig);
+       // struct LDKCResult_RefundBolt12SemanticErrorZ CResult_RefundBolt12SemanticErrorZ_ok(struct LDKRefund o);
+       public static native long CResult_RefundBolt12SemanticErrorZ_ok(long o);
+       // struct LDKCResult_RefundBolt12SemanticErrorZ CResult_RefundBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+       public static native long CResult_RefundBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+       // bool CResult_RefundBolt12SemanticErrorZ_is_ok(const struct LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_RefundBolt12SemanticErrorZ_is_ok(long o);
+       // void CResult_RefundBolt12SemanticErrorZ_free(struct LDKCResult_RefundBolt12SemanticErrorZ _res);
+       public static native void CResult_RefundBolt12SemanticErrorZ_free(long _res);
+       // uint64_t CResult_RefundBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR arg);
+       public static native long CResult_RefundBolt12SemanticErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_RefundBolt12SemanticErrorZ CResult_RefundBolt12SemanticErrorZ_clone(const struct LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR orig);
+       public static native long CResult_RefundBolt12SemanticErrorZ_clone(long orig);
        // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
        public static native long COption_u64Z_some(long o);
        // struct LDKCOption_u64Z COption_u64Z_none(void);
@@ -3475,8 +3869,6 @@ public class bindings {
        public static native long COption_ThirtyTwoBytesZ_clone_ptr(long arg);
        // struct LDKCOption_ThirtyTwoBytesZ COption_ThirtyTwoBytesZ_clone(const struct LDKCOption_ThirtyTwoBytesZ *NONNULL_PTR orig);
        public static native long COption_ThirtyTwoBytesZ_clone(long orig);
-       // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
-       public static native void CVec_u8Z_free(byte[] _res);
        // struct LDKCOption_CVec_u8ZZ COption_CVec_u8ZZ_some(struct LDKCVec_u8Z o);
        public static native long COption_CVec_u8ZZ_some(byte[] o);
        // struct LDKCOption_CVec_u8ZZ COption_CVec_u8ZZ_none(void);
@@ -3521,6 +3913,42 @@ public class bindings {
        public static native long CResult_RecipientOnionFieldsNoneZ_clone_ptr(long arg);
        // struct LDKCResult_RecipientOnionFieldsNoneZ CResult_RecipientOnionFieldsNoneZ_clone(const struct LDKCResult_RecipientOnionFieldsNoneZ *NONNULL_PTR orig);
        public static native long CResult_RecipientOnionFieldsNoneZ_clone(long orig);
+       // struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(struct LDKUnsignedBolt12Invoice o);
+       public static native long CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(long o);
+       // struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+       public static native long CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+       // bool CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(const struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(long o);
+       // void CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ _res);
+       public static native void CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(long _res);
+       // uint64_t CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg);
+       public static native long CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(const struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR orig);
+       public static native long CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(long orig);
+       // struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(struct LDKBolt12Invoice o);
+       public static native long CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(long o);
+       // struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+       public static native long CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+       // bool CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(const struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(long o);
+       // void CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ _res);
+       public static native void CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(long _res);
+       // uint64_t CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg);
+       public static native long CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(const struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR orig);
+       public static native long CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(long orig);
+       // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_ok(struct LDKSchnorrSignature o);
+       public static native long CResult_SchnorrSignatureNoneZ_ok(byte[] o);
+       // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_err(void);
+       public static native long CResult_SchnorrSignatureNoneZ_err();
+       // bool CResult_SchnorrSignatureNoneZ_is_ok(const struct LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR o);
+       public static native boolean CResult_SchnorrSignatureNoneZ_is_ok(long o);
+       // void CResult_SchnorrSignatureNoneZ_free(struct LDKCResult_SchnorrSignatureNoneZ _res);
+       public static native void CResult_SchnorrSignatureNoneZ_free(long _res);
+       // uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg);
+       public static native long CResult_SchnorrSignatureNoneZ_clone_ptr(long arg);
+       // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_clone(const struct LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR orig);
+       public static native long CResult_SchnorrSignatureNoneZ_clone(long orig);
        // void CVec_ThirtyTwoBytesZ_free(struct LDKCVec_ThirtyTwoBytesZ _res);
        public static native void CVec_ThirtyTwoBytesZ_free(byte[][] _res);
        // struct LDKCOption_CVec_ThirtyTwoBytesZZ COption_CVec_ThirtyTwoBytesZZ_some(struct LDKCVec_ThirtyTwoBytesZ o);
@@ -3533,6 +3961,26 @@ public class bindings {
        public static native long COption_CVec_ThirtyTwoBytesZZ_clone_ptr(long arg);
        // struct LDKCOption_CVec_ThirtyTwoBytesZZ COption_CVec_ThirtyTwoBytesZZ_clone(const struct LDKCOption_CVec_ThirtyTwoBytesZZ *NONNULL_PTR orig);
        public static native long COption_CVec_ThirtyTwoBytesZZ_clone(long orig);
+       // struct LDKCOption_AmountZ COption_AmountZ_some(struct LDKAmount o);
+       public static native long COption_AmountZ_some(long o);
+       // struct LDKCOption_AmountZ COption_AmountZ_none(void);
+       public static native long COption_AmountZ_none();
+       // void COption_AmountZ_free(struct LDKCOption_AmountZ _res);
+       public static native void COption_AmountZ_free(long _res);
+       // uint64_t COption_AmountZ_clone_ptr(LDKCOption_AmountZ *NONNULL_PTR arg);
+       public static native long COption_AmountZ_clone_ptr(long arg);
+       // struct LDKCOption_AmountZ COption_AmountZ_clone(const struct LDKCOption_AmountZ *NONNULL_PTR orig);
+       public static native long COption_AmountZ_clone(long orig);
+       // struct LDKCOption_QuantityZ COption_QuantityZ_some(struct LDKQuantity o);
+       public static native long COption_QuantityZ_some(long o);
+       // struct LDKCOption_QuantityZ COption_QuantityZ_none(void);
+       public static native long COption_QuantityZ_none();
+       // void COption_QuantityZ_free(struct LDKCOption_QuantityZ _res);
+       public static native void COption_QuantityZ_free(long _res);
+       // uint64_t COption_QuantityZ_clone_ptr(LDKCOption_QuantityZ *NONNULL_PTR arg);
+       public static native long COption_QuantityZ_clone_ptr(long arg);
+       // struct LDKCOption_QuantityZ COption_QuantityZ_clone(const struct LDKCOption_QuantityZ *NONNULL_PTR orig);
+       public static native long COption_QuantityZ_clone(long orig);
        // struct LDKCResult_ThirtyTwoBytesNoneZ CResult_ThirtyTwoBytesNoneZ_ok(struct LDKThirtyTwoBytes o);
        public static native long CResult_ThirtyTwoBytesNoneZ_ok(byte[] o);
        // struct LDKCResult_ThirtyTwoBytesNoneZ CResult_ThirtyTwoBytesNoneZ_err(void);
@@ -3699,18 +4147,6 @@ public class bindings {
        public static native long CResult_RecoverableSignatureNoneZ_clone_ptr(long arg);
        // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig);
        public static native long CResult_RecoverableSignatureNoneZ_clone(long orig);
-       // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_ok(struct LDKSchnorrSignature o);
-       public static native long CResult_SchnorrSignatureNoneZ_ok(byte[] o);
-       // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_err(void);
-       public static native long CResult_SchnorrSignatureNoneZ_err();
-       // bool CResult_SchnorrSignatureNoneZ_is_ok(const struct LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR o);
-       public static native boolean CResult_SchnorrSignatureNoneZ_is_ok(long o);
-       // void CResult_SchnorrSignatureNoneZ_free(struct LDKCResult_SchnorrSignatureNoneZ _res);
-       public static native void CResult_SchnorrSignatureNoneZ_free(long _res);
-       // uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg);
-       public static native long CResult_SchnorrSignatureNoneZ_clone_ptr(long arg);
-       // struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_clone(const struct LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR orig);
-       public static native long CResult_SchnorrSignatureNoneZ_clone(long orig);
        // struct LDKCResult_ECDSASignatureNoneZ CResult_ECDSASignatureNoneZ_ok(struct LDKECDSASignature o);
        public static native long CResult_ECDSASignatureNoneZ_ok(byte[] o);
        // struct LDKCResult_ECDSASignatureNoneZ CResult_ECDSASignatureNoneZ_err(void);
@@ -3723,6 +4159,18 @@ public class bindings {
        public static native long CResult_ECDSASignatureNoneZ_clone_ptr(long arg);
        // struct LDKCResult_ECDSASignatureNoneZ CResult_ECDSASignatureNoneZ_clone(const struct LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR orig);
        public static native long CResult_ECDSASignatureNoneZ_clone(long orig);
+       // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
+       public static native long CResult_TransactionNoneZ_ok(byte[] o);
+       // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
+       public static native long CResult_TransactionNoneZ_err();
+       // bool CResult_TransactionNoneZ_is_ok(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR o);
+       public static native boolean CResult_TransactionNoneZ_is_ok(long o);
+       // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
+       public static native void CResult_TransactionNoneZ_free(long _res);
+       // uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg);
+       public static native long CResult_TransactionNoneZ_clone_ptr(long arg);
+       // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
+       public static native long CResult_TransactionNoneZ_clone(long orig);
        // struct LDKCResult_WriteableEcdsaChannelSignerDecodeErrorZ CResult_WriteableEcdsaChannelSignerDecodeErrorZ_ok(struct LDKWriteableEcdsaChannelSigner o);
        public static native long CResult_WriteableEcdsaChannelSignerDecodeErrorZ_ok(long o);
        // struct LDKCResult_WriteableEcdsaChannelSignerDecodeErrorZ CResult_WriteableEcdsaChannelSignerDecodeErrorZ_err(struct LDKDecodeError e);
@@ -3825,18 +4273,6 @@ public class bindings {
        public static native long CResult_InMemorySignerDecodeErrorZ_clone_ptr(long arg);
        // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
        public static native long CResult_InMemorySignerDecodeErrorZ_clone(long orig);
-       // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
-       public static native long CResult_TransactionNoneZ_ok(byte[] o);
-       // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
-       public static native long CResult_TransactionNoneZ_err();
-       // bool CResult_TransactionNoneZ_is_ok(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR o);
-       public static native boolean CResult_TransactionNoneZ_is_ok(long o);
-       // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
-       public static native void CResult_TransactionNoneZ_free(long _res);
-       // uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg);
-       public static native long CResult_TransactionNoneZ_clone_ptr(long arg);
-       // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
-       public static native long CResult_TransactionNoneZ_clone(long orig);
        // struct LDKCOption_WriteableScoreZ COption_WriteableScoreZ_some(struct LDKWriteableScore o);
        public static native long COption_WriteableScoreZ_some(long o);
        // struct LDKCOption_WriteableScoreZ COption_WriteableScoreZ_none(void);
@@ -4089,6 +4525,18 @@ public class bindings {
        public static native boolean CResult_ProbabilisticScorerDecodeErrorZ_is_ok(long o);
        // void CResult_ProbabilisticScorerDecodeErrorZ_free(struct LDKCResult_ProbabilisticScorerDecodeErrorZ _res);
        public static native void CResult_ProbabilisticScorerDecodeErrorZ_free(long _res);
+       // struct LDKCResult_BestBlockDecodeErrorZ CResult_BestBlockDecodeErrorZ_ok(struct LDKBestBlock o);
+       public static native long CResult_BestBlockDecodeErrorZ_ok(long o);
+       // struct LDKCResult_BestBlockDecodeErrorZ CResult_BestBlockDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_BestBlockDecodeErrorZ_err(long e);
+       // bool CResult_BestBlockDecodeErrorZ_is_ok(const struct LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_BestBlockDecodeErrorZ_is_ok(long o);
+       // void CResult_BestBlockDecodeErrorZ_free(struct LDKCResult_BestBlockDecodeErrorZ _res);
+       public static native void CResult_BestBlockDecodeErrorZ_free(long _res);
+       // uint64_t CResult_BestBlockDecodeErrorZ_clone_ptr(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR arg);
+       public static native long CResult_BestBlockDecodeErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_BestBlockDecodeErrorZ CResult_BestBlockDecodeErrorZ_clone(const struct LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_BestBlockDecodeErrorZ_clone(long orig);
        // uint64_t C2Tuple_usizeTransactionZ_clone_ptr(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR arg);
        public static native long C2Tuple_usizeTransactionZ_clone_ptr(long arg);
        // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig);
@@ -4123,16 +4571,16 @@ public class bindings {
        public static native long CResult_ChannelMonitorUpdateStatusNoneZ_clone(long orig);
        // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
        public static native void CVec_MonitorEventZ_free(long[] _res);
-       // uint64_t C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg);
-       public static native long C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(long arg);
-       // struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(const struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR orig);
-       public static native long C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(long orig);
-       // struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(struct LDKOutPoint a, struct LDKCVec_MonitorEventZ b, struct LDKPublicKey c);
-       public static native long C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(long a, long[] b, byte[] c);
-       // void C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res);
-       public static native void C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(long _res);
-       // void CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(struct LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ _res);
-       public static native void CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(long[] _res);
+       // uint64_t C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg);
+       public static native long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(long arg);
+       // struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(const struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR orig);
+       public static native long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(long orig);
+       // struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(struct LDKOutPoint a, struct LDKChannelId b, struct LDKCVec_MonitorEventZ c, struct LDKPublicKey d);
+       public static native long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(long a, long b, long[] c, byte[] d);
+       // void C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res);
+       public static native void C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(long _res);
+       // void CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(struct LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ _res);
+       public static native void CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(long[] _res);
        // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
        public static native long CResult_InitFeaturesDecodeErrorZ_ok(long o);
        // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
@@ -4217,6 +4665,58 @@ public class bindings {
        public static native long CResult_ChannelTypeFeaturesDecodeErrorZ_clone_ptr(long arg);
        // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_clone(const struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR orig);
        public static native long CResult_ChannelTypeFeaturesDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_OfferIdDecodeErrorZ CResult_OfferIdDecodeErrorZ_ok(struct LDKOfferId o);
+       public static native long CResult_OfferIdDecodeErrorZ_ok(long o);
+       // struct LDKCResult_OfferIdDecodeErrorZ CResult_OfferIdDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_OfferIdDecodeErrorZ_err(long e);
+       // bool CResult_OfferIdDecodeErrorZ_is_ok(const struct LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_OfferIdDecodeErrorZ_is_ok(long o);
+       // void CResult_OfferIdDecodeErrorZ_free(struct LDKCResult_OfferIdDecodeErrorZ _res);
+       public static native void CResult_OfferIdDecodeErrorZ_free(long _res);
+       // uint64_t CResult_OfferIdDecodeErrorZ_clone_ptr(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR arg);
+       public static native long CResult_OfferIdDecodeErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_OfferIdDecodeErrorZ CResult_OfferIdDecodeErrorZ_clone(const struct LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_OfferIdDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_ok(void);
+       public static native long CResult_NoneBolt12SemanticErrorZ_ok();
+       // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+       public static native long CResult_NoneBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+       // bool CResult_NoneBolt12SemanticErrorZ_is_ok(const struct LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_NoneBolt12SemanticErrorZ_is_ok(long o);
+       // void CResult_NoneBolt12SemanticErrorZ_free(struct LDKCResult_NoneBolt12SemanticErrorZ _res);
+       public static native void CResult_NoneBolt12SemanticErrorZ_free(long _res);
+       // uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg);
+       public static native long CResult_NoneBolt12SemanticErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_clone(const struct LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR orig);
+       public static native long CResult_NoneBolt12SemanticErrorZ_clone(long orig);
+       // struct LDKCResult_OfferBolt12SemanticErrorZ CResult_OfferBolt12SemanticErrorZ_ok(struct LDKOffer o);
+       public static native long CResult_OfferBolt12SemanticErrorZ_ok(long o);
+       // struct LDKCResult_OfferBolt12SemanticErrorZ CResult_OfferBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+       public static native long CResult_OfferBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+       // bool CResult_OfferBolt12SemanticErrorZ_is_ok(const struct LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_OfferBolt12SemanticErrorZ_is_ok(long o);
+       // void CResult_OfferBolt12SemanticErrorZ_free(struct LDKCResult_OfferBolt12SemanticErrorZ _res);
+       public static native void CResult_OfferBolt12SemanticErrorZ_free(long _res);
+       // uint64_t CResult_OfferBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR arg);
+       public static native long CResult_OfferBolt12SemanticErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_OfferBolt12SemanticErrorZ CResult_OfferBolt12SemanticErrorZ_clone(const struct LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR orig);
+       public static native long CResult_OfferBolt12SemanticErrorZ_clone(long orig);
+       // struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceRequestWithDerivedPayerIdBuilder o);
+       public static native long CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(long o);
+       // struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+       public static native long CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+       // bool CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(long o);
+       // void CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ _res);
+       public static native void CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(long _res);
+       // struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceRequestWithExplicitPayerIdBuilder o);
+       public static native long CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(long o);
+       // struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+       public static native long CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+       // bool CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(long o);
+       // void CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ _res);
+       public static native void CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(long _res);
        // struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_ok(struct LDKOffer o);
        public static native long CResult_OfferBolt12ParseErrorZ_ok(long o);
        // struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_err(struct LDKBolt12ParseError e);
@@ -4229,18 +4729,6 @@ public class bindings {
        public static native long CResult_OfferBolt12ParseErrorZ_clone_ptr(long arg);
        // struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_clone(const struct LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR orig);
        public static native long CResult_OfferBolt12ParseErrorZ_clone(long orig);
-       // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_ok(struct LDKPublicKey o);
-       public static native long CResult_PublicKeySecp256k1ErrorZ_ok(byte[] o);
-       // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_err(enum LDKSecp256k1Error e);
-       public static native long CResult_PublicKeySecp256k1ErrorZ_err(Secp256k1Error e);
-       // bool CResult_PublicKeySecp256k1ErrorZ_is_ok(const struct LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR o);
-       public static native boolean CResult_PublicKeySecp256k1ErrorZ_is_ok(long o);
-       // void CResult_PublicKeySecp256k1ErrorZ_free(struct LDKCResult_PublicKeySecp256k1ErrorZ _res);
-       public static native void CResult_PublicKeySecp256k1ErrorZ_free(long _res);
-       // uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg);
-       public static native long CResult_PublicKeySecp256k1ErrorZ_clone_ptr(long arg);
-       // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_clone(const struct LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR orig);
-       public static native long CResult_PublicKeySecp256k1ErrorZ_clone(long orig);
        // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_ok(struct LDKNodeId o);
        public static native long CResult_NodeIdDecodeErrorZ_ok(long o);
        // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_err(struct LDKDecodeError e);
@@ -4253,6 +4741,18 @@ public class bindings {
        public static native long CResult_NodeIdDecodeErrorZ_clone_ptr(long arg);
        // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_clone(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR orig);
        public static native long CResult_NodeIdDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_ok(struct LDKPublicKey o);
+       public static native long CResult_PublicKeySecp256k1ErrorZ_ok(byte[] o);
+       // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_err(enum LDKSecp256k1Error e);
+       public static native long CResult_PublicKeySecp256k1ErrorZ_err(Secp256k1Error e);
+       // bool CResult_PublicKeySecp256k1ErrorZ_is_ok(const struct LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_PublicKeySecp256k1ErrorZ_is_ok(long o);
+       // void CResult_PublicKeySecp256k1ErrorZ_free(struct LDKCResult_PublicKeySecp256k1ErrorZ _res);
+       public static native void CResult_PublicKeySecp256k1ErrorZ_free(long _res);
+       // uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg);
+       public static native long CResult_PublicKeySecp256k1ErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_clone(const struct LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR orig);
+       public static native long CResult_PublicKeySecp256k1ErrorZ_clone(long orig);
        // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_some(struct LDKNetworkUpdate o);
        public static native long COption_NetworkUpdateZ_some(long o);
        // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_none(void);
@@ -4417,6 +4917,14 @@ public class bindings {
        public static native long COption_CVec_SocketAddressZZ_clone_ptr(long arg);
        // struct LDKCOption_CVec_SocketAddressZZ COption_CVec_SocketAddressZZ_clone(const struct LDKCOption_CVec_SocketAddressZZ *NONNULL_PTR orig);
        public static native long COption_CVec_SocketAddressZZ_clone(long orig);
+       // struct LDKCResult_u64ShortChannelIdErrorZ CResult_u64ShortChannelIdErrorZ_ok(uint64_t o);
+       public static native long CResult_u64ShortChannelIdErrorZ_ok(long o);
+       // struct LDKCResult_u64ShortChannelIdErrorZ CResult_u64ShortChannelIdErrorZ_err(enum LDKShortChannelIdError e);
+       public static native long CResult_u64ShortChannelIdErrorZ_err(ShortChannelIdError e);
+       // bool CResult_u64ShortChannelIdErrorZ_is_ok(const struct LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_u64ShortChannelIdErrorZ_is_ok(long o);
+       // void CResult_u64ShortChannelIdErrorZ_free(struct LDKCResult_u64ShortChannelIdErrorZ _res);
+       public static native void CResult_u64ShortChannelIdErrorZ_free(long _res);
        // struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ CResult_PendingHTLCInfoInboundHTLCErrZ_ok(struct LDKPendingHTLCInfo o);
        public static native long CResult_PendingHTLCInfoInboundHTLCErrZ_ok(long o);
        // struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ CResult_PendingHTLCInfoInboundHTLCErrZ_err(struct LDKInboundHTLCErr e);
@@ -4425,6 +4933,10 @@ public class bindings {
        public static native boolean CResult_PendingHTLCInfoInboundHTLCErrZ_is_ok(long o);
        // void CResult_PendingHTLCInfoInboundHTLCErrZ_free(struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ _res);
        public static native void CResult_PendingHTLCInfoInboundHTLCErrZ_free(long _res);
+       // uint64_t CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR arg);
+       public static native long CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(long arg);
+       // struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ CResult_PendingHTLCInfoInboundHTLCErrZ_clone(const struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR orig);
+       public static native long CResult_PendingHTLCInfoInboundHTLCErrZ_clone(long orig);
        // void CVec_HTLCOutputInCommitmentZ_free(struct LDKCVec_HTLCOutputInCommitmentZ _res);
        public static native void CVec_HTLCOutputInCommitmentZ_free(long[] _res);
        // void CVec_HTLCDescriptorZ_free(struct LDKCVec_HTLCDescriptorZ _res);
@@ -4467,6 +4979,16 @@ public class bindings {
        public static native long CResult_CVec_UtxoZNoneZ_clone_ptr(long arg);
        // struct LDKCResult_CVec_UtxoZNoneZ CResult_CVec_UtxoZNoneZ_clone(const struct LDKCResult_CVec_UtxoZNoneZ *NONNULL_PTR orig);
        public static native long CResult_CVec_UtxoZNoneZ_clone(long orig);
+       // struct LDKCOption_PaymentContextZ COption_PaymentContextZ_some(struct LDKPaymentContext o);
+       public static native long COption_PaymentContextZ_some(long o);
+       // struct LDKCOption_PaymentContextZ COption_PaymentContextZ_none(void);
+       public static native long COption_PaymentContextZ_none();
+       // void COption_PaymentContextZ_free(struct LDKCOption_PaymentContextZ _res);
+       public static native void COption_PaymentContextZ_free(long _res);
+       // uint64_t COption_PaymentContextZ_clone_ptr(LDKCOption_PaymentContextZ *NONNULL_PTR arg);
+       public static native long COption_PaymentContextZ_clone_ptr(long arg);
+       // struct LDKCOption_PaymentContextZ COption_PaymentContextZ_clone(const struct LDKCOption_PaymentContextZ *NONNULL_PTR orig);
+       public static native long COption_PaymentContextZ_clone(long orig);
        // uint64_t C2Tuple_u64u16Z_clone_ptr(LDKC2Tuple_u64u16Z *NONNULL_PTR arg);
        public static native long C2Tuple_u64u16Z_clone_ptr(long arg);
        // struct LDKC2Tuple_u64u16Z C2Tuple_u64u16Z_clone(const struct LDKC2Tuple_u64u16Z *NONNULL_PTR orig);
@@ -4495,18 +5017,18 @@ public class bindings {
        public static native long COption_ChannelShutdownStateZ_clone_ptr(long arg);
        // struct LDKCOption_ChannelShutdownStateZ COption_ChannelShutdownStateZ_clone(const struct LDKCOption_ChannelShutdownStateZ *NONNULL_PTR orig);
        public static native long COption_ChannelShutdownStateZ_clone(long orig);
-       // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
-       public static native long CResult_ThirtyTwoBytesAPIErrorZ_ok(byte[] o);
-       // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_err(struct LDKAPIError e);
-       public static native long CResult_ThirtyTwoBytesAPIErrorZ_err(long e);
-       // bool CResult_ThirtyTwoBytesAPIErrorZ_is_ok(const struct LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR o);
-       public static native boolean CResult_ThirtyTwoBytesAPIErrorZ_is_ok(long o);
-       // void CResult_ThirtyTwoBytesAPIErrorZ_free(struct LDKCResult_ThirtyTwoBytesAPIErrorZ _res);
-       public static native void CResult_ThirtyTwoBytesAPIErrorZ_free(long _res);
-       // uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg);
-       public static native long CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(long arg);
-       // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_clone(const struct LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR orig);
-       public static native long CResult_ThirtyTwoBytesAPIErrorZ_clone(long orig);
+       // struct LDKCResult_ChannelIdAPIErrorZ CResult_ChannelIdAPIErrorZ_ok(struct LDKChannelId o);
+       public static native long CResult_ChannelIdAPIErrorZ_ok(long o);
+       // struct LDKCResult_ChannelIdAPIErrorZ CResult_ChannelIdAPIErrorZ_err(struct LDKAPIError e);
+       public static native long CResult_ChannelIdAPIErrorZ_err(long e);
+       // bool CResult_ChannelIdAPIErrorZ_is_ok(const struct LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_ChannelIdAPIErrorZ_is_ok(long o);
+       // void CResult_ChannelIdAPIErrorZ_free(struct LDKCResult_ChannelIdAPIErrorZ _res);
+       public static native void CResult_ChannelIdAPIErrorZ_free(long _res);
+       // uint64_t CResult_ChannelIdAPIErrorZ_clone_ptr(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR arg);
+       public static native long CResult_ChannelIdAPIErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_ChannelIdAPIErrorZ CResult_ChannelIdAPIErrorZ_clone(const struct LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ChannelIdAPIErrorZ_clone(long orig);
        // void CVec_RecentPaymentDetailsZ_free(struct LDKCVec_RecentPaymentDetailsZ _res);
        public static native void CVec_RecentPaymentDetailsZ_free(long[] _res);
        // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
@@ -4591,16 +5113,30 @@ public class bindings {
        public static native long CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_clone_ptr(long arg);
        // struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_clone(const struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ *NONNULL_PTR orig);
        public static native long CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_clone(long orig);
-       // uint64_t C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR arg);
-       public static native long C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(long arg);
-       // struct LDKC2Tuple_ThirtyTwoBytesPublicKeyZ C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(const struct LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR orig);
-       public static native long C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(long orig);
-       // struct LDKC2Tuple_ThirtyTwoBytesPublicKeyZ C2Tuple_ThirtyTwoBytesPublicKeyZ_new(struct LDKThirtyTwoBytes a, struct LDKPublicKey b);
-       public static native long C2Tuple_ThirtyTwoBytesPublicKeyZ_new(byte[] a, byte[] b);
-       // void C2Tuple_ThirtyTwoBytesPublicKeyZ_free(struct LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res);
-       public static native void C2Tuple_ThirtyTwoBytesPublicKeyZ_free(long _res);
-       // void CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(struct LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ _res);
-       public static native void CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(long[] _res);
+       // uint64_t C2Tuple_ChannelIdPublicKeyZ_clone_ptr(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR arg);
+       public static native long C2Tuple_ChannelIdPublicKeyZ_clone_ptr(long arg);
+       // struct LDKC2Tuple_ChannelIdPublicKeyZ C2Tuple_ChannelIdPublicKeyZ_clone(const struct LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR orig);
+       public static native long C2Tuple_ChannelIdPublicKeyZ_clone(long orig);
+       // struct LDKC2Tuple_ChannelIdPublicKeyZ C2Tuple_ChannelIdPublicKeyZ_new(struct LDKChannelId a, struct LDKPublicKey b);
+       public static native long C2Tuple_ChannelIdPublicKeyZ_new(long a, byte[] b);
+       // void C2Tuple_ChannelIdPublicKeyZ_free(struct LDKC2Tuple_ChannelIdPublicKeyZ _res);
+       public static native void C2Tuple_ChannelIdPublicKeyZ_free(long _res);
+       // void CVec_C2Tuple_ChannelIdPublicKeyZZ_free(struct LDKCVec_C2Tuple_ChannelIdPublicKeyZZ _res);
+       public static native void CVec_C2Tuple_ChannelIdPublicKeyZZ_free(long[] _res);
+       // void CVec_ChannelIdZ_free(struct LDKCVec_ChannelIdZ _res);
+       public static native void CVec_ChannelIdZ_free(long[] _res);
+       // struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(struct LDKOfferWithDerivedMetadataBuilder o);
+       public static native long CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(long o);
+       // struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+       public static native long CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+       // bool CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(long o);
+       // void CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ _res);
+       public static native void CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(long _res);
+       // uint64_t CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg);
+       public static native long CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(const struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR orig);
+       public static native long CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(long orig);
        // struct LDKCOption_StrZ COption_StrZ_some(struct LDKStr o);
        public static native long COption_StrZ_some(String o);
        // struct LDKCOption_StrZ COption_StrZ_none(void);
@@ -4611,18 +5147,6 @@ public class bindings {
        public static native long COption_StrZ_clone_ptr(long arg);
        // struct LDKCOption_StrZ COption_StrZ_clone(const struct LDKCOption_StrZ *NONNULL_PTR orig);
        public static native long COption_StrZ_clone(long orig);
-       // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_ok(void);
-       public static native long CResult_NoneBolt12SemanticErrorZ_ok();
-       // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
-       public static native long CResult_NoneBolt12SemanticErrorZ_err(Bolt12SemanticError e);
-       // bool CResult_NoneBolt12SemanticErrorZ_is_ok(const struct LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR o);
-       public static native boolean CResult_NoneBolt12SemanticErrorZ_is_ok(long o);
-       // void CResult_NoneBolt12SemanticErrorZ_free(struct LDKCResult_NoneBolt12SemanticErrorZ _res);
-       public static native void CResult_NoneBolt12SemanticErrorZ_free(long _res);
-       // uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg);
-       public static native long CResult_NoneBolt12SemanticErrorZ_clone_ptr(long arg);
-       // struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_clone(const struct LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR orig);
-       public static native long CResult_NoneBolt12SemanticErrorZ_clone(long orig);
        // struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ o);
        public static native long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(long o);
        // struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_err(void);
@@ -4635,6 +5159,18 @@ public class bindings {
        public static native long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone_ptr(long arg);
        // struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone(const struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR orig);
        public static native long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone(long orig);
+       // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
+       public static native long CResult_ThirtyTwoBytesAPIErrorZ_ok(byte[] o);
+       // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_err(struct LDKAPIError e);
+       public static native long CResult_ThirtyTwoBytesAPIErrorZ_err(long e);
+       // bool CResult_ThirtyTwoBytesAPIErrorZ_is_ok(const struct LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_ThirtyTwoBytesAPIErrorZ_is_ok(long o);
+       // void CResult_ThirtyTwoBytesAPIErrorZ_free(struct LDKCResult_ThirtyTwoBytesAPIErrorZ _res);
+       public static native void CResult_ThirtyTwoBytesAPIErrorZ_free(long _res);
+       // uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg);
+       public static native long CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_clone(const struct LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ThirtyTwoBytesAPIErrorZ_clone(long orig);
        // struct LDKCOption_OffersMessageZ COption_OffersMessageZ_some(struct LDKOffersMessage o);
        public static native long COption_OffersMessageZ_some(long o);
        // struct LDKCOption_OffersMessageZ COption_OffersMessageZ_none(void);
@@ -4909,8 +5445,6 @@ public class bindings {
        public static native void CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ_free(long[] _res);
        // void CVec_CommitmentTransactionZ_free(struct LDKCVec_CommitmentTransactionZ _res);
        public static native void CVec_CommitmentTransactionZ_free(long[] _res);
-       // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
-       public static native void CVec_TransactionZ_free(byte[][] _res);
        // uint64_t C2Tuple_u32TxOutZ_clone_ptr(LDKC2Tuple_u32TxOutZ *NONNULL_PTR arg);
        public static native long C2Tuple_u32TxOutZ_clone_ptr(long arg);
        // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
@@ -5037,16 +5571,8 @@ public class bindings {
        public static native long COption_SocketAddressZ_clone_ptr(long arg);
        // struct LDKCOption_SocketAddressZ COption_SocketAddressZ_clone(const struct LDKCOption_SocketAddressZ *NONNULL_PTR orig);
        public static native long COption_SocketAddressZ_clone(long orig);
-       // uint64_t C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR arg);
-       public static native long C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(long arg);
-       // struct LDKC2Tuple_PublicKeyCOption_SocketAddressZZ C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(const struct LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR orig);
-       public static native long C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(long orig);
-       // struct LDKC2Tuple_PublicKeyCOption_SocketAddressZZ C2Tuple_PublicKeyCOption_SocketAddressZZ_new(struct LDKPublicKey a, struct LDKCOption_SocketAddressZ b);
-       public static native long C2Tuple_PublicKeyCOption_SocketAddressZZ_new(byte[] a, long b);
-       // void C2Tuple_PublicKeyCOption_SocketAddressZZ_free(struct LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res);
-       public static native void C2Tuple_PublicKeyCOption_SocketAddressZZ_free(long _res);
-       // void CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(struct LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ _res);
-       public static native void CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(long[] _res);
+       // void CVec_PeerDetailsZ_free(struct LDKCVec_PeerDetailsZ _res);
+       public static native void CVec_PeerDetailsZ_free(long[] _res);
        // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
        public static native long CResult_CVec_u8ZPeerHandleErrorZ_ok(byte[] o);
        // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
@@ -5143,6 +5669,30 @@ public class bindings {
        public static native long CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone_ptr(long arg);
        // struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone(const struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ *NONNULL_PTR orig);
        public static native long CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone(long orig);
+       // struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(struct LDKUnsignedInvoiceRequest o);
+       public static native long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(long o);
+       // struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+       public static native long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+       // bool CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(const struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(long o);
+       // void CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ _res);
+       public static native void CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(long _res);
+       // uint64_t CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg);
+       public static native long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(const struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR orig);
+       public static native long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(long orig);
+       // struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ CResult_InvoiceRequestBolt12SemanticErrorZ_ok(struct LDKInvoiceRequest o);
+       public static native long CResult_InvoiceRequestBolt12SemanticErrorZ_ok(long o);
+       // struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ CResult_InvoiceRequestBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+       public static native long CResult_InvoiceRequestBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+       // bool CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(long o);
+       // void CResult_InvoiceRequestBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ _res);
+       public static native void CResult_InvoiceRequestBolt12SemanticErrorZ_free(long _res);
+       // uint64_t CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg);
+       public static native long CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ CResult_InvoiceRequestBolt12SemanticErrorZ_clone(const struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR orig);
+       public static native long CResult_InvoiceRequestBolt12SemanticErrorZ_clone(long orig);
        // struct LDKCOption_SecretKeyZ COption_SecretKeyZ_some(struct LDKSecretKey o);
        public static native long COption_SecretKeyZ_some(byte[] o);
        // struct LDKCOption_SecretKeyZ COption_SecretKeyZ_none(void);
@@ -5153,6 +5703,14 @@ public class bindings {
        public static native long COption_SecretKeyZ_clone_ptr(long arg);
        // struct LDKCOption_SecretKeyZ COption_SecretKeyZ_clone(const struct LDKCOption_SecretKeyZ *NONNULL_PTR orig);
        public static native long COption_SecretKeyZ_clone(long orig);
+       // struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceWithExplicitSigningPubkeyBuilder o);
+       public static native long CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(long o);
+       // struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+       public static native long CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+       // bool CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(long o);
+       // void CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ _res);
+       public static native void CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(long _res);
        // struct LDKCResult_VerifiedInvoiceRequestNoneZ CResult_VerifiedInvoiceRequestNoneZ_ok(struct LDKVerifiedInvoiceRequest o);
        public static native long CResult_VerifiedInvoiceRequestNoneZ_ok(long o);
        // struct LDKCResult_VerifiedInvoiceRequestNoneZ CResult_VerifiedInvoiceRequestNoneZ_err(void);
@@ -5165,6 +5723,26 @@ public class bindings {
        public static native long CResult_VerifiedInvoiceRequestNoneZ_clone_ptr(long arg);
        // struct LDKCResult_VerifiedInvoiceRequestNoneZ CResult_VerifiedInvoiceRequestNoneZ_clone(const struct LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR orig);
        public static native long CResult_VerifiedInvoiceRequestNoneZ_clone(long orig);
+       // struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceWithDerivedSigningPubkeyBuilder o);
+       public static native long CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(long o);
+       // struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+       public static native long CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError e);
+       // bool CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(long o);
+       // void CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ _res);
+       public static native void CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(long _res);
+       // struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ CResult_InvoiceRequestFieldsDecodeErrorZ_ok(struct LDKInvoiceRequestFields o);
+       public static native long CResult_InvoiceRequestFieldsDecodeErrorZ_ok(long o);
+       // struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ CResult_InvoiceRequestFieldsDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_InvoiceRequestFieldsDecodeErrorZ_err(long e);
+       // bool CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(const struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(long o);
+       // void CResult_InvoiceRequestFieldsDecodeErrorZ_free(struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ _res);
+       public static native void CResult_InvoiceRequestFieldsDecodeErrorZ_free(long _res);
+       // uint64_t CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR arg);
+       public static native long CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ CResult_InvoiceRequestFieldsDecodeErrorZ_clone(const struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_InvoiceRequestFieldsDecodeErrorZ_clone(long orig);
        // enum LDKCOption_NoneZ COption_NoneZ_some(void);
        public static native COption_NoneZ COption_NoneZ_some();
        // enum LDKCOption_NoneZ COption_NoneZ_none(void);
@@ -5173,6 +5751,16 @@ public class bindings {
        public static native void COption_NoneZ_free(COption_NoneZ _res);
        // void CVec_WitnessZ_free(struct LDKCVec_WitnessZ _res);
        public static native void CVec_WitnessZ_free(byte[][] _res);
+       // struct LDKCOption_ECDSASignatureZ COption_ECDSASignatureZ_some(struct LDKECDSASignature o);
+       public static native long COption_ECDSASignatureZ_some(byte[] o);
+       // struct LDKCOption_ECDSASignatureZ COption_ECDSASignatureZ_none(void);
+       public static native long COption_ECDSASignatureZ_none();
+       // void COption_ECDSASignatureZ_free(struct LDKCOption_ECDSASignatureZ _res);
+       public static native void COption_ECDSASignatureZ_free(long _res);
+       // uint64_t COption_ECDSASignatureZ_clone_ptr(LDKCOption_ECDSASignatureZ *NONNULL_PTR arg);
+       public static native long COption_ECDSASignatureZ_clone_ptr(long arg);
+       // struct LDKCOption_ECDSASignatureZ COption_ECDSASignatureZ_clone(const struct LDKCOption_ECDSASignatureZ *NONNULL_PTR orig);
+       public static native long COption_ECDSASignatureZ_clone(long orig);
        // struct LDKCOption_i64Z COption_i64Z_some(int64_t o);
        public static native long COption_i64Z_some(long o);
        // struct LDKCOption_i64Z COption_i64Z_none(void);
@@ -6031,6 +6619,8 @@ public class bindings {
        public static native long CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(long arg);
        // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_clone(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR orig);
        public static native long CResult_ShutdownScriptInvalidShutdownScriptZ_clone(long orig);
+       // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
+       public static native void CVec_TransactionZ_free(byte[][] _res);
        // struct LDKCResult_PaymentPurposeDecodeErrorZ CResult_PaymentPurposeDecodeErrorZ_ok(struct LDKPaymentPurpose o);
        public static native long CResult_PaymentPurposeDecodeErrorZ_ok(long o);
        // struct LDKCResult_PaymentPurposeDecodeErrorZ CResult_PaymentPurposeDecodeErrorZ_err(struct LDKDecodeError e);
@@ -6367,6 +6957,18 @@ public class bindings {
        public static native long CResult_UntrustedStringDecodeErrorZ_clone_ptr(long arg);
        // struct LDKCResult_UntrustedStringDecodeErrorZ CResult_UntrustedStringDecodeErrorZ_clone(const struct LDKCResult_UntrustedStringDecodeErrorZ *NONNULL_PTR orig);
        public static native long CResult_UntrustedStringDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_ChannelIdDecodeErrorZ CResult_ChannelIdDecodeErrorZ_ok(struct LDKChannelId o);
+       public static native long CResult_ChannelIdDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ChannelIdDecodeErrorZ CResult_ChannelIdDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ChannelIdDecodeErrorZ_err(long e);
+       // bool CResult_ChannelIdDecodeErrorZ_is_ok(const struct LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_ChannelIdDecodeErrorZ_is_ok(long o);
+       // void CResult_ChannelIdDecodeErrorZ_free(struct LDKCResult_ChannelIdDecodeErrorZ _res);
+       public static native void CResult_ChannelIdDecodeErrorZ_free(long _res);
+       // uint64_t CResult_ChannelIdDecodeErrorZ_clone_ptr(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR arg);
+       public static native long CResult_ChannelIdDecodeErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_ChannelIdDecodeErrorZ CResult_ChannelIdDecodeErrorZ_clone(const struct LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ChannelIdDecodeErrorZ_clone(long orig);
        // uint64_t C2Tuple__u832u16Z_clone_ptr(LDKC2Tuple__u832u16Z *NONNULL_PTR arg);
        public static native long C2Tuple__u832u16Z_clone_ptr(long arg);
        // struct LDKC2Tuple__u832u16Z C2Tuple__u832u16Z_clone(const struct LDKC2Tuple__u832u16Z *NONNULL_PTR orig);
@@ -6399,6 +7001,66 @@ public class bindings {
        public static native long CResult_PaymentConstraintsDecodeErrorZ_clone_ptr(long arg);
        // struct LDKCResult_PaymentConstraintsDecodeErrorZ CResult_PaymentConstraintsDecodeErrorZ_clone(const struct LDKCResult_PaymentConstraintsDecodeErrorZ *NONNULL_PTR orig);
        public static native long CResult_PaymentConstraintsDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_PaymentContextDecodeErrorZ CResult_PaymentContextDecodeErrorZ_ok(struct LDKPaymentContext o);
+       public static native long CResult_PaymentContextDecodeErrorZ_ok(long o);
+       // struct LDKCResult_PaymentContextDecodeErrorZ CResult_PaymentContextDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_PaymentContextDecodeErrorZ_err(long e);
+       // bool CResult_PaymentContextDecodeErrorZ_is_ok(const struct LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_PaymentContextDecodeErrorZ_is_ok(long o);
+       // void CResult_PaymentContextDecodeErrorZ_free(struct LDKCResult_PaymentContextDecodeErrorZ _res);
+       public static native void CResult_PaymentContextDecodeErrorZ_free(long _res);
+       // uint64_t CResult_PaymentContextDecodeErrorZ_clone_ptr(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR arg);
+       public static native long CResult_PaymentContextDecodeErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_PaymentContextDecodeErrorZ CResult_PaymentContextDecodeErrorZ_clone(const struct LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_PaymentContextDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_UnknownPaymentContextDecodeErrorZ CResult_UnknownPaymentContextDecodeErrorZ_ok(struct LDKUnknownPaymentContext o);
+       public static native long CResult_UnknownPaymentContextDecodeErrorZ_ok(long o);
+       // struct LDKCResult_UnknownPaymentContextDecodeErrorZ CResult_UnknownPaymentContextDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_UnknownPaymentContextDecodeErrorZ_err(long e);
+       // bool CResult_UnknownPaymentContextDecodeErrorZ_is_ok(const struct LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_UnknownPaymentContextDecodeErrorZ_is_ok(long o);
+       // void CResult_UnknownPaymentContextDecodeErrorZ_free(struct LDKCResult_UnknownPaymentContextDecodeErrorZ _res);
+       public static native void CResult_UnknownPaymentContextDecodeErrorZ_free(long _res);
+       // uint64_t CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR arg);
+       public static native long CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_UnknownPaymentContextDecodeErrorZ CResult_UnknownPaymentContextDecodeErrorZ_clone(const struct LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_UnknownPaymentContextDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_Bolt12OfferContextDecodeErrorZ CResult_Bolt12OfferContextDecodeErrorZ_ok(struct LDKBolt12OfferContext o);
+       public static native long CResult_Bolt12OfferContextDecodeErrorZ_ok(long o);
+       // struct LDKCResult_Bolt12OfferContextDecodeErrorZ CResult_Bolt12OfferContextDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_Bolt12OfferContextDecodeErrorZ_err(long e);
+       // bool CResult_Bolt12OfferContextDecodeErrorZ_is_ok(const struct LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_Bolt12OfferContextDecodeErrorZ_is_ok(long o);
+       // void CResult_Bolt12OfferContextDecodeErrorZ_free(struct LDKCResult_Bolt12OfferContextDecodeErrorZ _res);
+       public static native void CResult_Bolt12OfferContextDecodeErrorZ_free(long _res);
+       // uint64_t CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR arg);
+       public static native long CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_Bolt12OfferContextDecodeErrorZ CResult_Bolt12OfferContextDecodeErrorZ_clone(const struct LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_Bolt12OfferContextDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_Bolt12RefundContextDecodeErrorZ CResult_Bolt12RefundContextDecodeErrorZ_ok(struct LDKBolt12RefundContext o);
+       public static native long CResult_Bolt12RefundContextDecodeErrorZ_ok(long o);
+       // struct LDKCResult_Bolt12RefundContextDecodeErrorZ CResult_Bolt12RefundContextDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_Bolt12RefundContextDecodeErrorZ_err(long e);
+       // bool CResult_Bolt12RefundContextDecodeErrorZ_is_ok(const struct LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_Bolt12RefundContextDecodeErrorZ_is_ok(long o);
+       // void CResult_Bolt12RefundContextDecodeErrorZ_free(struct LDKCResult_Bolt12RefundContextDecodeErrorZ _res);
+       public static native void CResult_Bolt12RefundContextDecodeErrorZ_free(long _res);
+       // uint64_t CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR arg);
+       public static native long CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_Bolt12RefundContextDecodeErrorZ CResult_Bolt12RefundContextDecodeErrorZ_clone(const struct LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_Bolt12RefundContextDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_ok(struct LDKStr o);
+       public static native long CResult_StrSecp256k1ErrorZ_ok(String o);
+       // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_err(enum LDKSecp256k1Error e);
+       public static native long CResult_StrSecp256k1ErrorZ_err(Secp256k1Error e);
+       // bool CResult_StrSecp256k1ErrorZ_is_ok(const struct LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_StrSecp256k1ErrorZ_is_ok(long o);
+       // void CResult_StrSecp256k1ErrorZ_free(struct LDKCResult_StrSecp256k1ErrorZ _res);
+       public static native void CResult_StrSecp256k1ErrorZ_free(long _res);
+       // uint64_t CResult_StrSecp256k1ErrorZ_clone_ptr(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR arg);
+       public static native long CResult_StrSecp256k1ErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_clone(const struct LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR orig);
+       public static native long CResult_StrSecp256k1ErrorZ_clone(long orig);
        // uint64_t C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR arg);
        public static native long C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(long arg);
        // struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(const struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR orig);
@@ -6419,18 +7081,6 @@ public class bindings {
        public static native long CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr(long arg);
        // struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(const struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR orig);
        public static native long CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(long orig);
-       // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_ok(struct LDKStr o);
-       public static native long CResult_StrSecp256k1ErrorZ_ok(String o);
-       // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_err(enum LDKSecp256k1Error e);
-       public static native long CResult_StrSecp256k1ErrorZ_err(Secp256k1Error e);
-       // bool CResult_StrSecp256k1ErrorZ_is_ok(const struct LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR o);
-       public static native boolean CResult_StrSecp256k1ErrorZ_is_ok(long o);
-       // void CResult_StrSecp256k1ErrorZ_free(struct LDKCResult_StrSecp256k1ErrorZ _res);
-       public static native void CResult_StrSecp256k1ErrorZ_free(long _res);
-       // uint64_t CResult_StrSecp256k1ErrorZ_clone_ptr(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR arg);
-       public static native long CResult_StrSecp256k1ErrorZ_clone_ptr(long arg);
-       // struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_clone(const struct LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR orig);
-       public static native long CResult_StrSecp256k1ErrorZ_clone(long orig);
        // struct LDKCResult_TxOutUtxoLookupErrorZ CResult_TxOutUtxoLookupErrorZ_ok(struct LDKTxOut o);
        public static native long CResult_TxOutUtxoLookupErrorZ_ok(long o);
        // struct LDKCResult_TxOutUtxoLookupErrorZ CResult_TxOutUtxoLookupErrorZ_err(enum LDKUtxoLookupError e);
@@ -6459,6 +7109,10 @@ public class bindings {
        public static native boolean CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_is_ok(long o);
        // void CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ _res);
        public static native void CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(long _res);
+       // uint64_t CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR arg);
+       public static native long CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(const struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR orig);
+       public static native long CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(long orig);
        // struct LDKCResult_PeeledOnionNoneZ CResult_PeeledOnionNoneZ_ok(struct LDKPeeledOnion o);
        public static native long CResult_PeeledOnionNoneZ_ok(long o);
        // struct LDKCResult_PeeledOnionNoneZ CResult_PeeledOnionNoneZ_err(void);
@@ -6467,6 +7121,10 @@ public class bindings {
        public static native boolean CResult_PeeledOnionNoneZ_is_ok(long o);
        // void CResult_PeeledOnionNoneZ_free(struct LDKCResult_PeeledOnionNoneZ _res);
        public static native void CResult_PeeledOnionNoneZ_free(long _res);
+       // uint64_t CResult_PeeledOnionNoneZ_clone_ptr(LDKCResult_PeeledOnionNoneZ *NONNULL_PTR arg);
+       public static native long CResult_PeeledOnionNoneZ_clone_ptr(long arg);
+       // struct LDKCResult_PeeledOnionNoneZ CResult_PeeledOnionNoneZ_clone(const struct LDKCResult_PeeledOnionNoneZ *NONNULL_PTR orig);
+       public static native long CResult_PeeledOnionNoneZ_clone(long orig);
        // struct LDKCResult_SendSuccessSendErrorZ CResult_SendSuccessSendErrorZ_ok(struct LDKSendSuccess o);
        public static native long CResult_SendSuccessSendErrorZ_ok(long o);
        // struct LDKCResult_SendSuccessSendErrorZ CResult_SendSuccessSendErrorZ_err(struct LDKSendError e);
@@ -6475,6 +7133,10 @@ public class bindings {
        public static native boolean CResult_SendSuccessSendErrorZ_is_ok(long o);
        // void CResult_SendSuccessSendErrorZ_free(struct LDKCResult_SendSuccessSendErrorZ _res);
        public static native void CResult_SendSuccessSendErrorZ_free(long _res);
+       // uint64_t CResult_SendSuccessSendErrorZ_clone_ptr(LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR arg);
+       public static native long CResult_SendSuccessSendErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_SendSuccessSendErrorZ CResult_SendSuccessSendErrorZ_clone(const struct LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR orig);
+       public static native long CResult_SendSuccessSendErrorZ_clone(long orig);
        // struct LDKCResult_BlindedPathNoneZ CResult_BlindedPathNoneZ_ok(struct LDKBlindedPath o);
        public static native long CResult_BlindedPathNoneZ_ok(long o);
        // struct LDKCResult_BlindedPathNoneZ CResult_BlindedPathNoneZ_err(void);
@@ -6537,6 +7199,58 @@ public class bindings {
        public static native long CResult_InvoiceErrorDecodeErrorZ_clone_ptr(long arg);
        // struct LDKCResult_InvoiceErrorDecodeErrorZ CResult_InvoiceErrorDecodeErrorZ_clone(const struct LDKCResult_InvoiceErrorDecodeErrorZ *NONNULL_PTR orig);
        public static native long CResult_InvoiceErrorDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_TrackedSpendableOutputDecodeErrorZ CResult_TrackedSpendableOutputDecodeErrorZ_ok(struct LDKTrackedSpendableOutput o);
+       public static native long CResult_TrackedSpendableOutputDecodeErrorZ_ok(long o);
+       // struct LDKCResult_TrackedSpendableOutputDecodeErrorZ CResult_TrackedSpendableOutputDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_TrackedSpendableOutputDecodeErrorZ_err(long e);
+       // bool CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(const struct LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(long o);
+       // void CResult_TrackedSpendableOutputDecodeErrorZ_free(struct LDKCResult_TrackedSpendableOutputDecodeErrorZ _res);
+       public static native void CResult_TrackedSpendableOutputDecodeErrorZ_free(long _res);
+       // uint64_t CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR arg);
+       public static native long CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_TrackedSpendableOutputDecodeErrorZ CResult_TrackedSpendableOutputDecodeErrorZ_clone(const struct LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_TrackedSpendableOutputDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_OutputSpendStatusDecodeErrorZ CResult_OutputSpendStatusDecodeErrorZ_ok(struct LDKOutputSpendStatus o);
+       public static native long CResult_OutputSpendStatusDecodeErrorZ_ok(long o);
+       // struct LDKCResult_OutputSpendStatusDecodeErrorZ CResult_OutputSpendStatusDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_OutputSpendStatusDecodeErrorZ_err(long e);
+       // bool CResult_OutputSpendStatusDecodeErrorZ_is_ok(const struct LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_OutputSpendStatusDecodeErrorZ_is_ok(long o);
+       // void CResult_OutputSpendStatusDecodeErrorZ_free(struct LDKCResult_OutputSpendStatusDecodeErrorZ _res);
+       public static native void CResult_OutputSpendStatusDecodeErrorZ_free(long _res);
+       // uint64_t CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR arg);
+       public static native long CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(long arg);
+       // struct LDKCResult_OutputSpendStatusDecodeErrorZ CResult_OutputSpendStatusDecodeErrorZ_clone(const struct LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_OutputSpendStatusDecodeErrorZ_clone(long orig);
+       // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o);
+       public static native long COption_FilterZ_some(long o);
+       // struct LDKCOption_FilterZ COption_FilterZ_none(void);
+       public static native long COption_FilterZ_none();
+       // void COption_FilterZ_free(struct LDKCOption_FilterZ _res);
+       public static native void COption_FilterZ_free(long _res);
+       // void CVec_TrackedSpendableOutputZ_free(struct LDKCVec_TrackedSpendableOutputZ _res);
+       public static native void CVec_TrackedSpendableOutputZ_free(long[] _res);
+       // struct LDKCResult_OutputSweeperDecodeErrorZ CResult_OutputSweeperDecodeErrorZ_ok(struct LDKOutputSweeper o);
+       public static native long CResult_OutputSweeperDecodeErrorZ_ok(long o);
+       // struct LDKCResult_OutputSweeperDecodeErrorZ CResult_OutputSweeperDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_OutputSweeperDecodeErrorZ_err(long e);
+       // bool CResult_OutputSweeperDecodeErrorZ_is_ok(const struct LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_OutputSweeperDecodeErrorZ_is_ok(long o);
+       // void CResult_OutputSweeperDecodeErrorZ_free(struct LDKCResult_OutputSweeperDecodeErrorZ _res);
+       public static native void CResult_OutputSweeperDecodeErrorZ_free(long _res);
+       // struct LDKC2Tuple_BestBlockOutputSweeperZ C2Tuple_BestBlockOutputSweeperZ_new(struct LDKBestBlock a, struct LDKOutputSweeper b);
+       public static native long C2Tuple_BestBlockOutputSweeperZ_new(long a, long b);
+       // void C2Tuple_BestBlockOutputSweeperZ_free(struct LDKC2Tuple_BestBlockOutputSweeperZ _res);
+       public static native void C2Tuple_BestBlockOutputSweeperZ_free(long _res);
+       // struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(struct LDKC2Tuple_BestBlockOutputSweeperZ o);
+       public static native long CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(long o);
+       // struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(long e);
+       // bool CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR o);
+       public static native boolean CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(long o);
+       // void CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ _res);
+       public static native void CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(long _res);
        // struct LDKCResult_DelayedPaymentBasepointDecodeErrorZ CResult_DelayedPaymentBasepointDecodeErrorZ_ok(struct LDKDelayedPaymentBasepoint o);
        public static native long CResult_DelayedPaymentBasepointDecodeErrorZ_ok(long o);
        // struct LDKCResult_DelayedPaymentBasepointDecodeErrorZ CResult_DelayedPaymentBasepointDecodeErrorZ_err(struct LDKDecodeError e);
@@ -6609,12 +7323,6 @@ public class bindings {
        public static native long CResult_RevocationKeyDecodeErrorZ_clone_ptr(long arg);
        // struct LDKCResult_RevocationKeyDecodeErrorZ CResult_RevocationKeyDecodeErrorZ_clone(const struct LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR orig);
        public static native long CResult_RevocationKeyDecodeErrorZ_clone(long orig);
-       // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o);
-       public static native long COption_FilterZ_some(long o);
-       // struct LDKCOption_FilterZ COption_FilterZ_none(void);
-       public static native long COption_FilterZ_none();
-       // void COption_FilterZ_free(struct LDKCOption_FilterZ _res);
-       public static native void COption_FilterZ_free(long _res);
        // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_ok(struct LDKLockedChannelMonitor o);
        public static native long CResult_LockedChannelMonitorNoneZ_ok(long o);
        // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_err(void);
@@ -6623,8 +7331,16 @@ public class bindings {
        public static native boolean CResult_LockedChannelMonitorNoneZ_is_ok(long o);
        // void CResult_LockedChannelMonitorNoneZ_free(struct LDKCResult_LockedChannelMonitorNoneZ _res);
        public static native void CResult_LockedChannelMonitorNoneZ_free(long _res);
-       // void CVec_OutPointZ_free(struct LDKCVec_OutPointZ _res);
-       public static native void CVec_OutPointZ_free(long[] _res);
+       // uint64_t C2Tuple_OutPointChannelIdZ_clone_ptr(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR arg);
+       public static native long C2Tuple_OutPointChannelIdZ_clone_ptr(long arg);
+       // struct LDKC2Tuple_OutPointChannelIdZ C2Tuple_OutPointChannelIdZ_clone(const struct LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR orig);
+       public static native long C2Tuple_OutPointChannelIdZ_clone(long orig);
+       // struct LDKC2Tuple_OutPointChannelIdZ C2Tuple_OutPointChannelIdZ_new(struct LDKOutPoint a, struct LDKChannelId b);
+       public static native long C2Tuple_OutPointChannelIdZ_new(long a, long b);
+       // void C2Tuple_OutPointChannelIdZ_free(struct LDKC2Tuple_OutPointChannelIdZ _res);
+       public static native void C2Tuple_OutPointChannelIdZ_free(long _res);
+       // void CVec_C2Tuple_OutPointChannelIdZZ_free(struct LDKCVec_C2Tuple_OutPointChannelIdZZ _res);
+       public static native void CVec_C2Tuple_OutPointChannelIdZZ_free(long[] _res);
        // void CVec_MonitorUpdateIdZ_free(struct LDKCVec_MonitorUpdateIdZ _res);
        public static native void CVec_MonitorUpdateIdZ_free(long[] _res);
        // uint64_t C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone_ptr(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR arg);
@@ -6711,6 +7427,8 @@ public class bindings {
        public static native long TransactionU16LenLimited_new(byte[] transaction);
        // MUST_USE_RES struct LDKTransaction TransactionU16LenLimited_into_transaction(struct LDKTransactionU16LenLimited this_arg);
        public static native byte[] TransactionU16LenLimited_into_transaction(long this_arg);
+       // MUST_USE_RES struct LDKTransaction TransactionU16LenLimited_as_transaction(const struct LDKTransactionU16LenLimited *NONNULL_PTR this_arg);
+       public static native byte[] TransactionU16LenLimited_as_transaction(long this_arg);
        // struct LDKCVec_u8Z TransactionU16LenLimited_write(const struct LDKTransactionU16LenLimited *NONNULL_PTR obj);
        public static native byte[] TransactionU16LenLimited_write(long obj);
        // struct LDKCResult_TransactionU16LenLimitedDecodeErrorZ TransactionU16LenLimited_read(struct LDKu8slice ser);
@@ -6741,6 +7459,24 @@ public class bindings {
        public static native long MonitorUpdatingPersister_cleanup_stale_updates(long this_arg, boolean lazy);
        // struct LDKPersist MonitorUpdatingPersister_as_Persist(const struct LDKMonitorUpdatingPersister *NONNULL_PTR this_arg);
        public static native long MonitorUpdatingPersister_as_Persist(long this_arg);
+       // enum LDKShortChannelIdError ShortChannelIdError_clone(const enum LDKShortChannelIdError *NONNULL_PTR orig);
+       public static native ShortChannelIdError ShortChannelIdError_clone(long orig);
+       // enum LDKShortChannelIdError ShortChannelIdError_block_overflow(void);
+       public static native ShortChannelIdError ShortChannelIdError_block_overflow();
+       // enum LDKShortChannelIdError ShortChannelIdError_tx_index_overflow(void);
+       public static native ShortChannelIdError ShortChannelIdError_tx_index_overflow();
+       // enum LDKShortChannelIdError ShortChannelIdError_vout_index_overflow(void);
+       public static native ShortChannelIdError ShortChannelIdError_vout_index_overflow();
+       // bool ShortChannelIdError_eq(const enum LDKShortChannelIdError *NONNULL_PTR a, const enum LDKShortChannelIdError *NONNULL_PTR b);
+       public static native boolean ShortChannelIdError_eq(long a, long b);
+       // uint32_t block_from_scid(uint64_t short_channel_id);
+       public static native int block_from_scid(long short_channel_id);
+       // uint32_t tx_index_from_scid(uint64_t short_channel_id);
+       public static native int tx_index_from_scid(long short_channel_id);
+       // uint16_t vout_from_scid(uint64_t short_channel_id);
+       public static native short vout_from_scid(long short_channel_id);
+       // struct LDKCResult_u64ShortChannelIdErrorZ scid_from_parts(uint64_t block, uint64_t tx_index, uint64_t vout_index);
+       public static native long scid_from_parts(long block, long tx_index, long vout_index);
        // void UntrustedString_free(struct LDKUntrustedString this_obj);
        public static native void UntrustedString_free(long this_obj);
        // struct LDKStr UntrustedString_get_a(const struct LDKUntrustedString *NONNULL_PTR this_ptr);
@@ -6769,25 +7505,95 @@ public class bindings {
        public static native void PrintableString_set_a(long this_ptr, String val);
        // MUST_USE_RES struct LDKPrintableString PrintableString_new(struct LDKStr a_arg);
        public static native long PrintableString_new(String a_arg);
+       // void TrackedSpendableOutput_free(struct LDKTrackedSpendableOutput this_obj);
+       public static native void TrackedSpendableOutput_free(long this_obj);
+       // struct LDKSpendableOutputDescriptor TrackedSpendableOutput_get_descriptor(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr);
+       public static native long TrackedSpendableOutput_get_descriptor(long this_ptr);
+       // void TrackedSpendableOutput_set_descriptor(struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr, struct LDKSpendableOutputDescriptor val);
+       public static native void TrackedSpendableOutput_set_descriptor(long this_ptr, long val);
+       // struct LDKChannelId TrackedSpendableOutput_get_channel_id(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr);
+       public static native long TrackedSpendableOutput_get_channel_id(long this_ptr);
+       // void TrackedSpendableOutput_set_channel_id(struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void TrackedSpendableOutput_set_channel_id(long this_ptr, long val);
+       // struct LDKOutputSpendStatus TrackedSpendableOutput_get_status(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr);
+       public static native long TrackedSpendableOutput_get_status(long this_ptr);
+       // void TrackedSpendableOutput_set_status(struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr, struct LDKOutputSpendStatus val);
+       public static native void TrackedSpendableOutput_set_status(long this_ptr, long val);
+       // MUST_USE_RES struct LDKTrackedSpendableOutput TrackedSpendableOutput_new(struct LDKSpendableOutputDescriptor descriptor_arg, struct LDKChannelId channel_id_arg, struct LDKOutputSpendStatus status_arg);
+       public static native long TrackedSpendableOutput_new(long descriptor_arg, long channel_id_arg, long status_arg);
+       // uint64_t TrackedSpendableOutput_clone_ptr(LDKTrackedSpendableOutput *NONNULL_PTR arg);
+       public static native long TrackedSpendableOutput_clone_ptr(long arg);
+       // struct LDKTrackedSpendableOutput TrackedSpendableOutput_clone(const struct LDKTrackedSpendableOutput *NONNULL_PTR orig);
+       public static native long TrackedSpendableOutput_clone(long orig);
+       // bool TrackedSpendableOutput_eq(const struct LDKTrackedSpendableOutput *NONNULL_PTR a, const struct LDKTrackedSpendableOutput *NONNULL_PTR b);
+       public static native boolean TrackedSpendableOutput_eq(long a, long b);
+       // MUST_USE_RES bool TrackedSpendableOutput_is_spent_in(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_arg, struct LDKTransaction tx);
+       public static native boolean TrackedSpendableOutput_is_spent_in(long this_arg, byte[] tx);
+       // struct LDKCVec_u8Z TrackedSpendableOutput_write(const struct LDKTrackedSpendableOutput *NONNULL_PTR obj);
+       public static native byte[] TrackedSpendableOutput_write(long obj);
+       // struct LDKCResult_TrackedSpendableOutputDecodeErrorZ TrackedSpendableOutput_read(struct LDKu8slice ser);
+       public static native long TrackedSpendableOutput_read(byte[] ser);
+       // void OutputSpendStatus_free(struct LDKOutputSpendStatus this_ptr);
+       public static native void OutputSpendStatus_free(long this_ptr);
+       // uint64_t OutputSpendStatus_clone_ptr(LDKOutputSpendStatus *NONNULL_PTR arg);
+       public static native long OutputSpendStatus_clone_ptr(long arg);
+       // struct LDKOutputSpendStatus OutputSpendStatus_clone(const struct LDKOutputSpendStatus *NONNULL_PTR orig);
+       public static native long OutputSpendStatus_clone(long orig);
+       // struct LDKOutputSpendStatus OutputSpendStatus_pending_initial_broadcast(struct LDKCOption_u32Z delayed_until_height);
+       public static native long OutputSpendStatus_pending_initial_broadcast(long delayed_until_height);
+       // struct LDKOutputSpendStatus OutputSpendStatus_pending_first_confirmation(struct LDKThirtyTwoBytes first_broadcast_hash, uint32_t latest_broadcast_height, struct LDKTransaction latest_spending_tx);
+       public static native long OutputSpendStatus_pending_first_confirmation(byte[] first_broadcast_hash, int latest_broadcast_height, byte[] latest_spending_tx);
+       // struct LDKOutputSpendStatus OutputSpendStatus_pending_threshold_confirmations(struct LDKThirtyTwoBytes first_broadcast_hash, uint32_t latest_broadcast_height, struct LDKTransaction latest_spending_tx, uint32_t confirmation_height, struct LDKThirtyTwoBytes confirmation_hash);
+       public static native long OutputSpendStatus_pending_threshold_confirmations(byte[] first_broadcast_hash, int latest_broadcast_height, byte[] latest_spending_tx, int confirmation_height, byte[] confirmation_hash);
+       // bool OutputSpendStatus_eq(const struct LDKOutputSpendStatus *NONNULL_PTR a, const struct LDKOutputSpendStatus *NONNULL_PTR b);
+       public static native boolean OutputSpendStatus_eq(long a, long b);
+       // struct LDKCVec_u8Z OutputSpendStatus_write(const struct LDKOutputSpendStatus *NONNULL_PTR obj);
+       public static native byte[] OutputSpendStatus_write(long obj);
+       // struct LDKCResult_OutputSpendStatusDecodeErrorZ OutputSpendStatus_read(struct LDKu8slice ser);
+       public static native long OutputSpendStatus_read(byte[] ser);
+       // void OutputSweeper_free(struct LDKOutputSweeper this_obj);
+       public static native void OutputSweeper_free(long this_obj);
+       // MUST_USE_RES struct LDKOutputSweeper OutputSweeper_new(struct LDKBestBlock best_block, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKCOption_FilterZ chain_data_source, struct LDKOutputSpender output_spender, struct LDKChangeDestinationSource change_destination_source, struct LDKKVStore kv_store, struct LDKLogger logger);
+       public static native long OutputSweeper_new(long best_block, long broadcaster, long fee_estimator, long chain_data_source, long output_spender, long change_destination_source, long kv_store, long logger);
+       // MUST_USE_RES struct LDKCResult_NoneNoneZ OutputSweeper_track_spendable_outputs(const struct LDKOutputSweeper *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ output_descriptors, struct LDKChannelId channel_id, bool exclude_static_outputs, struct LDKCOption_u32Z delay_until_height);
+       public static native long OutputSweeper_track_spendable_outputs(long this_arg, long[] output_descriptors, long channel_id, boolean exclude_static_outputs, long delay_until_height);
+       // MUST_USE_RES struct LDKCVec_TrackedSpendableOutputZ OutputSweeper_tracked_spendable_outputs(const struct LDKOutputSweeper *NONNULL_PTR this_arg);
+       public static native long[] OutputSweeper_tracked_spendable_outputs(long this_arg);
+       // MUST_USE_RES struct LDKBestBlock OutputSweeper_current_best_block(const struct LDKOutputSweeper *NONNULL_PTR this_arg);
+       public static native long OutputSweeper_current_best_block(long this_arg);
+       // struct LDKListen OutputSweeper_as_Listen(const struct LDKOutputSweeper *NONNULL_PTR this_arg);
+       public static native long OutputSweeper_as_Listen(long this_arg);
+       // struct LDKConfirm OutputSweeper_as_Confirm(const struct LDKOutputSweeper *NONNULL_PTR this_arg);
+       public static native long OutputSweeper_as_Confirm(long this_arg);
+       // void SpendingDelay_free(struct LDKSpendingDelay this_ptr);
+       public static native void SpendingDelay_free(long this_ptr);
+       // uint64_t SpendingDelay_clone_ptr(LDKSpendingDelay *NONNULL_PTR arg);
+       public static native long SpendingDelay_clone_ptr(long arg);
+       // struct LDKSpendingDelay SpendingDelay_clone(const struct LDKSpendingDelay *NONNULL_PTR orig);
+       public static native long SpendingDelay_clone(long orig);
+       // struct LDKSpendingDelay SpendingDelay_relative(uint32_t num_blocks);
+       public static native long SpendingDelay_relative(int num_blocks);
+       // struct LDKSpendingDelay SpendingDelay_absolute(uint32_t height);
+       public static native long SpendingDelay_absolute(int height);
+       // struct LDKCResult_OutputSweeperDecodeErrorZ OutputSweeper_read(struct LDKu8slice ser, struct LDKBroadcasterInterface arg_a, struct LDKFeeEstimator arg_b, struct LDKCOption_FilterZ arg_c, struct LDKOutputSpender arg_d, struct LDKChangeDestinationSource arg_e, struct LDKKVStore arg_f, struct LDKLogger arg_g);
+       public static native long OutputSweeper_read(byte[] ser, long arg_a, long arg_b, long arg_c, long arg_d, long arg_e, long arg_f, long arg_g);
+       // struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ C2Tuple_BestBlockOutputSweeperZ_read(struct LDKu8slice ser, struct LDKBroadcasterInterface arg_a, struct LDKFeeEstimator arg_b, struct LDKCOption_FilterZ arg_c, struct LDKOutputSpender arg_d, struct LDKChangeDestinationSource arg_e, struct LDKKVStore arg_f, struct LDKLogger arg_g);
+       public static native long C2Tuple_BestBlockOutputSweeperZ_read(byte[] ser, long arg_a, long arg_b, long arg_c, long arg_d, long arg_e, long arg_f, long arg_g);
        // void FutureCallback_free(struct LDKFutureCallback this_ptr);
        public static native void FutureCallback_free(long this_ptr);
        // void Future_free(struct LDKFuture this_obj);
        public static native void Future_free(long this_obj);
-       // uint64_t Future_clone_ptr(LDKFuture *NONNULL_PTR arg);
-       public static native long Future_clone_ptr(long arg);
-       // struct LDKFuture Future_clone(const struct LDKFuture *NONNULL_PTR orig);
-       public static native long Future_clone(long orig);
        // void Future_register_callback_fn(const struct LDKFuture *NONNULL_PTR this_arg, struct LDKFutureCallback callback);
        public static native void Future_register_callback_fn(long this_arg, long callback);
-       // void Future_wait(struct LDKFuture this_arg);
+       // void Future_wait(const struct LDKFuture *NONNULL_PTR this_arg);
        public static native void Future_wait(long this_arg);
-       // MUST_USE_RES bool Future_wait_timeout(struct LDKFuture this_arg, uint64_t max_wait);
+       // MUST_USE_RES bool Future_wait_timeout(const struct LDKFuture *NONNULL_PTR this_arg, uint64_t max_wait);
        public static native boolean Future_wait_timeout(long this_arg, long max_wait);
        // void Sleeper_free(struct LDKSleeper this_obj);
        public static native void Sleeper_free(long this_obj);
-       // MUST_USE_RES struct LDKSleeper Sleeper_from_single_future(struct LDKFuture future);
+       // MUST_USE_RES struct LDKSleeper Sleeper_from_single_future(const struct LDKFuture *NONNULL_PTR future);
        public static native long Sleeper_from_single_future(long future);
-       // MUST_USE_RES struct LDKSleeper Sleeper_from_two_futures(struct LDKFuture fut_a, struct LDKFuture fut_b);
+       // MUST_USE_RES struct LDKSleeper Sleeper_from_two_futures(const struct LDKFuture *NONNULL_PTR fut_a, const struct LDKFuture *NONNULL_PTR fut_b);
        public static native long Sleeper_from_two_futures(long fut_a, long fut_b);
        // MUST_USE_RES struct LDKSleeper Sleeper_new(struct LDKCVec_FutureZ futures);
        public static native long Sleeper_new(long[] futures);
@@ -6825,9 +7631,9 @@ public class bindings {
        public static native byte[] Record_get_peer_id(long this_ptr);
        // void Record_set_peer_id(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKPublicKey val);
        public static native void Record_set_peer_id(long this_ptr, byte[] val);
-       // struct LDKCOption_ThirtyTwoBytesZ Record_get_channel_id(const struct LDKRecord *NONNULL_PTR this_ptr);
+       // struct LDKChannelId Record_get_channel_id(const struct LDKRecord *NONNULL_PTR this_ptr);
        public static native long Record_get_channel_id(long this_ptr);
-       // void Record_set_channel_id(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKCOption_ThirtyTwoBytesZ val);
+       // void Record_set_channel_id(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKChannelId val);
        public static native void Record_set_channel_id(long this_ptr, long val);
        // struct LDKStr Record_get_args(const struct LDKRecord *NONNULL_PTR this_ptr);
        public static native String Record_get_args(long this_ptr);
@@ -6845,7 +7651,7 @@ public class bindings {
        public static native int Record_get_line(long this_ptr);
        // void Record_set_line(struct LDKRecord *NONNULL_PTR this_ptr, uint32_t val);
        public static native void Record_set_line(long this_ptr, int val);
-       // MUST_USE_RES struct LDKRecord Record_new(enum LDKLevel level_arg, struct LDKPublicKey peer_id_arg, struct LDKCOption_ThirtyTwoBytesZ channel_id_arg, struct LDKStr args_arg, struct LDKStr module_path_arg, struct LDKStr file_arg, uint32_t line_arg);
+       // MUST_USE_RES struct LDKRecord Record_new(enum LDKLevel level_arg, struct LDKPublicKey peer_id_arg, struct LDKChannelId channel_id_arg, struct LDKStr args_arg, struct LDKStr module_path_arg, struct LDKStr file_arg, uint32_t line_arg);
        public static native long Record_new(Level level_arg, byte[] peer_id_arg, long channel_id_arg, String args_arg, String module_path_arg, String file_arg, int line_arg);
        // uint64_t Record_clone_ptr(LDKRecord *NONNULL_PTR arg);
        public static native long Record_clone_ptr(long arg);
@@ -7081,20 +7887,30 @@ public class bindings {
        public static native long UserConfig_default();
        // void BestBlock_free(struct LDKBestBlock this_obj);
        public static native void BestBlock_free(long this_obj);
+       // const uint8_t (*BestBlock_get_block_hash(const struct LDKBestBlock *NONNULL_PTR this_ptr))[32];
+       public static native byte[] BestBlock_get_block_hash(long this_ptr);
+       // void BestBlock_set_block_hash(struct LDKBestBlock *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+       public static native void BestBlock_set_block_hash(long this_ptr, byte[] val);
+       // uint32_t BestBlock_get_height(const struct LDKBestBlock *NONNULL_PTR this_ptr);
+       public static native int BestBlock_get_height(long this_ptr);
+       // void BestBlock_set_height(struct LDKBestBlock *NONNULL_PTR this_ptr, uint32_t val);
+       public static native void BestBlock_set_height(long this_ptr, int val);
+       // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash_arg, uint32_t height_arg);
+       public static native long BestBlock_new(byte[] block_hash_arg, int height_arg);
        // uint64_t BestBlock_clone_ptr(LDKBestBlock *NONNULL_PTR arg);
        public static native long BestBlock_clone_ptr(long arg);
        // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
        public static native long BestBlock_clone(long orig);
+       // uint64_t BestBlock_hash(const struct LDKBestBlock *NONNULL_PTR o);
+       public static native long BestBlock_hash(long o);
        // bool BestBlock_eq(const struct LDKBestBlock *NONNULL_PTR a, const struct LDKBestBlock *NONNULL_PTR b);
        public static native boolean BestBlock_eq(long a, long b);
        // MUST_USE_RES struct LDKBestBlock BestBlock_from_network(enum LDKNetwork network);
        public static native long BestBlock_from_network(Network network);
-       // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
-       public static native long BestBlock_new(byte[] block_hash, int height);
-       // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
-       public static native byte[] BestBlock_block_hash(long this_arg);
-       // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
-       public static native int BestBlock_height(long this_arg);
+       // struct LDKCVec_u8Z BestBlock_write(const struct LDKBestBlock *NONNULL_PTR obj);
+       public static native byte[] BestBlock_write(long obj);
+       // struct LDKCResult_BestBlockDecodeErrorZ BestBlock_read(struct LDKu8slice ser);
+       public static native long BestBlock_read(byte[] ser);
        // void Listen_free(struct LDKListen this_ptr);
        public static native void Listen_free(long this_ptr);
        // void Confirm_free(struct LDKConfirm this_ptr);
@@ -7153,6 +7969,8 @@ public class bindings {
        public static native ConfirmationTarget ConfirmationTarget_non_anchor_channel_fee();
        // enum LDKConfirmationTarget ConfirmationTarget_channel_close_minimum(void);
        public static native ConfirmationTarget ConfirmationTarget_channel_close_minimum();
+       // enum LDKConfirmationTarget ConfirmationTarget_output_spending_fee(void);
+       public static native ConfirmationTarget ConfirmationTarget_output_spending_fee();
        // uint64_t ConfirmationTarget_hash(const enum LDKConfirmationTarget *NONNULL_PTR o);
        public static native long ConfirmationTarget_hash(long o);
        // bool ConfirmationTarget_eq(const enum LDKConfirmationTarget *NONNULL_PTR a, const enum LDKConfirmationTarget *NONNULL_PTR b);
@@ -7181,7 +7999,7 @@ public class bindings {
        public static native long[] ChainMonitor_get_claimable_balances(long this_arg, long[] ignored_channels);
        // MUST_USE_RES struct LDKCResult_LockedChannelMonitorNoneZ ChainMonitor_get_monitor(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo);
        public static native long ChainMonitor_get_monitor(long this_arg, long funding_txo);
-       // MUST_USE_RES struct LDKCVec_OutPointZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg);
+       // MUST_USE_RES struct LDKCVec_C2Tuple_OutPointChannelIdZZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg);
        public static native long[] ChainMonitor_list_monitors(long this_arg);
        // MUST_USE_RES struct LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ChainMonitor_list_pending_monitor_updates(const struct LDKChainMonitor *NONNULL_PTR this_arg);
        public static native long[] ChainMonitor_list_pending_monitor_updates(long this_arg);
@@ -7191,6 +8009,10 @@ public class bindings {
        public static native long ChainMonitor_get_update_future(long this_arg);
        // void ChainMonitor_rebroadcast_pending_claims(const struct LDKChainMonitor *NONNULL_PTR this_arg);
        public static native void ChainMonitor_rebroadcast_pending_claims(long this_arg);
+       // void ChainMonitor_signer_unblocked(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint monitor_opt);
+       public static native void ChainMonitor_signer_unblocked(long this_arg, long monitor_opt);
+       // void ChainMonitor_archive_fully_resolved_channel_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg);
+       public static native void ChainMonitor_archive_fully_resolved_channel_monitors(long this_arg);
        // struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg);
        public static native long ChainMonitor_as_Listen(long this_arg);
        // struct LDKConfirm ChainMonitor_as_Confirm(const struct LDKChainMonitor *NONNULL_PTR this_arg);
@@ -7205,6 +8027,10 @@ public class bindings {
        public static native long ChannelMonitorUpdate_get_update_id(long this_ptr);
        // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
        public static native void ChannelMonitorUpdate_set_update_id(long this_ptr, long val);
+       // struct LDKChannelId ChannelMonitorUpdate_get_channel_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
+       public static native long ChannelMonitorUpdate_get_channel_id(long this_ptr);
+       // void ChannelMonitorUpdate_set_channel_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void ChannelMonitorUpdate_set_channel_id(long this_ptr, long val);
        // uint64_t ChannelMonitorUpdate_clone_ptr(LDKChannelMonitorUpdate *NONNULL_PTR arg);
        public static native long ChannelMonitorUpdate_clone_ptr(long arg);
        // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
@@ -7223,10 +8049,12 @@ public class bindings {
        public static native long MonitorEvent_clone(long orig);
        // struct LDKMonitorEvent MonitorEvent_htlcevent(struct LDKHTLCUpdate a);
        public static native long MonitorEvent_htlcevent(long a);
+       // struct LDKMonitorEvent MonitorEvent_holder_force_closed_with_info(struct LDKClosureReason reason, struct LDKOutPoint outpoint, struct LDKChannelId channel_id);
+       public static native long MonitorEvent_holder_force_closed_with_info(long reason, long outpoint, long channel_id);
        // struct LDKMonitorEvent MonitorEvent_holder_force_closed(struct LDKOutPoint a);
        public static native long MonitorEvent_holder_force_closed(long a);
-       // struct LDKMonitorEvent MonitorEvent_completed(struct LDKOutPoint funding_txo, uint64_t monitor_update_id);
-       public static native long MonitorEvent_completed(long funding_txo, long monitor_update_id);
+       // struct LDKMonitorEvent MonitorEvent_completed(struct LDKOutPoint funding_txo, struct LDKChannelId channel_id, uint64_t monitor_update_id);
+       public static native long MonitorEvent_completed(long funding_txo, long channel_id, long monitor_update_id);
        // bool MonitorEvent_eq(const struct LDKMonitorEvent *NONNULL_PTR a, const struct LDKMonitorEvent *NONNULL_PTR b);
        public static native boolean MonitorEvent_eq(long a, long b);
        // struct LDKCVec_u8Z MonitorEvent_write(const struct LDKMonitorEvent *NONNULL_PTR obj);
@@ -7281,6 +8109,8 @@ public class bindings {
        public static native long ChannelMonitor_get_latest_update_id(long this_arg);
        // MUST_USE_RES struct LDKC2Tuple_OutPointCVec_u8ZZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
        public static native long ChannelMonitor_get_funding_txo(long this_arg);
+       // MUST_USE_RES struct LDKChannelId ChannelMonitor_channel_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
+       public static native long ChannelMonitor_channel_id(long this_arg);
        // MUST_USE_RES struct LDKCVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
        public static native long[] ChannelMonitor_get_outputs_to_watch(long this_arg);
        // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter, const struct LDKLogger *NONNULL_PTR logger);
@@ -7297,8 +8127,8 @@ public class bindings {
        public static native long ChannelMonitor_sign_to_local_justice_tx(long this_arg, byte[] justice_tx, long input_idx, long value, long commitment_number);
        // MUST_USE_RES struct LDKPublicKey ChannelMonitor_get_counterparty_node_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
        public static native byte[] ChannelMonitor_get_counterparty_node_id(long this_arg);
-       // MUST_USE_RES struct LDKCVec_TransactionZ ChannelMonitor_get_latest_holder_commitment_txn(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKLogger *NONNULL_PTR logger);
-       public static native byte[][] ChannelMonitor_get_latest_holder_commitment_txn(long this_arg, long logger);
+       // void ChannelMonitor_broadcast_latest_holder_commitment_txn(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, const struct LDKFeeEstimator *NONNULL_PTR fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
+       public static native void ChannelMonitor_broadcast_latest_holder_commitment_txn(long this_arg, long broadcaster, long fee_estimator, long logger);
        // MUST_USE_RES struct LDKCVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_block_connected(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
        public static native long[] ChannelMonitor_block_connected(long this_arg, byte[] header, long[] txdata, int height, long broadcaster, long fee_estimator, long logger);
        // void ChannelMonitor_block_disconnected(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
@@ -7315,8 +8145,12 @@ public class bindings {
        public static native long ChannelMonitor_current_best_block(long this_arg);
        // void ChannelMonitor_rebroadcast_pending_claims(const struct LDKChannelMonitor *NONNULL_PTR this_arg, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
        public static native void ChannelMonitor_rebroadcast_pending_claims(long this_arg, long broadcaster, long fee_estimator, long logger);
+       // void ChannelMonitor_signer_unblocked(const struct LDKChannelMonitor *NONNULL_PTR this_arg, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
+       public static native void ChannelMonitor_signer_unblocked(long this_arg, long broadcaster, long fee_estimator, long logger);
        // MUST_USE_RES struct LDKCVec_SpendableOutputDescriptorZ ChannelMonitor_get_spendable_outputs(const struct LDKChannelMonitor *NONNULL_PTR this_arg, struct LDKTransaction tx, uint32_t confirmation_height);
        public static native long[] ChannelMonitor_get_spendable_outputs(long this_arg, byte[] tx, int confirmation_height);
+       // MUST_USE_RES bool ChannelMonitor_is_fully_resolved(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKLogger *NONNULL_PTR logger);
+       public static native boolean ChannelMonitor_is_fully_resolved(long this_arg, long logger);
        // MUST_USE_RES struct LDKCVec_BalanceZ ChannelMonitor_get_claimable_balances(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
        public static native long[] ChannelMonitor_get_claimable_balances(long this_arg);
        // struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ C2Tuple_ThirtyTwoBytesChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKEntropySource *NONNULL_PTR arg_a, const struct LDKSignerProvider *NONNULL_PTR arg_b);
@@ -7341,8 +8175,6 @@ public class bindings {
        public static native boolean OutPoint_eq(long a, long b);
        // uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o);
        public static native long OutPoint_hash(long o);
-       // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
-       public static native byte[] OutPoint_to_channel_id(long this_arg);
        // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
        public static native byte[] OutPoint_write(long obj);
        // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
@@ -7363,6 +8195,14 @@ public class bindings {
        public static native void InboundHTLCErr_set_msg(long this_ptr, String val);
        // MUST_USE_RES struct LDKInboundHTLCErr InboundHTLCErr_new(uint16_t err_code_arg, struct LDKCVec_u8Z err_data_arg, struct LDKStr msg_arg);
        public static native long InboundHTLCErr_new(short err_code_arg, byte[] err_data_arg, String msg_arg);
+       // uint64_t InboundHTLCErr_clone_ptr(LDKInboundHTLCErr *NONNULL_PTR arg);
+       public static native long InboundHTLCErr_clone_ptr(long arg);
+       // struct LDKInboundHTLCErr InboundHTLCErr_clone(const struct LDKInboundHTLCErr *NONNULL_PTR orig);
+       public static native long InboundHTLCErr_clone(long orig);
+       // uint64_t InboundHTLCErr_hash(const struct LDKInboundHTLCErr *NONNULL_PTR o);
+       public static native long InboundHTLCErr_hash(long o);
+       // bool InboundHTLCErr_eq(const struct LDKInboundHTLCErr *NONNULL_PTR a, const struct LDKInboundHTLCErr *NONNULL_PTR b);
+       public static native boolean InboundHTLCErr_eq(long a, long b);
        // struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ peel_payment_onion(const struct LDKUpdateAddHTLC *NONNULL_PTR msg, const struct LDKNodeSigner *NONNULL_PTR node_signer, const struct LDKLogger *NONNULL_PTR logger, uint32_t cur_height, bool accept_mpp_keysend, bool allow_skimmed_fees);
        public static native long peel_payment_onion(long msg, long node_signer, long logger, int cur_height, boolean accept_mpp_keysend, boolean allow_skimmed_fees);
        // void PendingHTLCRouting_free(struct LDKPendingHTLCRouting this_ptr);
@@ -7373,10 +8213,10 @@ public class bindings {
        public static native long PendingHTLCRouting_clone(long orig);
        // struct LDKPendingHTLCRouting PendingHTLCRouting_forward(struct LDKOnionPacket onion_packet, uint64_t short_channel_id, struct LDKBlindedForward blinded);
        public static native long PendingHTLCRouting_forward(long onion_packet, long short_channel_id, long blinded);
-       // struct LDKPendingHTLCRouting PendingHTLCRouting_receive(struct LDKFinalOnionHopData payment_data, struct LDKCOption_CVec_u8ZZ payment_metadata, uint32_t incoming_cltv_expiry, struct LDKThirtyTwoBytes phantom_shared_secret, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs, bool requires_blinded_error);
-       public static native long PendingHTLCRouting_receive(long payment_data, long payment_metadata, int incoming_cltv_expiry, byte[] phantom_shared_secret, long[] custom_tlvs, boolean requires_blinded_error);
-       // struct LDKPendingHTLCRouting PendingHTLCRouting_receive_keysend(struct LDKFinalOnionHopData payment_data, struct LDKThirtyTwoBytes payment_preimage, struct LDKCOption_CVec_u8ZZ payment_metadata, uint32_t incoming_cltv_expiry, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs);
-       public static native long PendingHTLCRouting_receive_keysend(long payment_data, byte[] payment_preimage, long payment_metadata, int incoming_cltv_expiry, long[] custom_tlvs);
+       // struct LDKPendingHTLCRouting PendingHTLCRouting_receive(struct LDKFinalOnionHopData payment_data, struct LDKCOption_CVec_u8ZZ payment_metadata, struct LDKCOption_PaymentContextZ payment_context, uint32_t incoming_cltv_expiry, struct LDKThirtyTwoBytes phantom_shared_secret, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs, bool requires_blinded_error);
+       public static native long PendingHTLCRouting_receive(long payment_data, long payment_metadata, long payment_context, int incoming_cltv_expiry, byte[] phantom_shared_secret, long[] custom_tlvs, boolean requires_blinded_error);
+       // struct LDKPendingHTLCRouting PendingHTLCRouting_receive_keysend(struct LDKFinalOnionHopData payment_data, struct LDKThirtyTwoBytes payment_preimage, struct LDKCOption_CVec_u8ZZ payment_metadata, uint32_t incoming_cltv_expiry, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs, bool requires_blinded_error);
+       public static native long PendingHTLCRouting_receive_keysend(long payment_data, byte[] payment_preimage, long payment_metadata, int incoming_cltv_expiry, long[] custom_tlvs, boolean requires_blinded_error);
        // void BlindedForward_free(struct LDKBlindedForward this_obj);
        public static native void BlindedForward_free(long this_obj);
        // struct LDKPublicKey BlindedForward_get_inbound_blinding_point(const struct LDKBlindedForward *NONNULL_PTR this_ptr);
@@ -7529,10 +8369,10 @@ public class bindings {
        public static native long ChannelCounterparty_clone(long orig);
        // void ChannelDetails_free(struct LDKChannelDetails this_obj);
        public static native void ChannelDetails_free(long this_obj);
-       // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
-       public static native byte[] ChannelDetails_get_channel_id(long this_ptr);
-       // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void ChannelDetails_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
+       public static native long ChannelDetails_get_channel_id(long this_ptr);
+       // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void ChannelDetails_set_channel_id(long this_ptr, long val);
        // struct LDKChannelCounterparty ChannelDetails_get_counterparty(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
        public static native long ChannelDetails_get_counterparty(long this_ptr);
        // void ChannelDetails_set_counterparty(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelCounterparty val);
@@ -7637,8 +8477,6 @@ public class bindings {
        public static native long ChannelDetails_get_config(long this_ptr);
        // void ChannelDetails_set_config(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
        public static native void ChannelDetails_set_config(long this_ptr, long val);
-       // MUST_USE_RES struct LDKChannelDetails ChannelDetails_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKChannelCounterparty counterparty_arg, struct LDKOutPoint funding_txo_arg, struct LDKChannelTypeFeatures channel_type_arg, struct LDKCOption_u64Z short_channel_id_arg, struct LDKCOption_u64Z outbound_scid_alias_arg, struct LDKCOption_u64Z inbound_scid_alias_arg, uint64_t channel_value_satoshis_arg, struct LDKCOption_u64Z unspendable_punishment_reserve_arg, struct LDKU128 user_channel_id_arg, struct LDKCOption_u32Z feerate_sat_per_1000_weight_arg, uint64_t balance_msat_arg, uint64_t outbound_capacity_msat_arg, uint64_t next_outbound_htlc_limit_msat_arg, uint64_t next_outbound_htlc_minimum_msat_arg, uint64_t inbound_capacity_msat_arg, struct LDKCOption_u32Z confirmations_required_arg, struct LDKCOption_u32Z confirmations_arg, struct LDKCOption_u16Z force_close_spend_delay_arg, bool is_outbound_arg, bool is_channel_ready_arg, struct LDKCOption_ChannelShutdownStateZ channel_shutdown_state_arg, bool is_usable_arg, bool is_public_arg, struct LDKCOption_u64Z inbound_htlc_minimum_msat_arg, struct LDKCOption_u64Z inbound_htlc_maximum_msat_arg, struct LDKChannelConfig config_arg);
-       public static native long ChannelDetails_new(byte[] channel_id_arg, long counterparty_arg, long funding_txo_arg, long channel_type_arg, long short_channel_id_arg, long outbound_scid_alias_arg, long inbound_scid_alias_arg, long channel_value_satoshis_arg, long unspendable_punishment_reserve_arg, byte[] user_channel_id_arg, long feerate_sat_per_1000_weight_arg, long balance_msat_arg, long outbound_capacity_msat_arg, long next_outbound_htlc_limit_msat_arg, long next_outbound_htlc_minimum_msat_arg, long inbound_capacity_msat_arg, long confirmations_required_arg, long confirmations_arg, long force_close_spend_delay_arg, boolean is_outbound_arg, boolean is_channel_ready_arg, long channel_shutdown_state_arg, boolean is_usable_arg, boolean is_public_arg, long inbound_htlc_minimum_msat_arg, long inbound_htlc_maximum_msat_arg, long config_arg);
        // uint64_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg);
        public static native long ChannelDetails_clone_ptr(long arg);
        // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
@@ -7699,7 +8537,7 @@ public class bindings {
        public static native long ChannelManager_new(long fee_est, long chain_monitor, long tx_broadcaster, long router, long logger, long entropy_source, long node_signer, long signer_provider, long config, long params, int current_timestamp);
        // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
        public static native long ChannelManager_get_current_default_configuration(long this_arg);
-       // MUST_USE_RES struct LDKCResult_ThirtyTwoBytesAPIErrorZ ChannelManager_create_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, struct LDKU128 user_channel_id, struct LDKCOption_ThirtyTwoBytesZ temporary_channel_id, struct LDKUserConfig override_config);
+       // MUST_USE_RES struct LDKCResult_ChannelIdAPIErrorZ ChannelManager_create_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, struct LDKU128 user_channel_id, struct LDKChannelId temporary_channel_id, struct LDKUserConfig override_config);
        public static native long ChannelManager_create_channel(long this_arg, byte[] their_network_key, long channel_value_satoshis, long push_msat, byte[] user_channel_id, long temporary_channel_id, long override_config);
        // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
        public static native long[] ChannelManager_list_channels(long this_arg);
@@ -7709,14 +8547,14 @@ public class bindings {
        public static native long[] ChannelManager_list_channels_with_counterparty(long this_arg, byte[] counterparty_node_id);
        // MUST_USE_RES struct LDKCVec_RecentPaymentDetailsZ ChannelManager_list_recent_payments(const struct LDKChannelManager *NONNULL_PTR this_arg);
        public static native long[] ChannelManager_list_recent_payments(long this_arg);
-       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id);
-       public static native long ChannelManager_close_channel(long this_arg, byte[] channel_id, byte[] counterparty_node_id);
-       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel_with_feerate_and_script(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKCOption_u32Z target_feerate_sats_per_1000_weight, struct LDKShutdownScript shutdown_script);
-       public static native long ChannelManager_close_channel_with_feerate_and_script(long this_arg, byte[] channel_id, byte[] counterparty_node_id, long target_feerate_sats_per_1000_weight, long shutdown_script);
-       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_broadcasting_latest_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id);
-       public static native long ChannelManager_force_close_broadcasting_latest_txn(long this_arg, byte[] channel_id, byte[] counterparty_node_id);
-       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_without_broadcasting_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id);
-       public static native long ChannelManager_force_close_without_broadcasting_txn(long this_arg, byte[] channel_id, byte[] counterparty_node_id);
+       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id);
+       public static native long ChannelManager_close_channel(long this_arg, long channel_id, byte[] counterparty_node_id);
+       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel_with_feerate_and_script(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id, struct LDKCOption_u32Z target_feerate_sats_per_1000_weight, struct LDKShutdownScript shutdown_script);
+       public static native long ChannelManager_close_channel_with_feerate_and_script(long this_arg, long channel_id, byte[] counterparty_node_id, long target_feerate_sats_per_1000_weight, long shutdown_script);
+       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_broadcasting_latest_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id);
+       public static native long ChannelManager_force_close_broadcasting_latest_txn(long this_arg, long channel_id, byte[] counterparty_node_id);
+       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_without_broadcasting_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id);
+       public static native long ChannelManager_force_close_without_broadcasting_txn(long this_arg, long channel_id, byte[] counterparty_node_id);
        // void ChannelManager_force_close_all_channels_broadcasting_latest_txn(const struct LDKChannelManager *NONNULL_PTR this_arg);
        public static native void ChannelManager_force_close_all_channels_broadcasting_latest_txn(long this_arg);
        // void ChannelManager_force_close_all_channels_without_broadcasting_txn(const struct LDKChannelManager *NONNULL_PTR this_arg);
@@ -7737,16 +8575,16 @@ public class bindings {
        public static native long ChannelManager_send_spontaneous_preflight_probes(long this_arg, byte[] node_id, long amount_msat, int final_cltv_expiry_delta, long liquidity_limit_multiplier);
        // MUST_USE_RES struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ ChannelManager_send_preflight_probes(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKRouteParameters route_params, struct LDKCOption_u64Z liquidity_limit_multiplier);
        public static native long ChannelManager_send_preflight_probes(long this_arg, long route_params, long liquidity_limit_multiplier);
-       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKTransaction funding_transaction);
-       public static native long ChannelManager_funding_transaction_generated(long this_arg, byte[] temporary_channel_id, byte[] counterparty_node_id, byte[] funding_transaction);
-       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_batch_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ temporary_channels, struct LDKTransaction funding_transaction);
+       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKTransaction funding_transaction);
+       public static native long ChannelManager_funding_transaction_generated(long this_arg, long temporary_channel_id, byte[] counterparty_node_id, byte[] funding_transaction);
+       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_batch_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_ChannelIdPublicKeyZZ temporary_channels, struct LDKTransaction funding_transaction);
        public static native long ChannelManager_batch_funding_transaction_generated(long this_arg, long[] temporary_channels, byte[] funding_transaction);
-       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_partial_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ThirtyTwoBytesZ channel_ids, const struct LDKChannelConfigUpdate *NONNULL_PTR config_update);
-       public static native long ChannelManager_update_partial_channel_config(long this_arg, byte[] counterparty_node_id, byte[][] channel_ids, long config_update);
-       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ThirtyTwoBytesZ channel_ids, const struct LDKChannelConfig *NONNULL_PTR config);
-       public static native long ChannelManager_update_channel_config(long this_arg, byte[] counterparty_node_id, byte[][] channel_ids, long config);
-       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_forward_intercepted_htlc(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes intercept_id, const uint8_t (*next_hop_channel_id)[32], struct LDKPublicKey next_node_id, uint64_t amt_to_forward_msat);
-       public static native long ChannelManager_forward_intercepted_htlc(long this_arg, byte[] intercept_id, byte[] next_hop_channel_id, byte[] next_node_id, long amt_to_forward_msat);
+       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_partial_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ChannelIdZ channel_ids, const struct LDKChannelConfigUpdate *NONNULL_PTR config_update);
+       public static native long ChannelManager_update_partial_channel_config(long this_arg, byte[] counterparty_node_id, long[] channel_ids, long config_update);
+       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ChannelIdZ channel_ids, const struct LDKChannelConfig *NONNULL_PTR config);
+       public static native long ChannelManager_update_channel_config(long this_arg, byte[] counterparty_node_id, long[] channel_ids, long config);
+       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_forward_intercepted_htlc(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes intercept_id, const struct LDKChannelId *NONNULL_PTR next_hop_channel_id, struct LDKPublicKey next_node_id, uint64_t amt_to_forward_msat);
+       public static native long ChannelManager_forward_intercepted_htlc(long this_arg, byte[] intercept_id, long next_hop_channel_id, byte[] next_node_id, long amt_to_forward_msat);
        // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_fail_intercepted_htlc(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes intercept_id);
        public static native long ChannelManager_fail_intercepted_htlc(long this_arg, byte[] intercept_id);
        // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
@@ -7763,13 +8601,17 @@ public class bindings {
        public static native void ChannelManager_claim_funds_with_known_custom_tlvs(long this_arg, byte[] payment_preimage);
        // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
        public static native byte[] ChannelManager_get_our_node_id(long this_arg);
-       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id);
-       public static native long ChannelManager_accept_inbound_channel(long this_arg, byte[] temporary_channel_id, byte[] counterparty_node_id, byte[] user_channel_id);
-       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id);
-       public static native long ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(long this_arg, byte[] temporary_channel_id, byte[] counterparty_node_id, byte[] user_channel_id);
+       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id);
+       public static native long ChannelManager_accept_inbound_channel(long this_arg, long temporary_channel_id, byte[] counterparty_node_id, byte[] user_channel_id);
+       // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id);
+       public static native long ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(long this_arg, long temporary_channel_id, byte[] counterparty_node_id, byte[] user_channel_id);
+       // MUST_USE_RES struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ChannelManager_create_offer_builder(const struct LDKChannelManager *NONNULL_PTR this_arg);
+       public static native long ChannelManager_create_offer_builder(long this_arg);
+       // MUST_USE_RES struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ChannelManager_create_refund_builder(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t amount_msats, uint64_t absolute_expiry, struct LDKThirtyTwoBytes payment_id, struct LDKRetry retry_strategy, struct LDKCOption_u64Z max_total_routing_fee_msat);
+       public static native long ChannelManager_create_refund_builder(long this_arg, long amount_msats, long absolute_expiry, byte[] payment_id, long retry_strategy, long max_total_routing_fee_msat);
        // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ ChannelManager_pay_for_offer(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKOffer *NONNULL_PTR offer, struct LDKCOption_u64Z quantity, struct LDKCOption_u64Z amount_msats, struct LDKCOption_StrZ payer_note, struct LDKThirtyTwoBytes payment_id, struct LDKRetry retry_strategy, struct LDKCOption_u64Z max_total_routing_fee_msat);
        public static native long ChannelManager_pay_for_offer(long this_arg, long offer, long quantity, long amount_msats, long payer_note, byte[] payment_id, long retry_strategy, long max_total_routing_fee_msat);
-       // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ ChannelManager_request_refund_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRefund *NONNULL_PTR refund);
+       // MUST_USE_RES struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ ChannelManager_request_refund_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRefund *NONNULL_PTR refund);
        public static native long ChannelManager_request_refund_payment(long this_arg, long refund);
        // MUST_USE_RES struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ ChannelManager_create_inbound_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs, struct LDKCOption_u16Z min_final_cltv_expiry_delta);
        public static native long ChannelManager_create_inbound_payment(long this_arg, long min_value_msat, int invoice_expiry_delta_secs, long min_final_cltv_expiry_delta);
@@ -7811,6 +8653,8 @@ public class bindings {
        public static native long ChannelManager_as_ChannelMessageHandler(long this_arg);
        // struct LDKOffersMessageHandler ChannelManager_as_OffersMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
        public static native long ChannelManager_as_OffersMessageHandler(long this_arg);
+       // struct LDKNodeIdLookUp ChannelManager_as_NodeIdLookUp(const struct LDKChannelManager *NONNULL_PTR this_arg);
+       public static native long ChannelManager_as_NodeIdLookUp(long this_arg);
        // struct LDKInitFeatures provided_init_features(const struct LDKUserConfig *NONNULL_PTR config);
        public static native long provided_init_features(long config);
        // struct LDKCVec_u8Z CounterpartyForwardingInfo_write(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR obj);
@@ -7911,6 +8755,8 @@ public class bindings {
        public static native long DelayedPaymentBasepoint_hash(long o);
        // MUST_USE_RES struct LDKPublicKey DelayedPaymentBasepoint_to_public_key(const struct LDKDelayedPaymentBasepoint *NONNULL_PTR this_arg);
        public static native byte[] DelayedPaymentBasepoint_to_public_key(long this_arg);
+       // MUST_USE_RES struct LDKThirtyTwoBytes DelayedPaymentBasepoint_derive_add_tweak(const struct LDKDelayedPaymentBasepoint *NONNULL_PTR this_arg, struct LDKPublicKey per_commitment_point);
+       public static native byte[] DelayedPaymentBasepoint_derive_add_tweak(long this_arg, byte[] per_commitment_point);
        // struct LDKCVec_u8Z DelayedPaymentBasepoint_write(const struct LDKDelayedPaymentBasepoint *NONNULL_PTR obj);
        public static native byte[] DelayedPaymentBasepoint_write(long obj);
        // struct LDKCResult_DelayedPaymentBasepointDecodeErrorZ DelayedPaymentBasepoint_read(struct LDKu8slice ser);
@@ -7957,6 +8803,8 @@ public class bindings {
        public static native long HtlcBasepoint_hash(long o);
        // MUST_USE_RES struct LDKPublicKey HtlcBasepoint_to_public_key(const struct LDKHtlcBasepoint *NONNULL_PTR this_arg);
        public static native byte[] HtlcBasepoint_to_public_key(long this_arg);
+       // MUST_USE_RES struct LDKThirtyTwoBytes HtlcBasepoint_derive_add_tweak(const struct LDKHtlcBasepoint *NONNULL_PTR this_arg, struct LDKPublicKey per_commitment_point);
+       public static native byte[] HtlcBasepoint_derive_add_tweak(long this_arg, byte[] per_commitment_point);
        // struct LDKCVec_u8Z HtlcBasepoint_write(const struct LDKHtlcBasepoint *NONNULL_PTR obj);
        public static native byte[] HtlcBasepoint_write(long obj);
        // struct LDKCResult_HtlcBasepointDecodeErrorZ HtlcBasepoint_read(struct LDKu8slice ser);
@@ -7985,6 +8833,8 @@ public class bindings {
        public static native byte[] HtlcKey_write(long obj);
        // struct LDKCResult_HtlcKeyDecodeErrorZ HtlcKey_read(struct LDKu8slice ser);
        public static native long HtlcKey_read(byte[] ser);
+       // struct LDKPublicKey add_public_key_tweak(struct LDKPublicKey base_point, const uint8_t (*tweak)[32]);
+       public static native byte[] add_public_key_tweak(byte[] base_point, byte[] tweak);
        // void RevocationBasepoint_free(struct LDKRevocationBasepoint this_obj);
        public static native void RevocationBasepoint_free(long this_obj);
        // struct LDKPublicKey RevocationBasepoint_get_a(const struct LDKRevocationBasepoint *NONNULL_PTR this_ptr);
@@ -8059,6 +8909,8 @@ public class bindings {
        public static native long DecodeError_io(IOError a);
        // struct LDKDecodeError DecodeError_unsupported_compression(void);
        public static native long DecodeError_unsupported_compression();
+       // struct LDKDecodeError DecodeError_dangerous_value(void);
+       public static native long DecodeError_dangerous_value();
        // uint64_t DecodeError_hash(const struct LDKDecodeError *NONNULL_PTR o);
        public static native long DecodeError_hash(long o);
        // bool DecodeError_eq(const struct LDKDecodeError *NONNULL_PTR a, const struct LDKDecodeError *NONNULL_PTR b);
@@ -8089,16 +8941,16 @@ public class bindings {
        public static native boolean Init_eq(long a, long b);
        // void ErrorMessage_free(struct LDKErrorMessage this_obj);
        public static native void ErrorMessage_free(long this_obj);
-       // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
-       public static native byte[] ErrorMessage_get_channel_id(long this_ptr);
-       // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void ErrorMessage_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
+       public static native long ErrorMessage_get_channel_id(long this_ptr);
+       // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void ErrorMessage_set_channel_id(long this_ptr, long val);
        // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
        public static native String ErrorMessage_get_data(long this_ptr);
        // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKStr val);
        public static native void ErrorMessage_set_data(long this_ptr, String val);
-       // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
-       public static native long ErrorMessage_new(byte[] channel_id_arg, String data_arg);
+       // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKChannelId channel_id_arg, struct LDKStr data_arg);
+       public static native long ErrorMessage_new(long channel_id_arg, String data_arg);
        // uint64_t ErrorMessage_clone_ptr(LDKErrorMessage *NONNULL_PTR arg);
        public static native long ErrorMessage_clone_ptr(long arg);
        // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
@@ -8109,16 +8961,16 @@ public class bindings {
        public static native boolean ErrorMessage_eq(long a, long b);
        // void WarningMessage_free(struct LDKWarningMessage this_obj);
        public static native void WarningMessage_free(long this_obj);
-       // const uint8_t (*WarningMessage_get_channel_id(const struct LDKWarningMessage *NONNULL_PTR this_ptr))[32];
-       public static native byte[] WarningMessage_get_channel_id(long this_ptr);
-       // void WarningMessage_set_channel_id(struct LDKWarningMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void WarningMessage_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId WarningMessage_get_channel_id(const struct LDKWarningMessage *NONNULL_PTR this_ptr);
+       public static native long WarningMessage_get_channel_id(long this_ptr);
+       // void WarningMessage_set_channel_id(struct LDKWarningMessage *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void WarningMessage_set_channel_id(long this_ptr, long val);
        // struct LDKStr WarningMessage_get_data(const struct LDKWarningMessage *NONNULL_PTR this_ptr);
        public static native String WarningMessage_get_data(long this_ptr);
        // void WarningMessage_set_data(struct LDKWarningMessage *NONNULL_PTR this_ptr, struct LDKStr val);
        public static native void WarningMessage_set_data(long this_ptr, String val);
-       // MUST_USE_RES struct LDKWarningMessage WarningMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
-       public static native long WarningMessage_new(byte[] channel_id_arg, String data_arg);
+       // MUST_USE_RES struct LDKWarningMessage WarningMessage_new(struct LDKChannelId channel_id_arg, struct LDKStr data_arg);
+       public static native long WarningMessage_new(long channel_id_arg, String data_arg);
        // uint64_t WarningMessage_clone_ptr(LDKWarningMessage *NONNULL_PTR arg);
        public static native long WarningMessage_clone_ptr(long arg);
        // struct LDKWarningMessage WarningMessage_clone(const struct LDKWarningMessage *NONNULL_PTR orig);
@@ -8163,90 +9015,106 @@ public class bindings {
        public static native long Pong_hash(long o);
        // bool Pong_eq(const struct LDKPong *NONNULL_PTR a, const struct LDKPong *NONNULL_PTR b);
        public static native boolean Pong_eq(long a, long b);
+       // void CommonOpenChannelFields_free(struct LDKCommonOpenChannelFields this_obj);
+       public static native void CommonOpenChannelFields_free(long this_obj);
+       // const uint8_t (*CommonOpenChannelFields_get_chain_hash(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr))[32];
+       public static native byte[] CommonOpenChannelFields_get_chain_hash(long this_ptr);
+       // void CommonOpenChannelFields_set_chain_hash(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+       public static native void CommonOpenChannelFields_set_chain_hash(long this_ptr, byte[] val);
+       // struct LDKChannelId CommonOpenChannelFields_get_temporary_channel_id(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+       public static native long CommonOpenChannelFields_get_temporary_channel_id(long this_ptr);
+       // void CommonOpenChannelFields_set_temporary_channel_id(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void CommonOpenChannelFields_set_temporary_channel_id(long this_ptr, long val);
+       // uint64_t CommonOpenChannelFields_get_funding_satoshis(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+       public static native long CommonOpenChannelFields_get_funding_satoshis(long this_ptr);
+       // void CommonOpenChannelFields_set_funding_satoshis(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void CommonOpenChannelFields_set_funding_satoshis(long this_ptr, long val);
+       // uint64_t CommonOpenChannelFields_get_dust_limit_satoshis(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+       public static native long CommonOpenChannelFields_get_dust_limit_satoshis(long this_ptr);
+       // void CommonOpenChannelFields_set_dust_limit_satoshis(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void CommonOpenChannelFields_set_dust_limit_satoshis(long this_ptr, long val);
+       // uint64_t CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+       public static native long CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(long this_ptr);
+       // void CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(long this_ptr, long val);
+       // uint64_t CommonOpenChannelFields_get_htlc_minimum_msat(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+       public static native long CommonOpenChannelFields_get_htlc_minimum_msat(long this_ptr);
+       // void CommonOpenChannelFields_set_htlc_minimum_msat(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void CommonOpenChannelFields_set_htlc_minimum_msat(long this_ptr, long val);
+       // uint32_t CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+       public static native int CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(long this_ptr);
+       // void CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint32_t val);
+       public static native void CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(long this_ptr, int val);
+       // uint16_t CommonOpenChannelFields_get_to_self_delay(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+       public static native short CommonOpenChannelFields_get_to_self_delay(long this_ptr);
+       // void CommonOpenChannelFields_set_to_self_delay(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint16_t val);
+       public static native void CommonOpenChannelFields_set_to_self_delay(long this_ptr, short val);
+       // uint16_t CommonOpenChannelFields_get_max_accepted_htlcs(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+       public static native short CommonOpenChannelFields_get_max_accepted_htlcs(long this_ptr);
+       // void CommonOpenChannelFields_set_max_accepted_htlcs(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint16_t val);
+       public static native void CommonOpenChannelFields_set_max_accepted_htlcs(long this_ptr, short val);
+       // struct LDKPublicKey CommonOpenChannelFields_get_funding_pubkey(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+       public static native byte[] CommonOpenChannelFields_get_funding_pubkey(long this_ptr);
+       // void CommonOpenChannelFields_set_funding_pubkey(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       public static native void CommonOpenChannelFields_set_funding_pubkey(long this_ptr, byte[] val);
+       // struct LDKPublicKey CommonOpenChannelFields_get_revocation_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+       public static native byte[] CommonOpenChannelFields_get_revocation_basepoint(long this_ptr);
+       // void CommonOpenChannelFields_set_revocation_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       public static native void CommonOpenChannelFields_set_revocation_basepoint(long this_ptr, byte[] val);
+       // struct LDKPublicKey CommonOpenChannelFields_get_payment_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+       public static native byte[] CommonOpenChannelFields_get_payment_basepoint(long this_ptr);
+       // void CommonOpenChannelFields_set_payment_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       public static native void CommonOpenChannelFields_set_payment_basepoint(long this_ptr, byte[] val);
+       // struct LDKPublicKey CommonOpenChannelFields_get_delayed_payment_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+       public static native byte[] CommonOpenChannelFields_get_delayed_payment_basepoint(long this_ptr);
+       // void CommonOpenChannelFields_set_delayed_payment_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       public static native void CommonOpenChannelFields_set_delayed_payment_basepoint(long this_ptr, byte[] val);
+       // struct LDKPublicKey CommonOpenChannelFields_get_htlc_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+       public static native byte[] CommonOpenChannelFields_get_htlc_basepoint(long this_ptr);
+       // void CommonOpenChannelFields_set_htlc_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       public static native void CommonOpenChannelFields_set_htlc_basepoint(long this_ptr, byte[] val);
+       // struct LDKPublicKey CommonOpenChannelFields_get_first_per_commitment_point(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+       public static native byte[] CommonOpenChannelFields_get_first_per_commitment_point(long this_ptr);
+       // void CommonOpenChannelFields_set_first_per_commitment_point(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       public static native void CommonOpenChannelFields_set_first_per_commitment_point(long this_ptr, byte[] val);
+       // uint8_t CommonOpenChannelFields_get_channel_flags(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+       public static native byte CommonOpenChannelFields_get_channel_flags(long this_ptr);
+       // void CommonOpenChannelFields_set_channel_flags(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint8_t val);
+       public static native void CommonOpenChannelFields_set_channel_flags(long this_ptr, byte val);
+       // struct LDKCOption_CVec_u8ZZ CommonOpenChannelFields_get_shutdown_scriptpubkey(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+       public static native long CommonOpenChannelFields_get_shutdown_scriptpubkey(long this_ptr);
+       // void CommonOpenChannelFields_set_shutdown_scriptpubkey(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val);
+       public static native void CommonOpenChannelFields_set_shutdown_scriptpubkey(long this_ptr, long val);
+       // struct LDKChannelTypeFeatures CommonOpenChannelFields_get_channel_type(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
+       public static native long CommonOpenChannelFields_get_channel_type(long this_ptr);
+       // void CommonOpenChannelFields_set_channel_type(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
+       public static native void CommonOpenChannelFields_set_channel_type(long this_ptr, long val);
+       // MUST_USE_RES struct LDKCommonOpenChannelFields CommonOpenChannelFields_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKChannelId temporary_channel_id_arg, uint64_t funding_satoshis_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint32_t commitment_feerate_sat_per_1000_weight_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, uint8_t channel_flags_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg);
+       public static native long CommonOpenChannelFields_new(byte[] chain_hash_arg, long temporary_channel_id_arg, long funding_satoshis_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, int commitment_feerate_sat_per_1000_weight_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte channel_flags_arg, long shutdown_scriptpubkey_arg, long channel_type_arg);
+       // uint64_t CommonOpenChannelFields_clone_ptr(LDKCommonOpenChannelFields *NONNULL_PTR arg);
+       public static native long CommonOpenChannelFields_clone_ptr(long arg);
+       // struct LDKCommonOpenChannelFields CommonOpenChannelFields_clone(const struct LDKCommonOpenChannelFields *NONNULL_PTR orig);
+       public static native long CommonOpenChannelFields_clone(long orig);
+       // uint64_t CommonOpenChannelFields_hash(const struct LDKCommonOpenChannelFields *NONNULL_PTR o);
+       public static native long CommonOpenChannelFields_hash(long o);
+       // bool CommonOpenChannelFields_eq(const struct LDKCommonOpenChannelFields *NONNULL_PTR a, const struct LDKCommonOpenChannelFields *NONNULL_PTR b);
+       public static native boolean CommonOpenChannelFields_eq(long a, long b);
        // void OpenChannel_free(struct LDKOpenChannel this_obj);
        public static native void OpenChannel_free(long this_obj);
-       // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
-       public static native byte[] OpenChannel_get_chain_hash(long this_ptr);
-       // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void OpenChannel_set_chain_hash(long this_ptr, byte[] val);
-       // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
-       public static native byte[] OpenChannel_get_temporary_channel_id(long this_ptr);
-       // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void OpenChannel_set_temporary_channel_id(long this_ptr, byte[] val);
-       // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
-       public static native long OpenChannel_get_funding_satoshis(long this_ptr);
-       // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
-       public static native void OpenChannel_set_funding_satoshis(long this_ptr, long val);
+       // struct LDKCommonOpenChannelFields OpenChannel_get_common_fields(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
+       public static native long OpenChannel_get_common_fields(long this_ptr);
+       // void OpenChannel_set_common_fields(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKCommonOpenChannelFields val);
+       public static native void OpenChannel_set_common_fields(long this_ptr, long val);
        // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
        public static native long OpenChannel_get_push_msat(long this_ptr);
        // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
        public static native void OpenChannel_set_push_msat(long this_ptr, long val);
-       // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
-       public static native long OpenChannel_get_dust_limit_satoshis(long this_ptr);
-       // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
-       public static native void OpenChannel_set_dust_limit_satoshis(long this_ptr, long val);
-       // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
-       public static native long OpenChannel_get_max_htlc_value_in_flight_msat(long this_ptr);
-       // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
-       public static native void OpenChannel_set_max_htlc_value_in_flight_msat(long this_ptr, long val);
        // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
        public static native long OpenChannel_get_channel_reserve_satoshis(long this_ptr);
        // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
        public static native void OpenChannel_set_channel_reserve_satoshis(long this_ptr, long val);
-       // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
-       public static native long OpenChannel_get_htlc_minimum_msat(long this_ptr);
-       // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
-       public static native void OpenChannel_set_htlc_minimum_msat(long this_ptr, long val);
-       // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
-       public static native int OpenChannel_get_feerate_per_kw(long this_ptr);
-       // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
-       public static native void OpenChannel_set_feerate_per_kw(long this_ptr, int val);
-       // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
-       public static native short OpenChannel_get_to_self_delay(long this_ptr);
-       // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
-       public static native void OpenChannel_set_to_self_delay(long this_ptr, short val);
-       // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
-       public static native short OpenChannel_get_max_accepted_htlcs(long this_ptr);
-       // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
-       public static native void OpenChannel_set_max_accepted_htlcs(long this_ptr, short val);
-       // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
-       public static native byte[] OpenChannel_get_funding_pubkey(long this_ptr);
-       // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void OpenChannel_set_funding_pubkey(long this_ptr, byte[] val);
-       // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
-       public static native byte[] OpenChannel_get_revocation_basepoint(long this_ptr);
-       // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void OpenChannel_set_revocation_basepoint(long this_ptr, byte[] val);
-       // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
-       public static native byte[] OpenChannel_get_payment_point(long this_ptr);
-       // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void OpenChannel_set_payment_point(long this_ptr, byte[] val);
-       // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
-       public static native byte[] OpenChannel_get_delayed_payment_basepoint(long this_ptr);
-       // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void OpenChannel_set_delayed_payment_basepoint(long this_ptr, byte[] val);
-       // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
-       public static native byte[] OpenChannel_get_htlc_basepoint(long this_ptr);
-       // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void OpenChannel_set_htlc_basepoint(long this_ptr, byte[] val);
-       // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
-       public static native byte[] OpenChannel_get_first_per_commitment_point(long this_ptr);
-       // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void OpenChannel_set_first_per_commitment_point(long this_ptr, byte[] val);
-       // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
-       public static native byte OpenChannel_get_channel_flags(long this_ptr);
-       // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
-       public static native void OpenChannel_set_channel_flags(long this_ptr, byte val);
-       // struct LDKCOption_CVec_u8ZZ OpenChannel_get_shutdown_scriptpubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
-       public static native long OpenChannel_get_shutdown_scriptpubkey(long this_ptr);
-       // void OpenChannel_set_shutdown_scriptpubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val);
-       public static native void OpenChannel_set_shutdown_scriptpubkey(long this_ptr, long val);
-       // struct LDKChannelTypeFeatures OpenChannel_get_channel_type(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
-       public static native long OpenChannel_get_channel_type(long this_ptr);
-       // void OpenChannel_set_channel_type(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
-       public static native void OpenChannel_set_channel_type(long this_ptr, long val);
-       // MUST_USE_RES struct LDKOpenChannel OpenChannel_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKThirtyTwoBytes temporary_channel_id_arg, uint64_t funding_satoshis_arg, uint64_t push_msat_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t channel_reserve_satoshis_arg, uint64_t htlc_minimum_msat_arg, uint32_t feerate_per_kw_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_point_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, uint8_t channel_flags_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg);
-       public static native long OpenChannel_new(byte[] chain_hash_arg, byte[] temporary_channel_id_arg, long funding_satoshis_arg, long push_msat_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long channel_reserve_satoshis_arg, long htlc_minimum_msat_arg, int feerate_per_kw_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_point_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte channel_flags_arg, long shutdown_scriptpubkey_arg, long channel_type_arg);
+       // MUST_USE_RES struct LDKOpenChannel OpenChannel_new(struct LDKCommonOpenChannelFields common_fields_arg, uint64_t push_msat_arg, uint64_t channel_reserve_satoshis_arg);
+       public static native long OpenChannel_new(long common_fields_arg, long push_msat_arg, long channel_reserve_satoshis_arg);
        // uint64_t OpenChannel_clone_ptr(LDKOpenChannel *NONNULL_PTR arg);
        public static native long OpenChannel_clone_ptr(long arg);
        // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
@@ -8257,96 +9125,28 @@ public class bindings {
        public static native boolean OpenChannel_eq(long a, long b);
        // void OpenChannelV2_free(struct LDKOpenChannelV2 this_obj);
        public static native void OpenChannelV2_free(long this_obj);
-       // const uint8_t (*OpenChannelV2_get_chain_hash(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr))[32];
-       public static native byte[] OpenChannelV2_get_chain_hash(long this_ptr);
-       // void OpenChannelV2_set_chain_hash(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void OpenChannelV2_set_chain_hash(long this_ptr, byte[] val);
-       // const uint8_t (*OpenChannelV2_get_temporary_channel_id(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr))[32];
-       public static native byte[] OpenChannelV2_get_temporary_channel_id(long this_ptr);
-       // void OpenChannelV2_set_temporary_channel_id(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void OpenChannelV2_set_temporary_channel_id(long this_ptr, byte[] val);
+       // struct LDKCommonOpenChannelFields OpenChannelV2_get_common_fields(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
+       public static native long OpenChannelV2_get_common_fields(long this_ptr);
+       // void OpenChannelV2_set_common_fields(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKCommonOpenChannelFields val);
+       public static native void OpenChannelV2_set_common_fields(long this_ptr, long val);
        // uint32_t OpenChannelV2_get_funding_feerate_sat_per_1000_weight(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
        public static native int OpenChannelV2_get_funding_feerate_sat_per_1000_weight(long this_ptr);
        // void OpenChannelV2_set_funding_feerate_sat_per_1000_weight(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint32_t val);
        public static native void OpenChannelV2_set_funding_feerate_sat_per_1000_weight(long this_ptr, int val);
-       // uint32_t OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
-       public static native int OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(long this_ptr);
-       // void OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint32_t val);
-       public static native void OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(long this_ptr, int val);
-       // uint64_t OpenChannelV2_get_funding_satoshis(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
-       public static native long OpenChannelV2_get_funding_satoshis(long this_ptr);
-       // void OpenChannelV2_set_funding_satoshis(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
-       public static native void OpenChannelV2_set_funding_satoshis(long this_ptr, long val);
-       // uint64_t OpenChannelV2_get_dust_limit_satoshis(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
-       public static native long OpenChannelV2_get_dust_limit_satoshis(long this_ptr);
-       // void OpenChannelV2_set_dust_limit_satoshis(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
-       public static native void OpenChannelV2_set_dust_limit_satoshis(long this_ptr, long val);
-       // uint64_t OpenChannelV2_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
-       public static native long OpenChannelV2_get_max_htlc_value_in_flight_msat(long this_ptr);
-       // void OpenChannelV2_set_max_htlc_value_in_flight_msat(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
-       public static native void OpenChannelV2_set_max_htlc_value_in_flight_msat(long this_ptr, long val);
-       // uint64_t OpenChannelV2_get_htlc_minimum_msat(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
-       public static native long OpenChannelV2_get_htlc_minimum_msat(long this_ptr);
-       // void OpenChannelV2_set_htlc_minimum_msat(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
-       public static native void OpenChannelV2_set_htlc_minimum_msat(long this_ptr, long val);
-       // uint16_t OpenChannelV2_get_to_self_delay(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
-       public static native short OpenChannelV2_get_to_self_delay(long this_ptr);
-       // void OpenChannelV2_set_to_self_delay(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint16_t val);
-       public static native void OpenChannelV2_set_to_self_delay(long this_ptr, short val);
-       // uint16_t OpenChannelV2_get_max_accepted_htlcs(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
-       public static native short OpenChannelV2_get_max_accepted_htlcs(long this_ptr);
-       // void OpenChannelV2_set_max_accepted_htlcs(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint16_t val);
-       public static native void OpenChannelV2_set_max_accepted_htlcs(long this_ptr, short val);
        // uint32_t OpenChannelV2_get_locktime(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
        public static native int OpenChannelV2_get_locktime(long this_ptr);
        // void OpenChannelV2_set_locktime(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint32_t val);
        public static native void OpenChannelV2_set_locktime(long this_ptr, int val);
-       // struct LDKPublicKey OpenChannelV2_get_funding_pubkey(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
-       public static native byte[] OpenChannelV2_get_funding_pubkey(long this_ptr);
-       // void OpenChannelV2_set_funding_pubkey(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void OpenChannelV2_set_funding_pubkey(long this_ptr, byte[] val);
-       // struct LDKPublicKey OpenChannelV2_get_revocation_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
-       public static native byte[] OpenChannelV2_get_revocation_basepoint(long this_ptr);
-       // void OpenChannelV2_set_revocation_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void OpenChannelV2_set_revocation_basepoint(long this_ptr, byte[] val);
-       // struct LDKPublicKey OpenChannelV2_get_payment_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
-       public static native byte[] OpenChannelV2_get_payment_basepoint(long this_ptr);
-       // void OpenChannelV2_set_payment_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void OpenChannelV2_set_payment_basepoint(long this_ptr, byte[] val);
-       // struct LDKPublicKey OpenChannelV2_get_delayed_payment_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
-       public static native byte[] OpenChannelV2_get_delayed_payment_basepoint(long this_ptr);
-       // void OpenChannelV2_set_delayed_payment_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void OpenChannelV2_set_delayed_payment_basepoint(long this_ptr, byte[] val);
-       // struct LDKPublicKey OpenChannelV2_get_htlc_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
-       public static native byte[] OpenChannelV2_get_htlc_basepoint(long this_ptr);
-       // void OpenChannelV2_set_htlc_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void OpenChannelV2_set_htlc_basepoint(long this_ptr, byte[] val);
-       // struct LDKPublicKey OpenChannelV2_get_first_per_commitment_point(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
-       public static native byte[] OpenChannelV2_get_first_per_commitment_point(long this_ptr);
-       // void OpenChannelV2_set_first_per_commitment_point(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void OpenChannelV2_set_first_per_commitment_point(long this_ptr, byte[] val);
        // struct LDKPublicKey OpenChannelV2_get_second_per_commitment_point(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
        public static native byte[] OpenChannelV2_get_second_per_commitment_point(long this_ptr);
        // void OpenChannelV2_set_second_per_commitment_point(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
        public static native void OpenChannelV2_set_second_per_commitment_point(long this_ptr, byte[] val);
-       // uint8_t OpenChannelV2_get_channel_flags(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
-       public static native byte OpenChannelV2_get_channel_flags(long this_ptr);
-       // void OpenChannelV2_set_channel_flags(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint8_t val);
-       public static native void OpenChannelV2_set_channel_flags(long this_ptr, byte val);
-       // struct LDKCOption_CVec_u8ZZ OpenChannelV2_get_shutdown_scriptpubkey(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
-       public static native long OpenChannelV2_get_shutdown_scriptpubkey(long this_ptr);
-       // void OpenChannelV2_set_shutdown_scriptpubkey(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val);
-       public static native void OpenChannelV2_set_shutdown_scriptpubkey(long this_ptr, long val);
-       // struct LDKChannelTypeFeatures OpenChannelV2_get_channel_type(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
-       public static native long OpenChannelV2_get_channel_type(long this_ptr);
-       // void OpenChannelV2_set_channel_type(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
-       public static native void OpenChannelV2_set_channel_type(long this_ptr, long val);
        // enum LDKCOption_NoneZ OpenChannelV2_get_require_confirmed_inputs(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
        public static native COption_NoneZ OpenChannelV2_get_require_confirmed_inputs(long this_ptr);
        // void OpenChannelV2_set_require_confirmed_inputs(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, enum LDKCOption_NoneZ val);
        public static native void OpenChannelV2_set_require_confirmed_inputs(long this_ptr, COption_NoneZ val);
-       // MUST_USE_RES struct LDKOpenChannelV2 OpenChannelV2_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKThirtyTwoBytes temporary_channel_id_arg, uint32_t funding_feerate_sat_per_1000_weight_arg, uint32_t commitment_feerate_sat_per_1000_weight_arg, uint64_t funding_satoshis_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, uint32_t locktime_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKPublicKey second_per_commitment_point_arg, uint8_t channel_flags_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg);
-       public static native long OpenChannelV2_new(byte[] chain_hash_arg, byte[] temporary_channel_id_arg, int funding_feerate_sat_per_1000_weight_arg, int commitment_feerate_sat_per_1000_weight_arg, long funding_satoshis_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, int locktime_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte[] second_per_commitment_point_arg, byte channel_flags_arg, long shutdown_scriptpubkey_arg, long channel_type_arg, COption_NoneZ require_confirmed_inputs_arg);
+       // MUST_USE_RES struct LDKOpenChannelV2 OpenChannelV2_new(struct LDKCommonOpenChannelFields common_fields_arg, uint32_t funding_feerate_sat_per_1000_weight_arg, uint32_t locktime_arg, struct LDKPublicKey second_per_commitment_point_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg);
+       public static native long OpenChannelV2_new(long common_fields_arg, int funding_feerate_sat_per_1000_weight_arg, int locktime_arg, byte[] second_per_commitment_point_arg, COption_NoneZ require_confirmed_inputs_arg);
        // uint64_t OpenChannelV2_clone_ptr(LDKOpenChannelV2 *NONNULL_PTR arg);
        public static native long OpenChannelV2_clone_ptr(long arg);
        // struct LDKOpenChannelV2 OpenChannelV2_clone(const struct LDKOpenChannelV2 *NONNULL_PTR orig);
@@ -8355,74 +9155,90 @@ public class bindings {
        public static native long OpenChannelV2_hash(long o);
        // bool OpenChannelV2_eq(const struct LDKOpenChannelV2 *NONNULL_PTR a, const struct LDKOpenChannelV2 *NONNULL_PTR b);
        public static native boolean OpenChannelV2_eq(long a, long b);
+       // void CommonAcceptChannelFields_free(struct LDKCommonAcceptChannelFields this_obj);
+       public static native void CommonAcceptChannelFields_free(long this_obj);
+       // struct LDKChannelId CommonAcceptChannelFields_get_temporary_channel_id(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+       public static native long CommonAcceptChannelFields_get_temporary_channel_id(long this_ptr);
+       // void CommonAcceptChannelFields_set_temporary_channel_id(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void CommonAcceptChannelFields_set_temporary_channel_id(long this_ptr, long val);
+       // uint64_t CommonAcceptChannelFields_get_dust_limit_satoshis(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+       public static native long CommonAcceptChannelFields_get_dust_limit_satoshis(long this_ptr);
+       // void CommonAcceptChannelFields_set_dust_limit_satoshis(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void CommonAcceptChannelFields_set_dust_limit_satoshis(long this_ptr, long val);
+       // uint64_t CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+       public static native long CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(long this_ptr);
+       // void CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(long this_ptr, long val);
+       // uint64_t CommonAcceptChannelFields_get_htlc_minimum_msat(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+       public static native long CommonAcceptChannelFields_get_htlc_minimum_msat(long this_ptr);
+       // void CommonAcceptChannelFields_set_htlc_minimum_msat(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void CommonAcceptChannelFields_set_htlc_minimum_msat(long this_ptr, long val);
+       // uint32_t CommonAcceptChannelFields_get_minimum_depth(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+       public static native int CommonAcceptChannelFields_get_minimum_depth(long this_ptr);
+       // void CommonAcceptChannelFields_set_minimum_depth(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint32_t val);
+       public static native void CommonAcceptChannelFields_set_minimum_depth(long this_ptr, int val);
+       // uint16_t CommonAcceptChannelFields_get_to_self_delay(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+       public static native short CommonAcceptChannelFields_get_to_self_delay(long this_ptr);
+       // void CommonAcceptChannelFields_set_to_self_delay(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint16_t val);
+       public static native void CommonAcceptChannelFields_set_to_self_delay(long this_ptr, short val);
+       // uint16_t CommonAcceptChannelFields_get_max_accepted_htlcs(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+       public static native short CommonAcceptChannelFields_get_max_accepted_htlcs(long this_ptr);
+       // void CommonAcceptChannelFields_set_max_accepted_htlcs(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint16_t val);
+       public static native void CommonAcceptChannelFields_set_max_accepted_htlcs(long this_ptr, short val);
+       // struct LDKPublicKey CommonAcceptChannelFields_get_funding_pubkey(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+       public static native byte[] CommonAcceptChannelFields_get_funding_pubkey(long this_ptr);
+       // void CommonAcceptChannelFields_set_funding_pubkey(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       public static native void CommonAcceptChannelFields_set_funding_pubkey(long this_ptr, byte[] val);
+       // struct LDKPublicKey CommonAcceptChannelFields_get_revocation_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+       public static native byte[] CommonAcceptChannelFields_get_revocation_basepoint(long this_ptr);
+       // void CommonAcceptChannelFields_set_revocation_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       public static native void CommonAcceptChannelFields_set_revocation_basepoint(long this_ptr, byte[] val);
+       // struct LDKPublicKey CommonAcceptChannelFields_get_payment_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+       public static native byte[] CommonAcceptChannelFields_get_payment_basepoint(long this_ptr);
+       // void CommonAcceptChannelFields_set_payment_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       public static native void CommonAcceptChannelFields_set_payment_basepoint(long this_ptr, byte[] val);
+       // struct LDKPublicKey CommonAcceptChannelFields_get_delayed_payment_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+       public static native byte[] CommonAcceptChannelFields_get_delayed_payment_basepoint(long this_ptr);
+       // void CommonAcceptChannelFields_set_delayed_payment_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       public static native void CommonAcceptChannelFields_set_delayed_payment_basepoint(long this_ptr, byte[] val);
+       // struct LDKPublicKey CommonAcceptChannelFields_get_htlc_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+       public static native byte[] CommonAcceptChannelFields_get_htlc_basepoint(long this_ptr);
+       // void CommonAcceptChannelFields_set_htlc_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       public static native void CommonAcceptChannelFields_set_htlc_basepoint(long this_ptr, byte[] val);
+       // struct LDKPublicKey CommonAcceptChannelFields_get_first_per_commitment_point(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+       public static native byte[] CommonAcceptChannelFields_get_first_per_commitment_point(long this_ptr);
+       // void CommonAcceptChannelFields_set_first_per_commitment_point(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       public static native void CommonAcceptChannelFields_set_first_per_commitment_point(long this_ptr, byte[] val);
+       // struct LDKCOption_CVec_u8ZZ CommonAcceptChannelFields_get_shutdown_scriptpubkey(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+       public static native long CommonAcceptChannelFields_get_shutdown_scriptpubkey(long this_ptr);
+       // void CommonAcceptChannelFields_set_shutdown_scriptpubkey(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val);
+       public static native void CommonAcceptChannelFields_set_shutdown_scriptpubkey(long this_ptr, long val);
+       // struct LDKChannelTypeFeatures CommonAcceptChannelFields_get_channel_type(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
+       public static native long CommonAcceptChannelFields_get_channel_type(long this_ptr);
+       // void CommonAcceptChannelFields_set_channel_type(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
+       public static native void CommonAcceptChannelFields_set_channel_type(long this_ptr, long val);
+       // MUST_USE_RES struct LDKCommonAcceptChannelFields CommonAcceptChannelFields_new(struct LDKChannelId temporary_channel_id_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint32_t minimum_depth_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg);
+       public static native long CommonAcceptChannelFields_new(long temporary_channel_id_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, int minimum_depth_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, long shutdown_scriptpubkey_arg, long channel_type_arg);
+       // uint64_t CommonAcceptChannelFields_clone_ptr(LDKCommonAcceptChannelFields *NONNULL_PTR arg);
+       public static native long CommonAcceptChannelFields_clone_ptr(long arg);
+       // struct LDKCommonAcceptChannelFields CommonAcceptChannelFields_clone(const struct LDKCommonAcceptChannelFields *NONNULL_PTR orig);
+       public static native long CommonAcceptChannelFields_clone(long orig);
+       // uint64_t CommonAcceptChannelFields_hash(const struct LDKCommonAcceptChannelFields *NONNULL_PTR o);
+       public static native long CommonAcceptChannelFields_hash(long o);
+       // bool CommonAcceptChannelFields_eq(const struct LDKCommonAcceptChannelFields *NONNULL_PTR a, const struct LDKCommonAcceptChannelFields *NONNULL_PTR b);
+       public static native boolean CommonAcceptChannelFields_eq(long a, long b);
        // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
        public static native void AcceptChannel_free(long this_obj);
-       // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
-       public static native byte[] AcceptChannel_get_temporary_channel_id(long this_ptr);
-       // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void AcceptChannel_set_temporary_channel_id(long this_ptr, byte[] val);
-       // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
-       public static native long AcceptChannel_get_dust_limit_satoshis(long this_ptr);
-       // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
-       public static native void AcceptChannel_set_dust_limit_satoshis(long this_ptr, long val);
-       // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
-       public static native long AcceptChannel_get_max_htlc_value_in_flight_msat(long this_ptr);
-       // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
-       public static native void AcceptChannel_set_max_htlc_value_in_flight_msat(long this_ptr, long val);
+       // struct LDKCommonAcceptChannelFields AcceptChannel_get_common_fields(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
+       public static native long AcceptChannel_get_common_fields(long this_ptr);
+       // void AcceptChannel_set_common_fields(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKCommonAcceptChannelFields val);
+       public static native void AcceptChannel_set_common_fields(long this_ptr, long val);
        // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
        public static native long AcceptChannel_get_channel_reserve_satoshis(long this_ptr);
        // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
        public static native void AcceptChannel_set_channel_reserve_satoshis(long this_ptr, long val);
-       // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
-       public static native long AcceptChannel_get_htlc_minimum_msat(long this_ptr);
-       // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
-       public static native void AcceptChannel_set_htlc_minimum_msat(long this_ptr, long val);
-       // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
-       public static native int AcceptChannel_get_minimum_depth(long this_ptr);
-       // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
-       public static native void AcceptChannel_set_minimum_depth(long this_ptr, int val);
-       // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
-       public static native short AcceptChannel_get_to_self_delay(long this_ptr);
-       // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
-       public static native void AcceptChannel_set_to_self_delay(long this_ptr, short val);
-       // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
-       public static native short AcceptChannel_get_max_accepted_htlcs(long this_ptr);
-       // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
-       public static native void AcceptChannel_set_max_accepted_htlcs(long this_ptr, short val);
-       // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
-       public static native byte[] AcceptChannel_get_funding_pubkey(long this_ptr);
-       // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void AcceptChannel_set_funding_pubkey(long this_ptr, byte[] val);
-       // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
-       public static native byte[] AcceptChannel_get_revocation_basepoint(long this_ptr);
-       // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void AcceptChannel_set_revocation_basepoint(long this_ptr, byte[] val);
-       // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
-       public static native byte[] AcceptChannel_get_payment_point(long this_ptr);
-       // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void AcceptChannel_set_payment_point(long this_ptr, byte[] val);
-       // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
-       public static native byte[] AcceptChannel_get_delayed_payment_basepoint(long this_ptr);
-       // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void AcceptChannel_set_delayed_payment_basepoint(long this_ptr, byte[] val);
-       // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
-       public static native byte[] AcceptChannel_get_htlc_basepoint(long this_ptr);
-       // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void AcceptChannel_set_htlc_basepoint(long this_ptr, byte[] val);
-       // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
-       public static native byte[] AcceptChannel_get_first_per_commitment_point(long this_ptr);
-       // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void AcceptChannel_set_first_per_commitment_point(long this_ptr, byte[] val);
-       // struct LDKCOption_CVec_u8ZZ AcceptChannel_get_shutdown_scriptpubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
-       public static native long AcceptChannel_get_shutdown_scriptpubkey(long this_ptr);
-       // void AcceptChannel_set_shutdown_scriptpubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val);
-       public static native void AcceptChannel_set_shutdown_scriptpubkey(long this_ptr, long val);
-       // struct LDKChannelTypeFeatures AcceptChannel_get_channel_type(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
-       public static native long AcceptChannel_get_channel_type(long this_ptr);
-       // void AcceptChannel_set_channel_type(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
-       public static native void AcceptChannel_set_channel_type(long this_ptr, long val);
-       // MUST_USE_RES struct LDKAcceptChannel AcceptChannel_new(struct LDKThirtyTwoBytes temporary_channel_id_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t channel_reserve_satoshis_arg, uint64_t htlc_minimum_msat_arg, uint32_t minimum_depth_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_point_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg);
-       public static native long AcceptChannel_new(byte[] temporary_channel_id_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long channel_reserve_satoshis_arg, long htlc_minimum_msat_arg, int minimum_depth_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_point_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, long shutdown_scriptpubkey_arg, long channel_type_arg);
+       // MUST_USE_RES struct LDKAcceptChannel AcceptChannel_new(struct LDKCommonAcceptChannelFields common_fields_arg, uint64_t channel_reserve_satoshis_arg);
+       public static native long AcceptChannel_new(long common_fields_arg, long channel_reserve_satoshis_arg);
        // uint64_t AcceptChannel_clone_ptr(LDKAcceptChannel *NONNULL_PTR arg);
        public static native long AcceptChannel_clone_ptr(long arg);
        // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
@@ -8433,80 +9249,24 @@ public class bindings {
        public static native boolean AcceptChannel_eq(long a, long b);
        // void AcceptChannelV2_free(struct LDKAcceptChannelV2 this_obj);
        public static native void AcceptChannelV2_free(long this_obj);
-       // const uint8_t (*AcceptChannelV2_get_temporary_channel_id(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr))[32];
-       public static native byte[] AcceptChannelV2_get_temporary_channel_id(long this_ptr);
-       // void AcceptChannelV2_set_temporary_channel_id(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void AcceptChannelV2_set_temporary_channel_id(long this_ptr, byte[] val);
+       // struct LDKCommonAcceptChannelFields AcceptChannelV2_get_common_fields(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
+       public static native long AcceptChannelV2_get_common_fields(long this_ptr);
+       // void AcceptChannelV2_set_common_fields(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKCommonAcceptChannelFields val);
+       public static native void AcceptChannelV2_set_common_fields(long this_ptr, long val);
        // uint64_t AcceptChannelV2_get_funding_satoshis(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
        public static native long AcceptChannelV2_get_funding_satoshis(long this_ptr);
        // void AcceptChannelV2_set_funding_satoshis(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
        public static native void AcceptChannelV2_set_funding_satoshis(long this_ptr, long val);
-       // uint64_t AcceptChannelV2_get_dust_limit_satoshis(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
-       public static native long AcceptChannelV2_get_dust_limit_satoshis(long this_ptr);
-       // void AcceptChannelV2_set_dust_limit_satoshis(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
-       public static native void AcceptChannelV2_set_dust_limit_satoshis(long this_ptr, long val);
-       // uint64_t AcceptChannelV2_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
-       public static native long AcceptChannelV2_get_max_htlc_value_in_flight_msat(long this_ptr);
-       // void AcceptChannelV2_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
-       public static native void AcceptChannelV2_set_max_htlc_value_in_flight_msat(long this_ptr, long val);
-       // uint64_t AcceptChannelV2_get_htlc_minimum_msat(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
-       public static native long AcceptChannelV2_get_htlc_minimum_msat(long this_ptr);
-       // void AcceptChannelV2_set_htlc_minimum_msat(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
-       public static native void AcceptChannelV2_set_htlc_minimum_msat(long this_ptr, long val);
-       // uint32_t AcceptChannelV2_get_minimum_depth(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
-       public static native int AcceptChannelV2_get_minimum_depth(long this_ptr);
-       // void AcceptChannelV2_set_minimum_depth(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint32_t val);
-       public static native void AcceptChannelV2_set_minimum_depth(long this_ptr, int val);
-       // uint16_t AcceptChannelV2_get_to_self_delay(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
-       public static native short AcceptChannelV2_get_to_self_delay(long this_ptr);
-       // void AcceptChannelV2_set_to_self_delay(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint16_t val);
-       public static native void AcceptChannelV2_set_to_self_delay(long this_ptr, short val);
-       // uint16_t AcceptChannelV2_get_max_accepted_htlcs(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
-       public static native short AcceptChannelV2_get_max_accepted_htlcs(long this_ptr);
-       // void AcceptChannelV2_set_max_accepted_htlcs(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint16_t val);
-       public static native void AcceptChannelV2_set_max_accepted_htlcs(long this_ptr, short val);
-       // struct LDKPublicKey AcceptChannelV2_get_funding_pubkey(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
-       public static native byte[] AcceptChannelV2_get_funding_pubkey(long this_ptr);
-       // void AcceptChannelV2_set_funding_pubkey(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void AcceptChannelV2_set_funding_pubkey(long this_ptr, byte[] val);
-       // struct LDKPublicKey AcceptChannelV2_get_revocation_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
-       public static native byte[] AcceptChannelV2_get_revocation_basepoint(long this_ptr);
-       // void AcceptChannelV2_set_revocation_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void AcceptChannelV2_set_revocation_basepoint(long this_ptr, byte[] val);
-       // struct LDKPublicKey AcceptChannelV2_get_payment_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
-       public static native byte[] AcceptChannelV2_get_payment_basepoint(long this_ptr);
-       // void AcceptChannelV2_set_payment_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void AcceptChannelV2_set_payment_basepoint(long this_ptr, byte[] val);
-       // struct LDKPublicKey AcceptChannelV2_get_delayed_payment_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
-       public static native byte[] AcceptChannelV2_get_delayed_payment_basepoint(long this_ptr);
-       // void AcceptChannelV2_set_delayed_payment_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void AcceptChannelV2_set_delayed_payment_basepoint(long this_ptr, byte[] val);
-       // struct LDKPublicKey AcceptChannelV2_get_htlc_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
-       public static native byte[] AcceptChannelV2_get_htlc_basepoint(long this_ptr);
-       // void AcceptChannelV2_set_htlc_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void AcceptChannelV2_set_htlc_basepoint(long this_ptr, byte[] val);
-       // struct LDKPublicKey AcceptChannelV2_get_first_per_commitment_point(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
-       public static native byte[] AcceptChannelV2_get_first_per_commitment_point(long this_ptr);
-       // void AcceptChannelV2_set_first_per_commitment_point(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void AcceptChannelV2_set_first_per_commitment_point(long this_ptr, byte[] val);
        // struct LDKPublicKey AcceptChannelV2_get_second_per_commitment_point(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
        public static native byte[] AcceptChannelV2_get_second_per_commitment_point(long this_ptr);
        // void AcceptChannelV2_set_second_per_commitment_point(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
        public static native void AcceptChannelV2_set_second_per_commitment_point(long this_ptr, byte[] val);
-       // struct LDKCOption_CVec_u8ZZ AcceptChannelV2_get_shutdown_scriptpubkey(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
-       public static native long AcceptChannelV2_get_shutdown_scriptpubkey(long this_ptr);
-       // void AcceptChannelV2_set_shutdown_scriptpubkey(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val);
-       public static native void AcceptChannelV2_set_shutdown_scriptpubkey(long this_ptr, long val);
-       // struct LDKChannelTypeFeatures AcceptChannelV2_get_channel_type(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
-       public static native long AcceptChannelV2_get_channel_type(long this_ptr);
-       // void AcceptChannelV2_set_channel_type(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
-       public static native void AcceptChannelV2_set_channel_type(long this_ptr, long val);
        // enum LDKCOption_NoneZ AcceptChannelV2_get_require_confirmed_inputs(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
        public static native COption_NoneZ AcceptChannelV2_get_require_confirmed_inputs(long this_ptr);
        // void AcceptChannelV2_set_require_confirmed_inputs(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, enum LDKCOption_NoneZ val);
        public static native void AcceptChannelV2_set_require_confirmed_inputs(long this_ptr, COption_NoneZ val);
-       // MUST_USE_RES struct LDKAcceptChannelV2 AcceptChannelV2_new(struct LDKThirtyTwoBytes temporary_channel_id_arg, uint64_t funding_satoshis_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint32_t minimum_depth_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKPublicKey second_per_commitment_point_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg);
-       public static native long AcceptChannelV2_new(byte[] temporary_channel_id_arg, long funding_satoshis_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, int minimum_depth_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte[] second_per_commitment_point_arg, long shutdown_scriptpubkey_arg, long channel_type_arg, COption_NoneZ require_confirmed_inputs_arg);
+       // MUST_USE_RES struct LDKAcceptChannelV2 AcceptChannelV2_new(struct LDKCommonAcceptChannelFields common_fields_arg, uint64_t funding_satoshis_arg, struct LDKPublicKey second_per_commitment_point_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg);
+       public static native long AcceptChannelV2_new(long common_fields_arg, long funding_satoshis_arg, byte[] second_per_commitment_point_arg, COption_NoneZ require_confirmed_inputs_arg);
        // uint64_t AcceptChannelV2_clone_ptr(LDKAcceptChannelV2 *NONNULL_PTR arg);
        public static native long AcceptChannelV2_clone_ptr(long arg);
        // struct LDKAcceptChannelV2 AcceptChannelV2_clone(const struct LDKAcceptChannelV2 *NONNULL_PTR orig);
@@ -8517,10 +9277,10 @@ public class bindings {
        public static native boolean AcceptChannelV2_eq(long a, long b);
        // void FundingCreated_free(struct LDKFundingCreated this_obj);
        public static native void FundingCreated_free(long this_obj);
-       // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
-       public static native byte[] FundingCreated_get_temporary_channel_id(long this_ptr);
-       // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void FundingCreated_set_temporary_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
+       public static native long FundingCreated_get_temporary_channel_id(long this_ptr);
+       // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void FundingCreated_set_temporary_channel_id(long this_ptr, long val);
        // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
        public static native byte[] FundingCreated_get_funding_txid(long this_ptr);
        // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -8533,8 +9293,8 @@ public class bindings {
        public static native byte[] FundingCreated_get_signature(long this_ptr);
        // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
        public static native void FundingCreated_set_signature(long this_ptr, byte[] val);
-       // MUST_USE_RES struct LDKFundingCreated FundingCreated_new(struct LDKThirtyTwoBytes temporary_channel_id_arg, struct LDKThirtyTwoBytes funding_txid_arg, uint16_t funding_output_index_arg, struct LDKECDSASignature signature_arg);
-       public static native long FundingCreated_new(byte[] temporary_channel_id_arg, byte[] funding_txid_arg, short funding_output_index_arg, byte[] signature_arg);
+       // MUST_USE_RES struct LDKFundingCreated FundingCreated_new(struct LDKChannelId temporary_channel_id_arg, struct LDKThirtyTwoBytes funding_txid_arg, uint16_t funding_output_index_arg, struct LDKECDSASignature signature_arg);
+       public static native long FundingCreated_new(long temporary_channel_id_arg, byte[] funding_txid_arg, short funding_output_index_arg, byte[] signature_arg);
        // uint64_t FundingCreated_clone_ptr(LDKFundingCreated *NONNULL_PTR arg);
        public static native long FundingCreated_clone_ptr(long arg);
        // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
@@ -8545,16 +9305,16 @@ public class bindings {
        public static native boolean FundingCreated_eq(long a, long b);
        // void FundingSigned_free(struct LDKFundingSigned this_obj);
        public static native void FundingSigned_free(long this_obj);
-       // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
-       public static native byte[] FundingSigned_get_channel_id(long this_ptr);
-       // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void FundingSigned_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
+       public static native long FundingSigned_get_channel_id(long this_ptr);
+       // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void FundingSigned_set_channel_id(long this_ptr, long val);
        // struct LDKECDSASignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
        public static native byte[] FundingSigned_get_signature(long this_ptr);
        // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
        public static native void FundingSigned_set_signature(long this_ptr, byte[] val);
-       // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKECDSASignature signature_arg);
-       public static native long FundingSigned_new(byte[] channel_id_arg, byte[] signature_arg);
+       // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKChannelId channel_id_arg, struct LDKECDSASignature signature_arg);
+       public static native long FundingSigned_new(long channel_id_arg, byte[] signature_arg);
        // uint64_t FundingSigned_clone_ptr(LDKFundingSigned *NONNULL_PTR arg);
        public static native long FundingSigned_clone_ptr(long arg);
        // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
@@ -8565,10 +9325,10 @@ public class bindings {
        public static native boolean FundingSigned_eq(long a, long b);
        // void ChannelReady_free(struct LDKChannelReady this_obj);
        public static native void ChannelReady_free(long this_obj);
-       // const uint8_t (*ChannelReady_get_channel_id(const struct LDKChannelReady *NONNULL_PTR this_ptr))[32];
-       public static native byte[] ChannelReady_get_channel_id(long this_ptr);
-       // void ChannelReady_set_channel_id(struct LDKChannelReady *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void ChannelReady_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId ChannelReady_get_channel_id(const struct LDKChannelReady *NONNULL_PTR this_ptr);
+       public static native long ChannelReady_get_channel_id(long this_ptr);
+       // void ChannelReady_set_channel_id(struct LDKChannelReady *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void ChannelReady_set_channel_id(long this_ptr, long val);
        // struct LDKPublicKey ChannelReady_get_next_per_commitment_point(const struct LDKChannelReady *NONNULL_PTR this_ptr);
        public static native byte[] ChannelReady_get_next_per_commitment_point(long this_ptr);
        // void ChannelReady_set_next_per_commitment_point(struct LDKChannelReady *NONNULL_PTR this_ptr, struct LDKPublicKey val);
@@ -8577,8 +9337,8 @@ public class bindings {
        public static native long ChannelReady_get_short_channel_id_alias(long this_ptr);
        // void ChannelReady_set_short_channel_id_alias(struct LDKChannelReady *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
        public static native void ChannelReady_set_short_channel_id_alias(long this_ptr, long val);
-       // MUST_USE_RES struct LDKChannelReady ChannelReady_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg, struct LDKCOption_u64Z short_channel_id_alias_arg);
-       public static native long ChannelReady_new(byte[] channel_id_arg, byte[] next_per_commitment_point_arg, long short_channel_id_alias_arg);
+       // MUST_USE_RES struct LDKChannelReady ChannelReady_new(struct LDKChannelId channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg, struct LDKCOption_u64Z short_channel_id_alias_arg);
+       public static native long ChannelReady_new(long channel_id_arg, byte[] next_per_commitment_point_arg, long short_channel_id_alias_arg);
        // uint64_t ChannelReady_clone_ptr(LDKChannelReady *NONNULL_PTR arg);
        public static native long ChannelReady_clone_ptr(long arg);
        // struct LDKChannelReady ChannelReady_clone(const struct LDKChannelReady *NONNULL_PTR orig);
@@ -8589,16 +9349,16 @@ public class bindings {
        public static native boolean ChannelReady_eq(long a, long b);
        // void Stfu_free(struct LDKStfu this_obj);
        public static native void Stfu_free(long this_obj);
-       // const uint8_t (*Stfu_get_channel_id(const struct LDKStfu *NONNULL_PTR this_ptr))[32];
-       public static native byte[] Stfu_get_channel_id(long this_ptr);
-       // void Stfu_set_channel_id(struct LDKStfu *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void Stfu_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId Stfu_get_channel_id(const struct LDKStfu *NONNULL_PTR this_ptr);
+       public static native long Stfu_get_channel_id(long this_ptr);
+       // void Stfu_set_channel_id(struct LDKStfu *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void Stfu_set_channel_id(long this_ptr, long val);
        // uint8_t Stfu_get_initiator(const struct LDKStfu *NONNULL_PTR this_ptr);
        public static native byte Stfu_get_initiator(long this_ptr);
        // void Stfu_set_initiator(struct LDKStfu *NONNULL_PTR this_ptr, uint8_t val);
        public static native void Stfu_set_initiator(long this_ptr, byte val);
-       // MUST_USE_RES struct LDKStfu Stfu_new(struct LDKThirtyTwoBytes channel_id_arg, uint8_t initiator_arg);
-       public static native long Stfu_new(byte[] channel_id_arg, byte initiator_arg);
+       // MUST_USE_RES struct LDKStfu Stfu_new(struct LDKChannelId channel_id_arg, uint8_t initiator_arg);
+       public static native long Stfu_new(long channel_id_arg, byte initiator_arg);
        // uint64_t Stfu_clone_ptr(LDKStfu *NONNULL_PTR arg);
        public static native long Stfu_clone_ptr(long arg);
        // struct LDKStfu Stfu_clone(const struct LDKStfu *NONNULL_PTR orig);
@@ -8607,10 +9367,10 @@ public class bindings {
        public static native boolean Stfu_eq(long a, long b);
        // void Splice_free(struct LDKSplice this_obj);
        public static native void Splice_free(long this_obj);
-       // const uint8_t (*Splice_get_channel_id(const struct LDKSplice *NONNULL_PTR this_ptr))[32];
-       public static native byte[] Splice_get_channel_id(long this_ptr);
-       // void Splice_set_channel_id(struct LDKSplice *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void Splice_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId Splice_get_channel_id(const struct LDKSplice *NONNULL_PTR this_ptr);
+       public static native long Splice_get_channel_id(long this_ptr);
+       // void Splice_set_channel_id(struct LDKSplice *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void Splice_set_channel_id(long this_ptr, long val);
        // const uint8_t (*Splice_get_chain_hash(const struct LDKSplice *NONNULL_PTR this_ptr))[32];
        public static native byte[] Splice_get_chain_hash(long this_ptr);
        // void Splice_set_chain_hash(struct LDKSplice *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -8631,8 +9391,8 @@ public class bindings {
        public static native byte[] Splice_get_funding_pubkey(long this_ptr);
        // void Splice_set_funding_pubkey(struct LDKSplice *NONNULL_PTR this_ptr, struct LDKPublicKey val);
        public static native void Splice_set_funding_pubkey(long this_ptr, byte[] val);
-       // MUST_USE_RES struct LDKSplice Splice_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes chain_hash_arg, int64_t relative_satoshis_arg, uint32_t funding_feerate_perkw_arg, uint32_t locktime_arg, struct LDKPublicKey funding_pubkey_arg);
-       public static native long Splice_new(byte[] channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, int funding_feerate_perkw_arg, int locktime_arg, byte[] funding_pubkey_arg);
+       // MUST_USE_RES struct LDKSplice Splice_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes chain_hash_arg, int64_t relative_satoshis_arg, uint32_t funding_feerate_perkw_arg, uint32_t locktime_arg, struct LDKPublicKey funding_pubkey_arg);
+       public static native long Splice_new(long channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, int funding_feerate_perkw_arg, int locktime_arg, byte[] funding_pubkey_arg);
        // uint64_t Splice_clone_ptr(LDKSplice *NONNULL_PTR arg);
        public static native long Splice_clone_ptr(long arg);
        // struct LDKSplice Splice_clone(const struct LDKSplice *NONNULL_PTR orig);
@@ -8641,10 +9401,10 @@ public class bindings {
        public static native boolean Splice_eq(long a, long b);
        // void SpliceAck_free(struct LDKSpliceAck this_obj);
        public static native void SpliceAck_free(long this_obj);
-       // const uint8_t (*SpliceAck_get_channel_id(const struct LDKSpliceAck *NONNULL_PTR this_ptr))[32];
-       public static native byte[] SpliceAck_get_channel_id(long this_ptr);
-       // void SpliceAck_set_channel_id(struct LDKSpliceAck *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void SpliceAck_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId SpliceAck_get_channel_id(const struct LDKSpliceAck *NONNULL_PTR this_ptr);
+       public static native long SpliceAck_get_channel_id(long this_ptr);
+       // void SpliceAck_set_channel_id(struct LDKSpliceAck *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void SpliceAck_set_channel_id(long this_ptr, long val);
        // const uint8_t (*SpliceAck_get_chain_hash(const struct LDKSpliceAck *NONNULL_PTR this_ptr))[32];
        public static native byte[] SpliceAck_get_chain_hash(long this_ptr);
        // void SpliceAck_set_chain_hash(struct LDKSpliceAck *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -8657,8 +9417,8 @@ public class bindings {
        public static native byte[] SpliceAck_get_funding_pubkey(long this_ptr);
        // void SpliceAck_set_funding_pubkey(struct LDKSpliceAck *NONNULL_PTR this_ptr, struct LDKPublicKey val);
        public static native void SpliceAck_set_funding_pubkey(long this_ptr, byte[] val);
-       // MUST_USE_RES struct LDKSpliceAck SpliceAck_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes chain_hash_arg, int64_t relative_satoshis_arg, struct LDKPublicKey funding_pubkey_arg);
-       public static native long SpliceAck_new(byte[] channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, byte[] funding_pubkey_arg);
+       // MUST_USE_RES struct LDKSpliceAck SpliceAck_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes chain_hash_arg, int64_t relative_satoshis_arg, struct LDKPublicKey funding_pubkey_arg);
+       public static native long SpliceAck_new(long channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, byte[] funding_pubkey_arg);
        // uint64_t SpliceAck_clone_ptr(LDKSpliceAck *NONNULL_PTR arg);
        public static native long SpliceAck_clone_ptr(long arg);
        // struct LDKSpliceAck SpliceAck_clone(const struct LDKSpliceAck *NONNULL_PTR orig);
@@ -8667,12 +9427,12 @@ public class bindings {
        public static native boolean SpliceAck_eq(long a, long b);
        // void SpliceLocked_free(struct LDKSpliceLocked this_obj);
        public static native void SpliceLocked_free(long this_obj);
-       // const uint8_t (*SpliceLocked_get_channel_id(const struct LDKSpliceLocked *NONNULL_PTR this_ptr))[32];
-       public static native byte[] SpliceLocked_get_channel_id(long this_ptr);
-       // void SpliceLocked_set_channel_id(struct LDKSpliceLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void SpliceLocked_set_channel_id(long this_ptr, byte[] val);
-       // MUST_USE_RES struct LDKSpliceLocked SpliceLocked_new(struct LDKThirtyTwoBytes channel_id_arg);
-       public static native long SpliceLocked_new(byte[] channel_id_arg);
+       // struct LDKChannelId SpliceLocked_get_channel_id(const struct LDKSpliceLocked *NONNULL_PTR this_ptr);
+       public static native long SpliceLocked_get_channel_id(long this_ptr);
+       // void SpliceLocked_set_channel_id(struct LDKSpliceLocked *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void SpliceLocked_set_channel_id(long this_ptr, long val);
+       // MUST_USE_RES struct LDKSpliceLocked SpliceLocked_new(struct LDKChannelId channel_id_arg);
+       public static native long SpliceLocked_new(long channel_id_arg);
        // uint64_t SpliceLocked_clone_ptr(LDKSpliceLocked *NONNULL_PTR arg);
        public static native long SpliceLocked_clone_ptr(long arg);
        // struct LDKSpliceLocked SpliceLocked_clone(const struct LDKSpliceLocked *NONNULL_PTR orig);
@@ -8681,10 +9441,10 @@ public class bindings {
        public static native boolean SpliceLocked_eq(long a, long b);
        // void TxAddInput_free(struct LDKTxAddInput this_obj);
        public static native void TxAddInput_free(long this_obj);
-       // const uint8_t (*TxAddInput_get_channel_id(const struct LDKTxAddInput *NONNULL_PTR this_ptr))[32];
-       public static native byte[] TxAddInput_get_channel_id(long this_ptr);
-       // void TxAddInput_set_channel_id(struct LDKTxAddInput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void TxAddInput_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId TxAddInput_get_channel_id(const struct LDKTxAddInput *NONNULL_PTR this_ptr);
+       public static native long TxAddInput_get_channel_id(long this_ptr);
+       // void TxAddInput_set_channel_id(struct LDKTxAddInput *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void TxAddInput_set_channel_id(long this_ptr, long val);
        // uint64_t TxAddInput_get_serial_id(const struct LDKTxAddInput *NONNULL_PTR this_ptr);
        public static native long TxAddInput_get_serial_id(long this_ptr);
        // void TxAddInput_set_serial_id(struct LDKTxAddInput *NONNULL_PTR this_ptr, uint64_t val);
@@ -8701,8 +9461,8 @@ public class bindings {
        public static native int TxAddInput_get_sequence(long this_ptr);
        // void TxAddInput_set_sequence(struct LDKTxAddInput *NONNULL_PTR this_ptr, uint32_t val);
        public static native void TxAddInput_set_sequence(long this_ptr, int val);
-       // MUST_USE_RES struct LDKTxAddInput TxAddInput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg, struct LDKTransactionU16LenLimited prevtx_arg, uint32_t prevtx_out_arg, uint32_t sequence_arg);
-       public static native long TxAddInput_new(byte[] channel_id_arg, long serial_id_arg, long prevtx_arg, int prevtx_out_arg, int sequence_arg);
+       // MUST_USE_RES struct LDKTxAddInput TxAddInput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg, struct LDKTransactionU16LenLimited prevtx_arg, uint32_t prevtx_out_arg, uint32_t sequence_arg);
+       public static native long TxAddInput_new(long channel_id_arg, long serial_id_arg, long prevtx_arg, int prevtx_out_arg, int sequence_arg);
        // uint64_t TxAddInput_clone_ptr(LDKTxAddInput *NONNULL_PTR arg);
        public static native long TxAddInput_clone_ptr(long arg);
        // struct LDKTxAddInput TxAddInput_clone(const struct LDKTxAddInput *NONNULL_PTR orig);
@@ -8713,10 +9473,10 @@ public class bindings {
        public static native boolean TxAddInput_eq(long a, long b);
        // void TxAddOutput_free(struct LDKTxAddOutput this_obj);
        public static native void TxAddOutput_free(long this_obj);
-       // const uint8_t (*TxAddOutput_get_channel_id(const struct LDKTxAddOutput *NONNULL_PTR this_ptr))[32];
-       public static native byte[] TxAddOutput_get_channel_id(long this_ptr);
-       // void TxAddOutput_set_channel_id(struct LDKTxAddOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void TxAddOutput_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId TxAddOutput_get_channel_id(const struct LDKTxAddOutput *NONNULL_PTR this_ptr);
+       public static native long TxAddOutput_get_channel_id(long this_ptr);
+       // void TxAddOutput_set_channel_id(struct LDKTxAddOutput *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void TxAddOutput_set_channel_id(long this_ptr, long val);
        // uint64_t TxAddOutput_get_serial_id(const struct LDKTxAddOutput *NONNULL_PTR this_ptr);
        public static native long TxAddOutput_get_serial_id(long this_ptr);
        // void TxAddOutput_set_serial_id(struct LDKTxAddOutput *NONNULL_PTR this_ptr, uint64_t val);
@@ -8729,8 +9489,8 @@ public class bindings {
        public static native byte[] TxAddOutput_get_script(long this_ptr);
        // void TxAddOutput_set_script(struct LDKTxAddOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
        public static native void TxAddOutput_set_script(long this_ptr, byte[] val);
-       // MUST_USE_RES struct LDKTxAddOutput TxAddOutput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg, uint64_t sats_arg, struct LDKCVec_u8Z script_arg);
-       public static native long TxAddOutput_new(byte[] channel_id_arg, long serial_id_arg, long sats_arg, byte[] script_arg);
+       // MUST_USE_RES struct LDKTxAddOutput TxAddOutput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg, uint64_t sats_arg, struct LDKCVec_u8Z script_arg);
+       public static native long TxAddOutput_new(long channel_id_arg, long serial_id_arg, long sats_arg, byte[] script_arg);
        // uint64_t TxAddOutput_clone_ptr(LDKTxAddOutput *NONNULL_PTR arg);
        public static native long TxAddOutput_clone_ptr(long arg);
        // struct LDKTxAddOutput TxAddOutput_clone(const struct LDKTxAddOutput *NONNULL_PTR orig);
@@ -8741,16 +9501,16 @@ public class bindings {
        public static native boolean TxAddOutput_eq(long a, long b);
        // void TxRemoveInput_free(struct LDKTxRemoveInput this_obj);
        public static native void TxRemoveInput_free(long this_obj);
-       // const uint8_t (*TxRemoveInput_get_channel_id(const struct LDKTxRemoveInput *NONNULL_PTR this_ptr))[32];
-       public static native byte[] TxRemoveInput_get_channel_id(long this_ptr);
-       // void TxRemoveInput_set_channel_id(struct LDKTxRemoveInput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void TxRemoveInput_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId TxRemoveInput_get_channel_id(const struct LDKTxRemoveInput *NONNULL_PTR this_ptr);
+       public static native long TxRemoveInput_get_channel_id(long this_ptr);
+       // void TxRemoveInput_set_channel_id(struct LDKTxRemoveInput *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void TxRemoveInput_set_channel_id(long this_ptr, long val);
        // uint64_t TxRemoveInput_get_serial_id(const struct LDKTxRemoveInput *NONNULL_PTR this_ptr);
        public static native long TxRemoveInput_get_serial_id(long this_ptr);
        // void TxRemoveInput_set_serial_id(struct LDKTxRemoveInput *NONNULL_PTR this_ptr, uint64_t val);
        public static native void TxRemoveInput_set_serial_id(long this_ptr, long val);
-       // MUST_USE_RES struct LDKTxRemoveInput TxRemoveInput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg);
-       public static native long TxRemoveInput_new(byte[] channel_id_arg, long serial_id_arg);
+       // MUST_USE_RES struct LDKTxRemoveInput TxRemoveInput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg);
+       public static native long TxRemoveInput_new(long channel_id_arg, long serial_id_arg);
        // uint64_t TxRemoveInput_clone_ptr(LDKTxRemoveInput *NONNULL_PTR arg);
        public static native long TxRemoveInput_clone_ptr(long arg);
        // struct LDKTxRemoveInput TxRemoveInput_clone(const struct LDKTxRemoveInput *NONNULL_PTR orig);
@@ -8761,16 +9521,16 @@ public class bindings {
        public static native boolean TxRemoveInput_eq(long a, long b);
        // void TxRemoveOutput_free(struct LDKTxRemoveOutput this_obj);
        public static native void TxRemoveOutput_free(long this_obj);
-       // const uint8_t (*TxRemoveOutput_get_channel_id(const struct LDKTxRemoveOutput *NONNULL_PTR this_ptr))[32];
-       public static native byte[] TxRemoveOutput_get_channel_id(long this_ptr);
-       // void TxRemoveOutput_set_channel_id(struct LDKTxRemoveOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void TxRemoveOutput_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId TxRemoveOutput_get_channel_id(const struct LDKTxRemoveOutput *NONNULL_PTR this_ptr);
+       public static native long TxRemoveOutput_get_channel_id(long this_ptr);
+       // void TxRemoveOutput_set_channel_id(struct LDKTxRemoveOutput *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void TxRemoveOutput_set_channel_id(long this_ptr, long val);
        // uint64_t TxRemoveOutput_get_serial_id(const struct LDKTxRemoveOutput *NONNULL_PTR this_ptr);
        public static native long TxRemoveOutput_get_serial_id(long this_ptr);
        // void TxRemoveOutput_set_serial_id(struct LDKTxRemoveOutput *NONNULL_PTR this_ptr, uint64_t val);
        public static native void TxRemoveOutput_set_serial_id(long this_ptr, long val);
-       // MUST_USE_RES struct LDKTxRemoveOutput TxRemoveOutput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg);
-       public static native long TxRemoveOutput_new(byte[] channel_id_arg, long serial_id_arg);
+       // MUST_USE_RES struct LDKTxRemoveOutput TxRemoveOutput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg);
+       public static native long TxRemoveOutput_new(long channel_id_arg, long serial_id_arg);
        // uint64_t TxRemoveOutput_clone_ptr(LDKTxRemoveOutput *NONNULL_PTR arg);
        public static native long TxRemoveOutput_clone_ptr(long arg);
        // struct LDKTxRemoveOutput TxRemoveOutput_clone(const struct LDKTxRemoveOutput *NONNULL_PTR orig);
@@ -8781,12 +9541,12 @@ public class bindings {
        public static native boolean TxRemoveOutput_eq(long a, long b);
        // void TxComplete_free(struct LDKTxComplete this_obj);
        public static native void TxComplete_free(long this_obj);
-       // const uint8_t (*TxComplete_get_channel_id(const struct LDKTxComplete *NONNULL_PTR this_ptr))[32];
-       public static native byte[] TxComplete_get_channel_id(long this_ptr);
-       // void TxComplete_set_channel_id(struct LDKTxComplete *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void TxComplete_set_channel_id(long this_ptr, byte[] val);
-       // MUST_USE_RES struct LDKTxComplete TxComplete_new(struct LDKThirtyTwoBytes channel_id_arg);
-       public static native long TxComplete_new(byte[] channel_id_arg);
+       // struct LDKChannelId TxComplete_get_channel_id(const struct LDKTxComplete *NONNULL_PTR this_ptr);
+       public static native long TxComplete_get_channel_id(long this_ptr);
+       // void TxComplete_set_channel_id(struct LDKTxComplete *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void TxComplete_set_channel_id(long this_ptr, long val);
+       // MUST_USE_RES struct LDKTxComplete TxComplete_new(struct LDKChannelId channel_id_arg);
+       public static native long TxComplete_new(long channel_id_arg);
        // uint64_t TxComplete_clone_ptr(LDKTxComplete *NONNULL_PTR arg);
        public static native long TxComplete_clone_ptr(long arg);
        // struct LDKTxComplete TxComplete_clone(const struct LDKTxComplete *NONNULL_PTR orig);
@@ -8797,10 +9557,10 @@ public class bindings {
        public static native boolean TxComplete_eq(long a, long b);
        // void TxSignatures_free(struct LDKTxSignatures this_obj);
        public static native void TxSignatures_free(long this_obj);
-       // const uint8_t (*TxSignatures_get_channel_id(const struct LDKTxSignatures *NONNULL_PTR this_ptr))[32];
-       public static native byte[] TxSignatures_get_channel_id(long this_ptr);
-       // void TxSignatures_set_channel_id(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void TxSignatures_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId TxSignatures_get_channel_id(const struct LDKTxSignatures *NONNULL_PTR this_ptr);
+       public static native long TxSignatures_get_channel_id(long this_ptr);
+       // void TxSignatures_set_channel_id(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void TxSignatures_set_channel_id(long this_ptr, long val);
        // const uint8_t (*TxSignatures_get_tx_hash(const struct LDKTxSignatures *NONNULL_PTR this_ptr))[32];
        public static native byte[] TxSignatures_get_tx_hash(long this_ptr);
        // void TxSignatures_set_tx_hash(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -8809,8 +9569,12 @@ public class bindings {
        public static native byte[][] TxSignatures_get_witnesses(long this_ptr);
        // void TxSignatures_set_witnesses(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKCVec_WitnessZ val);
        public static native void TxSignatures_set_witnesses(long this_ptr, byte[][] val);
-       // MUST_USE_RES struct LDKTxSignatures TxSignatures_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes tx_hash_arg, struct LDKCVec_WitnessZ witnesses_arg);
-       public static native long TxSignatures_new(byte[] channel_id_arg, byte[] tx_hash_arg, byte[][] witnesses_arg);
+       // struct LDKCOption_ECDSASignatureZ TxSignatures_get_funding_outpoint_sig(const struct LDKTxSignatures *NONNULL_PTR this_ptr);
+       public static native long TxSignatures_get_funding_outpoint_sig(long this_ptr);
+       // void TxSignatures_set_funding_outpoint_sig(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKCOption_ECDSASignatureZ val);
+       public static native void TxSignatures_set_funding_outpoint_sig(long this_ptr, long val);
+       // MUST_USE_RES struct LDKTxSignatures TxSignatures_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes tx_hash_arg, struct LDKCVec_WitnessZ witnesses_arg, struct LDKCOption_ECDSASignatureZ funding_outpoint_sig_arg);
+       public static native long TxSignatures_new(long channel_id_arg, byte[] tx_hash_arg, byte[][] witnesses_arg, long funding_outpoint_sig_arg);
        // uint64_t TxSignatures_clone_ptr(LDKTxSignatures *NONNULL_PTR arg);
        public static native long TxSignatures_clone_ptr(long arg);
        // struct LDKTxSignatures TxSignatures_clone(const struct LDKTxSignatures *NONNULL_PTR orig);
@@ -8821,10 +9585,10 @@ public class bindings {
        public static native boolean TxSignatures_eq(long a, long b);
        // void TxInitRbf_free(struct LDKTxInitRbf this_obj);
        public static native void TxInitRbf_free(long this_obj);
-       // const uint8_t (*TxInitRbf_get_channel_id(const struct LDKTxInitRbf *NONNULL_PTR this_ptr))[32];
-       public static native byte[] TxInitRbf_get_channel_id(long this_ptr);
-       // void TxInitRbf_set_channel_id(struct LDKTxInitRbf *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void TxInitRbf_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId TxInitRbf_get_channel_id(const struct LDKTxInitRbf *NONNULL_PTR this_ptr);
+       public static native long TxInitRbf_get_channel_id(long this_ptr);
+       // void TxInitRbf_set_channel_id(struct LDKTxInitRbf *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void TxInitRbf_set_channel_id(long this_ptr, long val);
        // uint32_t TxInitRbf_get_locktime(const struct LDKTxInitRbf *NONNULL_PTR this_ptr);
        public static native int TxInitRbf_get_locktime(long this_ptr);
        // void TxInitRbf_set_locktime(struct LDKTxInitRbf *NONNULL_PTR this_ptr, uint32_t val);
@@ -8837,8 +9601,8 @@ public class bindings {
        public static native long TxInitRbf_get_funding_output_contribution(long this_ptr);
        // void TxInitRbf_set_funding_output_contribution(struct LDKTxInitRbf *NONNULL_PTR this_ptr, struct LDKCOption_i64Z val);
        public static native void TxInitRbf_set_funding_output_contribution(long this_ptr, long val);
-       // MUST_USE_RES struct LDKTxInitRbf TxInitRbf_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t locktime_arg, uint32_t feerate_sat_per_1000_weight_arg, struct LDKCOption_i64Z funding_output_contribution_arg);
-       public static native long TxInitRbf_new(byte[] channel_id_arg, int locktime_arg, int feerate_sat_per_1000_weight_arg, long funding_output_contribution_arg);
+       // MUST_USE_RES struct LDKTxInitRbf TxInitRbf_new(struct LDKChannelId channel_id_arg, uint32_t locktime_arg, uint32_t feerate_sat_per_1000_weight_arg, struct LDKCOption_i64Z funding_output_contribution_arg);
+       public static native long TxInitRbf_new(long channel_id_arg, int locktime_arg, int feerate_sat_per_1000_weight_arg, long funding_output_contribution_arg);
        // uint64_t TxInitRbf_clone_ptr(LDKTxInitRbf *NONNULL_PTR arg);
        public static native long TxInitRbf_clone_ptr(long arg);
        // struct LDKTxInitRbf TxInitRbf_clone(const struct LDKTxInitRbf *NONNULL_PTR orig);
@@ -8849,16 +9613,16 @@ public class bindings {
        public static native boolean TxInitRbf_eq(long a, long b);
        // void TxAckRbf_free(struct LDKTxAckRbf this_obj);
        public static native void TxAckRbf_free(long this_obj);
-       // const uint8_t (*TxAckRbf_get_channel_id(const struct LDKTxAckRbf *NONNULL_PTR this_ptr))[32];
-       public static native byte[] TxAckRbf_get_channel_id(long this_ptr);
-       // void TxAckRbf_set_channel_id(struct LDKTxAckRbf *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void TxAckRbf_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId TxAckRbf_get_channel_id(const struct LDKTxAckRbf *NONNULL_PTR this_ptr);
+       public static native long TxAckRbf_get_channel_id(long this_ptr);
+       // void TxAckRbf_set_channel_id(struct LDKTxAckRbf *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void TxAckRbf_set_channel_id(long this_ptr, long val);
        // struct LDKCOption_i64Z TxAckRbf_get_funding_output_contribution(const struct LDKTxAckRbf *NONNULL_PTR this_ptr);
        public static native long TxAckRbf_get_funding_output_contribution(long this_ptr);
        // void TxAckRbf_set_funding_output_contribution(struct LDKTxAckRbf *NONNULL_PTR this_ptr, struct LDKCOption_i64Z val);
        public static native void TxAckRbf_set_funding_output_contribution(long this_ptr, long val);
-       // MUST_USE_RES struct LDKTxAckRbf TxAckRbf_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCOption_i64Z funding_output_contribution_arg);
-       public static native long TxAckRbf_new(byte[] channel_id_arg, long funding_output_contribution_arg);
+       // MUST_USE_RES struct LDKTxAckRbf TxAckRbf_new(struct LDKChannelId channel_id_arg, struct LDKCOption_i64Z funding_output_contribution_arg);
+       public static native long TxAckRbf_new(long channel_id_arg, long funding_output_contribution_arg);
        // uint64_t TxAckRbf_clone_ptr(LDKTxAckRbf *NONNULL_PTR arg);
        public static native long TxAckRbf_clone_ptr(long arg);
        // struct LDKTxAckRbf TxAckRbf_clone(const struct LDKTxAckRbf *NONNULL_PTR orig);
@@ -8869,16 +9633,16 @@ public class bindings {
        public static native boolean TxAckRbf_eq(long a, long b);
        // void TxAbort_free(struct LDKTxAbort this_obj);
        public static native void TxAbort_free(long this_obj);
-       // const uint8_t (*TxAbort_get_channel_id(const struct LDKTxAbort *NONNULL_PTR this_ptr))[32];
-       public static native byte[] TxAbort_get_channel_id(long this_ptr);
-       // void TxAbort_set_channel_id(struct LDKTxAbort *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void TxAbort_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId TxAbort_get_channel_id(const struct LDKTxAbort *NONNULL_PTR this_ptr);
+       public static native long TxAbort_get_channel_id(long this_ptr);
+       // void TxAbort_set_channel_id(struct LDKTxAbort *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void TxAbort_set_channel_id(long this_ptr, long val);
        // struct LDKCVec_u8Z TxAbort_get_data(const struct LDKTxAbort *NONNULL_PTR this_ptr);
        public static native byte[] TxAbort_get_data(long this_ptr);
        // void TxAbort_set_data(struct LDKTxAbort *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
        public static native void TxAbort_set_data(long this_ptr, byte[] val);
-       // MUST_USE_RES struct LDKTxAbort TxAbort_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z data_arg);
-       public static native long TxAbort_new(byte[] channel_id_arg, byte[] data_arg);
+       // MUST_USE_RES struct LDKTxAbort TxAbort_new(struct LDKChannelId channel_id_arg, struct LDKCVec_u8Z data_arg);
+       public static native long TxAbort_new(long channel_id_arg, byte[] data_arg);
        // uint64_t TxAbort_clone_ptr(LDKTxAbort *NONNULL_PTR arg);
        public static native long TxAbort_clone_ptr(long arg);
        // struct LDKTxAbort TxAbort_clone(const struct LDKTxAbort *NONNULL_PTR orig);
@@ -8889,16 +9653,16 @@ public class bindings {
        public static native boolean TxAbort_eq(long a, long b);
        // void Shutdown_free(struct LDKShutdown this_obj);
        public static native void Shutdown_free(long this_obj);
-       // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
-       public static native byte[] Shutdown_get_channel_id(long this_ptr);
-       // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void Shutdown_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr);
+       public static native long Shutdown_get_channel_id(long this_ptr);
+       // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void Shutdown_set_channel_id(long this_ptr, long val);
        // struct LDKCVec_u8Z Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
        public static native byte[] Shutdown_get_scriptpubkey(long this_ptr);
        // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
        public static native void Shutdown_set_scriptpubkey(long this_ptr, byte[] val);
-       // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
-       public static native long Shutdown_new(byte[] channel_id_arg, byte[] scriptpubkey_arg);
+       // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKChannelId channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
+       public static native long Shutdown_new(long channel_id_arg, byte[] scriptpubkey_arg);
        // uint64_t Shutdown_clone_ptr(LDKShutdown *NONNULL_PTR arg);
        public static native long Shutdown_clone_ptr(long arg);
        // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
@@ -8929,10 +9693,10 @@ public class bindings {
        public static native boolean ClosingSignedFeeRange_eq(long a, long b);
        // void ClosingSigned_free(struct LDKClosingSigned this_obj);
        public static native void ClosingSigned_free(long this_obj);
-       // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
-       public static native byte[] ClosingSigned_get_channel_id(long this_ptr);
-       // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void ClosingSigned_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
+       public static native long ClosingSigned_get_channel_id(long this_ptr);
+       // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void ClosingSigned_set_channel_id(long this_ptr, long val);
        // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
        public static native long ClosingSigned_get_fee_satoshis(long this_ptr);
        // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
@@ -8945,8 +9709,8 @@ public class bindings {
        public static native long ClosingSigned_get_fee_range(long this_ptr);
        // void ClosingSigned_set_fee_range(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKClosingSignedFeeRange val);
        public static native void ClosingSigned_set_fee_range(long this_ptr, long val);
-       // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKECDSASignature signature_arg, struct LDKClosingSignedFeeRange fee_range_arg);
-       public static native long ClosingSigned_new(byte[] channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, long fee_range_arg);
+       // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKChannelId channel_id_arg, uint64_t fee_satoshis_arg, struct LDKECDSASignature signature_arg, struct LDKClosingSignedFeeRange fee_range_arg);
+       public static native long ClosingSigned_new(long channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, long fee_range_arg);
        // uint64_t ClosingSigned_clone_ptr(LDKClosingSigned *NONNULL_PTR arg);
        public static native long ClosingSigned_clone_ptr(long arg);
        // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
@@ -8957,10 +9721,10 @@ public class bindings {
        public static native boolean ClosingSigned_eq(long a, long b);
        // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
        public static native void UpdateAddHTLC_free(long this_obj);
-       // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
-       public static native byte[] UpdateAddHTLC_get_channel_id(long this_ptr);
-       // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void UpdateAddHTLC_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
+       public static native long UpdateAddHTLC_get_channel_id(long this_ptr);
+       // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void UpdateAddHTLC_set_channel_id(long this_ptr, long val);
        // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
        public static native long UpdateAddHTLC_get_htlc_id(long this_ptr);
        // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
@@ -8989,8 +9753,8 @@ public class bindings {
        public static native byte[] UpdateAddHTLC_get_blinding_point(long this_ptr);
        // void UpdateAddHTLC_set_blinding_point(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKPublicKey val);
        public static native void UpdateAddHTLC_set_blinding_point(long this_ptr, byte[] val);
-       // MUST_USE_RES struct LDKUpdateAddHTLC UpdateAddHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, uint64_t amount_msat_arg, struct LDKThirtyTwoBytes payment_hash_arg, uint32_t cltv_expiry_arg, struct LDKCOption_u64Z skimmed_fee_msat_arg, struct LDKOnionPacket onion_routing_packet_arg, struct LDKPublicKey blinding_point_arg);
-       public static native long UpdateAddHTLC_new(byte[] channel_id_arg, long htlc_id_arg, long amount_msat_arg, byte[] payment_hash_arg, int cltv_expiry_arg, long skimmed_fee_msat_arg, long onion_routing_packet_arg, byte[] blinding_point_arg);
+       // MUST_USE_RES struct LDKUpdateAddHTLC UpdateAddHTLC_new(struct LDKChannelId channel_id_arg, uint64_t htlc_id_arg, uint64_t amount_msat_arg, struct LDKThirtyTwoBytes payment_hash_arg, uint32_t cltv_expiry_arg, struct LDKCOption_u64Z skimmed_fee_msat_arg, struct LDKOnionPacket onion_routing_packet_arg, struct LDKPublicKey blinding_point_arg);
+       public static native long UpdateAddHTLC_new(long channel_id_arg, long htlc_id_arg, long amount_msat_arg, byte[] payment_hash_arg, int cltv_expiry_arg, long skimmed_fee_msat_arg, long onion_routing_packet_arg, byte[] blinding_point_arg);
        // uint64_t UpdateAddHTLC_clone_ptr(LDKUpdateAddHTLC *NONNULL_PTR arg);
        public static native long UpdateAddHTLC_clone_ptr(long arg);
        // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
@@ -9021,10 +9785,10 @@ public class bindings {
        public static native boolean OnionMessage_eq(long a, long b);
        // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
        public static native void UpdateFulfillHTLC_free(long this_obj);
-       // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
-       public static native byte[] UpdateFulfillHTLC_get_channel_id(long this_ptr);
-       // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void UpdateFulfillHTLC_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
+       public static native long UpdateFulfillHTLC_get_channel_id(long this_ptr);
+       // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void UpdateFulfillHTLC_set_channel_id(long this_ptr, long val);
        // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
        public static native long UpdateFulfillHTLC_get_htlc_id(long this_ptr);
        // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
@@ -9033,8 +9797,8 @@ public class bindings {
        public static native byte[] UpdateFulfillHTLC_get_payment_preimage(long this_ptr);
        // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
        public static native void UpdateFulfillHTLC_set_payment_preimage(long this_ptr, byte[] val);
-       // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
-       public static native long UpdateFulfillHTLC_new(byte[] channel_id_arg, long htlc_id_arg, byte[] payment_preimage_arg);
+       // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKChannelId channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
+       public static native long UpdateFulfillHTLC_new(long channel_id_arg, long htlc_id_arg, byte[] payment_preimage_arg);
        // uint64_t UpdateFulfillHTLC_clone_ptr(LDKUpdateFulfillHTLC *NONNULL_PTR arg);
        public static native long UpdateFulfillHTLC_clone_ptr(long arg);
        // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
@@ -9045,10 +9809,10 @@ public class bindings {
        public static native boolean UpdateFulfillHTLC_eq(long a, long b);
        // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
        public static native void UpdateFailHTLC_free(long this_obj);
-       // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
-       public static native byte[] UpdateFailHTLC_get_channel_id(long this_ptr);
-       // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void UpdateFailHTLC_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
+       public static native long UpdateFailHTLC_get_channel_id(long this_ptr);
+       // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void UpdateFailHTLC_set_channel_id(long this_ptr, long val);
        // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
        public static native long UpdateFailHTLC_get_htlc_id(long this_ptr);
        // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
@@ -9063,10 +9827,10 @@ public class bindings {
        public static native boolean UpdateFailHTLC_eq(long a, long b);
        // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
        public static native void UpdateFailMalformedHTLC_free(long this_obj);
-       // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
-       public static native byte[] UpdateFailMalformedHTLC_get_channel_id(long this_ptr);
-       // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void UpdateFailMalformedHTLC_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
+       public static native long UpdateFailMalformedHTLC_get_channel_id(long this_ptr);
+       // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void UpdateFailMalformedHTLC_set_channel_id(long this_ptr, long val);
        // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
        public static native long UpdateFailMalformedHTLC_get_htlc_id(long this_ptr);
        // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
@@ -9085,10 +9849,10 @@ public class bindings {
        public static native boolean UpdateFailMalformedHTLC_eq(long a, long b);
        // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
        public static native void CommitmentSigned_free(long this_obj);
-       // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
-       public static native byte[] CommitmentSigned_get_channel_id(long this_ptr);
-       // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void CommitmentSigned_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
+       public static native long CommitmentSigned_get_channel_id(long this_ptr);
+       // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void CommitmentSigned_set_channel_id(long this_ptr, long val);
        // struct LDKECDSASignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
        public static native byte[] CommitmentSigned_get_signature(long this_ptr);
        // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
@@ -9097,8 +9861,8 @@ public class bindings {
        public static native byte[][] CommitmentSigned_get_htlc_signatures(long this_ptr);
        // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_ECDSASignatureZ val);
        public static native void CommitmentSigned_set_htlc_signatures(long this_ptr, byte[][] val);
-       // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKECDSASignature signature_arg, struct LDKCVec_ECDSASignatureZ htlc_signatures_arg);
-       public static native long CommitmentSigned_new(byte[] channel_id_arg, byte[] signature_arg, byte[][] htlc_signatures_arg);
+       // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKChannelId channel_id_arg, struct LDKECDSASignature signature_arg, struct LDKCVec_ECDSASignatureZ htlc_signatures_arg);
+       public static native long CommitmentSigned_new(long channel_id_arg, byte[] signature_arg, byte[][] htlc_signatures_arg);
        // uint64_t CommitmentSigned_clone_ptr(LDKCommitmentSigned *NONNULL_PTR arg);
        public static native long CommitmentSigned_clone_ptr(long arg);
        // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
@@ -9109,10 +9873,10 @@ public class bindings {
        public static native boolean CommitmentSigned_eq(long a, long b);
        // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
        public static native void RevokeAndACK_free(long this_obj);
-       // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
-       public static native byte[] RevokeAndACK_get_channel_id(long this_ptr);
-       // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void RevokeAndACK_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
+       public static native long RevokeAndACK_get_channel_id(long this_ptr);
+       // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void RevokeAndACK_set_channel_id(long this_ptr, long val);
        // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
        public static native byte[] RevokeAndACK_get_per_commitment_secret(long this_ptr);
        // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -9121,8 +9885,8 @@ public class bindings {
        public static native byte[] RevokeAndACK_get_next_per_commitment_point(long this_ptr);
        // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
        public static native void RevokeAndACK_set_next_per_commitment_point(long this_ptr, byte[] val);
-       // MUST_USE_RES struct LDKRevokeAndACK RevokeAndACK_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes per_commitment_secret_arg, struct LDKPublicKey next_per_commitment_point_arg);
-       public static native long RevokeAndACK_new(byte[] channel_id_arg, byte[] per_commitment_secret_arg, byte[] next_per_commitment_point_arg);
+       // MUST_USE_RES struct LDKRevokeAndACK RevokeAndACK_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes per_commitment_secret_arg, struct LDKPublicKey next_per_commitment_point_arg);
+       public static native long RevokeAndACK_new(long channel_id_arg, byte[] per_commitment_secret_arg, byte[] next_per_commitment_point_arg);
        // uint64_t RevokeAndACK_clone_ptr(LDKRevokeAndACK *NONNULL_PTR arg);
        public static native long RevokeAndACK_clone_ptr(long arg);
        // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
@@ -9133,16 +9897,16 @@ public class bindings {
        public static native boolean RevokeAndACK_eq(long a, long b);
        // void UpdateFee_free(struct LDKUpdateFee this_obj);
        public static native void UpdateFee_free(long this_obj);
-       // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
-       public static native byte[] UpdateFee_get_channel_id(long this_ptr);
-       // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void UpdateFee_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
+       public static native long UpdateFee_get_channel_id(long this_ptr);
+       // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void UpdateFee_set_channel_id(long this_ptr, long val);
        // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
        public static native int UpdateFee_get_feerate_per_kw(long this_ptr);
        // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
        public static native void UpdateFee_set_feerate_per_kw(long this_ptr, int val);
-       // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
-       public static native long UpdateFee_new(byte[] channel_id_arg, int feerate_per_kw_arg);
+       // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKChannelId channel_id_arg, uint32_t feerate_per_kw_arg);
+       public static native long UpdateFee_new(long channel_id_arg, int feerate_per_kw_arg);
        // uint64_t UpdateFee_clone_ptr(LDKUpdateFee *NONNULL_PTR arg);
        public static native long UpdateFee_clone_ptr(long arg);
        // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
@@ -9153,10 +9917,10 @@ public class bindings {
        public static native boolean UpdateFee_eq(long a, long b);
        // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
        public static native void ChannelReestablish_free(long this_obj);
-       // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
-       public static native byte[] ChannelReestablish_get_channel_id(long this_ptr);
-       // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void ChannelReestablish_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
+       public static native long ChannelReestablish_get_channel_id(long this_ptr);
+       // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void ChannelReestablish_set_channel_id(long this_ptr, long val);
        // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
        public static native long ChannelReestablish_get_next_local_commitment_number(long this_ptr);
        // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
@@ -9177,8 +9941,8 @@ public class bindings {
        public static native long ChannelReestablish_get_next_funding_txid(long this_ptr);
        // void ChannelReestablish_set_next_funding_txid(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKCOption_ThirtyTwoBytesZ val);
        public static native void ChannelReestablish_set_next_funding_txid(long this_ptr, long val);
-       // MUST_USE_RES struct LDKChannelReestablish ChannelReestablish_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t next_local_commitment_number_arg, uint64_t next_remote_commitment_number_arg, struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg, struct LDKCOption_ThirtyTwoBytesZ next_funding_txid_arg);
-       public static native long ChannelReestablish_new(byte[] channel_id_arg, long next_local_commitment_number_arg, long next_remote_commitment_number_arg, byte[] your_last_per_commitment_secret_arg, byte[] my_current_per_commitment_point_arg, long next_funding_txid_arg);
+       // MUST_USE_RES struct LDKChannelReestablish ChannelReestablish_new(struct LDKChannelId channel_id_arg, uint64_t next_local_commitment_number_arg, uint64_t next_remote_commitment_number_arg, struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg, struct LDKCOption_ThirtyTwoBytesZ next_funding_txid_arg);
+       public static native long ChannelReestablish_new(long channel_id_arg, long next_local_commitment_number_arg, long next_remote_commitment_number_arg, byte[] your_last_per_commitment_secret_arg, byte[] my_current_per_commitment_point_arg, long next_funding_txid_arg);
        // uint64_t ChannelReestablish_clone_ptr(LDKChannelReestablish *NONNULL_PTR arg);
        public static native long ChannelReestablish_clone_ptr(long arg);
        // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
@@ -9189,10 +9953,10 @@ public class bindings {
        public static native boolean ChannelReestablish_eq(long a, long b);
        // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
        public static native void AnnouncementSignatures_free(long this_obj);
-       // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
-       public static native byte[] AnnouncementSignatures_get_channel_id(long this_ptr);
-       // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void AnnouncementSignatures_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
+       public static native long AnnouncementSignatures_get_channel_id(long this_ptr);
+       // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void AnnouncementSignatures_set_channel_id(long this_ptr, long val);
        // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
        public static native long AnnouncementSignatures_get_short_channel_id(long this_ptr);
        // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
@@ -9205,8 +9969,8 @@ public class bindings {
        public static native byte[] AnnouncementSignatures_get_bitcoin_signature(long this_ptr);
        // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
        public static native void AnnouncementSignatures_set_bitcoin_signature(long this_ptr, byte[] val);
-       // MUST_USE_RES struct LDKAnnouncementSignatures AnnouncementSignatures_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t short_channel_id_arg, struct LDKECDSASignature node_signature_arg, struct LDKECDSASignature bitcoin_signature_arg);
-       public static native long AnnouncementSignatures_new(byte[] channel_id_arg, long short_channel_id_arg, byte[] node_signature_arg, byte[] bitcoin_signature_arg);
+       // MUST_USE_RES struct LDKAnnouncementSignatures AnnouncementSignatures_new(struct LDKChannelId channel_id_arg, uint64_t short_channel_id_arg, struct LDKECDSASignature node_signature_arg, struct LDKECDSASignature bitcoin_signature_arg);
+       public static native long AnnouncementSignatures_new(long channel_id_arg, long short_channel_id_arg, byte[] node_signature_arg, byte[] bitcoin_signature_arg);
        // uint64_t AnnouncementSignatures_clone_ptr(LDKAnnouncementSignatures *NONNULL_PTR arg);
        public static native long AnnouncementSignatures_clone_ptr(long arg);
        // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
@@ -9299,6 +10063,16 @@ public class bindings {
        public static native long[] UnsignedNodeAnnouncement_get_addresses(long this_ptr);
        // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_SocketAddressZ val);
        public static native void UnsignedNodeAnnouncement_set_addresses(long this_ptr, long[] val);
+       // struct LDKCVec_u8Z UnsignedNodeAnnouncement_get_excess_address_data(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
+       public static native byte[] UnsignedNodeAnnouncement_get_excess_address_data(long this_ptr);
+       // void UnsignedNodeAnnouncement_set_excess_address_data(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
+       public static native void UnsignedNodeAnnouncement_set_excess_address_data(long this_ptr, byte[] val);
+       // struct LDKCVec_u8Z UnsignedNodeAnnouncement_get_excess_data(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
+       public static native byte[] UnsignedNodeAnnouncement_get_excess_data(long this_ptr);
+       // void UnsignedNodeAnnouncement_set_excess_data(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
+       public static native void UnsignedNodeAnnouncement_set_excess_data(long this_ptr, byte[] val);
+       // MUST_USE_RES struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_new(struct LDKNodeFeatures features_arg, uint32_t timestamp_arg, struct LDKNodeId node_id_arg, struct LDKThreeBytes rgb_arg, struct LDKNodeAlias alias_arg, struct LDKCVec_SocketAddressZ addresses_arg, struct LDKCVec_u8Z excess_address_data_arg, struct LDKCVec_u8Z excess_data_arg);
+       public static native long UnsignedNodeAnnouncement_new(long features_arg, int timestamp_arg, long node_id_arg, byte[] rgb_arg, long alias_arg, long[] addresses_arg, byte[] excess_address_data_arg, byte[] excess_data_arg);
        // uint64_t UnsignedNodeAnnouncement_clone_ptr(LDKUnsignedNodeAnnouncement *NONNULL_PTR arg);
        public static native long UnsignedNodeAnnouncement_clone_ptr(long arg);
        // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
@@ -9713,6 +10487,36 @@ public class bindings {
        public static native long OnionPacket_hash(long o);
        // bool OnionPacket_eq(const struct LDKOnionPacket *NONNULL_PTR a, const struct LDKOnionPacket *NONNULL_PTR b);
        public static native boolean OnionPacket_eq(long a, long b);
+       // void TrampolineOnionPacket_free(struct LDKTrampolineOnionPacket this_obj);
+       public static native void TrampolineOnionPacket_free(long this_obj);
+       // uint8_t TrampolineOnionPacket_get_version(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr);
+       public static native byte TrampolineOnionPacket_get_version(long this_ptr);
+       // void TrampolineOnionPacket_set_version(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, uint8_t val);
+       public static native void TrampolineOnionPacket_set_version(long this_ptr, byte val);
+       // struct LDKPublicKey TrampolineOnionPacket_get_public_key(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr);
+       public static native byte[] TrampolineOnionPacket_get_public_key(long this_ptr);
+       // void TrampolineOnionPacket_set_public_key(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       public static native void TrampolineOnionPacket_set_public_key(long this_ptr, byte[] val);
+       // struct LDKCVec_u8Z TrampolineOnionPacket_get_hop_data(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr);
+       public static native byte[] TrampolineOnionPacket_get_hop_data(long this_ptr);
+       // void TrampolineOnionPacket_set_hop_data(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
+       public static native void TrampolineOnionPacket_set_hop_data(long this_ptr, byte[] val);
+       // const uint8_t (*TrampolineOnionPacket_get_hmac(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr))[32];
+       public static native byte[] TrampolineOnionPacket_get_hmac(long this_ptr);
+       // void TrampolineOnionPacket_set_hmac(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+       public static native void TrampolineOnionPacket_set_hmac(long this_ptr, byte[] val);
+       // MUST_USE_RES struct LDKTrampolineOnionPacket TrampolineOnionPacket_new(uint8_t version_arg, struct LDKPublicKey public_key_arg, struct LDKCVec_u8Z hop_data_arg, struct LDKThirtyTwoBytes hmac_arg);
+       public static native long TrampolineOnionPacket_new(byte version_arg, byte[] public_key_arg, byte[] hop_data_arg, byte[] hmac_arg);
+       // uint64_t TrampolineOnionPacket_clone_ptr(LDKTrampolineOnionPacket *NONNULL_PTR arg);
+       public static native long TrampolineOnionPacket_clone_ptr(long arg);
+       // struct LDKTrampolineOnionPacket TrampolineOnionPacket_clone(const struct LDKTrampolineOnionPacket *NONNULL_PTR orig);
+       public static native long TrampolineOnionPacket_clone(long orig);
+       // uint64_t TrampolineOnionPacket_hash(const struct LDKTrampolineOnionPacket *NONNULL_PTR o);
+       public static native long TrampolineOnionPacket_hash(long o);
+       // bool TrampolineOnionPacket_eq(const struct LDKTrampolineOnionPacket *NONNULL_PTR a, const struct LDKTrampolineOnionPacket *NONNULL_PTR b);
+       public static native boolean TrampolineOnionPacket_eq(long a, long b);
+       // struct LDKCVec_u8Z TrampolineOnionPacket_write(const struct LDKTrampolineOnionPacket *NONNULL_PTR obj);
+       public static native byte[] TrampolineOnionPacket_write(long obj);
        // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
        public static native byte[] AcceptChannel_write(long obj);
        // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
@@ -9975,6 +10779,26 @@ public class bindings {
        public static native long SocketDescriptor_clone(long orig);
        // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
        public static native void SocketDescriptor_free(long this_ptr);
+       // void PeerDetails_free(struct LDKPeerDetails this_obj);
+       public static native void PeerDetails_free(long this_obj);
+       // struct LDKPublicKey PeerDetails_get_counterparty_node_id(const struct LDKPeerDetails *NONNULL_PTR this_ptr);
+       public static native byte[] PeerDetails_get_counterparty_node_id(long this_ptr);
+       // void PeerDetails_set_counterparty_node_id(struct LDKPeerDetails *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       public static native void PeerDetails_set_counterparty_node_id(long this_ptr, byte[] val);
+       // struct LDKCOption_SocketAddressZ PeerDetails_get_socket_address(const struct LDKPeerDetails *NONNULL_PTR this_ptr);
+       public static native long PeerDetails_get_socket_address(long this_ptr);
+       // void PeerDetails_set_socket_address(struct LDKPeerDetails *NONNULL_PTR this_ptr, struct LDKCOption_SocketAddressZ val);
+       public static native void PeerDetails_set_socket_address(long this_ptr, long val);
+       // struct LDKInitFeatures PeerDetails_get_init_features(const struct LDKPeerDetails *NONNULL_PTR this_ptr);
+       public static native long PeerDetails_get_init_features(long this_ptr);
+       // void PeerDetails_set_init_features(struct LDKPeerDetails *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
+       public static native void PeerDetails_set_init_features(long this_ptr, long val);
+       // bool PeerDetails_get_is_inbound_connection(const struct LDKPeerDetails *NONNULL_PTR this_ptr);
+       public static native boolean PeerDetails_get_is_inbound_connection(long this_ptr);
+       // void PeerDetails_set_is_inbound_connection(struct LDKPeerDetails *NONNULL_PTR this_ptr, bool val);
+       public static native void PeerDetails_set_is_inbound_connection(long this_ptr, boolean val);
+       // MUST_USE_RES struct LDKPeerDetails PeerDetails_new(struct LDKPublicKey counterparty_node_id_arg, struct LDKCOption_SocketAddressZ socket_address_arg, struct LDKInitFeatures init_features_arg, bool is_inbound_connection_arg);
+       public static native long PeerDetails_new(byte[] counterparty_node_id_arg, long socket_address_arg, long init_features_arg, boolean is_inbound_connection_arg);
        // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
        public static native void PeerHandleError_free(long this_obj);
        // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(void);
@@ -9987,8 +10811,10 @@ public class bindings {
        public static native void PeerManager_free(long this_obj);
        // MUST_USE_RES struct LDKPeerManager PeerManager_new(struct LDKMessageHandler message_handler, uint32_t current_time, const uint8_t (*ephemeral_random_data)[32], struct LDKLogger logger, struct LDKNodeSigner node_signer);
        public static native long PeerManager_new(long message_handler, int current_time, byte[] ephemeral_random_data, long logger, long node_signer);
-       // MUST_USE_RES struct LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
-       public static native long[] PeerManager_get_peer_node_ids(long this_arg);
+       // MUST_USE_RES struct LDKCVec_PeerDetailsZ PeerManager_list_peers(const struct LDKPeerManager *NONNULL_PTR this_arg);
+       public static native long[] PeerManager_list_peers(long this_arg);
+       // MUST_USE_RES struct LDKPeerDetails PeerManager_peer_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id);
+       public static native long PeerManager_peer_by_node_id(long this_arg, byte[] their_node_id);
        // MUST_USE_RES struct LDKCResult_CVec_u8ZPeerHandleErrorZ PeerManager_new_outbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKSocketDescriptor descriptor, struct LDKCOption_SocketAddressZ remote_network_address);
        public static native long PeerManager_new_outbound_connection(long this_arg, byte[] their_node_id, long descriptor, long remote_network_address);
        // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor, struct LDKCOption_SocketAddressZ remote_network_address);
@@ -11003,6 +11829,30 @@ public class bindings {
        public static native boolean NodeFeatures_supports_keysend(long this_arg);
        // MUST_USE_RES bool NodeFeatures_requires_keysend(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
        public static native boolean NodeFeatures_requires_keysend(long this_arg);
+       // void InitFeatures_set_trampoline_routing_optional(struct LDKInitFeatures *NONNULL_PTR this_arg);
+       public static native void InitFeatures_set_trampoline_routing_optional(long this_arg);
+       // void InitFeatures_set_trampoline_routing_required(struct LDKInitFeatures *NONNULL_PTR this_arg);
+       public static native void InitFeatures_set_trampoline_routing_required(long this_arg);
+       // MUST_USE_RES bool InitFeatures_supports_trampoline_routing(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+       public static native boolean InitFeatures_supports_trampoline_routing(long this_arg);
+       // void NodeFeatures_set_trampoline_routing_optional(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+       public static native void NodeFeatures_set_trampoline_routing_optional(long this_arg);
+       // void NodeFeatures_set_trampoline_routing_required(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+       public static native void NodeFeatures_set_trampoline_routing_required(long this_arg);
+       // MUST_USE_RES bool NodeFeatures_supports_trampoline_routing(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+       public static native boolean NodeFeatures_supports_trampoline_routing(long this_arg);
+       // void Bolt11InvoiceFeatures_set_trampoline_routing_optional(struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg);
+       public static native void Bolt11InvoiceFeatures_set_trampoline_routing_optional(long this_arg);
+       // void Bolt11InvoiceFeatures_set_trampoline_routing_required(struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg);
+       public static native void Bolt11InvoiceFeatures_set_trampoline_routing_required(long this_arg);
+       // MUST_USE_RES bool Bolt11InvoiceFeatures_supports_trampoline_routing(const struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg);
+       public static native boolean Bolt11InvoiceFeatures_supports_trampoline_routing(long this_arg);
+       // MUST_USE_RES bool InitFeatures_requires_trampoline_routing(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+       public static native boolean InitFeatures_requires_trampoline_routing(long this_arg);
+       // MUST_USE_RES bool NodeFeatures_requires_trampoline_routing(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+       public static native boolean NodeFeatures_requires_trampoline_routing(long this_arg);
+       // MUST_USE_RES bool Bolt11InvoiceFeatures_requires_trampoline_routing(const struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg);
+       public static native boolean Bolt11InvoiceFeatures_requires_trampoline_routing(long this_arg);
        // void ShutdownScript_free(struct LDKShutdownScript this_obj);
        public static native void ShutdownScript_free(long this_obj);
        // uint64_t ShutdownScript_clone_ptr(LDKShutdownScript *NONNULL_PTR arg);
@@ -11039,6 +11889,42 @@ public class bindings {
        public static native byte[] ShutdownScript_as_legacy_pubkey(long this_arg);
        // MUST_USE_RES bool ShutdownScript_is_compatible(const struct LDKShutdownScript *NONNULL_PTR this_arg, const struct LDKInitFeatures *NONNULL_PTR features);
        public static native boolean ShutdownScript_is_compatible(long this_arg, long features);
+       // void ChannelId_free(struct LDKChannelId this_obj);
+       public static native void ChannelId_free(long this_obj);
+       // const uint8_t (*ChannelId_get_a(const struct LDKChannelId *NONNULL_PTR this_ptr))[32];
+       public static native byte[] ChannelId_get_a(long this_ptr);
+       // void ChannelId_set_a(struct LDKChannelId *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+       public static native void ChannelId_set_a(long this_ptr, byte[] val);
+       // MUST_USE_RES struct LDKChannelId ChannelId_new(struct LDKThirtyTwoBytes a_arg);
+       public static native long ChannelId_new(byte[] a_arg);
+       // uint64_t ChannelId_clone_ptr(LDKChannelId *NONNULL_PTR arg);
+       public static native long ChannelId_clone_ptr(long arg);
+       // struct LDKChannelId ChannelId_clone(const struct LDKChannelId *NONNULL_PTR orig);
+       public static native long ChannelId_clone(long orig);
+       // bool ChannelId_eq(const struct LDKChannelId *NONNULL_PTR a, const struct LDKChannelId *NONNULL_PTR b);
+       public static native boolean ChannelId_eq(long a, long b);
+       // uint64_t ChannelId_hash(const struct LDKChannelId *NONNULL_PTR o);
+       public static native long ChannelId_hash(long o);
+       // MUST_USE_RES struct LDKChannelId ChannelId_v1_from_funding_txid(const uint8_t (*txid)[32], uint16_t output_index);
+       public static native long ChannelId_v1_from_funding_txid(byte[] txid, short output_index);
+       // MUST_USE_RES struct LDKChannelId ChannelId_v1_from_funding_outpoint(struct LDKOutPoint outpoint);
+       public static native long ChannelId_v1_from_funding_outpoint(long outpoint);
+       // MUST_USE_RES struct LDKChannelId ChannelId_temporary_from_entropy_source(const struct LDKEntropySource *NONNULL_PTR entropy_source);
+       public static native long ChannelId_temporary_from_entropy_source(long entropy_source);
+       // MUST_USE_RES struct LDKChannelId ChannelId_from_bytes(struct LDKThirtyTwoBytes data);
+       public static native long ChannelId_from_bytes(byte[] data);
+       // MUST_USE_RES struct LDKChannelId ChannelId_new_zero(void);
+       public static native long ChannelId_new_zero();
+       // MUST_USE_RES bool ChannelId_is_zero(const struct LDKChannelId *NONNULL_PTR this_arg);
+       public static native boolean ChannelId_is_zero(long this_arg);
+       // MUST_USE_RES struct LDKChannelId ChannelId_v2_from_revocation_basepoints(const struct LDKRevocationBasepoint *NONNULL_PTR ours, const struct LDKRevocationBasepoint *NONNULL_PTR theirs);
+       public static native long ChannelId_v2_from_revocation_basepoints(long ours, long theirs);
+       // MUST_USE_RES struct LDKChannelId ChannelId_temporary_v2_from_revocation_basepoint(const struct LDKRevocationBasepoint *NONNULL_PTR our_revocation_basepoint);
+       public static native long ChannelId_temporary_v2_from_revocation_basepoint(long our_revocation_basepoint);
+       // struct LDKCVec_u8Z ChannelId_write(const struct LDKChannelId *NONNULL_PTR obj);
+       public static native byte[] ChannelId_write(long obj);
+       // struct LDKCResult_ChannelIdDecodeErrorZ ChannelId_read(struct LDKu8slice ser);
+       public static native long ChannelId_read(byte[] ser);
        // void Retry_free(struct LDKRetry this_ptr);
        public static native void Retry_free(long this_ptr);
        // uint64_t Retry_clone_ptr(LDKRetry *NONNULL_PTR arg);
@@ -11133,6 +12019,74 @@ public class bindings {
        public static native long Type_clone(long orig);
        // void Type_free(struct LDKType this_ptr);
        public static native void Type_free(long this_ptr);
+       // void OfferId_free(struct LDKOfferId this_obj);
+       public static native void OfferId_free(long this_obj);
+       // const uint8_t (*OfferId_get_a(const struct LDKOfferId *NONNULL_PTR this_ptr))[32];
+       public static native byte[] OfferId_get_a(long this_ptr);
+       // void OfferId_set_a(struct LDKOfferId *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+       public static native void OfferId_set_a(long this_ptr, byte[] val);
+       // MUST_USE_RES struct LDKOfferId OfferId_new(struct LDKThirtyTwoBytes a_arg);
+       public static native long OfferId_new(byte[] a_arg);
+       // uint64_t OfferId_clone_ptr(LDKOfferId *NONNULL_PTR arg);
+       public static native long OfferId_clone_ptr(long arg);
+       // struct LDKOfferId OfferId_clone(const struct LDKOfferId *NONNULL_PTR orig);
+       public static native long OfferId_clone(long orig);
+       // bool OfferId_eq(const struct LDKOfferId *NONNULL_PTR a, const struct LDKOfferId *NONNULL_PTR b);
+       public static native boolean OfferId_eq(long a, long b);
+       // struct LDKCVec_u8Z OfferId_write(const struct LDKOfferId *NONNULL_PTR obj);
+       public static native byte[] OfferId_write(long obj);
+       // struct LDKCResult_OfferIdDecodeErrorZ OfferId_read(struct LDKu8slice ser);
+       public static native long OfferId_read(byte[] ser);
+       // void OfferWithExplicitMetadataBuilder_free(struct LDKOfferWithExplicitMetadataBuilder this_obj);
+       public static native void OfferWithExplicitMetadataBuilder_free(long this_obj);
+       // uint64_t OfferWithExplicitMetadataBuilder_clone_ptr(LDKOfferWithExplicitMetadataBuilder *NONNULL_PTR arg);
+       public static native long OfferWithExplicitMetadataBuilder_clone_ptr(long arg);
+       // struct LDKOfferWithExplicitMetadataBuilder OfferWithExplicitMetadataBuilder_clone(const struct LDKOfferWithExplicitMetadataBuilder *NONNULL_PTR orig);
+       public static native long OfferWithExplicitMetadataBuilder_clone(long orig);
+       // void OfferWithDerivedMetadataBuilder_free(struct LDKOfferWithDerivedMetadataBuilder this_obj);
+       public static native void OfferWithDerivedMetadataBuilder_free(long this_obj);
+       // uint64_t OfferWithDerivedMetadataBuilder_clone_ptr(LDKOfferWithDerivedMetadataBuilder *NONNULL_PTR arg);
+       public static native long OfferWithDerivedMetadataBuilder_clone_ptr(long arg);
+       // struct LDKOfferWithDerivedMetadataBuilder OfferWithDerivedMetadataBuilder_clone(const struct LDKOfferWithDerivedMetadataBuilder *NONNULL_PTR orig);
+       public static native long OfferWithDerivedMetadataBuilder_clone(long orig);
+       // MUST_USE_RES struct LDKOfferWithExplicitMetadataBuilder OfferWithExplicitMetadataBuilder_new(struct LDKPublicKey signing_pubkey);
+       public static native long OfferWithExplicitMetadataBuilder_new(byte[] signing_pubkey);
+       // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ OfferWithExplicitMetadataBuilder_metadata(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKCVec_u8Z metadata);
+       public static native long OfferWithExplicitMetadataBuilder_metadata(long this_arg, byte[] metadata);
+       // MUST_USE_RES void OfferWithExplicitMetadataBuilder_chain(struct LDKOfferWithExplicitMetadataBuilder this_arg, enum LDKNetwork network);
+       public static native void OfferWithExplicitMetadataBuilder_chain(long this_arg, Network network);
+       // MUST_USE_RES void OfferWithExplicitMetadataBuilder_amount_msats(struct LDKOfferWithExplicitMetadataBuilder this_arg, uint64_t amount_msats);
+       public static native void OfferWithExplicitMetadataBuilder_amount_msats(long this_arg, long amount_msats);
+       // MUST_USE_RES void OfferWithExplicitMetadataBuilder_absolute_expiry(struct LDKOfferWithExplicitMetadataBuilder this_arg, uint64_t absolute_expiry);
+       public static native void OfferWithExplicitMetadataBuilder_absolute_expiry(long this_arg, long absolute_expiry);
+       // MUST_USE_RES void OfferWithExplicitMetadataBuilder_description(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKStr description);
+       public static native void OfferWithExplicitMetadataBuilder_description(long this_arg, String description);
+       // MUST_USE_RES void OfferWithExplicitMetadataBuilder_issuer(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKStr issuer);
+       public static native void OfferWithExplicitMetadataBuilder_issuer(long this_arg, String issuer);
+       // MUST_USE_RES void OfferWithExplicitMetadataBuilder_path(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKBlindedPath path);
+       public static native void OfferWithExplicitMetadataBuilder_path(long this_arg, long path);
+       // MUST_USE_RES void OfferWithExplicitMetadataBuilder_supported_quantity(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKQuantity quantity);
+       public static native void OfferWithExplicitMetadataBuilder_supported_quantity(long this_arg, long quantity);
+       // MUST_USE_RES struct LDKCResult_OfferBolt12SemanticErrorZ OfferWithExplicitMetadataBuilder_build(struct LDKOfferWithExplicitMetadataBuilder this_arg);
+       public static native long OfferWithExplicitMetadataBuilder_build(long this_arg);
+       // MUST_USE_RES struct LDKOfferWithDerivedMetadataBuilder OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(struct LDKPublicKey node_id, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source);
+       public static native long OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(byte[] node_id, long expanded_key, long entropy_source);
+       // MUST_USE_RES void OfferWithDerivedMetadataBuilder_chain(struct LDKOfferWithDerivedMetadataBuilder this_arg, enum LDKNetwork network);
+       public static native void OfferWithDerivedMetadataBuilder_chain(long this_arg, Network network);
+       // MUST_USE_RES void OfferWithDerivedMetadataBuilder_amount_msats(struct LDKOfferWithDerivedMetadataBuilder this_arg, uint64_t amount_msats);
+       public static native void OfferWithDerivedMetadataBuilder_amount_msats(long this_arg, long amount_msats);
+       // MUST_USE_RES void OfferWithDerivedMetadataBuilder_absolute_expiry(struct LDKOfferWithDerivedMetadataBuilder this_arg, uint64_t absolute_expiry);
+       public static native void OfferWithDerivedMetadataBuilder_absolute_expiry(long this_arg, long absolute_expiry);
+       // MUST_USE_RES void OfferWithDerivedMetadataBuilder_description(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKStr description);
+       public static native void OfferWithDerivedMetadataBuilder_description(long this_arg, String description);
+       // MUST_USE_RES void OfferWithDerivedMetadataBuilder_issuer(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKStr issuer);
+       public static native void OfferWithDerivedMetadataBuilder_issuer(long this_arg, String issuer);
+       // MUST_USE_RES void OfferWithDerivedMetadataBuilder_path(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKBlindedPath path);
+       public static native void OfferWithDerivedMetadataBuilder_path(long this_arg, long path);
+       // MUST_USE_RES void OfferWithDerivedMetadataBuilder_supported_quantity(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKQuantity quantity);
+       public static native void OfferWithDerivedMetadataBuilder_supported_quantity(long this_arg, long quantity);
+       // MUST_USE_RES struct LDKCResult_OfferBolt12SemanticErrorZ OfferWithDerivedMetadataBuilder_build(struct LDKOfferWithDerivedMetadataBuilder this_arg);
+       public static native long OfferWithDerivedMetadataBuilder_build(long this_arg);
        // void Offer_free(struct LDKOffer this_obj);
        public static native void Offer_free(long this_obj);
        // uint64_t Offer_clone_ptr(LDKOffer *NONNULL_PTR arg);
@@ -11143,7 +12097,7 @@ public class bindings {
        public static native byte[][] Offer_chains(long this_arg);
        // MUST_USE_RES struct LDKCOption_CVec_u8ZZ Offer_metadata(const struct LDKOffer *NONNULL_PTR this_arg);
        public static native long Offer_metadata(long this_arg);
-       // MUST_USE_RES struct LDKAmount Offer_amount(const struct LDKOffer *NONNULL_PTR this_arg);
+       // MUST_USE_RES struct LDKCOption_AmountZ Offer_amount(const struct LDKOffer *NONNULL_PTR this_arg);
        public static native long Offer_amount(long this_arg);
        // MUST_USE_RES struct LDKPrintableString Offer_description(const struct LDKOffer *NONNULL_PTR this_arg);
        public static native long Offer_description(long this_arg);
@@ -11159,6 +12113,8 @@ public class bindings {
        public static native long Offer_supported_quantity(long this_arg);
        // MUST_USE_RES struct LDKPublicKey Offer_signing_pubkey(const struct LDKOffer *NONNULL_PTR this_arg);
        public static native byte[] Offer_signing_pubkey(long this_arg);
+       // MUST_USE_RES struct LDKOfferId Offer_id(const struct LDKOffer *NONNULL_PTR this_arg);
+       public static native long Offer_id(long this_arg);
        // MUST_USE_RES bool Offer_supports_chain(const struct LDKOffer *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes chain);
        public static native boolean Offer_supports_chain(long this_arg, byte[] chain);
        // MUST_USE_RES bool Offer_is_expired(const struct LDKOffer *NONNULL_PTR this_arg);
@@ -11169,24 +12125,76 @@ public class bindings {
        public static native boolean Offer_is_valid_quantity(long this_arg, long quantity);
        // MUST_USE_RES bool Offer_expects_quantity(const struct LDKOffer *NONNULL_PTR this_arg);
        public static native boolean Offer_expects_quantity(long this_arg);
+       // 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);
+       public static native long Offer_request_invoice_deriving_payer_id(long this_arg, long expanded_key, long entropy_source, byte[] payment_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);
+       public static native long Offer_request_invoice_deriving_metadata(long this_arg, byte[] payer_id, long expanded_key, long entropy_source, byte[] payment_id);
+       // MUST_USE_RES struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ Offer_request_invoice(const struct LDKOffer *NONNULL_PTR this_arg, struct LDKCVec_u8Z metadata, struct LDKPublicKey payer_id);
+       public static native long Offer_request_invoice(long this_arg, byte[] metadata, byte[] payer_id);
+       // uint64_t Offer_hash(const struct LDKOffer *NONNULL_PTR o);
+       public static native long Offer_hash(long o);
        // struct LDKCVec_u8Z Offer_write(const struct LDKOffer *NONNULL_PTR obj);
        public static native byte[] Offer_write(long obj);
-       // void Amount_free(struct LDKAmount this_obj);
-       public static native void Amount_free(long this_obj);
+       // void Amount_free(struct LDKAmount this_ptr);
+       public static native void Amount_free(long this_ptr);
        // uint64_t Amount_clone_ptr(LDKAmount *NONNULL_PTR arg);
        public static native long Amount_clone_ptr(long arg);
        // struct LDKAmount Amount_clone(const struct LDKAmount *NONNULL_PTR orig);
        public static native long Amount_clone(long orig);
-       // void Quantity_free(struct LDKQuantity this_obj);
-       public static native void Quantity_free(long this_obj);
+       // struct LDKAmount Amount_bitcoin(uint64_t amount_msats);
+       public static native long Amount_bitcoin(long amount_msats);
+       // struct LDKAmount Amount_currency(struct LDKThreeBytes iso4217_code, uint64_t amount);
+       public static native long Amount_currency(byte[] iso4217_code, long amount);
+       // void Quantity_free(struct LDKQuantity this_ptr);
+       public static native void Quantity_free(long this_ptr);
        // uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg);
        public static native long Quantity_clone_ptr(long arg);
        // struct LDKQuantity Quantity_clone(const struct LDKQuantity *NONNULL_PTR orig);
        public static native long Quantity_clone(long orig);
+       // struct LDKQuantity Quantity_bounded(uint64_t a);
+       public static native long Quantity_bounded(long a);
+       // struct LDKQuantity Quantity_unbounded(void);
+       public static native long Quantity_unbounded();
+       // struct LDKQuantity Quantity_one(void);
+       public static native long Quantity_one();
        // struct LDKCResult_OfferBolt12ParseErrorZ Offer_from_str(struct LDKStr s);
        public static native long Offer_from_str(String s);
+       // void InvoiceWithExplicitSigningPubkeyBuilder_free(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_obj);
+       public static native void InvoiceWithExplicitSigningPubkeyBuilder_free(long this_obj);
+       // void InvoiceWithDerivedSigningPubkeyBuilder_free(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_obj);
+       public static native void InvoiceWithDerivedSigningPubkeyBuilder_free(long this_obj);
+       // MUST_USE_RES struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ InvoiceWithExplicitSigningPubkeyBuilder_build(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg);
+       public static native long InvoiceWithExplicitSigningPubkeyBuilder_build(long this_arg);
+       // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, uint32_t relative_expiry_secs);
+       public static native void InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(long this_arg, int relative_expiry_secs);
+       // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, const uint8_t (*script_hash)[32]);
+       public static native void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(long this_arg, byte[] script_hash);
+       // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, const uint8_t (*pubkey_hash)[20]);
+       public static native void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(long this_arg, byte[] pubkey_hash);
+       // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, struct LDKTweakedPublicKey output_key);
+       public static native void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(long this_arg, byte[] utput_key);
+       // MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg);
+       public static native void InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(long this_arg);
+       // MUST_USE_RES struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg);
+       public static native long InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(long this_arg);
+       // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, uint32_t relative_expiry_secs);
+       public static native void InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(long this_arg, int relative_expiry_secs);
+       // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, const uint8_t (*script_hash)[32]);
+       public static native void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(long this_arg, byte[] script_hash);
+       // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, const uint8_t (*pubkey_hash)[20]);
+       public static native void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(long this_arg, byte[] pubkey_hash);
+       // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, struct LDKTweakedPublicKey output_key);
+       public static native void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(long this_arg, byte[] utput_key);
+       // MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg);
+       public static native void InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(long this_arg);
        // void UnsignedBolt12Invoice_free(struct LDKUnsignedBolt12Invoice this_obj);
        public static native void UnsignedBolt12Invoice_free(long this_obj);
+       // uint64_t UnsignedBolt12Invoice_clone_ptr(LDKUnsignedBolt12Invoice *NONNULL_PTR arg);
+       public static native long UnsignedBolt12Invoice_clone_ptr(long arg);
+       // struct LDKUnsignedBolt12Invoice UnsignedBolt12Invoice_clone(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR orig);
+       public static native long UnsignedBolt12Invoice_clone(long orig);
+       // void SignBolt12InvoiceFn_free(struct LDKSignBolt12InvoiceFn this_ptr);
+       public static native void SignBolt12InvoiceFn_free(long this_ptr);
        // MUST_USE_RES struct LDKTaggedHash UnsignedBolt12Invoice_tagged_hash(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
        public static native long UnsignedBolt12Invoice_tagged_hash(long this_arg);
        // void Bolt12Invoice_free(struct LDKBolt12Invoice this_obj);
@@ -11201,7 +12209,7 @@ public class bindings {
        public static native byte[] UnsignedBolt12Invoice_chain(long this_arg);
        // MUST_USE_RES struct LDKCOption_CVec_u8ZZ UnsignedBolt12Invoice_metadata(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
        public static native long UnsignedBolt12Invoice_metadata(long this_arg);
-       // MUST_USE_RES struct LDKAmount UnsignedBolt12Invoice_amount(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+       // MUST_USE_RES struct LDKCOption_AmountZ UnsignedBolt12Invoice_amount(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
        public static native long UnsignedBolt12Invoice_amount(long this_arg);
        // MUST_USE_RES struct LDKOfferFeatures UnsignedBolt12Invoice_offer_features(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
        public static native long UnsignedBolt12Invoice_offer_features(long this_arg);
@@ -11213,7 +12221,7 @@ public class bindings {
        public static native long UnsignedBolt12Invoice_issuer(long this_arg);
        // MUST_USE_RES struct LDKCVec_BlindedPathZ UnsignedBolt12Invoice_message_paths(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
        public static native long[] UnsignedBolt12Invoice_message_paths(long this_arg);
-       // MUST_USE_RES struct LDKQuantity UnsignedBolt12Invoice_supported_quantity(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+       // MUST_USE_RES struct LDKCOption_QuantityZ UnsignedBolt12Invoice_supported_quantity(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
        public static native long UnsignedBolt12Invoice_supported_quantity(long this_arg);
        // MUST_USE_RES struct LDKu8slice UnsignedBolt12Invoice_payer_metadata(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
        public static native byte[] UnsignedBolt12Invoice_payer_metadata(long this_arg);
@@ -11245,7 +12253,7 @@ public class bindings {
        public static native byte[] Bolt12Invoice_chain(long this_arg);
        // MUST_USE_RES struct LDKCOption_CVec_u8ZZ Bolt12Invoice_metadata(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
        public static native long Bolt12Invoice_metadata(long this_arg);
-       // MUST_USE_RES struct LDKAmount Bolt12Invoice_amount(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+       // MUST_USE_RES struct LDKCOption_AmountZ Bolt12Invoice_amount(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
        public static native long Bolt12Invoice_amount(long this_arg);
        // MUST_USE_RES struct LDKOfferFeatures Bolt12Invoice_offer_features(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
        public static native long Bolt12Invoice_offer_features(long this_arg);
@@ -11257,7 +12265,7 @@ public class bindings {
        public static native long Bolt12Invoice_issuer(long this_arg);
        // MUST_USE_RES struct LDKCVec_BlindedPathZ Bolt12Invoice_message_paths(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
        public static native long[] Bolt12Invoice_message_paths(long this_arg);
-       // MUST_USE_RES struct LDKQuantity Bolt12Invoice_supported_quantity(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+       // MUST_USE_RES struct LDKCOption_QuantityZ Bolt12Invoice_supported_quantity(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
        public static native long Bolt12Invoice_supported_quantity(long this_arg);
        // MUST_USE_RES struct LDKu8slice Bolt12Invoice_payer_metadata(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
        public static native byte[] Bolt12Invoice_payer_metadata(long this_arg);
@@ -11289,6 +12297,8 @@ public class bindings {
        public static native byte[] Bolt12Invoice_signable_hash(long this_arg);
        // MUST_USE_RES struct LDKCResult_ThirtyTwoBytesNoneZ Bolt12Invoice_verify(const struct LDKBolt12Invoice *NONNULL_PTR this_arg, const struct LDKExpandedKey *NONNULL_PTR key);
        public static native long Bolt12Invoice_verify(long this_arg, long key);
+       // uint64_t Bolt12Invoice_hash(const struct LDKBolt12Invoice *NONNULL_PTR o);
+       public static native long Bolt12Invoice_hash(long o);
        // struct LDKCVec_u8Z UnsignedBolt12Invoice_write(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR obj);
        public static native byte[] UnsignedBolt12Invoice_write(long obj);
        // struct LDKCVec_u8Z Bolt12Invoice_write(const struct LDKBolt12Invoice *NONNULL_PTR obj);
@@ -11371,8 +12381,38 @@ public class bindings {
        public static native byte[] InvoiceError_write(long obj);
        // struct LDKCResult_InvoiceErrorDecodeErrorZ InvoiceError_read(struct LDKu8slice ser);
        public static native long InvoiceError_read(byte[] ser);
+       // void InvoiceRequestWithExplicitPayerIdBuilder_free(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_obj);
+       public static native void InvoiceRequestWithExplicitPayerIdBuilder_free(long this_obj);
+       // void InvoiceRequestWithDerivedPayerIdBuilder_free(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_obj);
+       public static native void InvoiceRequestWithDerivedPayerIdBuilder_free(long this_obj);
+       // MUST_USE_RES struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_build(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg);
+       public static native long InvoiceRequestWithExplicitPayerIdBuilder_build(long this_arg);
+       // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_chain(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, enum LDKNetwork network);
+       public static native long InvoiceRequestWithExplicitPayerIdBuilder_chain(long this_arg, Network network);
+       // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, uint64_t amount_msats);
+       public static native long InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(long this_arg, long amount_msats);
+       // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_quantity(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, uint64_t quantity);
+       public static native long InvoiceRequestWithExplicitPayerIdBuilder_quantity(long this_arg, long quantity);
+       // MUST_USE_RES void InvoiceRequestWithExplicitPayerIdBuilder_payer_note(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, struct LDKStr payer_note);
+       public static native void InvoiceRequestWithExplicitPayerIdBuilder_payer_note(long this_arg, String payer_note);
+       // MUST_USE_RES struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg);
+       public static native long InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(long this_arg);
+       // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_chain(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, enum LDKNetwork network);
+       public static native long InvoiceRequestWithDerivedPayerIdBuilder_chain(long this_arg, Network network);
+       // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, uint64_t amount_msats);
+       public static native long InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(long this_arg, long amount_msats);
+       // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_quantity(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, uint64_t quantity);
+       public static native long InvoiceRequestWithDerivedPayerIdBuilder_quantity(long this_arg, long quantity);
+       // MUST_USE_RES void InvoiceRequestWithDerivedPayerIdBuilder_payer_note(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, struct LDKStr payer_note);
+       public static native void InvoiceRequestWithDerivedPayerIdBuilder_payer_note(long this_arg, String payer_note);
        // void UnsignedInvoiceRequest_free(struct LDKUnsignedInvoiceRequest this_obj);
        public static native void UnsignedInvoiceRequest_free(long this_obj);
+       // uint64_t UnsignedInvoiceRequest_clone_ptr(LDKUnsignedInvoiceRequest *NONNULL_PTR arg);
+       public static native long UnsignedInvoiceRequest_clone_ptr(long arg);
+       // struct LDKUnsignedInvoiceRequest UnsignedInvoiceRequest_clone(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR orig);
+       public static native long UnsignedInvoiceRequest_clone(long orig);
+       // void SignInvoiceRequestFn_free(struct LDKSignInvoiceRequestFn this_ptr);
+       public static native void SignInvoiceRequestFn_free(long this_ptr);
        // MUST_USE_RES struct LDKTaggedHash UnsignedInvoiceRequest_tagged_hash(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
        public static native long UnsignedInvoiceRequest_tagged_hash(long this_arg);
        // void InvoiceRequest_free(struct LDKInvoiceRequest this_obj);
@@ -11383,6 +12423,10 @@ public class bindings {
        public static native long InvoiceRequest_clone(long orig);
        // void VerifiedInvoiceRequest_free(struct LDKVerifiedInvoiceRequest this_obj);
        public static native void VerifiedInvoiceRequest_free(long this_obj);
+       // struct LDKOfferId VerifiedInvoiceRequest_get_offer_id(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr);
+       public static native long VerifiedInvoiceRequest_get_offer_id(long this_ptr);
+       // void VerifiedInvoiceRequest_set_offer_id(struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr, struct LDKOfferId val);
+       public static native void VerifiedInvoiceRequest_set_offer_id(long this_ptr, long val);
        // struct LDKCOption_SecretKeyZ VerifiedInvoiceRequest_get_keys(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr);
        public static native long VerifiedInvoiceRequest_get_keys(long this_ptr);
        // void VerifiedInvoiceRequest_set_keys(struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr, struct LDKCOption_SecretKeyZ val);
@@ -11395,7 +12439,7 @@ public class bindings {
        public static native byte[][] UnsignedInvoiceRequest_chains(long this_arg);
        // MUST_USE_RES struct LDKCOption_CVec_u8ZZ UnsignedInvoiceRequest_metadata(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
        public static native long UnsignedInvoiceRequest_metadata(long this_arg);
-       // MUST_USE_RES struct LDKAmount UnsignedInvoiceRequest_amount(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+       // MUST_USE_RES struct LDKCOption_AmountZ UnsignedInvoiceRequest_amount(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
        public static native long UnsignedInvoiceRequest_amount(long this_arg);
        // MUST_USE_RES struct LDKPrintableString UnsignedInvoiceRequest_description(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
        public static native long UnsignedInvoiceRequest_description(long this_arg);
@@ -11429,7 +12473,7 @@ public class bindings {
        public static native byte[][] InvoiceRequest_chains(long this_arg);
        // MUST_USE_RES struct LDKCOption_CVec_u8ZZ InvoiceRequest_metadata(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
        public static native long InvoiceRequest_metadata(long this_arg);
-       // MUST_USE_RES struct LDKAmount InvoiceRequest_amount(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+       // MUST_USE_RES struct LDKCOption_AmountZ InvoiceRequest_amount(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
        public static native long InvoiceRequest_amount(long this_arg);
        // MUST_USE_RES struct LDKPrintableString InvoiceRequest_description(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
        public static native long InvoiceRequest_description(long this_arg);
@@ -11459,15 +12503,19 @@ public class bindings {
        public static native byte[] InvoiceRequest_payer_id(long this_arg);
        // MUST_USE_RES struct LDKPrintableString InvoiceRequest_payer_note(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
        public static native long InvoiceRequest_payer_note(long this_arg);
-       // MUST_USE_RES struct LDKSchnorrSignature InvoiceRequest_signature(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
-       public static native byte[] InvoiceRequest_signature(long this_arg);
+       // 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);
+       public static native long InvoiceRequest_respond_with(long this_arg, long[] payment_paths, byte[] payment_hash);
+       // 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);
+       public static native long InvoiceRequest_respond_with_no_std(long this_arg, long[] payment_paths, byte[] payment_hash, long created_at);
        // MUST_USE_RES struct LDKCResult_VerifiedInvoiceRequestNoneZ InvoiceRequest_verify(struct LDKInvoiceRequest this_arg, const struct LDKExpandedKey *NONNULL_PTR key);
        public static native long InvoiceRequest_verify(long this_arg, long key);
+       // MUST_USE_RES struct LDKSchnorrSignature InvoiceRequest_signature(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+       public static native byte[] InvoiceRequest_signature(long this_arg);
        // MUST_USE_RES struct LDKCVec_ThirtyTwoBytesZ VerifiedInvoiceRequest_chains(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
        public static native byte[][] VerifiedInvoiceRequest_chains(long this_arg);
        // MUST_USE_RES struct LDKCOption_CVec_u8ZZ VerifiedInvoiceRequest_metadata(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
        public static native long VerifiedInvoiceRequest_metadata(long this_arg);
-       // MUST_USE_RES struct LDKAmount VerifiedInvoiceRequest_amount(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+       // MUST_USE_RES struct LDKCOption_AmountZ VerifiedInvoiceRequest_amount(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
        public static native long VerifiedInvoiceRequest_amount(long this_arg);
        // MUST_USE_RES struct LDKPrintableString VerifiedInvoiceRequest_description(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
        public static native long VerifiedInvoiceRequest_description(long this_arg);
@@ -11497,10 +12545,44 @@ public class bindings {
        public static native byte[] VerifiedInvoiceRequest_payer_id(long this_arg);
        // MUST_USE_RES struct LDKPrintableString VerifiedInvoiceRequest_payer_note(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
        public static native long VerifiedInvoiceRequest_payer_note(long this_arg);
+       // 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);
+       public static native long VerifiedInvoiceRequest_respond_with(long this_arg, long[] payment_paths, byte[] payment_hash);
+       // 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);
+       public static native long VerifiedInvoiceRequest_respond_with_no_std(long this_arg, long[] payment_paths, byte[] payment_hash, long created_at);
+       // 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);
+       public static native long VerifiedInvoiceRequest_respond_using_derived_keys(long this_arg, long[] payment_paths, byte[] payment_hash);
+       // 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);
+       public static native long VerifiedInvoiceRequest_respond_using_derived_keys_no_std(long this_arg, long[] payment_paths, byte[] payment_hash, long created_at);
        // struct LDKCVec_u8Z UnsignedInvoiceRequest_write(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR obj);
        public static native byte[] UnsignedInvoiceRequest_write(long obj);
        // struct LDKCVec_u8Z InvoiceRequest_write(const struct LDKInvoiceRequest *NONNULL_PTR obj);
        public static native byte[] InvoiceRequest_write(long obj);
+       // void InvoiceRequestFields_free(struct LDKInvoiceRequestFields this_obj);
+       public static native void InvoiceRequestFields_free(long this_obj);
+       // struct LDKPublicKey InvoiceRequestFields_get_payer_id(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr);
+       public static native byte[] InvoiceRequestFields_get_payer_id(long this_ptr);
+       // void InvoiceRequestFields_set_payer_id(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       public static native void InvoiceRequestFields_set_payer_id(long this_ptr, byte[] val);
+       // struct LDKCOption_u64Z InvoiceRequestFields_get_quantity(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr);
+       public static native long InvoiceRequestFields_get_quantity(long this_ptr);
+       // void InvoiceRequestFields_set_quantity(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+       public static native void InvoiceRequestFields_set_quantity(long this_ptr, long val);
+       // struct LDKUntrustedString InvoiceRequestFields_get_payer_note_truncated(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr);
+       public static native long InvoiceRequestFields_get_payer_note_truncated(long this_ptr);
+       // void InvoiceRequestFields_set_payer_note_truncated(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKUntrustedString val);
+       public static native void InvoiceRequestFields_set_payer_note_truncated(long this_ptr, long val);
+       // MUST_USE_RES struct LDKInvoiceRequestFields InvoiceRequestFields_new(struct LDKPublicKey payer_id_arg, struct LDKCOption_u64Z quantity_arg, struct LDKUntrustedString payer_note_truncated_arg);
+       public static native long InvoiceRequestFields_new(byte[] payer_id_arg, long quantity_arg, long payer_note_truncated_arg);
+       // uint64_t InvoiceRequestFields_clone_ptr(LDKInvoiceRequestFields *NONNULL_PTR arg);
+       public static native long InvoiceRequestFields_clone_ptr(long arg);
+       // struct LDKInvoiceRequestFields InvoiceRequestFields_clone(const struct LDKInvoiceRequestFields *NONNULL_PTR orig);
+       public static native long InvoiceRequestFields_clone(long orig);
+       // bool InvoiceRequestFields_eq(const struct LDKInvoiceRequestFields *NONNULL_PTR a, const struct LDKInvoiceRequestFields *NONNULL_PTR b);
+       public static native boolean InvoiceRequestFields_eq(long a, long b);
+       // struct LDKCVec_u8Z InvoiceRequestFields_write(const struct LDKInvoiceRequestFields *NONNULL_PTR obj);
+       public static native byte[] InvoiceRequestFields_write(long obj);
+       // struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ InvoiceRequestFields_read(struct LDKu8slice ser);
+       public static native long InvoiceRequestFields_read(byte[] ser);
        // void TaggedHash_free(struct LDKTaggedHash this_obj);
        public static native void TaggedHash_free(long this_obj);
        // uint64_t TaggedHash_clone_ptr(LDKTaggedHash *NONNULL_PTR arg);
@@ -11513,6 +12595,16 @@ public class bindings {
        public static native String TaggedHash_tag(long this_arg);
        // MUST_USE_RES struct LDKThirtyTwoBytes TaggedHash_merkle_root(const struct LDKTaggedHash *NONNULL_PTR this_arg);
        public static native byte[] TaggedHash_merkle_root(long this_arg);
+       // void SignError_free(struct LDKSignError this_ptr);
+       public static native void SignError_free(long this_ptr);
+       // uint64_t SignError_clone_ptr(LDKSignError *NONNULL_PTR arg);
+       public static native long SignError_clone_ptr(long arg);
+       // struct LDKSignError SignError_clone(const struct LDKSignError *NONNULL_PTR orig);
+       public static native long SignError_clone(long orig);
+       // struct LDKSignError SignError_signing(void);
+       public static native long SignError_signing();
+       // struct LDKSignError SignError_verification(enum LDKSecp256k1Error a);
+       public static native long SignError_verification(Secp256k1Error a);
        // void Bolt12ParseError_free(struct LDKBolt12ParseError this_obj);
        public static native void Bolt12ParseError_free(long this_obj);
        // uint64_t Bolt12ParseError_clone_ptr(LDKBolt12ParseError *NONNULL_PTR arg);
@@ -11567,6 +12659,8 @@ public class bindings {
        public static native Bolt12SemanticError Bolt12SemanticError_duplicate_payment_id();
        // enum LDKBolt12SemanticError Bolt12SemanticError_missing_paths(void);
        public static native Bolt12SemanticError Bolt12SemanticError_missing_paths();
+       // enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_paths(void);
+       public static native Bolt12SemanticError Bolt12SemanticError_unexpected_paths();
        // enum LDKBolt12SemanticError Bolt12SemanticError_invalid_pay_info(void);
        public static native Bolt12SemanticError Bolt12SemanticError_invalid_pay_info();
        // enum LDKBolt12SemanticError Bolt12SemanticError_missing_creation_time(void);
@@ -11575,6 +12669,32 @@ public class bindings {
        public static native Bolt12SemanticError Bolt12SemanticError_missing_payment_hash();
        // enum LDKBolt12SemanticError Bolt12SemanticError_missing_signature(void);
        public static native Bolt12SemanticError Bolt12SemanticError_missing_signature();
+       // void RefundMaybeWithDerivedMetadataBuilder_free(struct LDKRefundMaybeWithDerivedMetadataBuilder this_obj);
+       public static native void RefundMaybeWithDerivedMetadataBuilder_free(long this_obj);
+       // uint64_t RefundMaybeWithDerivedMetadataBuilder_clone_ptr(LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR arg);
+       public static native long RefundMaybeWithDerivedMetadataBuilder_clone_ptr(long arg);
+       // struct LDKRefundMaybeWithDerivedMetadataBuilder RefundMaybeWithDerivedMetadataBuilder_clone(const struct LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR orig);
+       public static native long RefundMaybeWithDerivedMetadataBuilder_clone(long orig);
+       // MUST_USE_RES struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ RefundMaybeWithDerivedMetadataBuilder_new(struct LDKCVec_u8Z metadata, struct LDKPublicKey payer_id, uint64_t amount_msats);
+       public static native long RefundMaybeWithDerivedMetadataBuilder_new(byte[] metadata, byte[] payer_id, long amount_msats);
+       // 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);
+       public static native long RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(byte[] node_id, long expanded_key, long entropy_source, long amount_msats, byte[] payment_id);
+       // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_description(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKStr description);
+       public static native void RefundMaybeWithDerivedMetadataBuilder_description(long this_arg, String description);
+       // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, uint64_t absolute_expiry);
+       public static native void RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(long this_arg, long absolute_expiry);
+       // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_issuer(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKStr issuer);
+       public static native void RefundMaybeWithDerivedMetadataBuilder_issuer(long this_arg, String issuer);
+       // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_path(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKBlindedPath path);
+       public static native void RefundMaybeWithDerivedMetadataBuilder_path(long this_arg, long path);
+       // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_chain(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, enum LDKNetwork network);
+       public static native void RefundMaybeWithDerivedMetadataBuilder_chain(long this_arg, Network network);
+       // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_quantity(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, uint64_t quantity);
+       public static native void RefundMaybeWithDerivedMetadataBuilder_quantity(long this_arg, long quantity);
+       // MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_payer_note(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKStr payer_note);
+       public static native void RefundMaybeWithDerivedMetadataBuilder_payer_note(long this_arg, String payer_note);
+       // MUST_USE_RES struct LDKCResult_RefundBolt12SemanticErrorZ RefundMaybeWithDerivedMetadataBuilder_build(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg);
+       public static native long RefundMaybeWithDerivedMetadataBuilder_build(long this_arg);
        // void Refund_free(struct LDKRefund this_obj);
        public static native void Refund_free(long this_obj);
        // uint64_t Refund_clone_ptr(LDKRefund *NONNULL_PTR arg);
@@ -11607,6 +12727,8 @@ public class bindings {
        public static native byte[] Refund_payer_id(long this_arg);
        // MUST_USE_RES struct LDKPrintableString Refund_payer_note(const struct LDKRefund *NONNULL_PTR this_arg);
        public static native long Refund_payer_note(long this_arg);
+       // uint64_t Refund_hash(const struct LDKRefund *NONNULL_PTR o);
+       public static native long Refund_hash(long o);
        // struct LDKCVec_u8Z Refund_write(const struct LDKRefund *NONNULL_PTR obj);
        public static native byte[] Refund_write(long obj);
        // struct LDKCResult_RefundBolt12ParseErrorZ Refund_from_str(struct LDKStr s);
@@ -11649,6 +12771,8 @@ public class bindings {
        public static native long NodeId_clone(long orig);
        // MUST_USE_RES struct LDKNodeId NodeId_from_pubkey(struct LDKPublicKey pubkey);
        public static native long NodeId_from_pubkey(byte[] pubkey);
+       // MUST_USE_RES struct LDKCResult_NodeIdDecodeErrorZ NodeId_from_slice(struct LDKu8slice bytes);
+       public static native long NodeId_from_slice(byte[] bytes);
        // MUST_USE_RES struct LDKu8slice NodeId_as_slice(const struct LDKNodeId *NONNULL_PTR this_arg);
        public static native byte[] NodeId_as_slice(long this_arg);
        // MUST_USE_RES const uint8_t (*NodeId_as_array(const struct LDKNodeId *NONNULL_PTR this_arg))[33];
@@ -11795,6 +12919,10 @@ public class bindings {
        public static native long DirectedChannelInfo_channel(long this_arg);
        // MUST_USE_RES struct LDKEffectiveCapacity DirectedChannelInfo_effective_capacity(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg);
        public static native long DirectedChannelInfo_effective_capacity(long this_arg);
+       // MUST_USE_RES struct LDKNodeId DirectedChannelInfo_source(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg);
+       public static native long DirectedChannelInfo_source(long this_arg);
+       // MUST_USE_RES struct LDKNodeId DirectedChannelInfo_target(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg);
+       public static native long DirectedChannelInfo_target(long this_arg);
        // void EffectiveCapacity_free(struct LDKEffectiveCapacity this_ptr);
        public static native void EffectiveCapacity_free(long this_ptr);
        // uint64_t EffectiveCapacity_clone_ptr(LDKEffectiveCapacity *NONNULL_PTR arg);
@@ -11913,6 +13041,8 @@ public class bindings {
        public static native long NodeInfo_clone(long orig);
        // bool NodeInfo_eq(const struct LDKNodeInfo *NONNULL_PTR a, const struct LDKNodeInfo *NONNULL_PTR b);
        public static native boolean NodeInfo_eq(long a, long b);
+       // MUST_USE_RES bool NodeInfo_is_tor_only(const struct LDKNodeInfo *NONNULL_PTR this_arg);
+       public static native boolean NodeInfo_is_tor_only(long this_arg);
        // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
        public static native byte[] NodeInfo_write(long obj);
        // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
@@ -12543,8 +13673,12 @@ public class bindings {
        public static native long DelayedPaymentOutputDescriptor_get_channel_value_satoshis(long this_ptr);
        // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
        public static native void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(long this_ptr, long val);
-       // MUST_USE_RES struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKPublicKey per_commitment_point_arg, uint16_t to_self_delay_arg, struct LDKTxOut output_arg, struct LDKRevocationKey revocation_pubkey_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg);
-       public static native long DelayedPaymentOutputDescriptor_new(long outpoint_arg, byte[] per_commitment_point_arg, short to_self_delay_arg, long output_arg, long revocation_pubkey_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg);
+       // struct LDKChannelTransactionParameters DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+       public static native long DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(long this_ptr);
+       // void DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKChannelTransactionParameters val);
+       public static native void DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(long this_ptr, long val);
+       // MUST_USE_RES struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKPublicKey per_commitment_point_arg, uint16_t to_self_delay_arg, struct LDKTxOut output_arg, struct LDKRevocationKey revocation_pubkey_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg, struct LDKChannelTransactionParameters channel_transaction_parameters_arg);
+       public static native long DelayedPaymentOutputDescriptor_new(long outpoint_arg, byte[] per_commitment_point_arg, short to_self_delay_arg, long output_arg, long revocation_pubkey_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg, long channel_transaction_parameters_arg);
        // uint64_t DelayedPaymentOutputDescriptor_clone_ptr(LDKDelayedPaymentOutputDescriptor *NONNULL_PTR arg);
        public static native long DelayedPaymentOutputDescriptor_clone_ptr(long arg);
        // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
@@ -12651,6 +13785,10 @@ public class bindings {
        public static native long HTLCDescriptor_get_channel_derivation_parameters(long this_ptr);
        // void HTLCDescriptor_set_channel_derivation_parameters(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKChannelDerivationParameters val);
        public static native void HTLCDescriptor_set_channel_derivation_parameters(long this_ptr, long val);
+       // const uint8_t (*HTLCDescriptor_get_commitment_txid(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr))[32];
+       public static native byte[] HTLCDescriptor_get_commitment_txid(long this_ptr);
+       // void HTLCDescriptor_set_commitment_txid(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+       public static native void HTLCDescriptor_set_commitment_txid(long this_ptr, byte[] val);
        // uint64_t HTLCDescriptor_get_per_commitment_number(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr);
        public static native long HTLCDescriptor_get_per_commitment_number(long this_ptr);
        // void HTLCDescriptor_set_per_commitment_number(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, uint64_t val);
@@ -12675,6 +13813,8 @@ public class bindings {
        public static native byte[] HTLCDescriptor_get_counterparty_sig(long this_ptr);
        // void HTLCDescriptor_set_counterparty_sig(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
        public static native void HTLCDescriptor_set_counterparty_sig(long this_ptr, byte[] val);
+       // MUST_USE_RES struct LDKHTLCDescriptor HTLCDescriptor_new(struct LDKChannelDerivationParameters channel_derivation_parameters_arg, struct LDKThirtyTwoBytes commitment_txid_arg, uint64_t per_commitment_number_arg, struct LDKPublicKey per_commitment_point_arg, uint32_t feerate_per_kw_arg, struct LDKHTLCOutputInCommitment htlc_arg, struct LDKCOption_ThirtyTwoBytesZ preimage_arg, struct LDKECDSASignature counterparty_sig_arg);
+       public static native long HTLCDescriptor_new(long channel_derivation_parameters_arg, byte[] commitment_txid_arg, long per_commitment_number_arg, byte[] per_commitment_point_arg, int feerate_per_kw_arg, long htlc_arg, long preimage_arg, byte[] counterparty_sig_arg);
        // uint64_t HTLCDescriptor_clone_ptr(LDKHTLCDescriptor *NONNULL_PTR arg);
        public static native long HTLCDescriptor_clone_ptr(long arg);
        // struct LDKHTLCDescriptor HTLCDescriptor_clone(const struct LDKHTLCDescriptor *NONNULL_PTR orig);
@@ -12711,8 +13851,12 @@ public class bindings {
        public static native void EntropySource_free(long this_ptr);
        // void NodeSigner_free(struct LDKNodeSigner this_ptr);
        public static native void NodeSigner_free(long this_ptr);
+       // void OutputSpender_free(struct LDKOutputSpender this_ptr);
+       public static native void OutputSpender_free(long this_ptr);
        // void SignerProvider_free(struct LDKSignerProvider this_ptr);
        public static native void SignerProvider_free(long this_ptr);
+       // void ChangeDestinationSource_free(struct LDKChangeDestinationSource this_ptr);
+       public static native void ChangeDestinationSource_free(long this_ptr);
        // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
        public static native void InMemorySigner_free(long this_obj);
        // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
@@ -12785,12 +13929,12 @@ public class bindings {
        public static native long KeysManager_derive_channel_keys(long this_arg, long channel_value_satoshis, byte[] params);
        // MUST_USE_RES struct LDKCResult_CVec_u8ZNoneZ KeysManager_sign_spendable_outputs_psbt(const struct LDKKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_u8Z psbt);
        public static native long KeysManager_sign_spendable_outputs_psbt(long this_arg, long[] descriptors, byte[] psbt);
-       // MUST_USE_RES struct LDKCResult_TransactionNoneZ KeysManager_spend_spendable_outputs(const struct LDKKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, struct LDKCOption_u32Z locktime);
-       public static native long KeysManager_spend_spendable_outputs(long this_arg, long[] descriptors, long[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, long locktime);
        // struct LDKEntropySource KeysManager_as_EntropySource(const struct LDKKeysManager *NONNULL_PTR this_arg);
        public static native long KeysManager_as_EntropySource(long this_arg);
        // struct LDKNodeSigner KeysManager_as_NodeSigner(const struct LDKKeysManager *NONNULL_PTR this_arg);
        public static native long KeysManager_as_NodeSigner(long this_arg);
+       // struct LDKOutputSpender KeysManager_as_OutputSpender(const struct LDKKeysManager *NONNULL_PTR this_arg);
+       public static native long KeysManager_as_OutputSpender(long this_arg);
        // struct LDKSignerProvider KeysManager_as_SignerProvider(const struct LDKKeysManager *NONNULL_PTR this_arg);
        public static native long KeysManager_as_SignerProvider(long this_arg);
        // void PhantomKeysManager_free(struct LDKPhantomKeysManager this_obj);
@@ -12799,18 +13943,24 @@ public class bindings {
        public static native long PhantomKeysManager_as_EntropySource(long this_arg);
        // struct LDKNodeSigner PhantomKeysManager_as_NodeSigner(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
        public static native long PhantomKeysManager_as_NodeSigner(long this_arg);
+       // struct LDKOutputSpender PhantomKeysManager_as_OutputSpender(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
+       public static native long PhantomKeysManager_as_OutputSpender(long this_arg);
        // struct LDKSignerProvider PhantomKeysManager_as_SignerProvider(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
        public static native long PhantomKeysManager_as_SignerProvider(long this_arg);
        // MUST_USE_RES struct LDKPhantomKeysManager PhantomKeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos, const uint8_t (*cross_node_seed)[32]);
        public static native long PhantomKeysManager_new(byte[] seed, long starting_time_secs, int starting_time_nanos, byte[] cross_node_seed);
-       // MUST_USE_RES struct LDKCResult_TransactionNoneZ PhantomKeysManager_spend_spendable_outputs(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, struct LDKCOption_u32Z locktime);
-       public static native long PhantomKeysManager_spend_spendable_outputs(long this_arg, long[] descriptors, long[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, long locktime);
        // MUST_USE_RES struct LDKInMemorySigner PhantomKeysManager_derive_channel_keys(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg, uint64_t channel_value_satoshis, const uint8_t (*params)[32]);
        public static native long PhantomKeysManager_derive_channel_keys(long this_arg, long channel_value_satoshis, byte[] params);
        // MUST_USE_RES struct LDKSecretKey PhantomKeysManager_get_node_secret_key(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
        public static native byte[] PhantomKeysManager_get_node_secret_key(long this_arg);
        // MUST_USE_RES struct LDKSecretKey PhantomKeysManager_get_phantom_node_secret_key(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
        public static native byte[] PhantomKeysManager_get_phantom_node_secret_key(long this_arg);
+       // void RandomBytes_free(struct LDKRandomBytes this_obj);
+       public static native void RandomBytes_free(long this_obj);
+       // MUST_USE_RES struct LDKRandomBytes RandomBytes_new(struct LDKThirtyTwoBytes seed);
+       public static native long RandomBytes_new(byte[] seed);
+       // struct LDKEntropySource RandomBytes_as_EntropySource(const struct LDKRandomBytes *NONNULL_PTR this_arg);
+       public static native long RandomBytes_as_EntropySource(long this_arg);
        // void EcdsaChannelSigner_free(struct LDKEcdsaChannelSigner this_ptr);
        public static native void EcdsaChannelSigner_free(long this_ptr);
        // uint64_t WriteableEcdsaChannelSigner_clone_ptr(LDKWriteableEcdsaChannelSigner *NONNULL_PTR arg);
@@ -12861,6 +14011,12 @@ public class bindings {
        public static native long Destination_node(byte[] a);
        // struct LDKDestination Destination_blinded_path(struct LDKBlindedPath a);
        public static native long Destination_blinded_path(long a);
+       // uint64_t Destination_hash(const struct LDKDestination *NONNULL_PTR o);
+       public static native long Destination_hash(long o);
+       // bool Destination_eq(const struct LDKDestination *NONNULL_PTR a, const struct LDKDestination *NONNULL_PTR b);
+       public static native boolean Destination_eq(long a, long b);
+       // void Destination_resolve(struct LDKDestination *NONNULL_PTR this_arg, const struct LDKReadOnlyNetworkGraph *NONNULL_PTR network_graph);
+       public static native void Destination_resolve(long this_arg, long network_graph);
        // void SendSuccess_free(struct LDKSendSuccess this_ptr);
        public static native void SendSuccess_free(long this_ptr);
        // uint64_t SendSuccess_clone_ptr(LDKSendSuccess *NONNULL_PTR arg);
@@ -12871,6 +14027,8 @@ public class bindings {
        public static native long SendSuccess_buffered();
        // struct LDKSendSuccess SendSuccess_buffered_awaiting_connection(struct LDKPublicKey a);
        public static native long SendSuccess_buffered_awaiting_connection(byte[] a);
+       // uint64_t SendSuccess_hash(const struct LDKSendSuccess *NONNULL_PTR o);
+       public static native long SendSuccess_hash(long o);
        // bool SendSuccess_eq(const struct LDKSendSuccess *NONNULL_PTR a, const struct LDKSendSuccess *NONNULL_PTR b);
        public static native boolean SendSuccess_eq(long a, long b);
        // void SendError_free(struct LDKSendError this_ptr);
@@ -12895,8 +14053,12 @@ public class bindings {
        public static native long SendError_buffer_full();
        // struct LDKSendError SendError_get_node_id_failed(void);
        public static native long SendError_get_node_id_failed();
+       // struct LDKSendError SendError_unresolved_introduction_node(void);
+       public static native long SendError_unresolved_introduction_node();
        // struct LDKSendError SendError_blinded_path_advance_failed(void);
        public static native long SendError_blinded_path_advance_failed();
+       // uint64_t SendError_hash(const struct LDKSendError *NONNULL_PTR o);
+       public static native long SendError_hash(long o);
        // bool SendError_eq(const struct LDKSendError *NONNULL_PTR a, const struct LDKSendError *NONNULL_PTR b);
        public static native boolean SendError_eq(long a, long b);
        // void CustomOnionMessageHandler_free(struct LDKCustomOnionMessageHandler this_ptr);
@@ -12907,16 +14069,18 @@ public class bindings {
        public static native long PeeledOnion_clone_ptr(long arg);
        // struct LDKPeeledOnion PeeledOnion_clone(const struct LDKPeeledOnion *NONNULL_PTR orig);
        public static native long PeeledOnion_clone(long orig);
-       // struct LDKPeeledOnion PeeledOnion_forward(struct LDKPublicKey a, struct LDKOnionMessage b);
-       public static native long PeeledOnion_forward(byte[] a, long b);
+       // struct LDKPeeledOnion PeeledOnion_forward(struct LDKNextMessageHop a, struct LDKOnionMessage b);
+       public static native long PeeledOnion_forward(long a, long b);
        // struct LDKPeeledOnion PeeledOnion_receive(struct LDKParsedOnionMessageContents a, struct LDKThirtyTwoBytes b, struct LDKBlindedPath c);
        public static native long PeeledOnion_receive(long a, byte[] b, long c);
-       // struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message(const struct LDKEntropySource *NONNULL_PTR entropy_source, const struct LDKNodeSigner *NONNULL_PTR node_signer, struct LDKOnionMessagePath path, struct LDKOnionMessageContents contents, struct LDKBlindedPath reply_path);
-       public static native long create_onion_message(long entropy_source, long node_signer, long path, long contents, long reply_path);
+       // struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message_resolving_destination(const struct LDKEntropySource *NONNULL_PTR entropy_source, const struct LDKNodeSigner *NONNULL_PTR node_signer, const struct LDKNodeIdLookUp *NONNULL_PTR node_id_lookup, const struct LDKReadOnlyNetworkGraph *NONNULL_PTR network_graph, struct LDKOnionMessagePath path, struct LDKOnionMessageContents contents, struct LDKBlindedPath reply_path);
+       public static native long create_onion_message_resolving_destination(long entropy_source, long node_signer, long node_id_lookup, long network_graph, long path, long contents, long reply_path);
+       // struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message(const struct LDKEntropySource *NONNULL_PTR entropy_source, const struct LDKNodeSigner *NONNULL_PTR node_signer, const struct LDKNodeIdLookUp *NONNULL_PTR node_id_lookup, struct LDKOnionMessagePath path, struct LDKOnionMessageContents contents, struct LDKBlindedPath reply_path);
+       public static native long create_onion_message(long entropy_source, long node_signer, long node_id_lookup, long path, long contents, long reply_path);
        // struct LDKCResult_PeeledOnionNoneZ peel_onion_message(const struct LDKOnionMessage *NONNULL_PTR msg, struct LDKNodeSigner node_signer, struct LDKLogger logger, struct LDKCustomOnionMessageHandler custom_handler);
        public static native long peel_onion_message(long msg, long node_signer, long logger, long custom_handler);
-       // MUST_USE_RES struct LDKOnionMessenger OnionMessenger_new(struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKLogger logger, struct LDKMessageRouter message_router, struct LDKOffersMessageHandler offers_handler, struct LDKCustomOnionMessageHandler custom_handler);
-       public static native long OnionMessenger_new(long entropy_source, long node_signer, long logger, long message_router, long offers_handler, long custom_handler);
+       // MUST_USE_RES struct LDKOnionMessenger OnionMessenger_new(struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKLogger logger, struct LDKNodeIdLookUp node_id_lookup, struct LDKMessageRouter message_router, struct LDKOffersMessageHandler offers_handler, struct LDKCustomOnionMessageHandler custom_handler);
+       public static native long OnionMessenger_new(long entropy_source, long node_signer, long logger, long node_id_lookup, long message_router, long offers_handler, long custom_handler);
        // MUST_USE_RES struct LDKCResult_SendSuccessSendErrorZ OnionMessenger_send_onion_message(const struct LDKOnionMessenger *NONNULL_PTR this_arg, struct LDKOnionMessageContents contents, struct LDKDestination destination, struct LDKBlindedPath reply_path);
        public static native long OnionMessenger_send_onion_message(long this_arg, long contents, long destination, long reply_path);
        // struct LDKOnionMessageHandler OnionMessenger_as_OnionMessageHandler(const struct LDKOnionMessenger *NONNULL_PTR this_arg);
@@ -12993,12 +14157,26 @@ public class bindings {
        public static native long OnionMessageContents_clone(long orig);
        // void OnionMessageContents_free(struct LDKOnionMessageContents this_ptr);
        public static native void OnionMessageContents_free(long this_ptr);
+       // void NextMessageHop_free(struct LDKNextMessageHop this_ptr);
+       public static native void NextMessageHop_free(long this_ptr);
+       // uint64_t NextMessageHop_clone_ptr(LDKNextMessageHop *NONNULL_PTR arg);
+       public static native long NextMessageHop_clone_ptr(long arg);
+       // struct LDKNextMessageHop NextMessageHop_clone(const struct LDKNextMessageHop *NONNULL_PTR orig);
+       public static native long NextMessageHop_clone(long orig);
+       // struct LDKNextMessageHop NextMessageHop_node_id(struct LDKPublicKey a);
+       public static native long NextMessageHop_node_id(byte[] a);
+       // struct LDKNextMessageHop NextMessageHop_short_channel_id(uint64_t a);
+       public static native long NextMessageHop_short_channel_id(long a);
+       // uint64_t NextMessageHop_hash(const struct LDKNextMessageHop *NONNULL_PTR o);
+       public static native long NextMessageHop_hash(long o);
+       // bool NextMessageHop_eq(const struct LDKNextMessageHop *NONNULL_PTR a, const struct LDKNextMessageHop *NONNULL_PTR b);
+       public static native boolean NextMessageHop_eq(long a, long b);
        // void BlindedPath_free(struct LDKBlindedPath this_obj);
        public static native void BlindedPath_free(long this_obj);
-       // struct LDKPublicKey BlindedPath_get_introduction_node_id(const struct LDKBlindedPath *NONNULL_PTR this_ptr);
-       public static native byte[] BlindedPath_get_introduction_node_id(long this_ptr);
-       // void BlindedPath_set_introduction_node_id(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-       public static native void BlindedPath_set_introduction_node_id(long this_ptr, byte[] val);
+       // struct LDKIntroductionNode BlindedPath_get_introduction_node(const struct LDKBlindedPath *NONNULL_PTR this_ptr);
+       public static native long BlindedPath_get_introduction_node(long this_ptr);
+       // void BlindedPath_set_introduction_node(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKIntroductionNode val);
+       public static native void BlindedPath_set_introduction_node(long this_ptr, long val);
        // struct LDKPublicKey BlindedPath_get_blinding_point(const struct LDKBlindedPath *NONNULL_PTR this_ptr);
        public static native byte[] BlindedPath_get_blinding_point(long this_ptr);
        // void BlindedPath_set_blinding_point(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKPublicKey val);
@@ -13007,8 +14185,8 @@ public class bindings {
        public static native long[] BlindedPath_get_blinded_hops(long this_ptr);
        // void BlindedPath_set_blinded_hops(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKCVec_BlindedHopZ val);
        public static native void BlindedPath_set_blinded_hops(long this_ptr, long[] val);
-       // MUST_USE_RES struct LDKBlindedPath BlindedPath_new(struct LDKPublicKey introduction_node_id_arg, struct LDKPublicKey blinding_point_arg, struct LDKCVec_BlindedHopZ blinded_hops_arg);
-       public static native long BlindedPath_new(byte[] introduction_node_id_arg, byte[] blinding_point_arg, long[] blinded_hops_arg);
+       // MUST_USE_RES struct LDKBlindedPath BlindedPath_new(struct LDKIntroductionNode introduction_node_arg, struct LDKPublicKey blinding_point_arg, struct LDKCVec_BlindedHopZ blinded_hops_arg);
+       public static native long BlindedPath_new(long introduction_node_arg, byte[] blinding_point_arg, long[] blinded_hops_arg);
        // uint64_t BlindedPath_clone_ptr(LDKBlindedPath *NONNULL_PTR arg);
        public static native long BlindedPath_clone_ptr(long arg);
        // struct LDKBlindedPath BlindedPath_clone(const struct LDKBlindedPath *NONNULL_PTR orig);
@@ -13017,6 +14195,38 @@ public class bindings {
        public static native long BlindedPath_hash(long o);
        // bool BlindedPath_eq(const struct LDKBlindedPath *NONNULL_PTR a, const struct LDKBlindedPath *NONNULL_PTR b);
        public static native boolean BlindedPath_eq(long a, long b);
+       // void IntroductionNode_free(struct LDKIntroductionNode this_ptr);
+       public static native void IntroductionNode_free(long this_ptr);
+       // uint64_t IntroductionNode_clone_ptr(LDKIntroductionNode *NONNULL_PTR arg);
+       public static native long IntroductionNode_clone_ptr(long arg);
+       // struct LDKIntroductionNode IntroductionNode_clone(const struct LDKIntroductionNode *NONNULL_PTR orig);
+       public static native long IntroductionNode_clone(long orig);
+       // struct LDKIntroductionNode IntroductionNode_node_id(struct LDKPublicKey a);
+       public static native long IntroductionNode_node_id(byte[] a);
+       // struct LDKIntroductionNode IntroductionNode_directed_short_channel_id(enum LDKDirection a, uint64_t b);
+       public static native long IntroductionNode_directed_short_channel_id(Direction a, long b);
+       // uint64_t IntroductionNode_hash(const struct LDKIntroductionNode *NONNULL_PTR o);
+       public static native long IntroductionNode_hash(long o);
+       // bool IntroductionNode_eq(const struct LDKIntroductionNode *NONNULL_PTR a, const struct LDKIntroductionNode *NONNULL_PTR b);
+       public static native boolean IntroductionNode_eq(long a, long b);
+       // enum LDKDirection Direction_clone(const enum LDKDirection *NONNULL_PTR orig);
+       public static native Direction Direction_clone(long orig);
+       // enum LDKDirection Direction_node_one(void);
+       public static native Direction Direction_node_one();
+       // enum LDKDirection Direction_node_two(void);
+       public static native Direction Direction_node_two();
+       // uint64_t Direction_hash(const enum LDKDirection *NONNULL_PTR o);
+       public static native long Direction_hash(long o);
+       // bool Direction_eq(const enum LDKDirection *NONNULL_PTR a, const enum LDKDirection *NONNULL_PTR b);
+       public static native boolean Direction_eq(long a, long b);
+       // void NodeIdLookUp_free(struct LDKNodeIdLookUp this_ptr);
+       public static native void NodeIdLookUp_free(long this_ptr);
+       // void EmptyNodeIdLookUp_free(struct LDKEmptyNodeIdLookUp this_obj);
+       public static native void EmptyNodeIdLookUp_free(long this_obj);
+       // MUST_USE_RES struct LDKEmptyNodeIdLookUp EmptyNodeIdLookUp_new(void);
+       public static native long EmptyNodeIdLookUp_new();
+       // struct LDKNodeIdLookUp EmptyNodeIdLookUp_as_NodeIdLookUp(const struct LDKEmptyNodeIdLookUp *NONNULL_PTR this_arg);
+       public static native long EmptyNodeIdLookUp_as_NodeIdLookUp(long this_arg);
        // void BlindedHop_free(struct LDKBlindedHop this_obj);
        public static native void BlindedHop_free(long this_obj);
        // struct LDKPublicKey BlindedHop_get_blinded_node_id(const struct LDKBlindedHop *NONNULL_PTR this_ptr);
@@ -13037,14 +14247,16 @@ public class bindings {
        public static native long BlindedHop_hash(long o);
        // bool BlindedHop_eq(const struct LDKBlindedHop *NONNULL_PTR a, const struct LDKBlindedHop *NONNULL_PTR b);
        public static native boolean BlindedHop_eq(long a, long b);
-       // MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_one_hop_for_message(struct LDKPublicKey recipient_node_id, const struct LDKEntropySource *NONNULL_PTR entropy_source);
+       // MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_one_hop_for_message(struct LDKPublicKey recipient_node_id, struct LDKEntropySource entropy_source);
        public static native long BlindedPath_one_hop_for_message(byte[] recipient_node_id, long entropy_source);
-       // MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_new_for_message(struct LDKCVec_PublicKeyZ node_pks, const struct LDKEntropySource *NONNULL_PTR entropy_source);
+       // MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_new_for_message(struct LDKCVec_PublicKeyZ node_pks, struct LDKEntropySource entropy_source);
        public static native long BlindedPath_new_for_message(byte[][] node_pks, long entropy_source);
-       // MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_one_hop_for_payment(struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, const struct LDKEntropySource *NONNULL_PTR entropy_source);
-       public static native long BlindedPath_one_hop_for_payment(byte[] payee_node_id, long payee_tlvs, long entropy_source);
-       // MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_new_for_payment(struct LDKCVec_ForwardNodeZ intermediate_nodes, struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, uint64_t htlc_maximum_msat, const struct LDKEntropySource *NONNULL_PTR entropy_source);
-       public static native long BlindedPath_new_for_payment(long[] intermediate_nodes, byte[] payee_node_id, long payee_tlvs, long htlc_maximum_msat, long entropy_source);
+       // MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_one_hop_for_payment(struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, uint16_t min_final_cltv_expiry_delta, struct LDKEntropySource entropy_source);
+       public static native long BlindedPath_one_hop_for_payment(byte[] payee_node_id, long payee_tlvs, short min_final_cltv_expiry_delta, long entropy_source);
+       // MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_new_for_payment(struct LDKCVec_ForwardNodeZ intermediate_nodes, struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, uint64_t htlc_maximum_msat, uint16_t min_final_cltv_expiry_delta, struct LDKEntropySource entropy_source);
+       public static native long BlindedPath_new_for_payment(long[] intermediate_nodes, byte[] payee_node_id, long payee_tlvs, long htlc_maximum_msat, short min_final_cltv_expiry_delta, long entropy_source);
+       // MUST_USE_RES struct LDKNodeId BlindedPath_public_introduction_node_id(const struct LDKBlindedPath *NONNULL_PTR this_arg, const struct LDKReadOnlyNetworkGraph *NONNULL_PTR network_graph);
+       public static native long BlindedPath_public_introduction_node_id(long this_arg, long network_graph);
        // struct LDKCVec_u8Z BlindedPath_write(const struct LDKBlindedPath *NONNULL_PTR obj);
        public static native byte[] BlindedPath_write(long obj);
        // struct LDKCResult_BlindedPathDecodeErrorZ BlindedPath_read(struct LDKu8slice ser);
@@ -13107,8 +14319,12 @@ public class bindings {
        public static native long ReceiveTlvs_get_payment_constraints(long this_ptr);
        // void ReceiveTlvs_set_payment_constraints(struct LDKReceiveTlvs *NONNULL_PTR this_ptr, struct LDKPaymentConstraints val);
        public static native void ReceiveTlvs_set_payment_constraints(long this_ptr, long val);
-       // MUST_USE_RES struct LDKReceiveTlvs ReceiveTlvs_new(struct LDKThirtyTwoBytes payment_secret_arg, struct LDKPaymentConstraints payment_constraints_arg);
-       public static native long ReceiveTlvs_new(byte[] payment_secret_arg, long payment_constraints_arg);
+       // struct LDKPaymentContext ReceiveTlvs_get_payment_context(const struct LDKReceiveTlvs *NONNULL_PTR this_ptr);
+       public static native long ReceiveTlvs_get_payment_context(long this_ptr);
+       // void ReceiveTlvs_set_payment_context(struct LDKReceiveTlvs *NONNULL_PTR this_ptr, struct LDKPaymentContext val);
+       public static native void ReceiveTlvs_set_payment_context(long this_ptr, long val);
+       // MUST_USE_RES struct LDKReceiveTlvs ReceiveTlvs_new(struct LDKThirtyTwoBytes payment_secret_arg, struct LDKPaymentConstraints payment_constraints_arg, struct LDKPaymentContext payment_context_arg);
+       public static native long ReceiveTlvs_new(byte[] payment_secret_arg, long payment_constraints_arg, long payment_context_arg);
        // uint64_t ReceiveTlvs_clone_ptr(LDKReceiveTlvs *NONNULL_PTR arg);
        public static native long ReceiveTlvs_clone_ptr(long arg);
        // struct LDKReceiveTlvs ReceiveTlvs_clone(const struct LDKReceiveTlvs *NONNULL_PTR orig);
@@ -13149,6 +14365,56 @@ public class bindings {
        public static native long PaymentConstraints_clone_ptr(long arg);
        // struct LDKPaymentConstraints PaymentConstraints_clone(const struct LDKPaymentConstraints *NONNULL_PTR orig);
        public static native long PaymentConstraints_clone(long orig);
+       // void PaymentContext_free(struct LDKPaymentContext this_ptr);
+       public static native void PaymentContext_free(long this_ptr);
+       // uint64_t PaymentContext_clone_ptr(LDKPaymentContext *NONNULL_PTR arg);
+       public static native long PaymentContext_clone_ptr(long arg);
+       // struct LDKPaymentContext PaymentContext_clone(const struct LDKPaymentContext *NONNULL_PTR orig);
+       public static native long PaymentContext_clone(long orig);
+       // struct LDKPaymentContext PaymentContext_unknown(struct LDKUnknownPaymentContext a);
+       public static native long PaymentContext_unknown(long a);
+       // struct LDKPaymentContext PaymentContext_bolt12_offer(struct LDKBolt12OfferContext a);
+       public static native long PaymentContext_bolt12_offer(long a);
+       // struct LDKPaymentContext PaymentContext_bolt12_refund(struct LDKBolt12RefundContext a);
+       public static native long PaymentContext_bolt12_refund(long a);
+       // bool PaymentContext_eq(const struct LDKPaymentContext *NONNULL_PTR a, const struct LDKPaymentContext *NONNULL_PTR b);
+       public static native boolean PaymentContext_eq(long a, long b);
+       // void UnknownPaymentContext_free(struct LDKUnknownPaymentContext this_obj);
+       public static native void UnknownPaymentContext_free(long this_obj);
+       // uint64_t UnknownPaymentContext_clone_ptr(LDKUnknownPaymentContext *NONNULL_PTR arg);
+       public static native long UnknownPaymentContext_clone_ptr(long arg);
+       // struct LDKUnknownPaymentContext UnknownPaymentContext_clone(const struct LDKUnknownPaymentContext *NONNULL_PTR orig);
+       public static native long UnknownPaymentContext_clone(long orig);
+       // bool UnknownPaymentContext_eq(const struct LDKUnknownPaymentContext *NONNULL_PTR a, const struct LDKUnknownPaymentContext *NONNULL_PTR b);
+       public static native boolean UnknownPaymentContext_eq(long a, long b);
+       // void Bolt12OfferContext_free(struct LDKBolt12OfferContext this_obj);
+       public static native void Bolt12OfferContext_free(long this_obj);
+       // struct LDKOfferId Bolt12OfferContext_get_offer_id(const struct LDKBolt12OfferContext *NONNULL_PTR this_ptr);
+       public static native long Bolt12OfferContext_get_offer_id(long this_ptr);
+       // void Bolt12OfferContext_set_offer_id(struct LDKBolt12OfferContext *NONNULL_PTR this_ptr, struct LDKOfferId val);
+       public static native void Bolt12OfferContext_set_offer_id(long this_ptr, long val);
+       // struct LDKInvoiceRequestFields Bolt12OfferContext_get_invoice_request(const struct LDKBolt12OfferContext *NONNULL_PTR this_ptr);
+       public static native long Bolt12OfferContext_get_invoice_request(long this_ptr);
+       // void Bolt12OfferContext_set_invoice_request(struct LDKBolt12OfferContext *NONNULL_PTR this_ptr, struct LDKInvoiceRequestFields val);
+       public static native void Bolt12OfferContext_set_invoice_request(long this_ptr, long val);
+       // MUST_USE_RES struct LDKBolt12OfferContext Bolt12OfferContext_new(struct LDKOfferId offer_id_arg, struct LDKInvoiceRequestFields invoice_request_arg);
+       public static native long Bolt12OfferContext_new(long offer_id_arg, long invoice_request_arg);
+       // uint64_t Bolt12OfferContext_clone_ptr(LDKBolt12OfferContext *NONNULL_PTR arg);
+       public static native long Bolt12OfferContext_clone_ptr(long arg);
+       // struct LDKBolt12OfferContext Bolt12OfferContext_clone(const struct LDKBolt12OfferContext *NONNULL_PTR orig);
+       public static native long Bolt12OfferContext_clone(long orig);
+       // bool Bolt12OfferContext_eq(const struct LDKBolt12OfferContext *NONNULL_PTR a, const struct LDKBolt12OfferContext *NONNULL_PTR b);
+       public static native boolean Bolt12OfferContext_eq(long a, long b);
+       // void Bolt12RefundContext_free(struct LDKBolt12RefundContext this_obj);
+       public static native void Bolt12RefundContext_free(long this_obj);
+       // MUST_USE_RES struct LDKBolt12RefundContext Bolt12RefundContext_new(void);
+       public static native long Bolt12RefundContext_new();
+       // uint64_t Bolt12RefundContext_clone_ptr(LDKBolt12RefundContext *NONNULL_PTR arg);
+       public static native long Bolt12RefundContext_clone_ptr(long arg);
+       // struct LDKBolt12RefundContext Bolt12RefundContext_clone(const struct LDKBolt12RefundContext *NONNULL_PTR orig);
+       public static native long Bolt12RefundContext_clone(long orig);
+       // bool Bolt12RefundContext_eq(const struct LDKBolt12RefundContext *NONNULL_PTR a, const struct LDKBolt12RefundContext *NONNULL_PTR b);
+       public static native boolean Bolt12RefundContext_eq(long a, long b);
        // struct LDKCVec_u8Z ForwardTlvs_write(const struct LDKForwardTlvs *NONNULL_PTR obj);
        public static native byte[] ForwardTlvs_write(long obj);
        // struct LDKCVec_u8Z ReceiveTlvs_write(const struct LDKReceiveTlvs *NONNULL_PTR obj);
@@ -13161,14 +14427,34 @@ public class bindings {
        public static native byte[] PaymentConstraints_write(long obj);
        // struct LDKCResult_PaymentConstraintsDecodeErrorZ PaymentConstraints_read(struct LDKu8slice ser);
        public static native long PaymentConstraints_read(byte[] ser);
+       // struct LDKCVec_u8Z PaymentContext_write(const struct LDKPaymentContext *NONNULL_PTR obj);
+       public static native byte[] PaymentContext_write(long obj);
+       // struct LDKCResult_PaymentContextDecodeErrorZ PaymentContext_read(struct LDKu8slice ser);
+       public static native long PaymentContext_read(byte[] ser);
+       // struct LDKCVec_u8Z UnknownPaymentContext_write(const struct LDKUnknownPaymentContext *NONNULL_PTR obj);
+       public static native byte[] UnknownPaymentContext_write(long obj);
+       // struct LDKCResult_UnknownPaymentContextDecodeErrorZ UnknownPaymentContext_read(struct LDKu8slice ser);
+       public static native long UnknownPaymentContext_read(byte[] ser);
+       // struct LDKCVec_u8Z Bolt12OfferContext_write(const struct LDKBolt12OfferContext *NONNULL_PTR obj);
+       public static native byte[] Bolt12OfferContext_write(long obj);
+       // struct LDKCResult_Bolt12OfferContextDecodeErrorZ Bolt12OfferContext_read(struct LDKu8slice ser);
+       public static native long Bolt12OfferContext_read(byte[] ser);
+       // struct LDKCVec_u8Z Bolt12RefundContext_write(const struct LDKBolt12RefundContext *NONNULL_PTR obj);
+       public static native byte[] Bolt12RefundContext_write(long obj);
+       // struct LDKCResult_Bolt12RefundContextDecodeErrorZ Bolt12RefundContext_read(struct LDKu8slice ser);
+       public static native long Bolt12RefundContext_read(byte[] ser);
        // void PaymentPurpose_free(struct LDKPaymentPurpose this_ptr);
        public static native void PaymentPurpose_free(long this_ptr);
        // uint64_t PaymentPurpose_clone_ptr(LDKPaymentPurpose *NONNULL_PTR arg);
        public static native long PaymentPurpose_clone_ptr(long arg);
        // struct LDKPaymentPurpose PaymentPurpose_clone(const struct LDKPaymentPurpose *NONNULL_PTR orig);
        public static native long PaymentPurpose_clone(long orig);
-       // struct LDKPaymentPurpose PaymentPurpose_invoice_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret);
-       public static native long PaymentPurpose_invoice_payment(long payment_preimage, byte[] payment_secret);
+       // struct LDKPaymentPurpose PaymentPurpose_bolt11_invoice_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret);
+       public static native long PaymentPurpose_bolt11_invoice_payment(long payment_preimage, byte[] payment_secret);
+       // struct LDKPaymentPurpose PaymentPurpose_bolt12_offer_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret, struct LDKBolt12OfferContext payment_context);
+       public static native long PaymentPurpose_bolt12_offer_payment(long payment_preimage, byte[] payment_secret, long payment_context);
+       // struct LDKPaymentPurpose PaymentPurpose_bolt12_refund_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret, struct LDKBolt12RefundContext payment_context);
+       public static native long PaymentPurpose_bolt12_refund_payment(long payment_preimage, byte[] payment_secret, long payment_context);
        // struct LDKPaymentPurpose PaymentPurpose_spontaneous_payment(struct LDKThirtyTwoBytes a);
        public static native long PaymentPurpose_spontaneous_payment(byte[] a);
        // bool PaymentPurpose_eq(const struct LDKPaymentPurpose *NONNULL_PTR a, const struct LDKPaymentPurpose *NONNULL_PTR b);
@@ -13181,10 +14467,10 @@ public class bindings {
        public static native long PaymentPurpose_read(byte[] ser);
        // void ClaimedHTLC_free(struct LDKClaimedHTLC this_obj);
        public static native void ClaimedHTLC_free(long this_obj);
-       // const uint8_t (*ClaimedHTLC_get_channel_id(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr))[32];
-       public static native byte[] ClaimedHTLC_get_channel_id(long this_ptr);
-       // void ClaimedHTLC_set_channel_id(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void ClaimedHTLC_set_channel_id(long this_ptr, byte[] val);
+       // struct LDKChannelId ClaimedHTLC_get_channel_id(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr);
+       public static native long ClaimedHTLC_get_channel_id(long this_ptr);
+       // void ClaimedHTLC_set_channel_id(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val);
+       public static native void ClaimedHTLC_set_channel_id(long this_ptr, long val);
        // struct LDKU128 ClaimedHTLC_get_user_channel_id(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr);
        public static native byte[] ClaimedHTLC_get_user_channel_id(long this_ptr);
        // void ClaimedHTLC_set_user_channel_id(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, struct LDKU128 val);
@@ -13201,8 +14487,8 @@ public class bindings {
        public static native long ClaimedHTLC_get_counterparty_skimmed_fee_msat(long this_ptr);
        // void ClaimedHTLC_set_counterparty_skimmed_fee_msat(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, uint64_t val);
        public static native void ClaimedHTLC_set_counterparty_skimmed_fee_msat(long this_ptr, long val);
-       // MUST_USE_RES struct LDKClaimedHTLC ClaimedHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKU128 user_channel_id_arg, uint32_t cltv_expiry_arg, uint64_t value_msat_arg, uint64_t counterparty_skimmed_fee_msat_arg);
-       public static native long ClaimedHTLC_new(byte[] channel_id_arg, byte[] user_channel_id_arg, int cltv_expiry_arg, long value_msat_arg, long counterparty_skimmed_fee_msat_arg);
+       // MUST_USE_RES struct LDKClaimedHTLC ClaimedHTLC_new(struct LDKChannelId channel_id_arg, struct LDKU128 user_channel_id_arg, uint32_t cltv_expiry_arg, uint64_t value_msat_arg, uint64_t counterparty_skimmed_fee_msat_arg);
+       public static native long ClaimedHTLC_new(long channel_id_arg, byte[] user_channel_id_arg, int cltv_expiry_arg, long value_msat_arg, long counterparty_skimmed_fee_msat_arg);
        // uint64_t ClaimedHTLC_clone_ptr(LDKClaimedHTLC *NONNULL_PTR arg);
        public static native long ClaimedHTLC_clone_ptr(long arg);
        // struct LDKClaimedHTLC ClaimedHTLC_clone(const struct LDKClaimedHTLC *NONNULL_PTR orig);
@@ -13239,8 +14525,12 @@ public class bindings {
        public static native long ClosureReason_counterparty_force_closed(long peer_msg);
        // struct LDKClosureReason ClosureReason_holder_force_closed(void);
        public static native long ClosureReason_holder_force_closed();
-       // struct LDKClosureReason ClosureReason_cooperative_closure(void);
-       public static native long ClosureReason_cooperative_closure();
+       // struct LDKClosureReason ClosureReason_legacy_cooperative_closure(void);
+       public static native long ClosureReason_legacy_cooperative_closure();
+       // struct LDKClosureReason ClosureReason_counterparty_initiated_cooperative_closure(void);
+       public static native long ClosureReason_counterparty_initiated_cooperative_closure();
+       // struct LDKClosureReason ClosureReason_locally_initiated_cooperative_closure(void);
+       public static native long ClosureReason_locally_initiated_cooperative_closure();
        // struct LDKClosureReason ClosureReason_commitment_tx_confirmed(void);
        public static native long ClosureReason_commitment_tx_confirmed();
        // struct LDKClosureReason ClosureReason_funding_timed_out(void);
@@ -13255,6 +14545,8 @@ public class bindings {
        public static native long ClosureReason_counterparty_coop_closed_unfunded_channel();
        // struct LDKClosureReason ClosureReason_funding_batch_closure(void);
        public static native long ClosureReason_funding_batch_closure();
+       // struct LDKClosureReason ClosureReason_htlcs_timed_out(void);
+       public static native long ClosureReason_htlcs_timed_out();
        // bool ClosureReason_eq(const struct LDKClosureReason *NONNULL_PTR a, const struct LDKClosureReason *NONNULL_PTR b);
        public static native boolean ClosureReason_eq(long a, long b);
        // struct LDKCVec_u8Z ClosureReason_write(const struct LDKClosureReason *NONNULL_PTR obj);
@@ -13267,12 +14559,14 @@ public class bindings {
        public static native long HTLCDestination_clone_ptr(long arg);
        // struct LDKHTLCDestination HTLCDestination_clone(const struct LDKHTLCDestination *NONNULL_PTR orig);
        public static native long HTLCDestination_clone(long orig);
-       // struct LDKHTLCDestination HTLCDestination_next_hop_channel(struct LDKPublicKey node_id, struct LDKThirtyTwoBytes channel_id);
-       public static native long HTLCDestination_next_hop_channel(byte[] node_id, byte[] channel_id);
+       // struct LDKHTLCDestination HTLCDestination_next_hop_channel(struct LDKPublicKey node_id, struct LDKChannelId channel_id);
+       public static native long HTLCDestination_next_hop_channel(byte[] node_id, long channel_id);
        // struct LDKHTLCDestination HTLCDestination_unknown_next_hop(uint64_t requested_forward_scid);
        public static native long HTLCDestination_unknown_next_hop(long requested_forward_scid);
        // struct LDKHTLCDestination HTLCDestination_invalid_forward(uint64_t requested_forward_scid);
        public static native long HTLCDestination_invalid_forward(long requested_forward_scid);
+       // struct LDKHTLCDestination HTLCDestination_invalid_onion(void);
+       public static native long HTLCDestination_invalid_onion();
        // struct LDKHTLCDestination HTLCDestination_failed_payment(struct LDKThirtyTwoBytes payment_hash);
        public static native long HTLCDestination_failed_payment(byte[] payment_hash);
        // bool HTLCDestination_eq(const struct LDKHTLCDestination *NONNULL_PTR a, const struct LDKHTLCDestination *NONNULL_PTR b);
@@ -13307,9 +14601,9 @@ public class bindings {
        public static native long Event_clone_ptr(long arg);
        // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
        public static native long Event_clone(long orig);
-       // struct LDKEvent Event_funding_generation_ready(struct LDKThirtyTwoBytes temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t channel_value_satoshis, struct LDKCVec_u8Z output_script, struct LDKU128 user_channel_id);
-       public static native long Event_funding_generation_ready(byte[] temporary_channel_id, byte[] counterparty_node_id, long channel_value_satoshis, byte[] output_script, byte[] user_channel_id);
-       // struct LDKEvent Event_payment_claimable(struct LDKPublicKey receiver_node_id, struct LDKThirtyTwoBytes payment_hash, struct LDKRecipientOnionFields onion_fields, uint64_t amount_msat, uint64_t counterparty_skimmed_fee_msat, struct LDKPaymentPurpose purpose, struct LDKCOption_ThirtyTwoBytesZ via_channel_id, struct LDKCOption_U128Z via_user_channel_id, struct LDKCOption_u32Z claim_deadline);
+       // struct LDKEvent Event_funding_generation_ready(struct LDKChannelId temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t channel_value_satoshis, struct LDKCVec_u8Z output_script, struct LDKU128 user_channel_id);
+       public static native long Event_funding_generation_ready(long temporary_channel_id, byte[] counterparty_node_id, long channel_value_satoshis, byte[] output_script, byte[] user_channel_id);
+       // struct LDKEvent Event_payment_claimable(struct LDKPublicKey receiver_node_id, struct LDKThirtyTwoBytes payment_hash, struct LDKRecipientOnionFields onion_fields, uint64_t amount_msat, uint64_t counterparty_skimmed_fee_msat, struct LDKPaymentPurpose purpose, struct LDKChannelId via_channel_id, struct LDKCOption_U128Z via_user_channel_id, struct LDKCOption_u32Z claim_deadline);
        public static native long Event_payment_claimable(byte[] receiver_node_id, byte[] payment_hash, long onion_fields, long amount_msat, long counterparty_skimmed_fee_msat, long purpose, long via_channel_id, long via_user_channel_id, long claim_deadline);
        // struct LDKEvent Event_payment_claimed(struct LDKPublicKey receiver_node_id, struct LDKThirtyTwoBytes payment_hash, uint64_t amount_msat, struct LDKPaymentPurpose purpose, struct LDKCVec_ClaimedHTLCZ htlcs, struct LDKCOption_u64Z sender_intended_total_msat);
        public static native long Event_payment_claimed(byte[] receiver_node_id, byte[] payment_hash, long amount_msat, long purpose, long[] htlcs, long sender_intended_total_msat);
@@ -13333,22 +14627,22 @@ public class bindings {
        public static native long Event_pending_htlcs_forwardable(long time_forwardable);
        // struct LDKEvent Event_htlcintercepted(struct LDKThirtyTwoBytes intercept_id, uint64_t requested_next_hop_scid, struct LDKThirtyTwoBytes payment_hash, uint64_t inbound_amount_msat, uint64_t expected_outbound_amount_msat);
        public static native long Event_htlcintercepted(byte[] intercept_id, long requested_next_hop_scid, byte[] payment_hash, long inbound_amount_msat, long expected_outbound_amount_msat);
-       // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs, struct LDKCOption_ThirtyTwoBytesZ channel_id);
+       // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs, struct LDKChannelId channel_id);
        public static native long Event_spendable_outputs(long[] outputs, long channel_id);
-       // struct LDKEvent Event_payment_forwarded(struct LDKCOption_ThirtyTwoBytesZ prev_channel_id, struct LDKCOption_ThirtyTwoBytesZ next_channel_id, struct LDKCOption_u64Z fee_earned_msat, bool claim_from_onchain_tx, struct LDKCOption_u64Z outbound_amount_forwarded_msat);
-       public static native long Event_payment_forwarded(long prev_channel_id, long next_channel_id, long fee_earned_msat, boolean claim_from_onchain_tx, long outbound_amount_forwarded_msat);
-       // struct LDKEvent Event_channel_pending(struct LDKThirtyTwoBytes channel_id, struct LDKU128 user_channel_id, struct LDKCOption_ThirtyTwoBytesZ former_temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKOutPoint funding_txo);
-       public static native long Event_channel_pending(byte[] channel_id, byte[] user_channel_id, long former_temporary_channel_id, byte[] counterparty_node_id, long funding_txo);
-       // struct LDKEvent Event_channel_ready(struct LDKThirtyTwoBytes channel_id, struct LDKU128 user_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKChannelTypeFeatures channel_type);
-       public static native long Event_channel_ready(byte[] channel_id, byte[] user_channel_id, byte[] counterparty_node_id, long channel_type);
-       // struct LDKEvent Event_channel_closed(struct LDKThirtyTwoBytes channel_id, struct LDKU128 user_channel_id, struct LDKClosureReason reason, struct LDKPublicKey counterparty_node_id, struct LDKCOption_u64Z channel_capacity_sats, struct LDKOutPoint channel_funding_txo);
-       public static native long Event_channel_closed(byte[] channel_id, byte[] user_channel_id, long reason, byte[] counterparty_node_id, long channel_capacity_sats, long channel_funding_txo);
-       // struct LDKEvent Event_discard_funding(struct LDKThirtyTwoBytes channel_id, struct LDKTransaction transaction);
-       public static native long Event_discard_funding(byte[] channel_id, byte[] transaction);
-       // struct LDKEvent Event_open_channel_request(struct LDKThirtyTwoBytes temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t funding_satoshis, uint64_t push_msat, struct LDKChannelTypeFeatures channel_type);
-       public static native long Event_open_channel_request(byte[] temporary_channel_id, byte[] counterparty_node_id, long funding_satoshis, long push_msat, long channel_type);
-       // struct LDKEvent Event_htlchandling_failed(struct LDKThirtyTwoBytes prev_channel_id, struct LDKHTLCDestination failed_next_destination);
-       public static native long Event_htlchandling_failed(byte[] prev_channel_id, long failed_next_destination);
+       // struct LDKEvent Event_payment_forwarded(struct LDKChannelId prev_channel_id, struct LDKChannelId next_channel_id, struct LDKCOption_U128Z prev_user_channel_id, struct LDKCOption_U128Z next_user_channel_id, struct LDKCOption_u64Z total_fee_earned_msat, struct LDKCOption_u64Z skimmed_fee_msat, bool claim_from_onchain_tx, struct LDKCOption_u64Z outbound_amount_forwarded_msat);
+       public static native long Event_payment_forwarded(long prev_channel_id, long next_channel_id, long prev_user_channel_id, long next_user_channel_id, long total_fee_earned_msat, long skimmed_fee_msat, boolean claim_from_onchain_tx, long outbound_amount_forwarded_msat);
+       // struct LDKEvent Event_channel_pending(struct LDKChannelId channel_id, struct LDKU128 user_channel_id, struct LDKChannelId former_temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKOutPoint funding_txo, struct LDKChannelTypeFeatures channel_type);
+       public static native long Event_channel_pending(long channel_id, byte[] user_channel_id, long former_temporary_channel_id, byte[] counterparty_node_id, long funding_txo, long channel_type);
+       // struct LDKEvent Event_channel_ready(struct LDKChannelId channel_id, struct LDKU128 user_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKChannelTypeFeatures channel_type);
+       public static native long Event_channel_ready(long channel_id, byte[] user_channel_id, byte[] counterparty_node_id, long channel_type);
+       // struct LDKEvent Event_channel_closed(struct LDKChannelId channel_id, struct LDKU128 user_channel_id, struct LDKClosureReason reason, struct LDKPublicKey counterparty_node_id, struct LDKCOption_u64Z channel_capacity_sats, struct LDKOutPoint channel_funding_txo);
+       public static native long Event_channel_closed(long channel_id, byte[] user_channel_id, long reason, byte[] counterparty_node_id, long channel_capacity_sats, long channel_funding_txo);
+       // struct LDKEvent Event_discard_funding(struct LDKChannelId channel_id, struct LDKTransaction transaction);
+       public static native long Event_discard_funding(long channel_id, byte[] transaction);
+       // struct LDKEvent Event_open_channel_request(struct LDKChannelId temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t funding_satoshis, uint64_t push_msat, struct LDKChannelTypeFeatures channel_type);
+       public static native long Event_open_channel_request(long temporary_channel_id, byte[] counterparty_node_id, long funding_satoshis, long push_msat, long channel_type);
+       // struct LDKEvent Event_htlchandling_failed(struct LDKChannelId prev_channel_id, struct LDKHTLCDestination failed_next_destination);
+       public static native long Event_htlchandling_failed(long prev_channel_id, long failed_next_destination);
        // struct LDKEvent Event_bump_transaction(struct LDKBumpTransactionEvent a);
        public static native long Event_bump_transaction(long a);
        // bool Event_eq(const struct LDKEvent *NONNULL_PTR a, const struct LDKEvent *NONNULL_PTR b);
@@ -13475,10 +14769,10 @@ public class bindings {
        public static native long BumpTransactionEvent_clone_ptr(long arg);
        // struct LDKBumpTransactionEvent BumpTransactionEvent_clone(const struct LDKBumpTransactionEvent *NONNULL_PTR orig);
        public static native long BumpTransactionEvent_clone(long orig);
-       // struct LDKBumpTransactionEvent BumpTransactionEvent_channel_close(struct LDKThirtyTwoBytes claim_id, uint32_t package_target_feerate_sat_per_1000_weight, struct LDKTransaction commitment_tx, uint64_t commitment_tx_fee_satoshis, struct LDKAnchorDescriptor anchor_descriptor, struct LDKCVec_HTLCOutputInCommitmentZ pending_htlcs);
-       public static native long BumpTransactionEvent_channel_close(byte[] claim_id, int package_target_feerate_sat_per_1000_weight, byte[] commitment_tx, long commitment_tx_fee_satoshis, long anchor_descriptor, long[] pending_htlcs);
-       // struct LDKBumpTransactionEvent BumpTransactionEvent_htlcresolution(struct LDKThirtyTwoBytes claim_id, uint32_t target_feerate_sat_per_1000_weight, struct LDKCVec_HTLCDescriptorZ htlc_descriptors, uint32_t tx_lock_time);
-       public static native long BumpTransactionEvent_htlcresolution(byte[] claim_id, int target_feerate_sat_per_1000_weight, long[] htlc_descriptors, int tx_lock_time);
+       // struct LDKBumpTransactionEvent BumpTransactionEvent_channel_close(struct LDKChannelId channel_id, struct LDKPublicKey counterparty_node_id, struct LDKThirtyTwoBytes claim_id, uint32_t package_target_feerate_sat_per_1000_weight, struct LDKTransaction commitment_tx, uint64_t commitment_tx_fee_satoshis, struct LDKAnchorDescriptor anchor_descriptor, struct LDKCVec_HTLCOutputInCommitmentZ pending_htlcs);
+       public static native long BumpTransactionEvent_channel_close(long channel_id, byte[] counterparty_node_id, byte[] claim_id, int package_target_feerate_sat_per_1000_weight, byte[] commitment_tx, long commitment_tx_fee_satoshis, long anchor_descriptor, long[] pending_htlcs);
+       // struct LDKBumpTransactionEvent BumpTransactionEvent_htlcresolution(struct LDKChannelId channel_id, struct LDKPublicKey counterparty_node_id, struct LDKThirtyTwoBytes claim_id, uint32_t target_feerate_sat_per_1000_weight, struct LDKCVec_HTLCDescriptorZ htlc_descriptors, uint32_t tx_lock_time);
+       public static native long BumpTransactionEvent_htlcresolution(long channel_id, byte[] counterparty_node_id, byte[] claim_id, int target_feerate_sat_per_1000_weight, long[] htlc_descriptors, int tx_lock_time);
        // bool BumpTransactionEvent_eq(const struct LDKBumpTransactionEvent *NONNULL_PTR a, const struct LDKBumpTransactionEvent *NONNULL_PTR b);
        public static native boolean BumpTransactionEvent_eq(long a, long b);
        // void Input_free(struct LDKInput this_obj);
@@ -13907,6 +15201,8 @@ public class bindings {
        public static native long Bolt11Invoice_features(long this_arg);
        // MUST_USE_RES struct LDKPublicKey Bolt11Invoice_recover_payee_pub_key(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
        public static native byte[] Bolt11Invoice_recover_payee_pub_key(long this_arg);
+       // MUST_USE_RES struct LDKPublicKey Bolt11Invoice_get_payee_pub_key(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
+       public static native byte[] Bolt11Invoice_get_payee_pub_key(long this_arg);
        // MUST_USE_RES struct LDKCOption_u64Z Bolt11Invoice_expires_at(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
        public static native long Bolt11Invoice_expires_at(long this_arg);
        // MUST_USE_RES uint64_t Bolt11Invoice_expiry_time(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
index 1d5bc19f0412c591bac5e3da7378e0dba219d5fd..d99e4b9c8549e1bac0305bdc6312ffe300ef5839 100644 (file)
@@ -226,7 +226,7 @@ public class APIError extends CommonBase {
         * Utility method to constructs a new IncompatibleShutdownScript-variant APIError
         */
        public static APIError incompatible_shutdown_script(org.ldk.structs.ShutdownScript script) {
-               long ret = bindings.APIError_incompatible_shutdown_script(script == null ? 0 : script.ptr);
+               long ret = bindings.APIError_incompatible_shutdown_script(script.ptr);
                Reference.reachabilityFence(script);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.APIError ret_hu_conv = org.ldk.structs.APIError.constr_from_ptr(ret);
@@ -240,7 +240,7 @@ public class APIError extends CommonBase {
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.APIError b) {
-               boolean ret = bindings.APIError_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.APIError_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
index 950e2a6693410d72e3c697dc6eed76cc20b61d17..757328e2399fee8a81316d821e951d6578e8f77d 100644 (file)
@@ -25,57 +25,25 @@ public class AcceptChannel extends CommonBase {
        }
 
        /**
-        * A temporary channel ID, until the funding outpoint is announced
+        * Common fields of `accept_channel(2)`-like messages
         */
-       public byte[] get_temporary_channel_id() {
-               byte[] ret = bindings.AcceptChannel_get_temporary_channel_id(this.ptr);
+       public CommonAcceptChannelFields get_common_fields() {
+               long ret = bindings.AcceptChannel_get_common_fields(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * A temporary channel ID, until the funding outpoint is announced
-        */
-       public void set_temporary_channel_id(byte[] val) {
-               bindings.AcceptChannel_set_temporary_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The threshold below which outputs on transactions broadcast by sender will be omitted
-        */
-       public long get_dust_limit_satoshis() {
-               long ret = bindings.AcceptChannel_get_dust_limit_satoshis(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The threshold below which outputs on transactions broadcast by sender will be omitted
-        */
-       public void set_dust_limit_satoshis(long val) {
-               bindings.AcceptChannel_set_dust_limit_satoshis(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The maximum inbound HTLC value in flight towards sender, in milli-satoshi
-        */
-       public long get_max_htlc_value_in_flight_msat() {
-               long ret = bindings.AcceptChannel_get_max_htlc_value_in_flight_msat(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.CommonAcceptChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonAcceptChannelFields(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
-        * The maximum inbound HTLC value in flight towards sender, in milli-satoshi
+        * Common fields of `accept_channel(2)`-like messages
         */
-       public void set_max_htlc_value_in_flight_msat(long val) {
-               bindings.AcceptChannel_set_max_htlc_value_in_flight_msat(this.ptr, val);
+       public void set_common_fields(org.ldk.structs.CommonAcceptChannelFields val) {
+               bindings.AcceptChannel_set_common_fields(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -96,271 +64,17 @@ public class AcceptChannel extends CommonBase {
                Reference.reachabilityFence(val);
        }
 
-       /**
-        * The minimum HTLC size incoming to sender, in milli-satoshi
-        */
-       public long get_htlc_minimum_msat() {
-               long ret = bindings.AcceptChannel_get_htlc_minimum_msat(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The minimum HTLC size incoming to sender, in milli-satoshi
-        */
-       public void set_htlc_minimum_msat(long val) {
-               bindings.AcceptChannel_set_htlc_minimum_msat(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * Minimum depth of the funding transaction before the channel is considered open
-        */
-       public int get_minimum_depth() {
-               int ret = bindings.AcceptChannel_get_minimum_depth(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * Minimum depth of the funding transaction before the channel is considered open
-        */
-       public void set_minimum_depth(int val) {
-               bindings.AcceptChannel_set_minimum_depth(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The number of blocks which the counterparty will have to wait to claim on-chain funds if they broadcast a commitment transaction
-        */
-       public short get_to_self_delay() {
-               short ret = bindings.AcceptChannel_get_to_self_delay(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The number of blocks which the counterparty will have to wait to claim on-chain funds if they broadcast a commitment transaction
-        */
-       public void set_to_self_delay(short val) {
-               bindings.AcceptChannel_set_to_self_delay(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The maximum number of inbound HTLCs towards sender
-        */
-       public short get_max_accepted_htlcs() {
-               short ret = bindings.AcceptChannel_get_max_accepted_htlcs(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The maximum number of inbound HTLCs towards sender
-        */
-       public void set_max_accepted_htlcs(short val) {
-               bindings.AcceptChannel_set_max_accepted_htlcs(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The sender's key controlling the funding transaction
-        */
-       public byte[] get_funding_pubkey() {
-               byte[] ret = bindings.AcceptChannel_get_funding_pubkey(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The sender's key controlling the funding transaction
-        */
-       public void set_funding_pubkey(byte[] val) {
-               bindings.AcceptChannel_set_funding_pubkey(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * Used to derive a revocation key for transactions broadcast by counterparty
-        */
-       public byte[] get_revocation_basepoint() {
-               byte[] ret = bindings.AcceptChannel_get_revocation_basepoint(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * Used to derive a revocation key for transactions broadcast by counterparty
-        */
-       public void set_revocation_basepoint(byte[] val) {
-               bindings.AcceptChannel_set_revocation_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * A payment key to sender for transactions broadcast by counterparty
-        */
-       public byte[] get_payment_point() {
-               byte[] ret = bindings.AcceptChannel_get_payment_point(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * A payment key to sender for transactions broadcast by counterparty
-        */
-       public void set_payment_point(byte[] val) {
-               bindings.AcceptChannel_set_payment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * Used to derive a payment key to sender for transactions broadcast by sender
-        */
-       public byte[] get_delayed_payment_basepoint() {
-               byte[] ret = bindings.AcceptChannel_get_delayed_payment_basepoint(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * Used to derive a payment key to sender for transactions broadcast by sender
-        */
-       public void set_delayed_payment_basepoint(byte[] val) {
-               bindings.AcceptChannel_set_delayed_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * Used to derive an HTLC payment key to sender for transactions broadcast by counterparty
-        */
-       public byte[] get_htlc_basepoint() {
-               byte[] ret = bindings.AcceptChannel_get_htlc_basepoint(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * Used to derive an HTLC payment key to sender for transactions broadcast by counterparty
-        */
-       public void set_htlc_basepoint(byte[] val) {
-               bindings.AcceptChannel_set_htlc_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The first to-be-broadcast-by-sender transaction's per commitment point
-        */
-       public byte[] get_first_per_commitment_point() {
-               byte[] ret = bindings.AcceptChannel_get_first_per_commitment_point(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The first to-be-broadcast-by-sender transaction's per commitment point
-        */
-       public void set_first_per_commitment_point(byte[] val) {
-               bindings.AcceptChannel_set_first_per_commitment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * A request to pre-set the to-sender output's scriptPubkey for when we collaboratively close
-        */
-       public Option_CVec_u8ZZ get_shutdown_scriptpubkey() {
-               long ret = bindings.AcceptChannel_get_shutdown_scriptpubkey(this.ptr);
-               Reference.reachabilityFence(this);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
-               return ret_hu_conv;
-       }
-
-       /**
-        * A request to pre-set the to-sender output's scriptPubkey for when we collaboratively close
-        */
-       public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) {
-               bindings.AcceptChannel_set_shutdown_scriptpubkey(this.ptr, val.ptr);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-               if (this != null) { this.ptrs_to.add(val); };
-       }
-
-       /**
-        * The channel type that this channel will represent.
-        * 
-        * If this is `None`, we derive the channel type from the intersection of
-        * our feature bits with our counterparty's feature bits from the [`Init`] message.
-        * This is required to match the equivalent field in [`OpenChannel::channel_type`].
-        * 
-        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
-        */
-       @Nullable
-       public ChannelTypeFeatures get_channel_type() {
-               long ret = bindings.AcceptChannel_get_channel_type(this.ptr);
-               Reference.reachabilityFence(this);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); }
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
-               return ret_hu_conv;
-       }
-
-       /**
-        * The channel type that this channel will represent.
-        * 
-        * If this is `None`, we derive the channel type from the intersection of
-        * our feature bits with our counterparty's feature bits from the [`Init`] message.
-        * This is required to match the equivalent field in [`OpenChannel::channel_type`].
-        * 
-        * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
-        */
-       public void set_channel_type(@Nullable org.ldk.structs.ChannelTypeFeatures val) {
-               bindings.AcceptChannel_set_channel_type(this.ptr, val == null ? 0 : val.ptr);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-               if (this != null) { this.ptrs_to.add(val); };
-       }
-
        /**
         * Constructs a new AcceptChannel given each field
-        * 
-        * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public static AcceptChannel of(byte[] temporary_channel_id_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long channel_reserve_satoshis_arg, long htlc_minimum_msat_arg, int minimum_depth_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_point_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, @Nullable org.ldk.structs.ChannelTypeFeatures channel_type_arg) {
-               long ret = bindings.AcceptChannel_new(InternalUtils.check_arr_len(temporary_channel_id_arg, 32), dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33), InternalUtils.check_arr_len(revocation_basepoint_arg, 33), InternalUtils.check_arr_len(payment_point_arg, 33), InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33), InternalUtils.check_arr_len(htlc_basepoint_arg, 33), InternalUtils.check_arr_len(first_per_commitment_point_arg, 33), shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr);
-               Reference.reachabilityFence(temporary_channel_id_arg);
-               Reference.reachabilityFence(dust_limit_satoshis_arg);
-               Reference.reachabilityFence(max_htlc_value_in_flight_msat_arg);
+       public static AcceptChannel of(org.ldk.structs.CommonAcceptChannelFields common_fields_arg, long channel_reserve_satoshis_arg) {
+               long ret = bindings.AcceptChannel_new(common_fields_arg.ptr, channel_reserve_satoshis_arg);
+               Reference.reachabilityFence(common_fields_arg);
                Reference.reachabilityFence(channel_reserve_satoshis_arg);
-               Reference.reachabilityFence(htlc_minimum_msat_arg);
-               Reference.reachabilityFence(minimum_depth_arg);
-               Reference.reachabilityFence(to_self_delay_arg);
-               Reference.reachabilityFence(max_accepted_htlcs_arg);
-               Reference.reachabilityFence(funding_pubkey_arg);
-               Reference.reachabilityFence(revocation_basepoint_arg);
-               Reference.reachabilityFence(payment_point_arg);
-               Reference.reachabilityFence(delayed_payment_basepoint_arg);
-               Reference.reachabilityFence(htlc_basepoint_arg);
-               Reference.reachabilityFence(first_per_commitment_point_arg);
-               Reference.reachabilityFence(shutdown_scriptpubkey_arg);
-               Reference.reachabilityFence(channel_type_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.AcceptChannel ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.AcceptChannel(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(shutdown_scriptpubkey_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(common_fields_arg); };
                return ret_hu_conv;
        }
 
@@ -400,7 +114,7 @@ public class AcceptChannel extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.AcceptChannel b) {
-               boolean ret = bindings.AcceptChannel_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.AcceptChannel_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 554a5c46013f7303843e1561962ecfc7596db6fe..9327a5ea1c9d3e5b8a072bdafdbb11085b9fe978 100644 (file)
@@ -23,21 +23,25 @@ public class AcceptChannelV2 extends CommonBase {
        }
 
        /**
-        * The same `temporary_channel_id` received from the initiator's `open_channel2` message.
+        * Common fields of `accept_channel(2)`-like messages
         */
-       public byte[] get_temporary_channel_id() {
-               byte[] ret = bindings.AcceptChannelV2_get_temporary_channel_id(this.ptr);
+       public CommonAcceptChannelFields get_common_fields() {
+               long ret = bindings.AcceptChannelV2_get_common_fields(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.CommonAcceptChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonAcceptChannelFields(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
-        * The same `temporary_channel_id` received from the initiator's `open_channel2` message.
+        * Common fields of `accept_channel(2)`-like messages
         */
-       public void set_temporary_channel_id(byte[] val) {
-               bindings.AcceptChannelV2_set_temporary_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_common_fields(org.ldk.structs.CommonAcceptChannelFields val) {
+               bindings.AcceptChannelV2_set_common_fields(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -58,228 +62,6 @@ public class AcceptChannelV2 extends CommonBase {
                Reference.reachabilityFence(val);
        }
 
-       /**
-        * The threshold below which outputs on transactions broadcast by the channel acceptor will be
-        * omitted
-        */
-       public long get_dust_limit_satoshis() {
-               long ret = bindings.AcceptChannelV2_get_dust_limit_satoshis(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The threshold below which outputs on transactions broadcast by the channel acceptor will be
-        * omitted
-        */
-       public void set_dust_limit_satoshis(long val) {
-               bindings.AcceptChannelV2_set_dust_limit_satoshis(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The maximum inbound HTLC value in flight towards channel acceptor, in milli-satoshi
-        */
-       public long get_max_htlc_value_in_flight_msat() {
-               long ret = bindings.AcceptChannelV2_get_max_htlc_value_in_flight_msat(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The maximum inbound HTLC value in flight towards channel acceptor, in milli-satoshi
-        */
-       public void set_max_htlc_value_in_flight_msat(long val) {
-               bindings.AcceptChannelV2_set_max_htlc_value_in_flight_msat(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The minimum HTLC size incoming to channel acceptor, in milli-satoshi
-        */
-       public long get_htlc_minimum_msat() {
-               long ret = bindings.AcceptChannelV2_get_htlc_minimum_msat(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The minimum HTLC size incoming to channel acceptor, in milli-satoshi
-        */
-       public void set_htlc_minimum_msat(long val) {
-               bindings.AcceptChannelV2_set_htlc_minimum_msat(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * Minimum depth of the funding transaction before the channel is considered open
-        */
-       public int get_minimum_depth() {
-               int ret = bindings.AcceptChannelV2_get_minimum_depth(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * Minimum depth of the funding transaction before the channel is considered open
-        */
-       public void set_minimum_depth(int val) {
-               bindings.AcceptChannelV2_set_minimum_depth(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
-        * broadcast a commitment transaction
-        */
-       public short get_to_self_delay() {
-               short ret = bindings.AcceptChannelV2_get_to_self_delay(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
-        * broadcast a commitment transaction
-        */
-       public void set_to_self_delay(short val) {
-               bindings.AcceptChannelV2_set_to_self_delay(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The maximum number of inbound HTLCs towards channel acceptor
-        */
-       public short get_max_accepted_htlcs() {
-               short ret = bindings.AcceptChannelV2_get_max_accepted_htlcs(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The maximum number of inbound HTLCs towards channel acceptor
-        */
-       public void set_max_accepted_htlcs(short val) {
-               bindings.AcceptChannelV2_set_max_accepted_htlcs(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The channel acceptor's key controlling the funding transaction
-        */
-       public byte[] get_funding_pubkey() {
-               byte[] ret = bindings.AcceptChannelV2_get_funding_pubkey(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The channel acceptor's key controlling the funding transaction
-        */
-       public void set_funding_pubkey(byte[] val) {
-               bindings.AcceptChannelV2_set_funding_pubkey(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * Used to derive a revocation key for transactions broadcast by counterparty
-        */
-       public byte[] get_revocation_basepoint() {
-               byte[] ret = bindings.AcceptChannelV2_get_revocation_basepoint(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * Used to derive a revocation key for transactions broadcast by counterparty
-        */
-       public void set_revocation_basepoint(byte[] val) {
-               bindings.AcceptChannelV2_set_revocation_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * A payment key to channel acceptor for transactions broadcast by counterparty
-        */
-       public byte[] get_payment_basepoint() {
-               byte[] ret = bindings.AcceptChannelV2_get_payment_basepoint(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * A payment key to channel acceptor for transactions broadcast by counterparty
-        */
-       public void set_payment_basepoint(byte[] val) {
-               bindings.AcceptChannelV2_set_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * Used to derive a payment key to channel acceptor for transactions broadcast by channel
-        * acceptor
-        */
-       public byte[] get_delayed_payment_basepoint() {
-               byte[] ret = bindings.AcceptChannelV2_get_delayed_payment_basepoint(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * Used to derive a payment key to channel acceptor for transactions broadcast by channel
-        * acceptor
-        */
-       public void set_delayed_payment_basepoint(byte[] val) {
-               bindings.AcceptChannelV2_set_delayed_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty
-        */
-       public byte[] get_htlc_basepoint() {
-               byte[] ret = bindings.AcceptChannelV2_get_htlc_basepoint(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty
-        */
-       public void set_htlc_basepoint(byte[] val) {
-               bindings.AcceptChannelV2_set_htlc_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point
-        */
-       public byte[] get_first_per_commitment_point() {
-               byte[] ret = bindings.AcceptChannelV2_get_first_per_commitment_point(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point
-        */
-       public void set_first_per_commitment_point(byte[] val) {
-               bindings.AcceptChannelV2_set_first_per_commitment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
        /**
         * The second to-be-broadcast-by-channel-acceptor transaction's per commitment point
         */
@@ -298,65 +80,6 @@ public class AcceptChannelV2 extends CommonBase {
                Reference.reachabilityFence(val);
        }
 
-       /**
-        * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we
-        * collaboratively close
-        */
-       public Option_CVec_u8ZZ get_shutdown_scriptpubkey() {
-               long ret = bindings.AcceptChannelV2_get_shutdown_scriptpubkey(this.ptr);
-               Reference.reachabilityFence(this);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
-               return ret_hu_conv;
-       }
-
-       /**
-        * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we
-        * collaboratively close
-        */
-       public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) {
-               bindings.AcceptChannelV2_set_shutdown_scriptpubkey(this.ptr, val.ptr);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-               if (this != null) { this.ptrs_to.add(val); };
-       }
-
-       /**
-        * The channel type that this channel will represent. If none is set, we derive the channel
-        * type from the intersection of our feature bits with our counterparty's feature bits from
-        * the Init message.
-        * 
-        * This is required to match the equivalent field in [`OpenChannelV2::channel_type`].
-        * 
-        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
-        */
-       @Nullable
-       public ChannelTypeFeatures get_channel_type() {
-               long ret = bindings.AcceptChannelV2_get_channel_type(this.ptr);
-               Reference.reachabilityFence(this);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); }
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
-               return ret_hu_conv;
-       }
-
-       /**
-        * The channel type that this channel will represent. If none is set, we derive the channel
-        * type from the intersection of our feature bits with our counterparty's feature bits from
-        * the Init message.
-        * 
-        * This is required to match the equivalent field in [`OpenChannelV2::channel_type`].
-        * 
-        * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
-        */
-       public void set_channel_type(@Nullable org.ldk.structs.ChannelTypeFeatures val) {
-               bindings.AcceptChannelV2_set_channel_type(this.ptr, val == null ? 0 : val.ptr);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-               if (this != null) { this.ptrs_to.add(val); };
-       }
-
        /**
         * Optionally, a requirement that only confirmed inputs can be added
         */
@@ -377,34 +100,17 @@ public class AcceptChannelV2 extends CommonBase {
 
        /**
         * Constructs a new AcceptChannelV2 given each field
-        * 
-        * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public static AcceptChannelV2 of(byte[] temporary_channel_id_arg, long funding_satoshis_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, int minimum_depth_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte[] second_per_commitment_point_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, @Nullable org.ldk.structs.ChannelTypeFeatures channel_type_arg, org.ldk.enums.COption_NoneZ require_confirmed_inputs_arg) {
-               long ret = bindings.AcceptChannelV2_new(InternalUtils.check_arr_len(temporary_channel_id_arg, 32), funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33), InternalUtils.check_arr_len(revocation_basepoint_arg, 33), InternalUtils.check_arr_len(payment_basepoint_arg, 33), InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33), InternalUtils.check_arr_len(htlc_basepoint_arg, 33), InternalUtils.check_arr_len(first_per_commitment_point_arg, 33), InternalUtils.check_arr_len(second_per_commitment_point_arg, 33), shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr, require_confirmed_inputs_arg);
-               Reference.reachabilityFence(temporary_channel_id_arg);
+       public static AcceptChannelV2 of(org.ldk.structs.CommonAcceptChannelFields common_fields_arg, long funding_satoshis_arg, byte[] second_per_commitment_point_arg, org.ldk.enums.COption_NoneZ require_confirmed_inputs_arg) {
+               long ret = bindings.AcceptChannelV2_new(common_fields_arg.ptr, funding_satoshis_arg, InternalUtils.check_arr_len(second_per_commitment_point_arg, 33), require_confirmed_inputs_arg);
+               Reference.reachabilityFence(common_fields_arg);
                Reference.reachabilityFence(funding_satoshis_arg);
-               Reference.reachabilityFence(dust_limit_satoshis_arg);
-               Reference.reachabilityFence(max_htlc_value_in_flight_msat_arg);
-               Reference.reachabilityFence(htlc_minimum_msat_arg);
-               Reference.reachabilityFence(minimum_depth_arg);
-               Reference.reachabilityFence(to_self_delay_arg);
-               Reference.reachabilityFence(max_accepted_htlcs_arg);
-               Reference.reachabilityFence(funding_pubkey_arg);
-               Reference.reachabilityFence(revocation_basepoint_arg);
-               Reference.reachabilityFence(payment_basepoint_arg);
-               Reference.reachabilityFence(delayed_payment_basepoint_arg);
-               Reference.reachabilityFence(htlc_basepoint_arg);
-               Reference.reachabilityFence(first_per_commitment_point_arg);
                Reference.reachabilityFence(second_per_commitment_point_arg);
-               Reference.reachabilityFence(shutdown_scriptpubkey_arg);
-               Reference.reachabilityFence(channel_type_arg);
                Reference.reachabilityFence(require_confirmed_inputs_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.AcceptChannelV2 ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.AcceptChannelV2(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(shutdown_scriptpubkey_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(common_fields_arg); };
                return ret_hu_conv;
        }
 
@@ -444,7 +150,7 @@ public class AcceptChannelV2 extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.AcceptChannelV2 b) {
-               boolean ret = bindings.AcceptChannelV2_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.AcceptChannelV2_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 24ce08e4376372046179c9416aedd0bf4de5d1f6..00231645a6db96dc9b7fde06d905fd46b1a6ecf4 100644 (file)
@@ -14,13 +14,54 @@ import javax.annotation.Nullable;
  */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class Amount extends CommonBase {
-       Amount(Object _dummy, long ptr) { super(ptr); }
+       private Amount(Object _dummy, long ptr) { super(ptr); }
        @Override @SuppressWarnings("deprecation")
        protected void finalize() throws Throwable {
                super.finalize();
                if (ptr != 0) { bindings.Amount_free(ptr); }
        }
+       static Amount constr_from_ptr(long ptr) {
+               bindings.LDKAmount raw_val = bindings.LDKAmount_ref_from_ptr(ptr);
+               if (raw_val.getClass() == bindings.LDKAmount.Bitcoin.class) {
+                       return new Bitcoin(ptr, (bindings.LDKAmount.Bitcoin)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKAmount.Currency.class) {
+                       return new Currency(ptr, (bindings.LDKAmount.Currency)raw_val);
+               }
+               assert false; return null; // Unreachable without extending the (internal) bindings interface
+       }
 
+       /**
+        * An amount of bitcoin.
+        */
+       public final static class Bitcoin extends Amount {
+               /**
+                * The amount in millisatoshi.
+               */
+               public final long amount_msats;
+               private Bitcoin(long ptr, bindings.LDKAmount.Bitcoin obj) {
+                       super(null, ptr);
+                       this.amount_msats = obj.amount_msats;
+               }
+       }
+       /**
+        * An amount of currency specified using ISO 4712.
+        */
+       public final static class Currency extends Amount {
+               /**
+                * The currency that the amount is denominated in.
+               */
+               public final byte[] iso4217_code;
+               /**
+                * The amount in the currency unit adjusted by the ISO 4712 exponent (e.g., USD cents).
+               */
+               public final long amount;
+               private Currency(long ptr, bindings.LDKAmount.Currency obj) {
+                       super(null, ptr);
+                       this.iso4217_code = obj.iso4217_code;
+                       this.amount = obj.amount;
+               }
+       }
        long clone_ptr() {
                long ret = bindings.Amount_clone_ptr(this.ptr);
                Reference.reachabilityFence(this);
@@ -34,9 +75,34 @@ public class Amount extends CommonBase {
                long ret = bindings.Amount_clone(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); }
+               org.ldk.structs.Amount ret_hu_conv = org.ldk.structs.Amount.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new Bitcoin-variant Amount
+        */
+       public static Amount bitcoin(long amount_msats) {
+               long ret = bindings.Amount_bitcoin(amount_msats);
+               Reference.reachabilityFence(amount_msats);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Amount ret_hu_conv = org.ldk.structs.Amount.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new Currency-variant Amount
+        */
+       public static Amount currency(byte[] iso4217_code, long amount) {
+               long ret = bindings.Amount_currency(InternalUtils.check_arr_len(iso4217_code, 3), amount);
+               Reference.reachabilityFence(iso4217_code);
+               Reference.reachabilityFence(amount);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Amount ret_hu_conv = org.ldk.structs.Amount.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
 }
index d843af52d41d992cad1350d958d88d96c8bb26e8..f821d70731937bad5469ce4c3e5c4a81f2b45bc8 100644 (file)
@@ -36,7 +36,7 @@ public class AnchorDescriptor extends CommonBase {
         * The parameters required to derive the signer for the anchor input.
         */
        public void set_channel_derivation_parameters(org.ldk.structs.ChannelDerivationParameters val) {
-               bindings.AnchorDescriptor_set_channel_derivation_parameters(this.ptr, val == null ? 0 : val.ptr);
+               bindings.AnchorDescriptor_set_channel_derivation_parameters(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -60,7 +60,7 @@ public class AnchorDescriptor extends CommonBase {
         * output.
         */
        public void set_outpoint(org.ldk.structs.OutPoint val) {
-               bindings.AnchorDescriptor_set_outpoint(this.ptr, val == null ? 0 : val.ptr);
+               bindings.AnchorDescriptor_set_outpoint(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -70,7 +70,7 @@ public class AnchorDescriptor extends CommonBase {
         * Constructs a new AnchorDescriptor given each field
         */
        public static AnchorDescriptor of(org.ldk.structs.ChannelDerivationParameters channel_derivation_parameters_arg, org.ldk.structs.OutPoint outpoint_arg) {
-               long ret = bindings.AnchorDescriptor_new(channel_derivation_parameters_arg == null ? 0 : channel_derivation_parameters_arg.ptr, outpoint_arg == null ? 0 : outpoint_arg.ptr);
+               long ret = bindings.AnchorDescriptor_new(channel_derivation_parameters_arg.ptr, outpoint_arg.ptr);
                Reference.reachabilityFence(channel_derivation_parameters_arg);
                Reference.reachabilityFence(outpoint_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -105,7 +105,7 @@ public class AnchorDescriptor extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.AnchorDescriptor b) {
-               boolean ret = bindings.AnchorDescriptor_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.AnchorDescriptor_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 61af592a5b50f0c7269b1f50d13f441fc724f37f..a8f0837cbd8500d5c28c4ab33bddb6c841473ac5 100644 (file)
@@ -25,19 +25,23 @@ public class AnnouncementSignatures extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.AnnouncementSignatures_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.AnnouncementSignatures_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.AnnouncementSignatures_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.AnnouncementSignatures_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -97,8 +101,8 @@ public class AnnouncementSignatures extends CommonBase {
        /**
         * Constructs a new AnnouncementSignatures given each field
         */
-       public static AnnouncementSignatures of(byte[] channel_id_arg, long short_channel_id_arg, byte[] node_signature_arg, byte[] bitcoin_signature_arg) {
-               long ret = bindings.AnnouncementSignatures_new(InternalUtils.check_arr_len(channel_id_arg, 32), short_channel_id_arg, InternalUtils.check_arr_len(node_signature_arg, 64), InternalUtils.check_arr_len(bitcoin_signature_arg, 64));
+       public static AnnouncementSignatures of(org.ldk.structs.ChannelId channel_id_arg, long short_channel_id_arg, byte[] node_signature_arg, byte[] bitcoin_signature_arg) {
+               long ret = bindings.AnnouncementSignatures_new(channel_id_arg.ptr, short_channel_id_arg, InternalUtils.check_arr_len(node_signature_arg, 64), InternalUtils.check_arr_len(bitcoin_signature_arg, 64));
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(short_channel_id_arg);
                Reference.reachabilityFence(node_signature_arg);
@@ -106,6 +110,7 @@ public class AnnouncementSignatures extends CommonBase {
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.AnnouncementSignatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.AnnouncementSignatures(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                return ret_hu_conv;
        }
 
@@ -145,7 +150,7 @@ public class AnnouncementSignatures extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.AnnouncementSignatures b) {
-               boolean ret = bindings.AnnouncementSignatures_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.AnnouncementSignatures_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index cb7674ab79d603e48ba555ad1ab6926fcddf9b6c..a6dac689779b9810dfeb01a35a89604b0c3e6ec5 100644 (file)
@@ -31,6 +31,8 @@ import javax.annotation.Nullable;
  * However, as long as [`ChannelMonitor`] backups are sound, no funds besides those used for
  * unilateral chain closure fees are at risk.
  * 
+ * [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager
+ * [`ChannelManager::timer_tick_occurred`]: lightning::ln::channelmanager::ChannelManager::timer_tick_occurred
  * [`ChannelMonitor`]: lightning::chain::channelmonitor::ChannelMonitor
  * [`Event`]: lightning::events::Event
  * [`PeerManager::timer_tick_occurred`]: lightning::ln::peer_handler::PeerManager::timer_tick_occurred
@@ -93,7 +95,7 @@ public class BackgroundProcessor extends CommonBase {
         * [`NetworkGraph::write`]: lightning::routing::gossip::NetworkGraph#impl-Writeable
         */
        public static BackgroundProcessor start(org.ldk.structs.Persister persister, org.ldk.structs.EventHandler event_handler, org.ldk.structs.ChainMonitor chain_monitor, org.ldk.structs.ChannelManager channel_manager, org.ldk.structs.GossipSync gossip_sync, org.ldk.structs.PeerManager peer_manager, org.ldk.structs.Logger logger, org.ldk.structs.Option_WriteableScoreZ scorer) {
-               long ret = bindings.BackgroundProcessor_start(persister.ptr, event_handler.ptr, chain_monitor == null ? 0 : chain_monitor.ptr, channel_manager == null ? 0 : channel_manager.ptr, gossip_sync.ptr, peer_manager == null ? 0 : peer_manager.ptr, logger.ptr, scorer.ptr);
+               long ret = bindings.BackgroundProcessor_start(persister.ptr, event_handler.ptr, chain_monitor.ptr, channel_manager.ptr, gossip_sync.ptr, peer_manager.ptr, logger.ptr, scorer.ptr);
                Reference.reachabilityFence(persister);
                Reference.reachabilityFence(event_handler);
                Reference.reachabilityFence(chain_monitor);
index cf11e198f5d194839342fb78e7ca18862ab05bf3..e46e85c47495fb1c53ecdebd8665d46e3260e3b9 100644 (file)
@@ -295,7 +295,7 @@ public class Balance extends CommonBase {
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.Balance b) {
-               boolean ret = bindings.Balance_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Balance_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
index fa485b60437407f3296492ff8570634f45b92b03..f7f60859b92da1891b5d044f2783d90e5b8a7db6 100644 (file)
@@ -20,6 +20,55 @@ public class BestBlock extends CommonBase {
                if (ptr != 0) { bindings.BestBlock_free(ptr); }
        }
 
+       /**
+        * The block's hash
+        */
+       public byte[] get_block_hash() {
+               byte[] ret = bindings.BestBlock_get_block_hash(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * The block's hash
+        */
+       public void set_block_hash(byte[] val) {
+               bindings.BestBlock_set_block_hash(this.ptr, InternalUtils.check_arr_len(val, 32));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * The height at which the block was confirmed.
+        */
+       public int get_height() {
+               int ret = bindings.BestBlock_get_height(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * The height at which the block was confirmed.
+        */
+       public void set_height(int val) {
+               bindings.BestBlock_set_height(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * Constructs a new BestBlock given each field
+        */
+       public static BestBlock of(byte[] block_hash_arg, int height_arg) {
+               long ret = bindings.BestBlock_new(InternalUtils.check_arr_len(block_hash_arg, 32), height_arg);
+               Reference.reachabilityFence(block_hash_arg);
+               Reference.reachabilityFence(height_arg);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.BestBlock ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BestBlock(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
        long clone_ptr() {
                long ret = bindings.BestBlock_clone_ptr(this.ptr);
                Reference.reachabilityFence(this);
@@ -38,13 +87,25 @@ public class BestBlock extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Generates a non-cryptographic 64-bit hash of the BestBlock.
+        */
+       public long hash() {
+               long ret = bindings.BestBlock_hash(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       @Override public int hashCode() {
+               return (int)this.hash();
+       }
        /**
         * Checks if two BestBlocks 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.
         */
        public boolean eq(org.ldk.structs.BestBlock b) {
-               boolean ret = bindings.BestBlock_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.BestBlock_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -69,34 +130,23 @@ public class BestBlock extends CommonBase {
        }
 
        /**
-        * Returns a `BestBlock` as identified by the given block hash and height.
+        * Serialize the BestBlock object into a byte array which can be read by BestBlock_read
         */
-       public static BestBlock of(byte[] block_hash, int height) {
-               long ret = bindings.BestBlock_new(InternalUtils.check_arr_len(block_hash, 32), height);
-               Reference.reachabilityFence(block_hash);
-               Reference.reachabilityFence(height);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.BestBlock ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BestBlock(null, ret); }
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
-               return ret_hu_conv;
-       }
-
-       /**
-        * Returns the best block hash.
-        */
-       public byte[] block_hash() {
-               byte[] ret = bindings.BestBlock_block_hash(this.ptr);
+       public byte[] write() {
+               byte[] ret = bindings.BestBlock_write(this.ptr);
                Reference.reachabilityFence(this);
                return ret;
        }
 
        /**
-        * Returns the best block height.
+        * Read a BestBlock from a byte array, created by BestBlock_write
         */
-       public int height() {
-               int ret = bindings.BestBlock_height(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
+       public static Result_BestBlockDecodeErrorZ read(byte[] ser) {
+               long ret = bindings.BestBlock_read(ser);
+               Reference.reachabilityFence(ser);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_BestBlockDecodeErrorZ ret_hu_conv = Result_BestBlockDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
        }
 
 }
index 421d9e6b5b9d6ebba3f09b17c135aa71cd27049e..fd0275fde1c9eefdb44fc12842f7be44f20df979 100644 (file)
@@ -86,7 +86,7 @@ public class BigSize extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.BigSize b) {
-               boolean ret = bindings.BigSize_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.BigSize_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 4675ebc579a9cda0b965b80bd195e3535b366500..6172aa20d8fe37be16753a96149a0a9f232718bb 100644 (file)
@@ -111,7 +111,7 @@ public class BlindedForward extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.BlindedForward b) {
-               boolean ret = bindings.BlindedForward_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.BlindedForward_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 9ca3a8ddf87b963e755eab1b32b158b23dceb291..6acd1512b203a5c1708400540b09e31e1dc6176d 100644 (file)
@@ -109,7 +109,7 @@ public class BlindedHop extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.BlindedHop b) {
-               boolean ret = bindings.BlindedHop_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.BlindedHop_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index ede23d2f4040012ecfcfcb167dff1588cb8c649c..8d13ba0eb58f344e1744789d13c9977cd419a446 100644 (file)
@@ -26,7 +26,7 @@ public class BlindedHopFeatures extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.BlindedHopFeatures b) {
-               boolean ret = bindings.BlindedHopFeatures_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.BlindedHopFeatures_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -82,7 +82,7 @@ public class BlindedHopFeatures extends CommonBase {
         * Returns true if this `Features` object contains required features unknown by `other`.
         */
        public boolean requires_unknown_bits_from(org.ldk.structs.BlindedHopFeatures other) {
-               boolean ret = bindings.BlindedHopFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr);
+               boolean ret = bindings.BlindedHopFeatures_requires_unknown_bits_from(this.ptr, other.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(other);
                if (this != null) { this.ptrs_to.add(other); };
index fcf11431b137b667ea0d16858e6c3162c8deeec1..5861f015d28ad8084f4dcbf4ac466a42a73701c6 100644 (file)
@@ -23,28 +23,32 @@ public class BlindedPath extends CommonBase {
 
        /**
         * To send to a blinded path, the sender first finds a route to the unblinded
-        * `introduction_node_id`, which can unblind its [`encrypted_payload`] to find out the onion
+        * `introduction_node`, which can unblind its [`encrypted_payload`] to find out the onion
         * message or payment's next hop and forward it along.
         * 
         * [`encrypted_payload`]: BlindedHop::encrypted_payload
         */
-       public byte[] get_introduction_node_id() {
-               byte[] ret = bindings.BlindedPath_get_introduction_node_id(this.ptr);
+       public IntroductionNode get_introduction_node() {
+               long ret = bindings.BlindedPath_get_introduction_node(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.IntroductionNode ret_hu_conv = org.ldk.structs.IntroductionNode.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * To send to a blinded path, the sender first finds a route to the unblinded
-        * `introduction_node_id`, which can unblind its [`encrypted_payload`] to find out the onion
+        * `introduction_node`, which can unblind its [`encrypted_payload`] to find out the onion
         * message or payment's next hop and forward it along.
         * 
         * [`encrypted_payload`]: BlindedHop::encrypted_payload
         */
-       public void set_introduction_node_id(byte[] val) {
-               bindings.BlindedPath_set_introduction_node_id(this.ptr, InternalUtils.check_arr_len(val, 33));
+       public void set_introduction_node(org.ldk.structs.IntroductionNode val) {
+               bindings.BlindedPath_set_introduction_node(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -92,7 +96,7 @@ public class BlindedPath extends CommonBase {
         * The hops composing the blinded path.
         */
        public void set_blinded_hops(BlindedHop[] val) {
-               bindings.BlindedPath_set_blinded_hops(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_12 -> val_conv_12 == null ? 0 : val_conv_12.ptr).toArray() : null);
+               bindings.BlindedPath_set_blinded_hops(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_12 -> val_conv_12.ptr).toArray() : null);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                for (BlindedHop val_conv_12: val) { if (this != null) { this.ptrs_to.add(val_conv_12); }; };
@@ -101,14 +105,15 @@ public class BlindedPath extends CommonBase {
        /**
         * Constructs a new BlindedPath given each field
         */
-       public static BlindedPath of(byte[] introduction_node_id_arg, byte[] blinding_point_arg, BlindedHop[] blinded_hops_arg) {
-               long ret = bindings.BlindedPath_new(InternalUtils.check_arr_len(introduction_node_id_arg, 33), InternalUtils.check_arr_len(blinding_point_arg, 33), blinded_hops_arg != null ? Arrays.stream(blinded_hops_arg).mapToLong(blinded_hops_arg_conv_12 -> blinded_hops_arg_conv_12 == null ? 0 : blinded_hops_arg_conv_12.ptr).toArray() : null);
-               Reference.reachabilityFence(introduction_node_id_arg);
+       public static BlindedPath of(org.ldk.structs.IntroductionNode introduction_node_arg, byte[] blinding_point_arg, BlindedHop[] blinded_hops_arg) {
+               long ret = bindings.BlindedPath_new(introduction_node_arg.ptr, InternalUtils.check_arr_len(blinding_point_arg, 33), blinded_hops_arg != null ? Arrays.stream(blinded_hops_arg).mapToLong(blinded_hops_arg_conv_12 -> blinded_hops_arg_conv_12.ptr).toArray() : null);
+               Reference.reachabilityFence(introduction_node_arg);
                Reference.reachabilityFence(blinding_point_arg);
                Reference.reachabilityFence(blinded_hops_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.BlindedPath ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BlindedPath(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(introduction_node_arg); };
                for (BlindedHop blinded_hops_arg_conv_12: blinded_hops_arg) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(blinded_hops_arg_conv_12); }; };
                return ret_hu_conv;
        }
@@ -149,7 +154,7 @@ public class BlindedPath extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.BlindedPath b) {
-               boolean ret = bindings.BlindedPath_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.BlindedPath_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -189,6 +194,24 @@ public class BlindedPath extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Returns the introduction [`NodeId`] of the blinded path, if it is publicly reachable (i.e.,
+        * it is found in the network graph).
+        * 
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       @Nullable
+       public NodeId public_introduction_node_id(org.ldk.structs.ReadOnlyNetworkGraph network_graph) {
+               long ret = bindings.BlindedPath_public_introduction_node_id(this.ptr, network_graph.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(network_graph);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.NodeId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.NodeId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               if (this != null) { this.ptrs_to.add(network_graph); };
+               return ret_hu_conv;
+       }
+
        /**
         * Serialize the BlindedPath object into a byte array which can be read by BlindedPath_read
         */
index fe7d519ed7709bba3f60784bb76e1236a1a1ebfc..e575c503fd7203f080eeafcf5cfea467b494f4be 100644 (file)
@@ -140,7 +140,7 @@ public class BlindedPayInfo extends CommonBase {
         * onion payload.
         */
        public void set_features(org.ldk.structs.BlindedHopFeatures val) {
-               bindings.BlindedPayInfo_set_features(this.ptr, val == null ? 0 : val.ptr);
+               bindings.BlindedPayInfo_set_features(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -150,7 +150,7 @@ public class BlindedPayInfo extends CommonBase {
         * Constructs a new BlindedPayInfo given each field
         */
        public static BlindedPayInfo of(int fee_base_msat_arg, int fee_proportional_millionths_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg, long htlc_maximum_msat_arg, org.ldk.structs.BlindedHopFeatures features_arg) {
-               long ret = bindings.BlindedPayInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, features_arg == null ? 0 : features_arg.ptr);
+               long ret = bindings.BlindedPayInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, features_arg.ptr);
                Reference.reachabilityFence(fee_base_msat_arg);
                Reference.reachabilityFence(fee_proportional_millionths_arg);
                Reference.reachabilityFence(cltv_expiry_delta_arg);
@@ -200,7 +200,7 @@ public class BlindedPayInfo extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.BlindedPayInfo b) {
-               boolean ret = bindings.BlindedPayInfo_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.BlindedPayInfo_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index e2e7b71fb97ec47e90b1849dbc6d18fca73f400e..c9e59fc80768c7b1907898f787248a86a9df64e8 100644 (file)
@@ -48,7 +48,7 @@ public class BlindedTail extends CommonBase {
         * [`BlindedPath`]: crate::blinded_path::BlindedPath
         */
        public void set_hops(BlindedHop[] val) {
-               bindings.BlindedTail_set_hops(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_12 -> val_conv_12 == null ? 0 : val_conv_12.ptr).toArray() : null);
+               bindings.BlindedTail_set_hops(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_12 -> val_conv_12.ptr).toArray() : null);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                for (BlindedHop val_conv_12: val) { if (this != null) { this.ptrs_to.add(val_conv_12); }; };
@@ -118,7 +118,7 @@ public class BlindedTail extends CommonBase {
         * Constructs a new BlindedTail given each field
         */
        public static BlindedTail of(BlindedHop[] hops_arg, byte[] blinding_point_arg, int excess_final_cltv_expiry_delta_arg, long final_value_msat_arg) {
-               long ret = bindings.BlindedTail_new(hops_arg != null ? Arrays.stream(hops_arg).mapToLong(hops_arg_conv_12 -> hops_arg_conv_12 == null ? 0 : hops_arg_conv_12.ptr).toArray() : null, InternalUtils.check_arr_len(blinding_point_arg, 33), excess_final_cltv_expiry_delta_arg, final_value_msat_arg);
+               long ret = bindings.BlindedTail_new(hops_arg != null ? Arrays.stream(hops_arg).mapToLong(hops_arg_conv_12 -> hops_arg_conv_12.ptr).toArray() : null, InternalUtils.check_arr_len(blinding_point_arg, 33), excess_final_cltv_expiry_delta_arg, final_value_msat_arg);
                Reference.reachabilityFence(hops_arg);
                Reference.reachabilityFence(blinding_point_arg);
                Reference.reachabilityFence(excess_final_cltv_expiry_delta_arg);
@@ -166,7 +166,7 @@ public class BlindedTail extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.BlindedTail b) {
-               boolean ret = bindings.BlindedTail_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.BlindedTail_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index efe7e133837e2b7946de2f32c5d8c58e6e821b3b..67e9f44beb63214e2efeffc44eb4ae598707907e 100644 (file)
@@ -33,7 +33,7 @@ public class Bolt11Invoice extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.Bolt11Invoice b) {
-               boolean ret = bindings.Bolt11Invoice_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Bolt11Invoice_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -130,7 +130,7 @@ public class Bolt11Invoice extends CommonBase {
         * ```
         */
        public static Result_Bolt11InvoiceBolt11SemanticErrorZ from_signed(org.ldk.structs.SignedRawBolt11Invoice signed_invoice) {
-               long ret = bindings.Bolt11Invoice_from_signed(signed_invoice == null ? 0 : signed_invoice.ptr);
+               long ret = bindings.Bolt11Invoice_from_signed(signed_invoice.ptr);
                Reference.reachabilityFence(signed_invoice);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_Bolt11InvoiceBolt11SemanticErrorZ ret_hu_conv = Result_Bolt11InvoiceBolt11SemanticErrorZ.constr_from_ptr(ret);
@@ -222,6 +222,16 @@ public class Bolt11Invoice extends CommonBase {
                return ret;
        }
 
+       /**
+        * Recover the payee's public key if one was included in the invoice, otherwise return the
+        * recovered public key from the signature
+        */
+       public byte[] get_payee_pub_key() {
+               byte[] ret = bindings.Bolt11Invoice_get_payee_pub_key(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
        /**
         * Returns the Duration since the Unix epoch at which the invoice expires.
         * Returning None if overflow occurred.
index 8cdc3093036dcd87d9d86585f9841e37bf510628..cc4e156dc473a9f2d581d30e1f129eac1694842b 100644 (file)
@@ -26,7 +26,7 @@ public class Bolt11InvoiceFeatures extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.Bolt11InvoiceFeatures b) {
-               boolean ret = bindings.Bolt11InvoiceFeatures_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Bolt11InvoiceFeatures_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -82,7 +82,7 @@ public class Bolt11InvoiceFeatures extends CommonBase {
         * Returns true if this `Features` object contains required features unknown by `other`.
         */
        public boolean requires_unknown_bits_from(org.ldk.structs.Bolt11InvoiceFeatures other) {
-               boolean ret = bindings.Bolt11InvoiceFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr);
+               boolean ret = bindings.Bolt11InvoiceFeatures_requires_unknown_bits_from(this.ptr, other.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(other);
                if (this != null) { this.ptrs_to.add(other); };
@@ -327,4 +327,38 @@ public class Bolt11InvoiceFeatures extends CommonBase {
                return ret;
        }
 
+       /**
+        * Set this feature as optional.
+        */
+       public void set_trampoline_routing_optional() {
+               bindings.Bolt11InvoiceFeatures_set_trampoline_routing_optional(this.ptr);
+               Reference.reachabilityFence(this);
+       }
+
+       /**
+        * Set this feature as required.
+        */
+       public void set_trampoline_routing_required() {
+               bindings.Bolt11InvoiceFeatures_set_trampoline_routing_required(this.ptr);
+               Reference.reachabilityFence(this);
+       }
+
+       /**
+        * Checks if this feature is supported.
+        */
+       public boolean supports_trampoline_routing() {
+               boolean ret = bindings.Bolt11InvoiceFeatures_supports_trampoline_routing(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Checks if this feature is required.
+        */
+       public boolean requires_trampoline_routing() {
+               boolean ret = bindings.Bolt11InvoiceFeatures_requires_trampoline_routing(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
 }
index f9d7288b35c4940bf71dc32800d5aa66ad3731c1..7ea69a15333cdbfe1a081ec7ffeae7365f5247ac 100644 (file)
@@ -56,7 +56,7 @@ public class Bolt11InvoiceSignature extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.Bolt11InvoiceSignature b) {
-               boolean ret = bindings.Bolt11InvoiceSignature_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Bolt11InvoiceSignature_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 77aba0121857fc82da64ea43e7cb958c09563cb9..6112483129972fca8c8882c84542c196c43c23a4 100644 (file)
@@ -417,7 +417,7 @@ public class Bolt11ParseError extends CommonBase {
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.Bolt11ParseError b) {
-               boolean ret = bindings.Bolt11ParseError_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Bolt11ParseError_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
index 6f32a09db79954d487265865ac972a2ea80fc4e2..77ad79fd1ab5409d3a063a5af89ff748ff1a5c59 100644 (file)
@@ -102,15 +102,12 @@ public class Bolt12Invoice extends CommonBase {
         * 
         * [`Offer`]: crate::offers::offer::Offer
         * [`Offer::amount`]: crate::offers::offer::Offer::amount
-        * 
-        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       @Nullable
-       public Amount amount() {
+       public Option_AmountZ amount() {
                long ret = bindings.Bolt12Invoice_amount(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); }
+               org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
@@ -142,7 +139,10 @@ public class Bolt12Invoice extends CommonBase {
         * 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
         */
+       @Nullable
        public PrintableString description() {
                long ret = bindings.Bolt12Invoice_description(this.ptr);
                Reference.reachabilityFence(this);
@@ -215,15 +215,12 @@ public class Bolt12Invoice extends CommonBase {
         * [`Refund`].
         * 
         * [`Offer::supported_quantity`]: crate::offers::offer::Offer::supported_quantity
-        * 
-        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       @Nullable
-       public Quantity supported_quantity() {
+       public Option_QuantityZ supported_quantity() {
                long ret = bindings.Bolt12Invoice_supported_quantity(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); }
+               org.ldk.structs.Option_QuantityZ ret_hu_conv = org.ldk.structs.Option_QuantityZ.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
@@ -386,7 +383,7 @@ public class Bolt12Invoice extends CommonBase {
         * the associated [`PaymentId`] to use when sending the payment.
         */
        public Result_ThirtyTwoBytesNoneZ verify(org.ldk.structs.ExpandedKey key) {
-               long ret = bindings.Bolt12Invoice_verify(this.ptr, key == null ? 0 : key.ptr);
+               long ret = bindings.Bolt12Invoice_verify(this.ptr, key.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(key);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -395,6 +392,18 @@ public class Bolt12Invoice extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Generates a non-cryptographic 64-bit hash of the Bolt12Invoice.
+        */
+       public long hash() {
+               long ret = bindings.Bolt12Invoice_hash(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       @Override public int hashCode() {
+               return (int)this.hash();
+       }
        /**
         * Serialize the Bolt12Invoice object into a byte array which can be read by Bolt12Invoice_read
         */
index 4cd2230c256631473e5de43b93e9e43616562633..6dbd72cc168e8cb23cb9142e513cf3803bf85e3b 100644 (file)
@@ -26,7 +26,7 @@ public class Bolt12InvoiceFeatures extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.Bolt12InvoiceFeatures b) {
-               boolean ret = bindings.Bolt12InvoiceFeatures_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Bolt12InvoiceFeatures_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -82,7 +82,7 @@ public class Bolt12InvoiceFeatures extends CommonBase {
         * Returns true if this `Features` object contains required features unknown by `other`.
         */
        public boolean requires_unknown_bits_from(org.ldk.structs.Bolt12InvoiceFeatures other) {
-               boolean ret = bindings.Bolt12InvoiceFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr);
+               boolean ret = bindings.Bolt12InvoiceFeatures_requires_unknown_bits_from(this.ptr, other.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(other);
                if (this != null) { this.ptrs_to.add(other); };
diff --git a/src/main/java/org/ldk/structs/Bolt12OfferContext.java b/src/main/java/org/ldk/structs/Bolt12OfferContext.java
new file mode 100644 (file)
index 0000000..cc84552
--- /dev/null
@@ -0,0 +1,149 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * The context of a payment made for an invoice requested from a BOLT 12 [`Offer`].
+ * 
+ * [`Offer`]: crate::offers::offer::Offer
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Bolt12OfferContext extends CommonBase {
+       Bolt12OfferContext(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.Bolt12OfferContext_free(ptr); }
+       }
+
+       /**
+        * The identifier of the [`Offer`].
+        * 
+        * [`Offer`]: crate::offers::offer::Offer
+        */
+       public OfferId get_offer_id() {
+               long ret = bindings.Bolt12OfferContext_get_offer_id(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.OfferId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * The identifier of the [`Offer`].
+        * 
+        * [`Offer`]: crate::offers::offer::Offer
+        */
+       public void set_offer_id(org.ldk.structs.OfferId val) {
+               bindings.Bolt12OfferContext_set_offer_id(this.ptr, val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
+       }
+
+       /**
+        * Fields from an [`InvoiceRequest`] sent for a [`Bolt12Invoice`].
+        * 
+        * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+        * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+        */
+       public InvoiceRequestFields get_invoice_request() {
+               long ret = bindings.Bolt12OfferContext_get_invoice_request(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.InvoiceRequestFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvoiceRequestFields(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Fields from an [`InvoiceRequest`] sent for a [`Bolt12Invoice`].
+        * 
+        * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+        * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+        */
+       public void set_invoice_request(org.ldk.structs.InvoiceRequestFields val) {
+               bindings.Bolt12OfferContext_set_invoice_request(this.ptr, val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
+       }
+
+       /**
+        * Constructs a new Bolt12OfferContext given each field
+        */
+       public static Bolt12OfferContext of(org.ldk.structs.OfferId offer_id_arg, org.ldk.structs.InvoiceRequestFields invoice_request_arg) {
+               long ret = bindings.Bolt12OfferContext_new(offer_id_arg.ptr, invoice_request_arg.ptr);
+               Reference.reachabilityFence(offer_id_arg);
+               Reference.reachabilityFence(invoice_request_arg);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Bolt12OfferContext ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Bolt12OfferContext(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(offer_id_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(invoice_request_arg); };
+               return ret_hu_conv;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.Bolt12OfferContext_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the Bolt12OfferContext
+        */
+       public Bolt12OfferContext clone() {
+               long ret = bindings.Bolt12OfferContext_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Bolt12OfferContext ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Bolt12OfferContext(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if two Bolt12OfferContexts 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.
+        */
+       public boolean eq(org.ldk.structs.Bolt12OfferContext b) {
+               boolean ret = bindings.Bolt12OfferContext_eq(this.ptr, b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof Bolt12OfferContext)) return false;
+               return this.eq((Bolt12OfferContext)o);
+       }
+       /**
+        * Serialize the Bolt12OfferContext object into a byte array which can be read by Bolt12OfferContext_read
+        */
+       public byte[] write() {
+               byte[] ret = bindings.Bolt12OfferContext_write(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Read a Bolt12OfferContext from a byte array, created by Bolt12OfferContext_write
+        */
+       public static Result_Bolt12OfferContextDecodeErrorZ read(byte[] ser) {
+               long ret = bindings.Bolt12OfferContext_read(ser);
+               Reference.reachabilityFence(ser);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_Bolt12OfferContextDecodeErrorZ ret_hu_conv = Result_Bolt12OfferContextDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/Bolt12RefundContext.java b/src/main/java/org/ldk/structs/Bolt12RefundContext.java
new file mode 100644 (file)
index 0000000..3fe8791
--- /dev/null
@@ -0,0 +1,91 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * The context of a payment made for an invoice sent for a BOLT 12 [`Refund`].
+ * 
+ * [`Refund`]: crate::offers::refund::Refund
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Bolt12RefundContext extends CommonBase {
+       Bolt12RefundContext(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.Bolt12RefundContext_free(ptr); }
+       }
+
+       /**
+        * Constructs a new Bolt12RefundContext given each field
+        */
+       public static Bolt12RefundContext of() {
+               long ret = bindings.Bolt12RefundContext_new();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Bolt12RefundContext ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Bolt12RefundContext(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.Bolt12RefundContext_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the Bolt12RefundContext
+        */
+       public Bolt12RefundContext clone() {
+               long ret = bindings.Bolt12RefundContext_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Bolt12RefundContext ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Bolt12RefundContext(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if two Bolt12RefundContexts 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.
+        */
+       public boolean eq(org.ldk.structs.Bolt12RefundContext b) {
+               boolean ret = bindings.Bolt12RefundContext_eq(this.ptr, b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof Bolt12RefundContext)) return false;
+               return this.eq((Bolt12RefundContext)o);
+       }
+       /**
+        * Serialize the Bolt12RefundContext object into a byte array which can be read by Bolt12RefundContext_read
+        */
+       public byte[] write() {
+               byte[] ret = bindings.Bolt12RefundContext_write(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Read a Bolt12RefundContext from a byte array, created by Bolt12RefundContext_write
+        */
+       public static Result_Bolt12RefundContextDecodeErrorZ read(byte[] ser) {
+               long ret = bindings.Bolt12RefundContext_read(ser);
+               Reference.reachabilityFence(ser);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_Bolt12RefundContextDecodeErrorZ ret_hu_conv = Result_Bolt12RefundContextDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
index 0b0b19048fc8f493793f820aa52e7b98a15d2445..455fb188b5924929e822371830dbf0ed9095468e 100644 (file)
@@ -72,6 +72,14 @@ public class BumpTransactionEvent extends CommonBase {
         * [`build_anchor_input_witness`]: crate::ln::chan_utils::build_anchor_input_witness
         */
        public final static class ChannelClose extends BumpTransactionEvent {
+               /**
+                * The `channel_id` of the channel which has been closed.
+               */
+               public final org.ldk.structs.ChannelId channel_id;
+               /**
+                * Counterparty in the closed channel.
+               */
+               public final byte[] counterparty_node_id;
                /**
                 * The unique identifier for the claim of the anchor output in the commitment transaction.
                 * 
@@ -108,6 +116,11 @@ public class BumpTransactionEvent extends CommonBase {
                public final HTLCOutputInCommitment[] pending_htlcs;
                private ChannelClose(long ptr, bindings.LDKBumpTransactionEvent.ChannelClose obj) {
                        super(null, ptr);
+                       long channel_id = obj.channel_id;
+                       org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); }
+                       if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
+                       this.channel_id = channel_id_hu_conv;
+                       this.counterparty_node_id = obj.counterparty_node_id;
                        this.claim_id = obj.claim_id;
                        this.package_target_feerate_sat_per_1000_weight = obj.package_target_feerate_sat_per_1000_weight;
                        this.commitment_tx = obj.commitment_tx;
@@ -160,6 +173,14 @@ public class BumpTransactionEvent extends CommonBase {
         * [`EcdsaChannelSigner::sign_holder_htlc_transaction`]: crate::sign::ecdsa::EcdsaChannelSigner::sign_holder_htlc_transaction
         */
        public final static class HTLCResolution extends BumpTransactionEvent {
+               /**
+                * The `channel_id` of the channel which has been closed.
+               */
+               public final org.ldk.structs.ChannelId channel_id;
+               /**
+                * Counterparty in the closed channel.
+               */
+               public final byte[] counterparty_node_id;
                /**
                 * The unique identifier for the claim of the HTLCs in the confirmed commitment
                 * transaction.
@@ -184,6 +205,11 @@ public class BumpTransactionEvent extends CommonBase {
                public final int tx_lock_time;
                private HTLCResolution(long ptr, bindings.LDKBumpTransactionEvent.HTLCResolution obj) {
                        super(null, ptr);
+                       long channel_id = obj.channel_id;
+                       org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); }
+                       if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
+                       this.channel_id = channel_id_hu_conv;
+                       this.counterparty_node_id = obj.counterparty_node_id;
                        this.claim_id = obj.claim_id;
                        this.target_feerate_sat_per_1000_weight = obj.target_feerate_sat_per_1000_weight;
                        long[] htlc_descriptors = obj.htlc_descriptors;
@@ -220,8 +246,10 @@ public class BumpTransactionEvent extends CommonBase {
        /**
         * Utility method to constructs a new ChannelClose-variant BumpTransactionEvent
         */
-       public static BumpTransactionEvent channel_close(byte[] claim_id, int package_target_feerate_sat_per_1000_weight, byte[] commitment_tx, long commitment_tx_fee_satoshis, org.ldk.structs.AnchorDescriptor anchor_descriptor, HTLCOutputInCommitment[] pending_htlcs) {
-               long ret = bindings.BumpTransactionEvent_channel_close(InternalUtils.check_arr_len(claim_id, 32), package_target_feerate_sat_per_1000_weight, commitment_tx, commitment_tx_fee_satoshis, anchor_descriptor == null ? 0 : anchor_descriptor.ptr, pending_htlcs != null ? Arrays.stream(pending_htlcs).mapToLong(pending_htlcs_conv_24 -> pending_htlcs_conv_24 == null ? 0 : pending_htlcs_conv_24.ptr).toArray() : null);
+       public static BumpTransactionEvent channel_close(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id, byte[] claim_id, int package_target_feerate_sat_per_1000_weight, byte[] commitment_tx, long commitment_tx_fee_satoshis, org.ldk.structs.AnchorDescriptor anchor_descriptor, HTLCOutputInCommitment[] pending_htlcs) {
+               long ret = bindings.BumpTransactionEvent_channel_close(channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), InternalUtils.check_arr_len(claim_id, 32), package_target_feerate_sat_per_1000_weight, commitment_tx, commitment_tx_fee_satoshis, anchor_descriptor.ptr, pending_htlcs != null ? Arrays.stream(pending_htlcs).mapToLong(pending_htlcs_conv_24 -> pending_htlcs_conv_24.ptr).toArray() : null);
+               Reference.reachabilityFence(channel_id);
+               Reference.reachabilityFence(counterparty_node_id);
                Reference.reachabilityFence(claim_id);
                Reference.reachabilityFence(package_target_feerate_sat_per_1000_weight);
                Reference.reachabilityFence(commitment_tx);
@@ -231,6 +259,7 @@ public class BumpTransactionEvent extends CommonBase {
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.BumpTransactionEvent ret_hu_conv = org.ldk.structs.BumpTransactionEvent.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(anchor_descriptor); };
                for (HTLCOutputInCommitment pending_htlcs_conv_24: pending_htlcs) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(pending_htlcs_conv_24); }; };
                return ret_hu_conv;
@@ -239,8 +268,10 @@ public class BumpTransactionEvent extends CommonBase {
        /**
         * Utility method to constructs a new HTLCResolution-variant BumpTransactionEvent
         */
-       public static BumpTransactionEvent htlcresolution(byte[] claim_id, int target_feerate_sat_per_1000_weight, HTLCDescriptor[] htlc_descriptors, int tx_lock_time) {
-               long ret = bindings.BumpTransactionEvent_htlcresolution(InternalUtils.check_arr_len(claim_id, 32), target_feerate_sat_per_1000_weight, htlc_descriptors != null ? Arrays.stream(htlc_descriptors).mapToLong(htlc_descriptors_conv_16 -> htlc_descriptors_conv_16 == null ? 0 : htlc_descriptors_conv_16.ptr).toArray() : null, tx_lock_time);
+       public static BumpTransactionEvent htlcresolution(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id, byte[] claim_id, int target_feerate_sat_per_1000_weight, HTLCDescriptor[] htlc_descriptors, int tx_lock_time) {
+               long ret = bindings.BumpTransactionEvent_htlcresolution(channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), InternalUtils.check_arr_len(claim_id, 32), target_feerate_sat_per_1000_weight, htlc_descriptors != null ? Arrays.stream(htlc_descriptors).mapToLong(htlc_descriptors_conv_16 -> htlc_descriptors_conv_16.ptr).toArray() : null, tx_lock_time);
+               Reference.reachabilityFence(channel_id);
+               Reference.reachabilityFence(counterparty_node_id);
                Reference.reachabilityFence(claim_id);
                Reference.reachabilityFence(target_feerate_sat_per_1000_weight);
                Reference.reachabilityFence(htlc_descriptors);
@@ -248,6 +279,7 @@ public class BumpTransactionEvent extends CommonBase {
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.BumpTransactionEvent ret_hu_conv = org.ldk.structs.BumpTransactionEvent.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); };
                for (HTLCDescriptor htlc_descriptors_conv_16: htlc_descriptors) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(htlc_descriptors_conv_16); }; };
                return ret_hu_conv;
        }
@@ -257,7 +289,7 @@ public class BumpTransactionEvent extends CommonBase {
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.BumpTransactionEvent b) {
-               boolean ret = bindings.BumpTransactionEvent_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.BumpTransactionEvent_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
index 75f3cb66a58d7a5199cc4bb676006bf6b8269c4d..b694a2eaeb29a63624a882e7ee163db64c3cb45b 100644 (file)
@@ -49,7 +49,7 @@ public class BumpTransactionEventHandler extends CommonBase {
         * Handles all variants of [`BumpTransactionEvent`].
         */
        public void handle_event(org.ldk.structs.BumpTransactionEvent event) {
-               bindings.BumpTransactionEventHandler_handle_event(this.ptr, event == null ? 0 : event.ptr);
+               bindings.BumpTransactionEventHandler_handle_event(this.ptr, event.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(event);
        }
index 90e7d14063fa0069cee4b70e4069fb0fc00aa3b1..60b8856531f9e93f3ee136cb19a6b393c450b57a 100644 (file)
@@ -149,7 +149,7 @@ public class CandidateRouteHop extends CommonBase {
         * Utility method to constructs a new FirstHop-variant CandidateRouteHop
         */
        public static CandidateRouteHop first_hop(org.ldk.structs.FirstHopCandidate a) {
-               long ret = bindings.CandidateRouteHop_first_hop(a == null ? 0 : a.ptr);
+               long ret = bindings.CandidateRouteHop_first_hop(a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.CandidateRouteHop ret_hu_conv = org.ldk.structs.CandidateRouteHop.constr_from_ptr(ret);
@@ -162,7 +162,7 @@ public class CandidateRouteHop extends CommonBase {
         * Utility method to constructs a new PublicHop-variant CandidateRouteHop
         */
        public static CandidateRouteHop public_hop(org.ldk.structs.PublicHopCandidate a) {
-               long ret = bindings.CandidateRouteHop_public_hop(a == null ? 0 : a.ptr);
+               long ret = bindings.CandidateRouteHop_public_hop(a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.CandidateRouteHop ret_hu_conv = org.ldk.structs.CandidateRouteHop.constr_from_ptr(ret);
@@ -175,7 +175,7 @@ public class CandidateRouteHop extends CommonBase {
         * Utility method to constructs a new PrivateHop-variant CandidateRouteHop
         */
        public static CandidateRouteHop private_hop(org.ldk.structs.PrivateHopCandidate a) {
-               long ret = bindings.CandidateRouteHop_private_hop(a == null ? 0 : a.ptr);
+               long ret = bindings.CandidateRouteHop_private_hop(a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.CandidateRouteHop ret_hu_conv = org.ldk.structs.CandidateRouteHop.constr_from_ptr(ret);
@@ -188,7 +188,7 @@ public class CandidateRouteHop extends CommonBase {
         * Utility method to constructs a new Blinded-variant CandidateRouteHop
         */
        public static CandidateRouteHop blinded(org.ldk.structs.BlindedPathCandidate a) {
-               long ret = bindings.CandidateRouteHop_blinded(a == null ? 0 : a.ptr);
+               long ret = bindings.CandidateRouteHop_blinded(a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.CandidateRouteHop ret_hu_conv = org.ldk.structs.CandidateRouteHop.constr_from_ptr(ret);
@@ -201,7 +201,7 @@ public class CandidateRouteHop extends CommonBase {
         * Utility method to constructs a new OneHopBlinded-variant CandidateRouteHop
         */
        public static CandidateRouteHop one_hop_blinded(org.ldk.structs.OneHopBlindedPathCandidate a) {
-               long ret = bindings.CandidateRouteHop_one_hop_blinded(a == null ? 0 : a.ptr);
+               long ret = bindings.CandidateRouteHop_one_hop_blinded(a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.CandidateRouteHop ret_hu_conv = org.ldk.structs.CandidateRouteHop.constr_from_ptr(ret);
index e7bfc524fe5fc91c3c15a37d0649bc072152ec56..8d68f8f1b0d301d8b951a9a2bd0e12665b4c0550 100644 (file)
@@ -74,7 +74,7 @@ public class ChainMonitor extends CommonBase {
         * inclusion in the return value.
         */
        public Balance[] get_claimable_balances(ChannelDetails[] ignored_channels) {
-               long[] ret = bindings.ChainMonitor_get_claimable_balances(this.ptr, ignored_channels != null ? Arrays.stream(ignored_channels).mapToLong(ignored_channels_conv_16 -> ignored_channels_conv_16 == null ? 0 : ignored_channels_conv_16.ptr).toArray() : null);
+               long[] ret = bindings.ChainMonitor_get_claimable_balances(this.ptr, ignored_channels != null ? Arrays.stream(ignored_channels).mapToLong(ignored_channels_conv_16 -> ignored_channels_conv_16.ptr).toArray() : null);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(ignored_channels);
                int ret_conv_9_len = ret.length;
@@ -97,7 +97,7 @@ public class ChainMonitor extends CommonBase {
         * indefinitely.
         */
        public Result_LockedChannelMonitorNoneZ get_monitor(org.ldk.structs.OutPoint funding_txo) {
-               long ret = bindings.ChainMonitor_get_monitor(this.ptr, funding_txo == null ? 0 : funding_txo.ptr);
+               long ret = bindings.ChainMonitor_get_monitor(this.ptr, funding_txo.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(funding_txo);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -107,23 +107,23 @@ public class ChainMonitor extends CommonBase {
        }
 
        /**
-        * Lists the funding outpoint of each [`ChannelMonitor`] being monitored.
+        * Lists the funding outpoint and channel ID of each [`ChannelMonitor`] being monitored.
         * 
         * Note that [`ChannelMonitor`]s are not removed when a channel is closed as they are always
         * monitoring for on-chain state resolutions.
         */
-       public OutPoint[] list_monitors() {
+       public TwoTuple_OutPointChannelIdZ[] list_monitors() {
                long[] ret = bindings.ChainMonitor_list_monitors(this.ptr);
                Reference.reachabilityFence(this);
-               int ret_conv_10_len = ret.length;
-               OutPoint[] ret_conv_10_arr = new OutPoint[ret_conv_10_len];
-               for (int k = 0; k < ret_conv_10_len; k++) {
-                       long ret_conv_10 = ret[k];
-                       org.ldk.structs.OutPoint ret_conv_10_hu_conv = null; if (ret_conv_10 < 0 || ret_conv_10 > 4096) { ret_conv_10_hu_conv = new org.ldk.structs.OutPoint(null, ret_conv_10); }
-                       if (ret_conv_10_hu_conv != null) { ret_conv_10_hu_conv.ptrs_to.add(this); };
-                       ret_conv_10_arr[k] = ret_conv_10_hu_conv;
+               int ret_conv_29_len = ret.length;
+               TwoTuple_OutPointChannelIdZ[] ret_conv_29_arr = new TwoTuple_OutPointChannelIdZ[ret_conv_29_len];
+               for (int d = 0; d < ret_conv_29_len; d++) {
+                       long ret_conv_29 = ret[d];
+                       TwoTuple_OutPointChannelIdZ ret_conv_29_hu_conv = new TwoTuple_OutPointChannelIdZ(null, ret_conv_29);
+                       if (ret_conv_29_hu_conv != null) { ret_conv_29_hu_conv.ptrs_to.add(this); };
+                       ret_conv_29_arr[d] = ret_conv_29_hu_conv;
                }
-               return ret_conv_10_arr;
+               return ret_conv_29_arr;
        }
 
        /**
@@ -159,7 +159,7 @@ public class ChainMonitor extends CommonBase {
         * registered [`ChannelMonitor`]s.
         */
        public Result_NoneAPIErrorZ channel_monitor_updated(org.ldk.structs.OutPoint funding_txo, org.ldk.structs.MonitorUpdateId completed_update_id) {
-               long ret = bindings.ChainMonitor_channel_monitor_updated(this.ptr, funding_txo == null ? 0 : funding_txo.ptr, completed_update_id == null ? 0 : completed_update_id.ptr);
+               long ret = bindings.ChainMonitor_channel_monitor_updated(this.ptr, funding_txo.ptr, completed_update_id.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(funding_txo);
                Reference.reachabilityFence(completed_update_id);
@@ -201,6 +201,37 @@ public class ChainMonitor extends CommonBase {
                Reference.reachabilityFence(this);
        }
 
+       /**
+        * Triggers rebroadcasts of pending claims from force-closed channels after a transaction
+        * signature generation failure.
+        * 
+        * `monitor_opt` can be used as a filter to only trigger them for a specific channel monitor.
+        * 
+        * Note that monitor_opt (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       public void signer_unblocked(@Nullable org.ldk.structs.OutPoint monitor_opt) {
+               bindings.ChainMonitor_signer_unblocked(this.ptr, monitor_opt == null ? 0 : monitor_opt.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(monitor_opt);
+               if (this != null) { this.ptrs_to.add(monitor_opt); };
+       }
+
+       /**
+        * Archives fully resolved channel monitors by calling [`Persist::archive_persisted_channel`].
+        * 
+        * This is useful for pruning fully resolved monitors from the monitor set and primary
+        * storage so they are not kept in memory and reloaded on restart.
+        * 
+        * Should be called occasionally (once every handful of blocks or on startup).
+        * 
+        * Depending on the implementation of [`Persist::archive_persisted_channel`] the monitor
+        * data could be moved to an archive location or removed entirely.
+        */
+       public void archive_fully_resolved_channel_monitors() {
+               bindings.ChainMonitor_archive_fully_resolved_channel_monitors(this.ptr);
+               Reference.reachabilityFence(this);
+       }
+
        /**
         * Constructs a new Listen which calls the relevant methods on this_arg.
         * This copies the `inner` pointer in this_arg and thus the returned Listen must be freed before this_arg is
index 77c65ccd54bd2d5efb979ec44b7a8b6ea0675bca..2518986deddfd9877164b4f20e6a1a083f439e1c 100644 (file)
@@ -62,7 +62,7 @@ public class ChainParameters extends CommonBase {
         * Used to track on-chain channel funding outputs and send payments with reliable timelocks.
         */
        public void set_best_block(org.ldk.structs.BestBlock val) {
-               bindings.ChainParameters_set_best_block(this.ptr, val == null ? 0 : val.ptr);
+               bindings.ChainParameters_set_best_block(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -72,7 +72,7 @@ public class ChainParameters extends CommonBase {
         * Constructs a new ChainParameters given each field
         */
        public static ChainParameters of(org.ldk.enums.Network network_arg, org.ldk.structs.BestBlock best_block_arg) {
-               long ret = bindings.ChainParameters_new(network_arg, best_block_arg == null ? 0 : best_block_arg.ptr);
+               long ret = bindings.ChainParameters_new(network_arg, best_block_arg.ptr);
                Reference.reachabilityFence(network_arg);
                Reference.reachabilityFence(best_block_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
diff --git a/src/main/java/org/ldk/structs/ChangeDestinationSource.java b/src/main/java/org/ldk/structs/ChangeDestinationSource.java
new file mode 100644 (file)
index 0000000..e26ac02
--- /dev/null
@@ -0,0 +1,78 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+/**
+ * A helper trait that describes an on-chain wallet capable of returning a (change) destination
+ * script.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class ChangeDestinationSource extends CommonBase {
+       final bindings.LDKChangeDestinationSource bindings_instance;
+       ChangeDestinationSource(Object _dummy, long ptr) { super(ptr); bindings_instance = null; }
+       private ChangeDestinationSource(bindings.LDKChangeDestinationSource arg) {
+               super(bindings.LDKChangeDestinationSource_new(arg));
+               this.ptrs_to.add(arg);
+               this.bindings_instance = arg;
+       }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.ChangeDestinationSource_free(ptr); } super.finalize();
+       }
+       /**
+        * Destroys the object, freeing associated resources. After this call, any access
+        * to this object may result in a SEGFAULT or worse.
+        *
+        * You should generally NEVER call this method. You should let the garbage collector
+        * do this for you when it finalizes objects. However, it may be useful for types
+        * which represent locks and should be closed immediately to avoid holding locks
+        * until the GC runs.
+        */
+       public void destroy() {
+               if (ptr != 0) { bindings.ChangeDestinationSource_free(ptr); }
+               ptr = 0;
+       }
+       public static interface ChangeDestinationSourceInterface {
+               /**
+                * Returns a script pubkey which can be used as a change destination for
+                * [`OutputSpender::spend_spendable_outputs`].
+                * 
+                * This method should return a different value each time it is called, to avoid linking
+                * on-chain funds controlled to the same user.
+                */
+               Result_CVec_u8ZNoneZ get_change_destination_script();
+       }
+       private static class LDKChangeDestinationSourceHolder { ChangeDestinationSource held; }
+       public static ChangeDestinationSource new_impl(ChangeDestinationSourceInterface arg) {
+               final LDKChangeDestinationSourceHolder impl_holder = new LDKChangeDestinationSourceHolder();
+               impl_holder.held = new ChangeDestinationSource(new bindings.LDKChangeDestinationSource() {
+                       @Override public long get_change_destination_script() {
+                               Result_CVec_u8ZNoneZ ret = arg.get_change_destination_script();
+                               Reference.reachabilityFence(arg);
+                               long result = ret.clone_ptr();
+                               return result;
+                       }
+               });
+               return impl_holder.held;
+       }
+       /**
+        * Returns a script pubkey which can be used as a change destination for
+        * [`OutputSpender::spend_spendable_outputs`].
+        * 
+        * This method should return a different value each time it is called, to avoid linking
+        * on-chain funds controlled to the same user.
+        */
+       public Result_CVec_u8ZNoneZ get_change_destination_script() {
+               long ret = bindings.ChangeDestinationSource_get_change_destination_script(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_CVec_u8ZNoneZ ret_hu_conv = Result_CVec_u8ZNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
index ffac3ff74c6dafcd18365a972cf04dfa54b21a74..b766ee90bbe42d500015b7b999207dcd7c8c26c9 100644 (file)
@@ -110,7 +110,7 @@ public class ChannelAnnouncement extends CommonBase {
         * The actual announcement
         */
        public void set_contents(org.ldk.structs.UnsignedChannelAnnouncement val) {
-               bindings.ChannelAnnouncement_set_contents(this.ptr, val == null ? 0 : val.ptr);
+               bindings.ChannelAnnouncement_set_contents(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -120,7 +120,7 @@ public class ChannelAnnouncement extends CommonBase {
         * Constructs a new ChannelAnnouncement given each field
         */
        public static ChannelAnnouncement of(byte[] node_signature_1_arg, byte[] node_signature_2_arg, byte[] bitcoin_signature_1_arg, byte[] bitcoin_signature_2_arg, org.ldk.structs.UnsignedChannelAnnouncement contents_arg) {
-               long ret = bindings.ChannelAnnouncement_new(InternalUtils.check_arr_len(node_signature_1_arg, 64), InternalUtils.check_arr_len(node_signature_2_arg, 64), InternalUtils.check_arr_len(bitcoin_signature_1_arg, 64), InternalUtils.check_arr_len(bitcoin_signature_2_arg, 64), contents_arg == null ? 0 : contents_arg.ptr);
+               long ret = bindings.ChannelAnnouncement_new(InternalUtils.check_arr_len(node_signature_1_arg, 64), InternalUtils.check_arr_len(node_signature_2_arg, 64), InternalUtils.check_arr_len(bitcoin_signature_1_arg, 64), InternalUtils.check_arr_len(bitcoin_signature_2_arg, 64), contents_arg.ptr);
                Reference.reachabilityFence(node_signature_1_arg);
                Reference.reachabilityFence(node_signature_2_arg);
                Reference.reachabilityFence(bitcoin_signature_1_arg);
@@ -169,7 +169,7 @@ public class ChannelAnnouncement extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.ChannelAnnouncement b) {
-               boolean ret = bindings.ChannelAnnouncement_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ChannelAnnouncement_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 64bed6ed6d83f9d528258ecb88692bffde53cbd0..3ec121ff1f514943e230b268c6a68ecaa1bf9943 100644 (file)
@@ -144,13 +144,16 @@ public class ChannelConfig extends CommonBase {
        }
 
        /**
-        * Limit our total exposure to in-flight HTLCs which are burned to fees as they are too
-        * small to claim on-chain.
+        * Limit our total exposure to potential loss to on-chain fees on close, including in-flight
+        * HTLCs which are burned to fees as they are too small to claim on-chain and fees on
+        * commitment transaction(s) broadcasted by our counterparty in excess of our own fee estimate.
+        * 
+        * # HTLC-based Dust Exposure
         * 
         * When an HTLC present in one of our channels is below a \"dust\" threshold, the HTLC will
         * not be claimable on-chain, instead being turned into additional miner fees if either
         * party force-closes the channel. Because the threshold is per-HTLC, our total exposure
-        * to such payments may be sustantial if there are many dust HTLCs present when the
+        * to such payments may be substantial if there are many dust HTLCs present when the
         * channel is force-closed.
         * 
         * The dust threshold for each HTLC is based on the `dust_limit_satoshis` for each party in a
@@ -164,7 +167,37 @@ public class ChannelConfig extends CommonBase {
         * The selected limit is applied for sent, forwarded, and received HTLCs and limits the total
         * exposure across all three types per-channel.
         * 
-        * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 5000.
+        * # Transaction Fee Dust Exposure
+        * 
+        * Further, counterparties broadcasting a commitment transaction in a force-close may result
+        * in other balance being burned to fees, and thus all fees on commitment and HTLC
+        * transactions in excess of our local fee estimates are included in the dust calculation.
+        * 
+        * Because of this, another way to look at this limit is to divide it by 43,000 (or 218,750
+        * for non-anchor channels) and see it as the maximum feerate disagreement (in sats/vB) per
+        * non-dust HTLC we're allowed to have with our peers before risking a force-closure for
+        * inbound channels.
+        * 
+        * Thus, for the default value of 10_000 * a current feerate estimate of 10 sat/vB (or 2,500
+        * sat/KW), we risk force-closure if we disagree with our peer by:
+        * `10_000 * 2_500 / 43_000 / (483*2)` = 0.6 sat/vB for anchor channels with 483 HTLCs in
+        * both directions (the maximum),
+        * `10_000 * 2_500 / 43_000 / (50*2)` = 5.8 sat/vB for anchor channels with 50 HTLCs in both
+        * directions (the LDK default max from [`ChannelHandshakeConfig::our_max_accepted_htlcs`])
+        * `10_000 * 2_500 / 218_750 / (483*2)` = 0.1 sat/vB for non-anchor channels with 483 HTLCs
+        * in both directions (the maximum),
+        * `10_000 * 2_500 / 218_750 / (50*2)` = 1.1 sat/vB for non-anchor channels with 50 HTLCs
+        * in both (the LDK default maximum from [`ChannelHandshakeConfig::our_max_accepted_htlcs`])
+        * 
+        * Note that when using [`MaxDustHTLCExposure::FeeRateMultiplier`] this maximum disagreement
+        * will scale linearly with increases (or decreases) in the our feerate estimates. Further,
+        * for anchor channels we expect our counterparty to use a relatively low feerate estimate
+        * while we use [`ConfirmationTarget::OnChainSweep`] (which should be relatively high) and
+        * feerate disagreement force-closures should only occur when theirs is higher than ours.
+        * 
+        * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 10_000.
+        * 
+        * [`ConfirmationTarget::OnChainSweep`]: crate::chain::chaininterface::ConfirmationTarget::OnChainSweep
         */
        public MaxDustHTLCExposure get_max_dust_htlc_exposure() {
                long ret = bindings.ChannelConfig_get_max_dust_htlc_exposure(this.ptr);
@@ -176,13 +209,16 @@ public class ChannelConfig extends CommonBase {
        }
 
        /**
-        * Limit our total exposure to in-flight HTLCs which are burned to fees as they are too
-        * small to claim on-chain.
+        * Limit our total exposure to potential loss to on-chain fees on close, including in-flight
+        * HTLCs which are burned to fees as they are too small to claim on-chain and fees on
+        * commitment transaction(s) broadcasted by our counterparty in excess of our own fee estimate.
+        * 
+        * # HTLC-based Dust Exposure
         * 
         * When an HTLC present in one of our channels is below a \"dust\" threshold, the HTLC will
         * not be claimable on-chain, instead being turned into additional miner fees if either
         * party force-closes the channel. Because the threshold is per-HTLC, our total exposure
-        * to such payments may be sustantial if there are many dust HTLCs present when the
+        * to such payments may be substantial if there are many dust HTLCs present when the
         * channel is force-closed.
         * 
         * The dust threshold for each HTLC is based on the `dust_limit_satoshis` for each party in a
@@ -196,7 +232,37 @@ public class ChannelConfig extends CommonBase {
         * The selected limit is applied for sent, forwarded, and received HTLCs and limits the total
         * exposure across all three types per-channel.
         * 
-        * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 5000.
+        * # Transaction Fee Dust Exposure
+        * 
+        * Further, counterparties broadcasting a commitment transaction in a force-close may result
+        * in other balance being burned to fees, and thus all fees on commitment and HTLC
+        * transactions in excess of our local fee estimates are included in the dust calculation.
+        * 
+        * Because of this, another way to look at this limit is to divide it by 43,000 (or 218,750
+        * for non-anchor channels) and see it as the maximum feerate disagreement (in sats/vB) per
+        * non-dust HTLC we're allowed to have with our peers before risking a force-closure for
+        * inbound channels.
+        * 
+        * Thus, for the default value of 10_000 * a current feerate estimate of 10 sat/vB (or 2,500
+        * sat/KW), we risk force-closure if we disagree with our peer by:
+        * `10_000 * 2_500 / 43_000 / (483*2)` = 0.6 sat/vB for anchor channels with 483 HTLCs in
+        * both directions (the maximum),
+        * `10_000 * 2_500 / 43_000 / (50*2)` = 5.8 sat/vB for anchor channels with 50 HTLCs in both
+        * directions (the LDK default max from [`ChannelHandshakeConfig::our_max_accepted_htlcs`])
+        * `10_000 * 2_500 / 218_750 / (483*2)` = 0.1 sat/vB for non-anchor channels with 483 HTLCs
+        * in both directions (the maximum),
+        * `10_000 * 2_500 / 218_750 / (50*2)` = 1.1 sat/vB for non-anchor channels with 50 HTLCs
+        * in both (the LDK default maximum from [`ChannelHandshakeConfig::our_max_accepted_htlcs`])
+        * 
+        * Note that when using [`MaxDustHTLCExposure::FeeRateMultiplier`] this maximum disagreement
+        * will scale linearly with increases (or decreases) in the our feerate estimates. Further,
+        * for anchor channels we expect our counterparty to use a relatively low feerate estimate
+        * while we use [`ConfirmationTarget::OnChainSweep`] (which should be relatively high) and
+        * feerate disagreement force-closures should only occur when theirs is higher than ours.
+        * 
+        * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 10_000.
+        * 
+        * [`ConfirmationTarget::OnChainSweep`]: crate::chain::chaininterface::ConfirmationTarget::OnChainSweep
         */
        public void set_max_dust_htlc_exposure(org.ldk.structs.MaxDustHTLCExposure val) {
                bindings.ChannelConfig_set_max_dust_htlc_exposure(this.ptr, val.ptr);
@@ -385,7 +451,7 @@ public class ChannelConfig extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.ChannelConfig b) {
-               boolean ret = bindings.ChannelConfig_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ChannelConfig_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -400,7 +466,7 @@ public class ChannelConfig extends CommonBase {
         * Applies the given [`ChannelConfigUpdate`] as a partial update to the [`ChannelConfig`].
         */
        public void apply(org.ldk.structs.ChannelConfigUpdate update) {
-               bindings.ChannelConfig_apply(this.ptr, update == null ? 0 : update.ptr);
+               bindings.ChannelConfig_apply(this.ptr, update.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(update);
                if (this != null) { this.ptrs_to.add(update); };
index b19c44a42d2eb96e83b85a6e60c4540a573b4d5f..7c0062202894f70cc834bd92d4393f84ba469d94 100644 (file)
@@ -59,7 +59,7 @@ public class ChannelCounterparty extends CommonBase {
         * many routing-relevant features are present in the init context.
         */
        public void set_features(org.ldk.structs.InitFeatures val) {
-               bindings.ChannelCounterparty_set_features(this.ptr, val == null ? 0 : val.ptr);
+               bindings.ChannelCounterparty_set_features(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -178,7 +178,7 @@ public class ChannelCounterparty extends CommonBase {
         * Note that forwarding_info_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public static ChannelCounterparty of(byte[] node_id_arg, org.ldk.structs.InitFeatures features_arg, long unspendable_punishment_reserve_arg, @Nullable org.ldk.structs.CounterpartyForwardingInfo forwarding_info_arg, org.ldk.structs.Option_u64Z outbound_htlc_minimum_msat_arg, org.ldk.structs.Option_u64Z outbound_htlc_maximum_msat_arg) {
-               long ret = bindings.ChannelCounterparty_new(InternalUtils.check_arr_len(node_id_arg, 33), features_arg == null ? 0 : features_arg.ptr, unspendable_punishment_reserve_arg, forwarding_info_arg == null ? 0 : forwarding_info_arg.ptr, outbound_htlc_minimum_msat_arg.ptr, outbound_htlc_maximum_msat_arg.ptr);
+               long ret = bindings.ChannelCounterparty_new(InternalUtils.check_arr_len(node_id_arg, 33), features_arg.ptr, unspendable_punishment_reserve_arg, forwarding_info_arg == null ? 0 : forwarding_info_arg.ptr, outbound_htlc_minimum_msat_arg.ptr, outbound_htlc_maximum_msat_arg.ptr);
                Reference.reachabilityFence(node_id_arg);
                Reference.reachabilityFence(features_arg);
                Reference.reachabilityFence(unspendable_punishment_reserve_arg);
index 8aba6e0d6d71fcb0c9ff4ff573d0d6a7b3ad9661..93c7a875d5049f258a8dcb4173510166efc830e7 100644 (file)
@@ -74,7 +74,7 @@ public class ChannelDerivationParameters extends CommonBase {
         * [`ChannelSigner::provide_channel_parameters`].
         */
        public void set_transaction_parameters(org.ldk.structs.ChannelTransactionParameters val) {
-               bindings.ChannelDerivationParameters_set_transaction_parameters(this.ptr, val == null ? 0 : val.ptr);
+               bindings.ChannelDerivationParameters_set_transaction_parameters(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -84,7 +84,7 @@ public class ChannelDerivationParameters extends CommonBase {
         * Constructs a new ChannelDerivationParameters given each field
         */
        public static ChannelDerivationParameters of(long value_satoshis_arg, byte[] keys_id_arg, org.ldk.structs.ChannelTransactionParameters transaction_parameters_arg) {
-               long ret = bindings.ChannelDerivationParameters_new(value_satoshis_arg, InternalUtils.check_arr_len(keys_id_arg, 32), transaction_parameters_arg == null ? 0 : transaction_parameters_arg.ptr);
+               long ret = bindings.ChannelDerivationParameters_new(value_satoshis_arg, InternalUtils.check_arr_len(keys_id_arg, 32), transaction_parameters_arg.ptr);
                Reference.reachabilityFence(value_satoshis_arg);
                Reference.reachabilityFence(keys_id_arg);
                Reference.reachabilityFence(transaction_parameters_arg);
@@ -119,7 +119,7 @@ public class ChannelDerivationParameters extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.ChannelDerivationParameters b) {
-               boolean ret = bindings.ChannelDerivationParameters_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ChannelDerivationParameters_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 4ba94a43409be47f79aacae78ae2029454663e29..c117b601573be34cc3a257d23a6d74d3b95dee3b 100644 (file)
@@ -26,10 +26,13 @@ public class ChannelDetails extends CommonBase {
         * Note that this means this value is *not* persistent - it can change once during the
         * lifetime of the channel.
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.ChannelDetails_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.ChannelDetails_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
@@ -38,10 +41,11 @@ public class ChannelDetails extends CommonBase {
         * Note that this means this value is *not* persistent - it can change once during the
         * lifetime of the channel.
         */
-       public void set_channel_id(byte[] val) {
-               bindings.ChannelDetails_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.ChannelDetails_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -60,7 +64,7 @@ public class ChannelDetails extends CommonBase {
         * Parameters which apply to our counterparty. See individual fields for more information.
         */
        public void set_counterparty(org.ldk.structs.ChannelCounterparty val) {
-               bindings.ChannelDetails_set_counterparty(this.ptr, val == null ? 0 : val.ptr);
+               bindings.ChannelDetails_set_counterparty(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -70,9 +74,6 @@ public class ChannelDetails extends CommonBase {
         * The Channel's funding transaction output, if we've negotiated the funding transaction with
         * our counterparty already.
         * 
-        * Note that, if this has been set, `channel_id` will be equivalent to
-        * `funding_txo.unwrap().to_channel_id()`.
-        * 
         * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        @Nullable
@@ -89,9 +90,6 @@ public class ChannelDetails extends CommonBase {
         * The Channel's funding transaction output, if we've negotiated the funding transaction with
         * our counterparty already.
         * 
-        * Note that, if this has been set, `channel_id` will be equivalent to
-        * `funding_txo.unwrap().to_channel_id()`.
-        * 
         * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public void set_funding_txo(@Nullable org.ldk.structs.OutPoint val) {
@@ -830,63 +828,6 @@ public class ChannelDetails extends CommonBase {
                if (this != null) { this.ptrs_to.add(val); };
        }
 
-       /**
-        * Constructs a new ChannelDetails given each field
-        * 
-        * Note that funding_txo_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
-        * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
-        * Note that config_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
-        */
-       public static ChannelDetails of(byte[] channel_id_arg, org.ldk.structs.ChannelCounterparty counterparty_arg, @Nullable org.ldk.structs.OutPoint funding_txo_arg, @Nullable org.ldk.structs.ChannelTypeFeatures channel_type_arg, org.ldk.structs.Option_u64Z short_channel_id_arg, org.ldk.structs.Option_u64Z outbound_scid_alias_arg, org.ldk.structs.Option_u64Z inbound_scid_alias_arg, long channel_value_satoshis_arg, org.ldk.structs.Option_u64Z unspendable_punishment_reserve_arg, org.ldk.util.UInt128 user_channel_id_arg, org.ldk.structs.Option_u32Z feerate_sat_per_1000_weight_arg, long balance_msat_arg, long outbound_capacity_msat_arg, long next_outbound_htlc_limit_msat_arg, long next_outbound_htlc_minimum_msat_arg, long inbound_capacity_msat_arg, org.ldk.structs.Option_u32Z confirmations_required_arg, org.ldk.structs.Option_u32Z confirmations_arg, org.ldk.structs.Option_u16Z force_close_spend_delay_arg, boolean is_outbound_arg, boolean is_channel_ready_arg, org.ldk.structs.Option_ChannelShutdownStateZ channel_shutdown_state_arg, boolean is_usable_arg, boolean is_public_arg, org.ldk.structs.Option_u64Z inbound_htlc_minimum_msat_arg, org.ldk.structs.Option_u64Z inbound_htlc_maximum_msat_arg, @Nullable org.ldk.structs.ChannelConfig config_arg) {
-               long ret = bindings.ChannelDetails_new(InternalUtils.check_arr_len(channel_id_arg, 32), counterparty_arg == null ? 0 : counterparty_arg.ptr, funding_txo_arg == null ? 0 : funding_txo_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr, short_channel_id_arg.ptr, outbound_scid_alias_arg.ptr, inbound_scid_alias_arg.ptr, channel_value_satoshis_arg, unspendable_punishment_reserve_arg.ptr, user_channel_id_arg.getLEBytes(), feerate_sat_per_1000_weight_arg.ptr, balance_msat_arg, outbound_capacity_msat_arg, next_outbound_htlc_limit_msat_arg, next_outbound_htlc_minimum_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg.ptr, confirmations_arg.ptr, force_close_spend_delay_arg.ptr, is_outbound_arg, is_channel_ready_arg, channel_shutdown_state_arg.ptr, is_usable_arg, is_public_arg, inbound_htlc_minimum_msat_arg.ptr, inbound_htlc_maximum_msat_arg.ptr, config_arg == null ? 0 : config_arg.ptr);
-               Reference.reachabilityFence(channel_id_arg);
-               Reference.reachabilityFence(counterparty_arg);
-               Reference.reachabilityFence(funding_txo_arg);
-               Reference.reachabilityFence(channel_type_arg);
-               Reference.reachabilityFence(short_channel_id_arg);
-               Reference.reachabilityFence(outbound_scid_alias_arg);
-               Reference.reachabilityFence(inbound_scid_alias_arg);
-               Reference.reachabilityFence(channel_value_satoshis_arg);
-               Reference.reachabilityFence(unspendable_punishment_reserve_arg);
-               Reference.reachabilityFence(user_channel_id_arg);
-               Reference.reachabilityFence(feerate_sat_per_1000_weight_arg);
-               Reference.reachabilityFence(balance_msat_arg);
-               Reference.reachabilityFence(outbound_capacity_msat_arg);
-               Reference.reachabilityFence(next_outbound_htlc_limit_msat_arg);
-               Reference.reachabilityFence(next_outbound_htlc_minimum_msat_arg);
-               Reference.reachabilityFence(inbound_capacity_msat_arg);
-               Reference.reachabilityFence(confirmations_required_arg);
-               Reference.reachabilityFence(confirmations_arg);
-               Reference.reachabilityFence(force_close_spend_delay_arg);
-               Reference.reachabilityFence(is_outbound_arg);
-               Reference.reachabilityFence(is_channel_ready_arg);
-               Reference.reachabilityFence(channel_shutdown_state_arg);
-               Reference.reachabilityFence(is_usable_arg);
-               Reference.reachabilityFence(is_public_arg);
-               Reference.reachabilityFence(inbound_htlc_minimum_msat_arg);
-               Reference.reachabilityFence(inbound_htlc_maximum_msat_arg);
-               Reference.reachabilityFence(config_arg);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.ChannelDetails ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelDetails(null, ret); }
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(counterparty_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(funding_txo_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(short_channel_id_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(outbound_scid_alias_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(inbound_scid_alias_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(unspendable_punishment_reserve_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(feerate_sat_per_1000_weight_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(confirmations_required_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(confirmations_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(force_close_spend_delay_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_shutdown_state_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(inbound_htlc_minimum_msat_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(inbound_htlc_maximum_msat_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(config_arg); };
-               return ret_hu_conv;
-       }
-
        long clone_ptr() {
                long ret = bindings.ChannelDetails_clone_ptr(this.ptr);
                Reference.reachabilityFence(this);
index b6d24de036d619636451e16168c93fbeed4f8dd8..2f05763f6c481476c6afa293a6ca7014fd36c18f 100644 (file)
@@ -26,7 +26,7 @@ public class ChannelFeatures extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.ChannelFeatures b) {
-               boolean ret = bindings.ChannelFeatures_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ChannelFeatures_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -82,7 +82,7 @@ public class ChannelFeatures extends CommonBase {
         * Returns true if this `Features` object contains required features unknown by `other`.
         */
        public boolean requires_unknown_bits_from(org.ldk.structs.ChannelFeatures other) {
-               boolean ret = bindings.ChannelFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr);
+               boolean ret = bindings.ChannelFeatures_requires_unknown_bits_from(this.ptr, other.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(other);
                if (this != null) { this.ptrs_to.add(other); };
diff --git a/src/main/java/org/ldk/structs/ChannelId.java b/src/main/java/org/ldk/structs/ChannelId.java
new file mode 100644 (file)
index 0000000..c5a1644
--- /dev/null
@@ -0,0 +1,224 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * A unique 32-byte identifier for a channel.
+ * Depending on how the ID is generated, several varieties are distinguished
+ * (but all are stored as 32 bytes):
+ * _v1_ and _temporary_.
+ * A _v1_ channel ID is generated based on funding tx outpoint (txid & index).
+ * A _temporary_ ID is generated randomly.
+ * (Later revocation-point-based _v2_ is a possibility.)
+ * The variety (context) is not stored, it is relevant only at creation.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class ChannelId extends CommonBase {
+       ChannelId(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.ChannelId_free(ptr); }
+       }
+
+       public byte[] get_a() {
+               byte[] ret = bindings.ChannelId_get_a(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       public void set_a(byte[] val) {
+               bindings.ChannelId_set_a(this.ptr, InternalUtils.check_arr_len(val, 32));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * Constructs a new ChannelId given each field
+        */
+       public static ChannelId of(byte[] a_arg) {
+               long ret = bindings.ChannelId_new(InternalUtils.check_arr_len(a_arg, 32));
+               Reference.reachabilityFence(a_arg);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.ChannelId_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the ChannelId
+        */
+       public ChannelId clone() {
+               long ret = bindings.ChannelId_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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.
+        */
+       public boolean eq(org.ldk.structs.ChannelId b) {
+               boolean ret = bindings.ChannelId_eq(this.ptr, b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof ChannelId)) return false;
+               return this.eq((ChannelId)o);
+       }
+       /**
+        * Generates a non-cryptographic 64-bit hash of the ChannelId.
+        */
+       public long hash() {
+               long ret = bindings.ChannelId_hash(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       @Override public int hashCode() {
+               return (int)this.hash();
+       }
+       /**
+        * Create _v1_ channel ID based on a funding TX ID and output index
+        */
+       public static ChannelId v1_from_funding_txid(byte[] txid, short output_index) {
+               long ret = bindings.ChannelId_v1_from_funding_txid(InternalUtils.check_arr_len(txid, 32), output_index);
+               Reference.reachabilityFence(txid);
+               Reference.reachabilityFence(output_index);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Create _v1_ channel ID from a funding tx outpoint
+        */
+       public static ChannelId v1_from_funding_outpoint(org.ldk.structs.OutPoint outpoint) {
+               long ret = bindings.ChannelId_v1_from_funding_outpoint(outpoint.ptr);
+               Reference.reachabilityFence(outpoint);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(outpoint); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Create a _temporary_ channel ID randomly, based on an entropy source.
+        */
+       public static ChannelId temporary_from_entropy_source(org.ldk.structs.EntropySource entropy_source) {
+               long ret = bindings.ChannelId_temporary_from_entropy_source(entropy_source.ptr);
+               Reference.reachabilityFence(entropy_source);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(entropy_source); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Generic constructor; create a new channel ID from the provided data.
+        * Use a more specific `*_from_*` constructor when possible.
+        */
+       public static ChannelId from_bytes(byte[] data) {
+               long ret = bindings.ChannelId_from_bytes(InternalUtils.check_arr_len(data, 32));
+               Reference.reachabilityFence(data);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Create a channel ID consisting of all-zeros data (e.g. when uninitialized or a placeholder).
+        */
+       public static ChannelId new_zero() {
+               long ret = bindings.ChannelId_new_zero();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Check whether ID is consisting of all zeros (uninitialized)
+        */
+       public boolean is_zero() {
+               boolean ret = bindings.ChannelId_is_zero(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * 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.
+        */
+       public static ChannelId v2_from_revocation_basepoints(org.ldk.structs.RevocationBasepoint ours, org.ldk.structs.RevocationBasepoint theirs) {
+               long ret = bindings.ChannelId_v2_from_revocation_basepoints(ours.ptr, theirs.ptr);
+               Reference.reachabilityFence(ours);
+               Reference.reachabilityFence(theirs);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ours); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(theirs); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Create temporary _v2_ channel ID by concatenating a zeroed out basepoint with the holder
+        * revocation basepoint and hashing the result.
+        */
+       public static ChannelId temporary_v2_from_revocation_basepoint(org.ldk.structs.RevocationBasepoint our_revocation_basepoint) {
+               long ret = bindings.ChannelId_temporary_v2_from_revocation_basepoint(our_revocation_basepoint.ptr);
+               Reference.reachabilityFence(our_revocation_basepoint);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(our_revocation_basepoint); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Serialize the ChannelId object into a byte array which can be read by ChannelId_read
+        */
+       public byte[] write() {
+               byte[] ret = bindings.ChannelId_write(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Read a ChannelId from a byte array, created by ChannelId_write
+        */
+       public static Result_ChannelIdDecodeErrorZ read(byte[] ser) {
+               long ret = bindings.ChannelId_read(ser);
+               Reference.reachabilityFence(ser);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_ChannelIdDecodeErrorZ ret_hu_conv = Result_ChannelIdDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
index b00fa3d7c7d9bd906b44016d2fdf419cf40de732..8e74795e83202d1b508e8eded88de68e4f2e6f15 100644 (file)
@@ -37,7 +37,7 @@ public class ChannelInfo extends CommonBase {
         * Protocol features of a channel communicated during its announcement
         */
        public void set_features(org.ldk.structs.ChannelFeatures val) {
-               bindings.ChannelInfo_set_features(this.ptr, val == null ? 0 : val.ptr);
+               bindings.ChannelInfo_set_features(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -59,7 +59,7 @@ public class ChannelInfo extends CommonBase {
         * Source node of the first direction of a channel
         */
        public void set_node_one(org.ldk.structs.NodeId val) {
-               bindings.ChannelInfo_set_node_one(this.ptr, val == null ? 0 : val.ptr);
+               bindings.ChannelInfo_set_node_one(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -108,7 +108,7 @@ public class ChannelInfo extends CommonBase {
         * Source node of the second direction of a channel
         */
        public void set_node_two(org.ldk.structs.NodeId val) {
-               bindings.ChannelInfo_set_node_two(this.ptr, val == null ? 0 : val.ptr);
+               bindings.ChannelInfo_set_node_two(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -220,7 +220,7 @@ public class ChannelInfo extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.ChannelInfo b) {
-               boolean ret = bindings.ChannelInfo_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ChannelInfo_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 3136908417b5e22e6539c68a11503583521ea0e3..f462ad522603dad29f2698eebd66489dc3e9994f 100644 (file)
@@ -9,11 +9,629 @@ import javax.annotation.Nullable;
 
 
 /**
- * Manager which keeps track of a number of channels and sends messages to the appropriate
- * channel, also tracking HTLC preimages and forwarding onion packets appropriately.
+ * A lightning node's channel state machine and payment management logic, which facilitates
+ * sending, forwarding, and receiving payments through lightning channels.
  * 
- * Implements [`ChannelMessageHandler`], handling the multi-channel parts and passing things through
- * to individual Channels.
+ * [`ChannelManager`] is parameterized by a number of components to achieve this.
+ * - [`chain::Watch`] (typically [`ChainMonitor`]) for on-chain monitoring and enforcement of each
+ * channel
+ * - [`BroadcasterInterface`] for broadcasting transactions related to opening, funding, and
+ * closing channels
+ * - [`EntropySource`] for providing random data needed for cryptographic operations
+ * - [`NodeSigner`] for cryptographic operations scoped to the node
+ * - [`SignerProvider`] for providing signers whose operations are scoped to individual channels
+ * - [`FeeEstimator`] to determine transaction fee rates needed to have a transaction mined in a
+ * timely manner
+ * - [`Router`] for finding payment paths when initiating and retrying payments
+ * - [`Logger`] for logging operational information of varying degrees
+ * 
+ * Additionally, it implements the following traits:
+ * - [`ChannelMessageHandler`] to handle off-chain channel activity from peers
+ * - [`MessageSendEventsProvider`] to similarly send such messages to peers
+ * - [`OffersMessageHandler`] for BOLT 12 message handling and sending
+ * - [`EventsProvider`] to generate user-actionable [`Event`]s
+ * - [`chain::Listen`] and [`chain::Confirm`] for notification of on-chain activity
+ * 
+ * Thus, [`ChannelManager`] is typically used to parameterize a [`MessageHandler`] and an
+ * [`OnionMessenger`]. The latter is required to support BOLT 12 functionality.
+ * 
+ * # `ChannelManager` vs `ChannelMonitor`
+ * 
+ * It's important to distinguish between the *off-chain* management and *on-chain* enforcement of
+ * lightning channels. [`ChannelManager`] exchanges messages with peers to manage the off-chain
+ * state of each channel. During this process, it generates a [`ChannelMonitor`] for each channel
+ * and a [`ChannelMonitorUpdate`] for each relevant change, notifying its parameterized
+ * [`chain::Watch`] of them.
+ * 
+ * An implementation of [`chain::Watch`], such as [`ChainMonitor`], is responsible for aggregating
+ * these [`ChannelMonitor`]s and applying any [`ChannelMonitorUpdate`]s to them. It then monitors
+ * for any pertinent on-chain activity, enforcing claims as needed.
+ * 
+ * This division of off-chain management and on-chain enforcement allows for interesting node
+ * setups. For instance, on-chain enforcement could be moved to a separate host or have added
+ * redundancy, possibly as a watchtower. See [`chain::Watch`] for the relevant interface.
+ * 
+ * # Initialization
+ * 
+ * Use [`ChannelManager::new`] with the most recent [`BlockHash`] when creating a fresh instance.
+ * Otherwise, if restarting, construct [`ChannelManagerReadArgs`] with the necessary parameters and
+ * references to any deserialized [`ChannelMonitor`]s that were previously persisted. Use this to
+ * deserialize the [`ChannelManager`] and feed it any new chain data since it was last online, as
+ * detailed in the [`ChannelManagerReadArgs`] documentation.
+ * 
+ * ```
+ * use bitcoin::BlockHash;
+ * use bitcoin::network::constants::Network;
+ * use lightning::chain::BestBlock;
+ * # use lightning::chain::channelmonitor::ChannelMonitor;
+ * use lightning::ln::channelmanager::{ChainParameters, ChannelManager, ChannelManagerReadArgs};
+ * # use lightning::routing::gossip::NetworkGraph;
+ * use lightning::util::config::UserConfig;
+ * use lightning::util::ser::ReadableArgs;
+ * 
+ * # fn read_channel_monitors() -> Vec<ChannelMonitor<lightning::sign::InMemorySigner>> { vec![] }
+ * # fn example<
+ * #     'a,
+ * #     L: lightning::util::logger::Logger,
+ * #     ES: lightning::sign::EntropySource,
+ * #     S: for <'b> lightning::routing::scoring::LockableScore<'b, ScoreLookUp = SL>,
+ * #     SL: lightning::routing::scoring::ScoreLookUp<ScoreParams = SP>,
+ * #     SP: Sized,
+ * #     R: lightning::io::Read,
+ * # >(
+ * #     fee_estimator: &dyn lightning::chain::chaininterface::FeeEstimator,
+ * #     chain_monitor: &dyn lightning::chain::Watch<lightning::sign::InMemorySigner>,
+ * #     tx_broadcaster: &dyn lightning::chain::chaininterface::BroadcasterInterface,
+ * #     router: &lightning::routing::router::DefaultRouter<&NetworkGraph<&'a L>, &'a L, &ES, &S, SP, SL>,
+ * #     logger: &L,
+ * #     entropy_source: &ES,
+ * #     node_signer: &dyn lightning::sign::NodeSigner,
+ * #     signer_provider: &lightning::sign::DynSignerProvider,
+ * #     best_block: lightning::chain::BestBlock,
+ * #     current_timestamp: u32,
+ * #     mut reader: R,
+ * # ) -> Result<(), lightning::ln::msgs::DecodeError> {
+ * Fresh start with no channels
+ * let params = ChainParameters {
+ * network: Network::Bitcoin,
+ * best_block,
+ * };
+ * let default_config = UserConfig::default();
+ * let channel_manager = ChannelManager::new(
+ * fee_estimator, chain_monitor, tx_broadcaster, router, logger, entropy_source, node_signer,
+ * signer_provider, default_config, params, current_timestamp
+ * );
+ * 
+ * Restart from deserialized data
+ * let mut channel_monitors = read_channel_monitors();
+ * let args = ChannelManagerReadArgs::new(
+ * entropy_source, node_signer, signer_provider, fee_estimator, chain_monitor, tx_broadcaster,
+ * router, logger, default_config, channel_monitors.iter_mut().collect()
+ * );
+ * let (block_hash, channel_manager) =
+ * <(BlockHash, ChannelManager<_, _, _, _, _, _, _, _>)>::read(&mut reader, args)?;
+ * 
+ * Update the ChannelManager and ChannelMonitors with the latest chain data
+ * ...
+ * 
+ * Move the monitors to the ChannelManager's chain::Watch parameter
+ * for monitor in channel_monitors {
+ * chain_monitor.watch_channel(monitor.get_funding_txo().0, monitor);
+ * }
+ * # Ok(())
+ * # }
+ * ```
+ * 
+ * # Operation
+ * 
+ * The following is required for [`ChannelManager`] to function properly:
+ * - Handle messages from peers using its [`ChannelMessageHandler`] implementation (typically
+ * called by [`PeerManager::read_event`] when processing network I/O)
+ * - Send messages to peers obtained via its [`MessageSendEventsProvider`] implementation
+ * (typically initiated when [`PeerManager::process_events`] is called)
+ * - Feed on-chain activity using either its [`chain::Listen`] or [`chain::Confirm`] implementation
+ * as documented by those traits
+ * - Perform any periodic channel and payment checks by calling [`timer_tick_occurred`] roughly
+ * every minute
+ * - Persist to disk whenever [`get_and_clear_needs_persistence`] returns `true` using a
+ * [`Persister`] such as a [`KVStore`] implementation
+ * - Handle [`Event`]s obtained via its [`EventsProvider`] implementation
+ * 
+ * The [`Future`] returned by [`get_event_or_persistence_needed_future`] is useful in determining
+ * when the last two requirements need to be checked.
+ * 
+ * The [`lightning-block-sync`] and [`lightning-transaction-sync`] crates provide utilities that
+ * simplify feeding in on-chain activity using the [`chain::Listen`] and [`chain::Confirm`] traits,
+ * respectively. The remaining requirements can be met using the [`lightning-background-processor`]
+ * crate. For languages other than Rust, the availability of similar utilities may vary.
+ * 
+ * # Channels
+ * 
+ * [`ChannelManager`]'s primary function involves managing a channel state. Without channels,
+ * payments can't be sent. Use [`list_channels`] or [`list_usable_channels`] for a snapshot of the
+ * currently open channels.
+ * 
+ * ```
+ * # use lightning::ln::channelmanager::AChannelManager;
+ * #
+ * # fn example<T: AChannelManager>(channel_manager: T) {
+ * # let channel_manager = channel_manager.get_cm();
+ * let channels = channel_manager.list_usable_channels();
+ * for details in channels {
+ * println!(\"{:?}\", details);
+ * }
+ * # }
+ * ```
+ * 
+ * Each channel is identified using a [`ChannelId`], which will change throughout the channel's
+ * life cycle. Additionally, channels are assigned a `user_channel_id`, which is given in
+ * [`Event`]s associated with the channel and serves as a fixed identifier but is otherwise unused
+ * by [`ChannelManager`].
+ * 
+ * ## Opening Channels
+ * 
+ * To an open a channel with a peer, call [`create_channel`]. This will initiate the process of
+ * opening an outbound channel, which requires self-funding when handling
+ * [`Event::FundingGenerationReady`].
+ * 
+ * ```
+ * # use bitcoin::{ScriptBuf, Transaction};
+ * # use bitcoin::secp256k1::PublicKey;
+ * # use lightning::ln::channelmanager::AChannelManager;
+ * # use lightning::events::{Event, EventsProvider};
+ * #
+ * # trait Wallet {
+ * #     fn create_funding_transaction(
+ * #         &self, _amount_sats: u64, _output_script: ScriptBuf
+ * #     ) -> Transaction;
+ * # }
+ * #
+ * # fn example<T: AChannelManager, W: Wallet>(channel_manager: T, wallet: W, peer_id: PublicKey) {
+ * # let channel_manager = channel_manager.get_cm();
+ * let value_sats = 1_000_000;
+ * let push_msats = 10_000_000;
+ * match channel_manager.create_channel(peer_id, value_sats, push_msats, 42, None, None) {
+ * Ok(channel_id) => println!(\"Opening channel {}\", channel_id),
+ * Err(e) => println!(\"Error opening channel: {:?}\", e),
+ * }
+ * 
+ * On the event processing thread once the peer has responded
+ * channel_manager.process_pending_events(&|event| match event {
+ * Event::FundingGenerationReady {
+ * temporary_channel_id, counterparty_node_id, channel_value_satoshis, output_script,
+ * user_channel_id, ..
+ * } => {
+ * assert_eq!(user_channel_id, 42);
+ * let funding_transaction = wallet.create_funding_transaction(
+ * channel_value_satoshis, output_script
+ * );
+ * match channel_manager.funding_transaction_generated(
+ * &temporary_channel_id, &counterparty_node_id, funding_transaction
+ * ) {
+ * Ok(()) => println!(\"Funding channel {}\", temporary_channel_id),
+ * Err(e) => println!(\"Error funding channel {}: {:?}\", temporary_channel_id, e),
+ * }
+ * },
+ * Event::ChannelPending { channel_id, user_channel_id, former_temporary_channel_id, .. } => {
+ * assert_eq!(user_channel_id, 42);
+ * println!(
+ * \"Channel {} now {} pending (funding transaction has been broadcasted)\", channel_id,
+ * former_temporary_channel_id.unwrap()
+ * );
+ * },
+ * Event::ChannelReady { channel_id, user_channel_id, .. } => {
+ * assert_eq!(user_channel_id, 42);
+ * println!(\"Channel {} ready\", channel_id);
+ * },
+ * ...
+ * #     _ => {},
+ * });
+ * # }
+ * ```
+ * 
+ * ## Accepting Channels
+ * 
+ * Inbound channels are initiated by peers and are automatically accepted unless [`ChannelManager`]
+ * has [`UserConfig::manually_accept_inbound_channels`] set. In that case, the channel may be
+ * either accepted or rejected when handling [`Event::OpenChannelRequest`].
+ * 
+ * ```
+ * # use bitcoin::secp256k1::PublicKey;
+ * # use lightning::ln::channelmanager::AChannelManager;
+ * # use lightning::events::{Event, EventsProvider};
+ * #
+ * # fn is_trusted(counterparty_node_id: PublicKey) -> bool {
+ * #     // ...
+ * #     unimplemented!()
+ * # }
+ * #
+ * # fn example<T: AChannelManager>(channel_manager: T) {
+ * # let channel_manager = channel_manager.get_cm();
+ * channel_manager.process_pending_events(&|event| match event {
+ * Event::OpenChannelRequest { temporary_channel_id, counterparty_node_id, ..  } => {
+ * if !is_trusted(counterparty_node_id) {
+ * match channel_manager.force_close_without_broadcasting_txn(
+ * &temporary_channel_id, &counterparty_node_id
+ * ) {
+ * Ok(()) => println!(\"Rejecting channel {}\", temporary_channel_id),
+ * Err(e) => println!(\"Error rejecting channel {}: {:?}\", temporary_channel_id, e),
+ * }
+ * return;
+ * }
+ * 
+ * let user_channel_id = 43;
+ * match channel_manager.accept_inbound_channel(
+ * &temporary_channel_id, &counterparty_node_id, user_channel_id
+ * ) {
+ * Ok(()) => println!(\"Accepting channel {}\", temporary_channel_id),
+ * Err(e) => println!(\"Error accepting channel {}: {:?}\", temporary_channel_id, e),
+ * }
+ * },
+ * ...
+ * #     _ => {},
+ * });
+ * # }
+ * ```
+ * 
+ * ## Closing Channels
+ * 
+ * There are two ways to close a channel: either cooperatively using [`close_channel`] or
+ * unilaterally using [`force_close_broadcasting_latest_txn`]. The former is ideal as it makes for
+ * lower fees and immediate access to funds. However, the latter may be necessary if the
+ * counterparty isn't behaving properly or has gone offline. [`Event::ChannelClosed`] is generated
+ * once the channel has been closed successfully.
+ * 
+ * ```
+ * # use bitcoin::secp256k1::PublicKey;
+ * # use lightning::ln::types::ChannelId;
+ * # use lightning::ln::channelmanager::AChannelManager;
+ * # use lightning::events::{Event, EventsProvider};
+ * #
+ * # fn example<T: AChannelManager>(
+ * #     channel_manager: T, channel_id: ChannelId, counterparty_node_id: PublicKey
+ * # ) {
+ * # let channel_manager = channel_manager.get_cm();
+ * match channel_manager.close_channel(&channel_id, &counterparty_node_id) {
+ * Ok(()) => println!(\"Closing channel {}\", channel_id),
+ * Err(e) => println!(\"Error closing channel {}: {:?}\", channel_id, e),
+ * }
+ * 
+ * On the event processing thread
+ * channel_manager.process_pending_events(&|event| match event {
+ * Event::ChannelClosed { channel_id, user_channel_id, ..  } => {
+ * assert_eq!(user_channel_id, 42);
+ * println!(\"Channel {} closed\", channel_id);
+ * },
+ * ...
+ * #     _ => {},
+ * });
+ * # }
+ * ```
+ * 
+ * # Payments
+ * 
+ * [`ChannelManager`] is responsible for sending, forwarding, and receiving payments through its
+ * channels. A payment is typically initiated from a [BOLT 11] invoice or a [BOLT 12] offer, though
+ * spontaneous (i.e., keysend) payments are also possible. Incoming payments don't require
+ * maintaining any additional state as [`ChannelManager`] can reconstruct the [`PaymentPreimage`]
+ * from the [`PaymentSecret`]. Sending payments, however, require tracking in order to retry failed
+ * HTLCs.
+ * 
+ * After a payment is initiated, it will appear in [`list_recent_payments`] until a short time
+ * after either an [`Event::PaymentSent`] or [`Event::PaymentFailed`] is handled. Failed HTLCs
+ * for a payment will be retried according to the payment's [`Retry`] strategy or until
+ * [`abandon_payment`] is called.
+ * 
+ * ## BOLT 11 Invoices
+ * 
+ * The [`lightning-invoice`] crate is useful for creating BOLT 11 invoices. Specifically, use the
+ * functions in its `utils` module for constructing invoices that are compatible with
+ * [`ChannelManager`]. These functions serve as a convenience for building invoices with the
+ * [`PaymentHash`] and [`PaymentSecret`] returned from [`create_inbound_payment`]. To provide your
+ * own [`PaymentHash`], use [`create_inbound_payment_for_hash`] or the corresponding functions in
+ * the [`lightning-invoice`] `utils` module.
+ * 
+ * [`ChannelManager`] generates an [`Event::PaymentClaimable`] once the full payment has been
+ * received. Call [`claim_funds`] to release the [`PaymentPreimage`], which in turn will result in
+ * an [`Event::PaymentClaimed`].
+ * 
+ * ```
+ * # use lightning::events::{Event, EventsProvider, PaymentPurpose};
+ * # use lightning::ln::channelmanager::AChannelManager;
+ * #
+ * # fn example<T: AChannelManager>(channel_manager: T) {
+ * # let channel_manager = channel_manager.get_cm();
+ * Or use utils::create_invoice_from_channelmanager
+ * let known_payment_hash = match channel_manager.create_inbound_payment(
+ * Some(10_000_000), 3600, None
+ * ) {
+ * Ok((payment_hash, _payment_secret)) => {
+ * println!(\"Creating inbound payment {}\", payment_hash);
+ * payment_hash
+ * },
+ * Err(()) => panic!(\"Error creating inbound payment\"),
+ * };
+ * 
+ * On the event processing thread
+ * channel_manager.process_pending_events(&|event| match event {
+ * Event::PaymentClaimable { payment_hash, purpose, .. } => match purpose {
+ * PaymentPurpose::Bolt11InvoicePayment { payment_preimage: Some(payment_preimage), .. } => {
+ * assert_eq!(payment_hash, known_payment_hash);
+ * println!(\"Claiming payment {}\", payment_hash);
+ * channel_manager.claim_funds(payment_preimage);
+ * },
+ * PaymentPurpose::Bolt11InvoicePayment { payment_preimage: None, .. } => {
+ * println!(\"Unknown payment hash: {}\", payment_hash);
+ * },
+ * PaymentPurpose::SpontaneousPayment(payment_preimage) => {
+ * assert_ne!(payment_hash, known_payment_hash);
+ * println!(\"Claiming spontaneous payment {}\", payment_hash);
+ * channel_manager.claim_funds(payment_preimage);
+ * },
+ * ...
+ * #         _ => {},
+ * },
+ * Event::PaymentClaimed { payment_hash, amount_msat, .. } => {
+ * assert_eq!(payment_hash, known_payment_hash);
+ * println!(\"Claimed {} msats\", amount_msat);
+ * },
+ * ...
+ * #     _ => {},
+ * });
+ * # }
+ * ```
+ * 
+ * For paying an invoice, [`lightning-invoice`] provides a `payment` module with convenience
+ * functions for use with [`send_payment`].
+ * 
+ * ```
+ * # use lightning::events::{Event, EventsProvider};
+ * # use lightning::ln::types::PaymentHash;
+ * # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails, RecipientOnionFields, Retry};
+ * # use lightning::routing::router::RouteParameters;
+ * #
+ * # fn example<T: AChannelManager>(
+ * #     channel_manager: T, payment_hash: PaymentHash, recipient_onion: RecipientOnionFields,
+ * #     route_params: RouteParameters, retry: Retry
+ * # ) {
+ * # let channel_manager = channel_manager.get_cm();
+ * let (payment_hash, recipient_onion, route_params) =
+ * payment::payment_parameters_from_invoice(&invoice);
+ * let payment_id = PaymentId([42; 32]);
+ * match channel_manager.send_payment(
+ * payment_hash, recipient_onion, payment_id, route_params, retry
+ * ) {
+ * Ok(()) => println!(\"Sending payment with hash {}\", payment_hash),
+ * Err(e) => println!(\"Failed sending payment with hash {}: {:?}\", payment_hash, e),
+ * }
+ * 
+ * let expected_payment_id = payment_id;
+ * let expected_payment_hash = payment_hash;
+ * assert!(
+ * channel_manager.list_recent_payments().iter().find(|details| matches!(
+ * details,
+ * RecentPaymentDetails::Pending {
+ * payment_id: expected_payment_id,
+ * payment_hash: expected_payment_hash,
+ * ..
+ * }
+ * )).is_some()
+ * );
+ * 
+ * On the event processing thread
+ * channel_manager.process_pending_events(&|event| match event {
+ * Event::PaymentSent { payment_hash, .. } => println!(\"Paid {}\", payment_hash),
+ * Event::PaymentFailed { payment_hash, .. } => println!(\"Failed paying {}\", payment_hash),
+ * ...
+ * #     _ => {},
+ * });
+ * # }
+ * ```
+ * 
+ * ## BOLT 12 Offers
+ * 
+ * The [`offers`] module is useful for creating BOLT 12 offers. An [`Offer`] is a precursor to a
+ * [`Bolt12Invoice`], which must first be requested by the payer. The interchange of these messages
+ * as defined in the specification is handled by [`ChannelManager`] and its implementation of
+ * [`OffersMessageHandler`]. However, this only works with an [`Offer`] created using a builder
+ * returned by [`create_offer_builder`]. With this approach, BOLT 12 offers and invoices are
+ * stateless just as BOLT 11 invoices are.
+ * 
+ * ```
+ * # use lightning::events::{Event, EventsProvider, PaymentPurpose};
+ * # use lightning::ln::channelmanager::AChannelManager;
+ * # use lightning::offers::parse::Bolt12SemanticError;
+ * #
+ * # fn example<T: AChannelManager>(channel_manager: T) -> Result<(), Bolt12SemanticError> {
+ * # let channel_manager = channel_manager.get_cm();
+ * let offer = channel_manager
+ * .create_offer_builder()?
+ * # ;
+ * # // Needed for compiling for c_bindings
+ * # let builder: lightning::offers::offer::OfferBuilder<_, _> = offer.into();
+ * # let offer = builder
+ * .description(\"coffee\".to_string())
+ * .amount_msats(10_000_000)
+ * .build()?;
+ * let bech32_offer = offer.to_string();
+ * 
+ * On the event processing thread
+ * channel_manager.process_pending_events(&|event| match event {
+ * Event::PaymentClaimable { payment_hash, purpose, .. } => match purpose {
+ * PaymentPurpose::Bolt12OfferPayment { payment_preimage: Some(payment_preimage), .. } => {
+ * println!(\"Claiming payment {}\", payment_hash);
+ * channel_manager.claim_funds(payment_preimage);
+ * },
+ * PaymentPurpose::Bolt12OfferPayment { payment_preimage: None, .. } => {
+ * println!(\"Unknown payment hash: {}\", payment_hash);
+ * },
+ * ...
+ * #         _ => {},
+ * },
+ * Event::PaymentClaimed { payment_hash, amount_msat, .. } => {
+ * println!(\"Claimed {} msats\", amount_msat);
+ * },
+ * ...
+ * #     _ => {},
+ * });
+ * # Ok(())
+ * # }
+ * ```
+ * 
+ * Use [`pay_for_offer`] to initiated payment, which sends an [`InvoiceRequest`] for an [`Offer`]
+ * and pays the [`Bolt12Invoice`] response. In addition to success and failure events,
+ * [`ChannelManager`] may also generate an [`Event::InvoiceRequestFailed`].
+ * 
+ * ```
+ * # use lightning::events::{Event, EventsProvider};
+ * # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails, Retry};
+ * # use lightning::offers::offer::Offer;
+ * #
+ * # fn example<T: AChannelManager>(
+ * #     channel_manager: T, offer: &Offer, quantity: Option<u64>, amount_msats: Option<u64>,
+ * #     payer_note: Option<String>, retry: Retry, max_total_routing_fee_msat: Option<u64>
+ * # ) {
+ * # let channel_manager = channel_manager.get_cm();
+ * let payment_id = PaymentId([42; 32]);
+ * match channel_manager.pay_for_offer(
+ * offer, quantity, amount_msats, payer_note, payment_id, retry, max_total_routing_fee_msat
+ * ) {
+ * Ok(()) => println!(\"Requesting invoice for offer\"),
+ * Err(e) => println!(\"Unable to request invoice for offer: {:?}\", e),
+ * }
+ * 
+ * First the payment will be waiting on an invoice
+ * let expected_payment_id = payment_id;
+ * assert!(
+ * channel_manager.list_recent_payments().iter().find(|details| matches!(
+ * details,
+ * RecentPaymentDetails::AwaitingInvoice { payment_id: expected_payment_id }
+ * )).is_some()
+ * );
+ * 
+ * Once the invoice is received, a payment will be sent
+ * assert!(
+ * channel_manager.list_recent_payments().iter().find(|details| matches!(
+ * details,
+ * RecentPaymentDetails::Pending { payment_id: expected_payment_id, ..  }
+ * )).is_some()
+ * );
+ * 
+ * On the event processing thread
+ * channel_manager.process_pending_events(&|event| match event {
+ * Event::PaymentSent { payment_id: Some(payment_id), .. } => println!(\"Paid {}\", payment_id),
+ * Event::PaymentFailed { payment_id, .. } => println!(\"Failed paying {}\", payment_id),
+ * Event::InvoiceRequestFailed { payment_id, .. } => println!(\"Failed paying {}\", payment_id),
+ * ...
+ * #     _ => {},
+ * });
+ * # }
+ * ```
+ * 
+ * ## BOLT 12 Refunds
+ * 
+ * A [`Refund`] is a request for an invoice to be paid. Like *paying* for an [`Offer`], *creating*
+ * a [`Refund`] involves maintaining state since it represents a future outbound payment.
+ * Therefore, use [`create_refund_builder`] when creating one, otherwise [`ChannelManager`] will
+ * refuse to pay any corresponding [`Bolt12Invoice`] that it receives.
+ * 
+ * ```
+ * # use core::time::Duration;
+ * # use lightning::events::{Event, EventsProvider};
+ * # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails, Retry};
+ * # use lightning::offers::parse::Bolt12SemanticError;
+ * #
+ * # fn example<T: AChannelManager>(
+ * #     channel_manager: T, amount_msats: u64, absolute_expiry: Duration, retry: Retry,
+ * #     max_total_routing_fee_msat: Option<u64>
+ * # ) -> Result<(), Bolt12SemanticError> {
+ * # let channel_manager = channel_manager.get_cm();
+ * let payment_id = PaymentId([42; 32]);
+ * let refund = channel_manager
+ * .create_refund_builder(
+ * amount_msats, absolute_expiry, payment_id, retry, max_total_routing_fee_msat
+ * )?
+ * # ;
+ * # // Needed for compiling for c_bindings
+ * # let builder: lightning::offers::refund::RefundBuilder<_> = refund.into();
+ * # let refund = builder
+ * .description(\"coffee\".to_string())
+ * .payer_note(\"refund for order 1234\".to_string())
+ * .build()?;
+ * let bech32_refund = refund.to_string();
+ * 
+ * First the payment will be waiting on an invoice
+ * let expected_payment_id = payment_id;
+ * assert!(
+ * channel_manager.list_recent_payments().iter().find(|details| matches!(
+ * details,
+ * RecentPaymentDetails::AwaitingInvoice { payment_id: expected_payment_id }
+ * )).is_some()
+ * );
+ * 
+ * Once the invoice is received, a payment will be sent
+ * assert!(
+ * channel_manager.list_recent_payments().iter().find(|details| matches!(
+ * details,
+ * RecentPaymentDetails::Pending { payment_id: expected_payment_id, ..  }
+ * )).is_some()
+ * );
+ * 
+ * On the event processing thread
+ * channel_manager.process_pending_events(&|event| match event {
+ * Event::PaymentSent { payment_id: Some(payment_id), .. } => println!(\"Paid {}\", payment_id),
+ * Event::PaymentFailed { payment_id, .. } => println!(\"Failed paying {}\", payment_id),
+ * ...
+ * #     _ => {},
+ * });
+ * # Ok(())
+ * # }
+ * ```
+ * 
+ * Use [`request_refund_payment`] to send a [`Bolt12Invoice`] for receiving the refund. Similar to
+ * creating* an [`Offer`], this is stateless as it represents an inbound payment.
+ * 
+ * ```
+ * # use lightning::events::{Event, EventsProvider, PaymentPurpose};
+ * # use lightning::ln::channelmanager::AChannelManager;
+ * # use lightning::offers::refund::Refund;
+ * #
+ * # fn example<T: AChannelManager>(channel_manager: T, refund: &Refund) {
+ * # let channel_manager = channel_manager.get_cm();
+ * let known_payment_hash = match channel_manager.request_refund_payment(refund) {
+ * Ok(invoice) => {
+ * let payment_hash = invoice.payment_hash();
+ * println!(\"Requesting refund payment {}\", payment_hash);
+ * payment_hash
+ * },
+ * Err(e) => panic!(\"Unable to request payment for refund: {:?}\", e),
+ * };
+ * 
+ * On the event processing thread
+ * channel_manager.process_pending_events(&|event| match event {
+ * Event::PaymentClaimable { payment_hash, purpose, .. } => match purpose {
+ * \tPaymentPurpose::Bolt12RefundPayment { payment_preimage: Some(payment_preimage), .. } => {
+ * assert_eq!(payment_hash, known_payment_hash);
+ * println!(\"Claiming payment {}\", payment_hash);
+ * channel_manager.claim_funds(payment_preimage);
+ * },
+ * \tPaymentPurpose::Bolt12RefundPayment { payment_preimage: None, .. } => {
+ * println!(\"Unknown payment hash: {}\", payment_hash);
+ * \t},
+ * ...
+ * #         _ => {},
+ * },
+ * Event::PaymentClaimed { payment_hash, amount_msat, .. } => {
+ * assert_eq!(payment_hash, known_payment_hash);
+ * println!(\"Claimed {} msats\", amount_msat);
+ * },
+ * ...
+ * #     _ => {},
+ * });
+ * # }
+ * ```
+ * 
+ * # Persistence
  * 
  * Implements [`Writeable`] to write out all channel state to disk. Implies [`peer_disconnected`] for
  * all peers during write/read (though does not modify this instance, only the instance being
@@ -34,12 +652,16 @@ import javax.annotation.Nullable;
  * tells you the last block hash which was connected. You should get the best block tip before using the manager.
  * See [`chain::Listen`] and [`chain::Confirm`] for more details.
  * 
+ * # `ChannelUpdate` Messages
+ * 
  * Note that `ChannelManager` is responsible for tracking liveness of its channels and generating
  * [`ChannelUpdate`] messages informing peers that the channel is temporarily disabled. To avoid
  * spam due to quick disconnection/reconnection, updates are not sent until the channel has been
  * offline for a full minute. In order to track this, you must call
  * [`timer_tick_occurred`] roughly once per minute, though it doesn't have to be perfect.
  * 
+ * # DoS Mitigation
+ * 
  * To avoid trivial DoS issues, `ChannelManager` limits the number of inbound connections and
  * inbound channels without confirmed funding transactions. This may result in nodes which we do
  * not have a channel with being unable to connect to us or open new channels with us if we have
@@ -49,19 +671,53 @@ import javax.annotation.Nullable;
  * exempted from the count of unfunded channels. Similarly, outbound channels and connections are
  * never limited. Please ensure you limit the count of such channels yourself.
  * 
+ * # Type Aliases
+ * 
  * Rather than using a plain `ChannelManager`, it is preferable to use either a [`SimpleArcChannelManager`]
  * a [`SimpleRefChannelManager`], for conciseness. See their documentation for more details, but
  * essentially you should default to using a [`SimpleRefChannelManager`], and use a
  * [`SimpleArcChannelManager`] when you require a `ChannelManager` with a static lifetime, such as when
  * you're using lightning-net-tokio.
  * 
+ * [`ChainMonitor`]: crate::chain::chainmonitor::ChainMonitor
+ * [`MessageHandler`]: crate::ln::peer_handler::MessageHandler
+ * [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger
+ * [`PeerManager::read_event`]: crate::ln::peer_handler::PeerManager::read_event
+ * [`PeerManager::process_events`]: crate::ln::peer_handler::PeerManager::process_events
+ * [`timer_tick_occurred`]: Self::timer_tick_occurred
+ * [`get_and_clear_needs_persistence`]: Self::get_and_clear_needs_persistence
+ * [`Persister`]: crate::util::persist::Persister
+ * [`KVStore`]: crate::util::persist::KVStore
+ * [`get_event_or_persistence_needed_future`]: Self::get_event_or_persistence_needed_future
+ * [`lightning-block-sync`]: https://docs.rs/lightning_block_sync/latest/lightning_block_sync
+ * [`lightning-transaction-sync`]: https://docs.rs/lightning_transaction_sync/latest/lightning_transaction_sync
+ * [`lightning-background-processor`]: https://docs.rs/lightning_background_processor/lightning_background_processor
+ * [`list_channels`]: Self::list_channels
+ * [`list_usable_channels`]: Self::list_usable_channels
+ * [`create_channel`]: Self::create_channel
+ * [`close_channel`]: Self::force_close_broadcasting_latest_txn
+ * [`force_close_broadcasting_latest_txn`]: Self::force_close_broadcasting_latest_txn
+ * [BOLT 11]: https://github.com/lightning/bolts/blob/master/11-payment-encoding.md
+ * [BOLT 12]: https://github.com/rustyrussell/lightning-rfc/blob/guilt/offers/12-offer-encoding.md
+ * [`list_recent_payments`]: Self::list_recent_payments
+ * [`abandon_payment`]: Self::abandon_payment
+ * [`lightning-invoice`]: https://docs.rs/lightning_invoice/latest/lightning_invoice
+ * [`create_inbound_payment`]: Self::create_inbound_payment
+ * [`create_inbound_payment_for_hash`]: Self::create_inbound_payment_for_hash
+ * [`claim_funds`]: Self::claim_funds
+ * [`send_payment`]: Self::send_payment
+ * [`offers`]: crate::offers
+ * [`create_offer_builder`]: Self::create_offer_builder
+ * [`pay_for_offer`]: Self::pay_for_offer
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`create_refund_builder`]: Self::create_refund_builder
+ * [`request_refund_payment`]: Self::request_refund_payment
  * [`peer_disconnected`]: msgs::ChannelMessageHandler::peer_disconnected
  * [`funding_created`]: msgs::FundingCreated
  * [`funding_transaction_generated`]: Self::funding_transaction_generated
  * [`BlockHash`]: bitcoin::hash_types::BlockHash
  * [`update_channel`]: chain::Watch::update_channel
  * [`ChannelUpdate`]: msgs::ChannelUpdate
- * [`timer_tick_occurred`]: Self::timer_tick_occurred
  * [`read`]: ReadableArgs::read
  */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
@@ -93,7 +749,7 @@ public class ChannelManager extends CommonBase {
         * [`params.best_block.block_hash`]: chain::BestBlock::block_hash
         */
        public static ChannelManager of(org.ldk.structs.FeeEstimator fee_est, org.ldk.structs.Watch chain_monitor, org.ldk.structs.BroadcasterInterface tx_broadcaster, org.ldk.structs.Router router, org.ldk.structs.Logger logger, org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.SignerProvider signer_provider, org.ldk.structs.UserConfig config, org.ldk.structs.ChainParameters params, int current_timestamp) {
-               long ret = bindings.ChannelManager_new(fee_est.ptr, chain_monitor.ptr, tx_broadcaster.ptr, router.ptr, logger.ptr, entropy_source.ptr, node_signer.ptr, signer_provider.ptr, config == null ? 0 : config.ptr, params == null ? 0 : params.ptr, current_timestamp);
+               long ret = bindings.ChannelManager_new(fee_est.ptr, chain_monitor.ptr, tx_broadcaster.ptr, router.ptr, logger.ptr, entropy_source.ptr, node_signer.ptr, signer_provider.ptr, config.ptr, params.ptr, current_timestamp);
                Reference.reachabilityFence(fee_est);
                Reference.reachabilityFence(chain_monitor);
                Reference.reachabilityFence(tx_broadcaster);
@@ -167,10 +823,11 @@ public class ChannelManager extends CommonBase {
         * [`Event::FundingGenerationReady::temporary_channel_id`]: events::Event::FundingGenerationReady::temporary_channel_id
         * [`Event::ChannelClosed::channel_id`]: events::Event::ChannelClosed::channel_id
         * 
+        * Note that temporary_channel_id (or a relevant inner pointer) may be NULL or all-0s to represent None
         * Note that override_config (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public Result_ThirtyTwoBytesAPIErrorZ create_channel(byte[] their_network_key, long channel_value_satoshis, long push_msat, org.ldk.util.UInt128 user_channel_id, org.ldk.structs.Option_ThirtyTwoBytesZ temporary_channel_id, @Nullable org.ldk.structs.UserConfig override_config) {
-               long ret = bindings.ChannelManager_create_channel(this.ptr, InternalUtils.check_arr_len(their_network_key, 33), channel_value_satoshis, push_msat, user_channel_id.getLEBytes(), temporary_channel_id.ptr, override_config == null ? 0 : override_config.ptr);
+       public Result_ChannelIdAPIErrorZ create_channel(byte[] their_network_key, long channel_value_satoshis, long push_msat, org.ldk.util.UInt128 user_channel_id, @Nullable org.ldk.structs.ChannelId temporary_channel_id, @Nullable org.ldk.structs.UserConfig override_config) {
+               long ret = bindings.ChannelManager_create_channel(this.ptr, InternalUtils.check_arr_len(their_network_key, 33), channel_value_satoshis, push_msat, user_channel_id.getLEBytes(), temporary_channel_id == null ? 0 : temporary_channel_id.ptr, override_config == null ? 0 : override_config.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_network_key);
                Reference.reachabilityFence(channel_value_satoshis);
@@ -179,7 +836,7 @@ public class ChannelManager extends CommonBase {
                Reference.reachabilityFence(temporary_channel_id);
                Reference.reachabilityFence(override_config);
                if (ret >= 0 && ret <= 4096) { return null; }
-               Result_ThirtyTwoBytesAPIErrorZ ret_hu_conv = Result_ThirtyTwoBytesAPIErrorZ.constr_from_ptr(ret);
+               Result_ChannelIdAPIErrorZ ret_hu_conv = Result_ChannelIdAPIErrorZ.constr_from_ptr(ret);
                if (this != null) { this.ptrs_to.add(temporary_channel_id); };
                if (this != null) { this.ptrs_to.add(override_config); };
                return ret_hu_conv;
@@ -292,13 +949,14 @@ public class ChannelManager extends CommonBase {
         * [`NonAnchorChannelFee`]: crate::chain::chaininterface::ConfirmationTarget::NonAnchorChannelFee
         * [`SendShutdown`]: crate::events::MessageSendEvent::SendShutdown
         */
-       public Result_NoneAPIErrorZ close_channel(byte[] channel_id, byte[] counterparty_node_id) {
-               long ret = bindings.ChannelManager_close_channel(this.ptr, InternalUtils.check_arr_len(channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33));
+       public Result_NoneAPIErrorZ close_channel(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id) {
+               long ret = bindings.ChannelManager_close_channel(this.ptr, channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33));
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(channel_id);
                Reference.reachabilityFence(counterparty_node_id);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(channel_id); };
                return ret_hu_conv;
        }
 
@@ -335,8 +993,8 @@ public class ChannelManager extends CommonBase {
         * 
         * Note that shutdown_script (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public Result_NoneAPIErrorZ close_channel_with_feerate_and_script(byte[] channel_id, byte[] counterparty_node_id, org.ldk.structs.Option_u32Z target_feerate_sats_per_1000_weight, @Nullable org.ldk.structs.ShutdownScript shutdown_script) {
-               long ret = bindings.ChannelManager_close_channel_with_feerate_and_script(this.ptr, InternalUtils.check_arr_len(channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33), target_feerate_sats_per_1000_weight.ptr, shutdown_script == null ? 0 : shutdown_script.ptr);
+       public Result_NoneAPIErrorZ close_channel_with_feerate_and_script(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id, org.ldk.structs.Option_u32Z target_feerate_sats_per_1000_weight, @Nullable org.ldk.structs.ShutdownScript shutdown_script) {
+               long ret = bindings.ChannelManager_close_channel_with_feerate_and_script(this.ptr, channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), target_feerate_sats_per_1000_weight.ptr, shutdown_script == null ? 0 : shutdown_script.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(channel_id);
                Reference.reachabilityFence(counterparty_node_id);
@@ -344,6 +1002,7 @@ public class ChannelManager extends CommonBase {
                Reference.reachabilityFence(shutdown_script);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(channel_id); };
                if (this != null) { this.ptrs_to.add(target_feerate_sats_per_1000_weight); };
                if (this != null) { this.ptrs_to.add(shutdown_script); };
                return ret_hu_conv;
@@ -355,13 +1014,14 @@ public class ChannelManager extends CommonBase {
         * the manager, or if the `counterparty_node_id` isn't the counterparty of the corresponding
         * channel.
         */
-       public Result_NoneAPIErrorZ force_close_broadcasting_latest_txn(byte[] channel_id, byte[] counterparty_node_id) {
-               long ret = bindings.ChannelManager_force_close_broadcasting_latest_txn(this.ptr, InternalUtils.check_arr_len(channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33));
+       public Result_NoneAPIErrorZ force_close_broadcasting_latest_txn(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id) {
+               long ret = bindings.ChannelManager_force_close_broadcasting_latest_txn(this.ptr, channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33));
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(channel_id);
                Reference.reachabilityFence(counterparty_node_id);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(channel_id); };
                return ret_hu_conv;
        }
 
@@ -370,16 +1030,17 @@ public class ChannelManager extends CommonBase {
         * the latest local transaction(s). Fails if `channel_id` is unknown to the manager, or if the
         * `counterparty_node_id` isn't the counterparty of the corresponding channel.
         * 
-        * You can always get the latest local transaction(s) to broadcast from
-        * [`ChannelMonitor::get_latest_holder_commitment_txn`].
+        * You can always broadcast the latest local transaction(s) via
+        * [`ChannelMonitor::broadcast_latest_holder_commitment_txn`].
         */
-       public Result_NoneAPIErrorZ force_close_without_broadcasting_txn(byte[] channel_id, byte[] counterparty_node_id) {
-               long ret = bindings.ChannelManager_force_close_without_broadcasting_txn(this.ptr, InternalUtils.check_arr_len(channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33));
+       public Result_NoneAPIErrorZ force_close_without_broadcasting_txn(org.ldk.structs.ChannelId channel_id, byte[] counterparty_node_id) {
+               long ret = bindings.ChannelManager_force_close_without_broadcasting_txn(this.ptr, channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33));
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(channel_id);
                Reference.reachabilityFence(counterparty_node_id);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(channel_id); };
                return ret_hu_conv;
        }
 
@@ -455,7 +1116,7 @@ public class ChannelManager extends CommonBase {
         * [`ChannelMonitorUpdateStatus::InProgress`]: crate::chain::ChannelMonitorUpdateStatus::InProgress
         */
        public Result_NonePaymentSendFailureZ send_payment_with_route(org.ldk.structs.Route route, byte[] payment_hash, org.ldk.structs.RecipientOnionFields recipient_onion, byte[] payment_id) {
-               long ret = bindings.ChannelManager_send_payment_with_route(this.ptr, route == null ? 0 : route.ptr, InternalUtils.check_arr_len(payment_hash, 32), recipient_onion == null ? 0 : recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32));
+               long ret = bindings.ChannelManager_send_payment_with_route(this.ptr, route.ptr, InternalUtils.check_arr_len(payment_hash, 32), recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32));
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(route);
                Reference.reachabilityFence(payment_hash);
@@ -473,7 +1134,7 @@ public class ChannelManager extends CommonBase {
         * `route_params` and retry failed payment paths based on `retry_strategy`.
         */
        public Result_NoneRetryableSendFailureZ send_payment(byte[] payment_hash, org.ldk.structs.RecipientOnionFields recipient_onion, byte[] payment_id, org.ldk.structs.RouteParameters route_params, org.ldk.structs.Retry retry_strategy) {
-               long ret = bindings.ChannelManager_send_payment(this.ptr, InternalUtils.check_arr_len(payment_hash, 32), recipient_onion == null ? 0 : recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32), route_params == null ? 0 : route_params.ptr, retry_strategy.ptr);
+               long ret = bindings.ChannelManager_send_payment(this.ptr, InternalUtils.check_arr_len(payment_hash, 32), recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32), route_params.ptr, retry_strategy.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(payment_hash);
                Reference.reachabilityFence(recipient_onion);
@@ -539,7 +1200,7 @@ public class ChannelManager extends CommonBase {
         * [`send_payment`]: Self::send_payment
         */
        public Result_ThirtyTwoBytesPaymentSendFailureZ send_spontaneous_payment(org.ldk.structs.Route route, org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, org.ldk.structs.RecipientOnionFields recipient_onion, byte[] payment_id) {
-               long ret = bindings.ChannelManager_send_spontaneous_payment(this.ptr, route == null ? 0 : route.ptr, payment_preimage.ptr, recipient_onion == null ? 0 : recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32));
+               long ret = bindings.ChannelManager_send_spontaneous_payment(this.ptr, route.ptr, payment_preimage.ptr, recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32));
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(route);
                Reference.reachabilityFence(payment_preimage);
@@ -563,7 +1224,7 @@ public class ChannelManager extends CommonBase {
         * [`PaymentParameters::for_keysend`]: crate::routing::router::PaymentParameters::for_keysend
         */
        public Result_ThirtyTwoBytesRetryableSendFailureZ send_spontaneous_payment_with_retry(org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, org.ldk.structs.RecipientOnionFields recipient_onion, byte[] payment_id, org.ldk.structs.RouteParameters route_params, org.ldk.structs.Retry retry_strategy) {
-               long ret = bindings.ChannelManager_send_spontaneous_payment_with_retry(this.ptr, payment_preimage.ptr, recipient_onion == null ? 0 : recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32), route_params == null ? 0 : route_params.ptr, retry_strategy.ptr);
+               long ret = bindings.ChannelManager_send_spontaneous_payment_with_retry(this.ptr, payment_preimage.ptr, recipient_onion.ptr, InternalUtils.check_arr_len(payment_id, 32), route_params.ptr, retry_strategy.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(payment_preimage);
                Reference.reachabilityFence(recipient_onion);
@@ -585,7 +1246,7 @@ public class ChannelManager extends CommonBase {
         * us to easily discern them from real payments.
         */
        public Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ send_probe(org.ldk.structs.Path path) {
-               long ret = bindings.ChannelManager_send_probe(this.ptr, path == null ? 0 : path.ptr);
+               long ret = bindings.ChannelManager_send_probe(this.ptr, path.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(path);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -630,7 +1291,7 @@ public class ChannelManager extends CommonBase {
         * probes. If `None` is given as `liquidity_limit_multiplier`, it defaults to `3`.
         */
        public Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ send_preflight_probes(org.ldk.structs.RouteParameters route_params, org.ldk.structs.Option_u64Z liquidity_limit_multiplier) {
-               long ret = bindings.ChannelManager_send_preflight_probes(this.ptr, route_params == null ? 0 : route_params.ptr, liquidity_limit_multiplier.ptr);
+               long ret = bindings.ChannelManager_send_preflight_probes(this.ptr, route_params.ptr, liquidity_limit_multiplier.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(route_params);
                Reference.reachabilityFence(liquidity_limit_multiplier);
@@ -673,14 +1334,15 @@ public class ChannelManager extends CommonBase {
         * [`Event::FundingGenerationReady`]: crate::events::Event::FundingGenerationReady
         * [`Event::ChannelClosed`]: crate::events::Event::ChannelClosed
         */
-       public Result_NoneAPIErrorZ funding_transaction_generated(byte[] temporary_channel_id, byte[] counterparty_node_id, byte[] funding_transaction) {
-               long ret = bindings.ChannelManager_funding_transaction_generated(this.ptr, InternalUtils.check_arr_len(temporary_channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33), funding_transaction);
+       public Result_NoneAPIErrorZ funding_transaction_generated(org.ldk.structs.ChannelId temporary_channel_id, byte[] counterparty_node_id, byte[] funding_transaction) {
+               long ret = bindings.ChannelManager_funding_transaction_generated(this.ptr, temporary_channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), funding_transaction);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(temporary_channel_id);
                Reference.reachabilityFence(counterparty_node_id);
                Reference.reachabilityFence(funding_transaction);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(temporary_channel_id); };
                return ret_hu_conv;
        }
 
@@ -696,8 +1358,8 @@ public class ChannelManager extends CommonBase {
         * 
         * If there is an error, all channels in the batch are to be considered closed.
         */
-       public Result_NoneAPIErrorZ batch_funding_transaction_generated(TwoTuple_ThirtyTwoBytesPublicKeyZ[] temporary_channels, byte[] funding_transaction) {
-               long ret = bindings.ChannelManager_batch_funding_transaction_generated(this.ptr, temporary_channels != null ? Arrays.stream(temporary_channels).mapToLong(temporary_channels_conv_35 -> temporary_channels_conv_35 != null ? temporary_channels_conv_35.ptr : 0).toArray() : null, funding_transaction);
+       public Result_NoneAPIErrorZ batch_funding_transaction_generated(TwoTuple_ChannelIdPublicKeyZ[] temporary_channels, byte[] funding_transaction) {
+               long ret = bindings.ChannelManager_batch_funding_transaction_generated(this.ptr, temporary_channels != null ? Arrays.stream(temporary_channels).mapToLong(temporary_channels_conv_30 -> temporary_channels_conv_30.ptr).toArray() : null, funding_transaction);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(temporary_channels);
                Reference.reachabilityFence(funding_transaction);
@@ -730,14 +1392,15 @@ public class ChannelManager extends CommonBase {
         * [`ChannelUnavailable`]: APIError::ChannelUnavailable
         * [`APIMisuseError`]: APIError::APIMisuseError
         */
-       public Result_NoneAPIErrorZ update_partial_channel_config(byte[] counterparty_node_id, byte[][] channel_ids, org.ldk.structs.ChannelConfigUpdate config_update) {
-               long ret = bindings.ChannelManager_update_partial_channel_config(this.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), channel_ids != null ? Arrays.stream(channel_ids).map(channel_ids_conv_8 -> InternalUtils.check_arr_len(channel_ids_conv_8, 32)).toArray(byte[][]::new) : null, config_update == null ? 0 : config_update.ptr);
+       public Result_NoneAPIErrorZ update_partial_channel_config(byte[] counterparty_node_id, ChannelId[] channel_ids, org.ldk.structs.ChannelConfigUpdate config_update) {
+               long ret = bindings.ChannelManager_update_partial_channel_config(this.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), channel_ids != null ? Arrays.stream(channel_ids).mapToLong(channel_ids_conv_11 -> channel_ids_conv_11.ptr).toArray() : null, config_update.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(counterparty_node_id);
                Reference.reachabilityFence(channel_ids);
                Reference.reachabilityFence(config_update);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+               for (ChannelId channel_ids_conv_11: channel_ids) { if (this != null) { this.ptrs_to.add(channel_ids_conv_11); }; };
                if (this != null) { this.ptrs_to.add(config_update); };
                return ret_hu_conv;
        }
@@ -766,14 +1429,15 @@ public class ChannelManager extends CommonBase {
         * [`ChannelUnavailable`]: APIError::ChannelUnavailable
         * [`APIMisuseError`]: APIError::APIMisuseError
         */
-       public Result_NoneAPIErrorZ update_channel_config(byte[] counterparty_node_id, byte[][] channel_ids, org.ldk.structs.ChannelConfig config) {
-               long ret = bindings.ChannelManager_update_channel_config(this.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), channel_ids != null ? Arrays.stream(channel_ids).map(channel_ids_conv_8 -> InternalUtils.check_arr_len(channel_ids_conv_8, 32)).toArray(byte[][]::new) : null, config == null ? 0 : config.ptr);
+       public Result_NoneAPIErrorZ update_channel_config(byte[] counterparty_node_id, ChannelId[] channel_ids, org.ldk.structs.ChannelConfig config) {
+               long ret = bindings.ChannelManager_update_channel_config(this.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), channel_ids != null ? Arrays.stream(channel_ids).mapToLong(channel_ids_conv_11 -> channel_ids_conv_11.ptr).toArray() : null, config.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(counterparty_node_id);
                Reference.reachabilityFence(channel_ids);
                Reference.reachabilityFence(config);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+               for (ChannelId channel_ids_conv_11: channel_ids) { if (this != null) { this.ptrs_to.add(channel_ids_conv_11); }; };
                if (this != null) { this.ptrs_to.add(config); };
                return ret_hu_conv;
        }
@@ -803,8 +1467,8 @@ public class ChannelManager extends CommonBase {
         * [`HTLCIntercepted`]: events::Event::HTLCIntercepted
         * [`HTLCIntercepted::expected_outbound_amount_msat`]: events::Event::HTLCIntercepted::expected_outbound_amount_msat
         */
-       public Result_NoneAPIErrorZ forward_intercepted_htlc(byte[] intercept_id, byte[] next_hop_channel_id, byte[] next_node_id, long amt_to_forward_msat) {
-               long ret = bindings.ChannelManager_forward_intercepted_htlc(this.ptr, InternalUtils.check_arr_len(intercept_id, 32), InternalUtils.check_arr_len(next_hop_channel_id, 32), InternalUtils.check_arr_len(next_node_id, 33), amt_to_forward_msat);
+       public Result_NoneAPIErrorZ forward_intercepted_htlc(byte[] intercept_id, org.ldk.structs.ChannelId next_hop_channel_id, byte[] next_node_id, long amt_to_forward_msat) {
+               long ret = bindings.ChannelManager_forward_intercepted_htlc(this.ptr, InternalUtils.check_arr_len(intercept_id, 32), next_hop_channel_id.ptr, InternalUtils.check_arr_len(next_node_id, 33), amt_to_forward_msat);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(intercept_id);
                Reference.reachabilityFence(next_hop_channel_id);
@@ -812,6 +1476,7 @@ public class ChannelManager extends CommonBase {
                Reference.reachabilityFence(amt_to_forward_msat);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(next_hop_channel_id); };
                return ret_hu_conv;
        }
 
@@ -983,14 +1648,15 @@ public class ChannelManager extends CommonBase {
         * [`Event::OpenChannelRequest`]: events::Event::OpenChannelRequest
         * [`Event::ChannelClosed::user_channel_id`]: events::Event::ChannelClosed::user_channel_id
         */
-       public Result_NoneAPIErrorZ accept_inbound_channel(byte[] temporary_channel_id, byte[] counterparty_node_id, org.ldk.util.UInt128 user_channel_id) {
-               long ret = bindings.ChannelManager_accept_inbound_channel(this.ptr, InternalUtils.check_arr_len(temporary_channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33), user_channel_id.getLEBytes());
+       public Result_NoneAPIErrorZ accept_inbound_channel(org.ldk.structs.ChannelId temporary_channel_id, byte[] counterparty_node_id, org.ldk.util.UInt128 user_channel_id) {
+               long ret = bindings.ChannelManager_accept_inbound_channel(this.ptr, temporary_channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), user_channel_id.getLEBytes());
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(temporary_channel_id);
                Reference.reachabilityFence(counterparty_node_id);
                Reference.reachabilityFence(user_channel_id);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(temporary_channel_id); };
                return ret_hu_conv;
        }
 
@@ -1014,14 +1680,113 @@ public class ChannelManager extends CommonBase {
         * [`Event::OpenChannelRequest`]: events::Event::OpenChannelRequest
         * [`Event::ChannelClosed::user_channel_id`]: events::Event::ChannelClosed::user_channel_id
         */
-       public Result_NoneAPIErrorZ accept_inbound_channel_from_trusted_peer_0conf(byte[] temporary_channel_id, byte[] counterparty_node_id, org.ldk.util.UInt128 user_channel_id) {
-               long ret = bindings.ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(this.ptr, InternalUtils.check_arr_len(temporary_channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33), user_channel_id.getLEBytes());
+       public Result_NoneAPIErrorZ accept_inbound_channel_from_trusted_peer_0conf(org.ldk.structs.ChannelId temporary_channel_id, byte[] counterparty_node_id, org.ldk.util.UInt128 user_channel_id) {
+               long ret = bindings.ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(this.ptr, temporary_channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), user_channel_id.getLEBytes());
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(temporary_channel_id);
                Reference.reachabilityFence(counterparty_node_id);
                Reference.reachabilityFence(user_channel_id);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(temporary_channel_id); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates an [`OfferBuilder`] such that the [`Offer`] it builds is recognized by the
+        * [`ChannelManager`] when handling [`InvoiceRequest`] messages for the offer. The offer will
+        * not have an expiration unless otherwise set on the builder.
+        * 
+        * # Privacy
+        * 
+        * Uses [`MessageRouter::create_blinded_paths`] to construct a [`BlindedPath`] for the offer.
+        * However, if one is not found, uses a one-hop [`BlindedPath`] with
+        * [`ChannelManager::get_our_node_id`] as the introduction node instead. In the latter case,
+        * the node must be announced, otherwise, there is no way to find a path to the introduction in
+        * order to send the [`InvoiceRequest`].
+        * 
+        * Also, uses a derived signing pubkey in the offer for recipient privacy.
+        * 
+        * # Limitations
+        * 
+        * Requires a direct connection to the introduction node in the responding [`InvoiceRequest`]'s
+        * reply path.
+        * 
+        * # Errors
+        * 
+        * Errors if the parameterized [`Router`] is unable to create a blinded path for the offer.
+        * 
+        * [`Offer`]: crate::offers::offer::Offer
+        * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+        */
+       public Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ create_offer_builder() {
+               long ret = bindings.ChannelManager_create_offer_builder(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a [`RefundBuilder`] such that the [`Refund`] it builds is recognized by the
+        * [`ChannelManager`] when handling [`Bolt12Invoice`] messages for the refund.
+        * 
+        * # Payment
+        * 
+        * The provided `payment_id` is used to ensure that only one invoice is paid for the refund.
+        * See [Avoiding Duplicate Payments] for other requirements once the payment has been sent.
+        * 
+        * The builder will have the provided expiration set. Any changes to the expiration on the
+        * returned builder will not be honored by [`ChannelManager`]. For `no-std`, the highest seen
+        * block time minus two hours is used for the current time when determining if the refund has
+        * expired.
+        * 
+        * To revoke the refund, use [`ChannelManager::abandon_payment`] prior to receiving the
+        * invoice. If abandoned, or an invoice isn't received before expiration, the payment will fail
+        * with an [`Event::InvoiceRequestFailed`].
+        * 
+        * If `max_total_routing_fee_msat` is not specified, The default from
+        * [`RouteParameters::from_payment_params_and_value`] is applied.
+        * 
+        * # Privacy
+        * 
+        * Uses [`MessageRouter::create_blinded_paths`] to construct a [`BlindedPath`] for the refund.
+        * However, if one is not found, uses a one-hop [`BlindedPath`] with
+        * [`ChannelManager::get_our_node_id`] as the introduction node instead. In the latter case,
+        * the node must be announced, otherwise, there is no way to find a path to the introduction in
+        * order to send the [`Bolt12Invoice`].
+        * 
+        * Also, uses a derived payer id in the refund for payer privacy.
+        * 
+        * # Limitations
+        * 
+        * Requires a direct connection to an introduction node in the responding
+        * [`Bolt12Invoice::payment_paths`].
+        * 
+        * # Errors
+        * 
+        * Errors if:
+        * - a duplicate `payment_id` is provided given the caveats in the aforementioned link,
+        * - `amount_msats` is invalid, or
+        * - the parameterized [`Router`] is unable to create a blinded path for the refund.
+        * 
+        * [`Refund`]: crate::offers::refund::Refund
+        * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+        * [`Bolt12Invoice::payment_paths`]: crate::offers::invoice::Bolt12Invoice::payment_paths
+        * [Avoiding Duplicate Payments]: #avoiding-duplicate-payments
+        */
+       public Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ create_refund_builder(long amount_msats, long absolute_expiry, byte[] payment_id, org.ldk.structs.Retry retry_strategy, org.ldk.structs.Option_u64Z max_total_routing_fee_msat) {
+               long ret = bindings.ChannelManager_create_refund_builder(this.ptr, amount_msats, absolute_expiry, InternalUtils.check_arr_len(payment_id, 32), retry_strategy.ptr, max_total_routing_fee_msat.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(amount_msats);
+               Reference.reachabilityFence(absolute_expiry);
+               Reference.reachabilityFence(payment_id);
+               Reference.reachabilityFence(retry_strategy);
+               Reference.reachabilityFence(max_total_routing_fee_msat);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(retry_strategy); };
+               if (this != null) { this.ptrs_to.add(max_total_routing_fee_msat); };
                return ret_hu_conv;
        }
 
@@ -1069,6 +1834,7 @@ public class ChannelManager extends CommonBase {
         * Errors if:
         * - a duplicate `payment_id` is provided given the caveats in the aforementioned link,
         * - the provided parameters are invalid for the offer,
+        * - the offer is for an unsupported chain, or
         * - the parameterized [`Router`] is unable to create a blinded reply path for the invoice
         * request.
         * 
@@ -1081,7 +1847,7 @@ public class ChannelManager extends CommonBase {
         * [Avoiding Duplicate Payments]: #avoiding-duplicate-payments
         */
        public Result_NoneBolt12SemanticErrorZ pay_for_offer(org.ldk.structs.Offer offer, org.ldk.structs.Option_u64Z quantity, org.ldk.structs.Option_u64Z amount_msats, org.ldk.structs.Option_StrZ payer_note, byte[] payment_id, org.ldk.structs.Retry retry_strategy, org.ldk.structs.Option_u64Z max_total_routing_fee_msat) {
-               long ret = bindings.ChannelManager_pay_for_offer(this.ptr, offer == null ? 0 : offer.ptr, quantity.ptr, amount_msats.ptr, payer_note.ptr, InternalUtils.check_arr_len(payment_id, 32), retry_strategy.ptr, max_total_routing_fee_msat.ptr);
+               long ret = bindings.ChannelManager_pay_for_offer(this.ptr, offer.ptr, quantity.ptr, amount_msats.ptr, payer_note.ptr, InternalUtils.check_arr_len(payment_id, 32), retry_strategy.ptr, max_total_routing_fee_msat.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(offer);
                Reference.reachabilityFence(quantity);
@@ -1107,7 +1873,7 @@ public class ChannelManager extends CommonBase {
         * 
         * The resulting invoice uses a [`PaymentHash`] recognized by the [`ChannelManager`] and a
         * [`BlindedPath`] containing the [`PaymentSecret`] needed to reconstruct the corresponding
-        * [`PaymentPreimage`].
+        * [`PaymentPreimage`]. It is returned purely for informational purposes.
         * 
         * # Limitations
         * 
@@ -1118,17 +1884,19 @@ public class ChannelManager extends CommonBase {
         * 
         * # Errors
         * 
-        * Errors if the parameterized [`Router`] is unable to create a blinded payment path or reply
-        * path for the invoice.
+        * Errors if:
+        * - the refund is for an unsupported chain, or
+        * - the parameterized [`Router`] is unable to create a blinded payment path or reply path for
+        * the invoice.
         * 
         * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
         */
-       public Result_NoneBolt12SemanticErrorZ request_refund_payment(org.ldk.structs.Refund refund) {
-               long ret = bindings.ChannelManager_request_refund_payment(this.ptr, refund == null ? 0 : refund.ptr);
+       public Result_Bolt12InvoiceBolt12SemanticErrorZ request_refund_payment(org.ldk.structs.Refund refund) {
+               long ret = bindings.ChannelManager_request_refund_payment(this.ptr, refund.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(refund);
                if (ret >= 0 && ret <= 4096) { return null; }
-               Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret);
+               Result_Bolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret);
                if (this != null) { this.ptrs_to.add(refund); };
                return ret_hu_conv;
        }
@@ -1140,10 +1908,9 @@ public class ChannelManager extends CommonBase {
         * This differs from [`create_inbound_payment_for_hash`] only in that it generates the
         * [`PaymentHash`] and [`PaymentPreimage`] for you.
         * 
-        * The [`PaymentPreimage`] will ultimately be returned to you in the [`PaymentClaimable`], which
-        * will have the [`PaymentClaimable::purpose`] be [`PaymentPurpose::InvoicePayment`] with
-        * its [`PaymentPurpose::InvoicePayment::payment_preimage`] field filled in. That should then be
-        * passed directly to [`claim_funds`].
+        * The [`PaymentPreimage`] will ultimately be returned to you in the [`PaymentClaimable`] event, which
+        * will have the [`PaymentClaimable::purpose`] return `Some` for [`PaymentPurpose::preimage`]. That
+        * should then be passed directly to [`claim_funds`].
         * 
         * See [`create_inbound_payment_for_hash`] for detailed documentation on behavior and requirements.
         * 
@@ -1163,8 +1930,7 @@ public class ChannelManager extends CommonBase {
         * [`claim_funds`]: Self::claim_funds
         * [`PaymentClaimable`]: events::Event::PaymentClaimable
         * [`PaymentClaimable::purpose`]: events::Event::PaymentClaimable::purpose
-        * [`PaymentPurpose::InvoicePayment`]: events::PaymentPurpose::InvoicePayment
-        * [`PaymentPurpose::InvoicePayment::payment_preimage`]: events::PaymentPurpose::InvoicePayment::payment_preimage
+        * [`PaymentPurpose::preimage`]: events::PaymentPurpose::preimage
         * [`create_inbound_payment_for_hash`]: Self::create_inbound_payment_for_hash
         */
        public Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ create_inbound_payment(org.ldk.structs.Option_u64Z min_value_msat, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) {
@@ -1384,6 +2150,9 @@ public class ChannelManager extends CommonBase {
 
        /**
         * Returns true if this [`ChannelManager`] needs to be persisted.
+        * 
+        * See [`Self::get_event_or_persistence_needed_future`] for retrieving a [`Future`] that
+        * indicates this should be checked.
         */
        public boolean get_and_clear_needs_persistence() {
                boolean ret = bindings.ChannelManager_get_and_clear_needs_persistence(this.ptr);
@@ -1482,6 +2251,19 @@ public class ChannelManager extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Constructs a new NodeIdLookUp which calls the relevant methods on this_arg.
+        * This copies the `inner` pointer in this_arg and thus the returned NodeIdLookUp must be freed before this_arg is
+        */
+       public NodeIdLookUp as_NodeIdLookUp() {
+               long ret = bindings.ChannelManager_as_NodeIdLookUp(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               NodeIdLookUp ret_hu_conv = new NodeIdLookUp(null, ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
        /**
         * Serialize the ChannelManager object into a byte array which can be read by ChannelManager_read
         */
index 95703760703acfa5fad61a9b2ff879004aadc7ef..614f082592bae9ebe6d63825ac53644ca62524bf 100644 (file)
@@ -273,7 +273,7 @@ public class ChannelManagerReadArgs extends CommonBase {
         * runtime settings which were stored when the ChannelManager was serialized.
         */
        public void set_default_config(org.ldk.structs.UserConfig val) {
-               bindings.ChannelManagerReadArgs_set_default_config(this.ptr, val == null ? 0 : val.ptr);
+               bindings.ChannelManagerReadArgs_set_default_config(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -285,7 +285,7 @@ public class ChannelManagerReadArgs extends CommonBase {
         * populate a HashMap directly from C.
         */
        public static ChannelManagerReadArgs of(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.SignerProvider signer_provider, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Watch chain_monitor, org.ldk.structs.BroadcasterInterface tx_broadcaster, org.ldk.structs.Router router, org.ldk.structs.Logger logger, org.ldk.structs.UserConfig default_config, ChannelMonitor[] channel_monitors) {
-               long ret = bindings.ChannelManagerReadArgs_new(entropy_source.ptr, node_signer.ptr, signer_provider.ptr, fee_estimator.ptr, chain_monitor.ptr, tx_broadcaster.ptr, router.ptr, logger.ptr, default_config == null ? 0 : default_config.ptr, channel_monitors != null ? Arrays.stream(channel_monitors).mapToLong(channel_monitors_conv_16 -> channel_monitors_conv_16 == null ? 0 : channel_monitors_conv_16.ptr).toArray() : null);
+               long ret = bindings.ChannelManagerReadArgs_new(entropy_source.ptr, node_signer.ptr, signer_provider.ptr, fee_estimator.ptr, chain_monitor.ptr, tx_broadcaster.ptr, router.ptr, logger.ptr, default_config.ptr, channel_monitors != null ? Arrays.stream(channel_monitors).mapToLong(channel_monitors_conv_16 -> channel_monitors_conv_16.ptr).toArray() : null);
                Reference.reachabilityFence(entropy_source);
                Reference.reachabilityFence(node_signer);
                Reference.reachabilityFence(signer_provider);
index c815ecdb316b9c78bfa9b79eb011bbd72d91d26c..3b16cb18ba82cc42cf497123369c8944eccb97df 100644 (file)
@@ -81,18 +81,6 @@ public class ChannelMessageHandler extends CommonBase {
                 * Handle an incoming `stfu` message from the given peer.
                 */
                void handle_stfu(byte[] their_node_id, Stfu msg);
-               /**
-                * Handle an incoming `splice` message from the given peer.
-                */
-               void handle_splice(byte[] their_node_id, Splice msg);
-               /**
-                * Handle an incoming `splice_ack` message from the given peer.
-                */
-               void handle_splice_ack(byte[] their_node_id, SpliceAck msg);
-               /**
-                * Handle an incoming `splice_locked` message from the given peer.
-                */
-               void handle_splice_locked(byte[] their_node_id, SpliceLocked msg);
                /**
                 * Handle an incoming `tx_add_input message` from the given peer.
                 */
@@ -261,21 +249,6 @@ public class ChannelMessageHandler extends CommonBase {
                                arg.handle_stfu(their_node_id, msg_hu_conv);
                                Reference.reachabilityFence(arg);
                        }
-                       @Override public void handle_splice(byte[] their_node_id, long msg) {
-                               org.ldk.structs.Splice msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.Splice(null, msg); }
-                               arg.handle_splice(their_node_id, msg_hu_conv);
-                               Reference.reachabilityFence(arg);
-                       }
-                       @Override public void handle_splice_ack(byte[] their_node_id, long msg) {
-                               org.ldk.structs.SpliceAck msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.SpliceAck(null, msg); }
-                               arg.handle_splice_ack(their_node_id, msg_hu_conv);
-                               Reference.reachabilityFence(arg);
-                       }
-                       @Override public void handle_splice_locked(byte[] their_node_id, long msg) {
-                               org.ldk.structs.SpliceLocked msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.SpliceLocked(null, msg); }
-                               arg.handle_splice_locked(their_node_id, msg_hu_conv);
-                               Reference.reachabilityFence(arg);
-                       }
                        @Override public void handle_tx_add_input(byte[] their_node_id, long msg) {
                                org.ldk.structs.TxAddInput msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.TxAddInput(null, msg); }
                                arg.handle_tx_add_input(their_node_id, msg_hu_conv);
@@ -369,7 +342,7 @@ public class ChannelMessageHandler extends CommonBase {
                                org.ldk.structs.Init msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.Init(null, msg); }
                                Result_NoneNoneZ ret = arg.peer_connected(their_node_id, msg_hu_conv, inbound);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public void handle_channel_reestablish(byte[] their_node_id, long msg) {
@@ -390,19 +363,19 @@ public class ChannelMessageHandler extends CommonBase {
                        @Override public long provided_node_features() {
                                NodeFeatures ret = arg.provided_node_features();
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long provided_init_features(byte[] their_node_id) {
                                InitFeatures ret = arg.provided_init_features(their_node_id);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long get_chain_hashes() {
                                Option_CVec_ThirtyTwoBytesZZ ret = arg.get_chain_hashes();
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                if (impl_holder.held != null) { impl_holder.held.ptrs_to.add(ret); };
                                return result;
                        }
@@ -423,7 +396,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `open_channel` message from the given peer.
         */
        public void handle_open_channel(byte[] their_node_id, org.ldk.structs.OpenChannel msg) {
-               bindings.ChannelMessageHandler_handle_open_channel(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_open_channel(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -434,7 +407,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `open_channel2` message from the given peer.
         */
        public void handle_open_channel_v2(byte[] their_node_id, org.ldk.structs.OpenChannelV2 msg) {
-               bindings.ChannelMessageHandler_handle_open_channel_v2(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_open_channel_v2(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -445,7 +418,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `accept_channel` message from the given peer.
         */
        public void handle_accept_channel(byte[] their_node_id, org.ldk.structs.AcceptChannel msg) {
-               bindings.ChannelMessageHandler_handle_accept_channel(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_accept_channel(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -456,7 +429,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `accept_channel2` message from the given peer.
         */
        public void handle_accept_channel_v2(byte[] their_node_id, org.ldk.structs.AcceptChannelV2 msg) {
-               bindings.ChannelMessageHandler_handle_accept_channel_v2(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_accept_channel_v2(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -467,7 +440,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `funding_created` message from the given peer.
         */
        public void handle_funding_created(byte[] their_node_id, org.ldk.structs.FundingCreated msg) {
-               bindings.ChannelMessageHandler_handle_funding_created(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_funding_created(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -478,7 +451,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `funding_signed` message from the given peer.
         */
        public void handle_funding_signed(byte[] their_node_id, org.ldk.structs.FundingSigned msg) {
-               bindings.ChannelMessageHandler_handle_funding_signed(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_funding_signed(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -489,7 +462,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `channel_ready` message from the given peer.
         */
        public void handle_channel_ready(byte[] their_node_id, org.ldk.structs.ChannelReady msg) {
-               bindings.ChannelMessageHandler_handle_channel_ready(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_channel_ready(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -500,7 +473,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `shutdown` message from the given peer.
         */
        public void handle_shutdown(byte[] their_node_id, org.ldk.structs.Shutdown msg) {
-               bindings.ChannelMessageHandler_handle_shutdown(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_shutdown(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -511,7 +484,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `closing_signed` message from the given peer.
         */
        public void handle_closing_signed(byte[] their_node_id, org.ldk.structs.ClosingSigned msg) {
-               bindings.ChannelMessageHandler_handle_closing_signed(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_closing_signed(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -522,40 +495,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `stfu` message from the given peer.
         */
        public void handle_stfu(byte[] their_node_id, org.ldk.structs.Stfu msg) {
-               bindings.ChannelMessageHandler_handle_stfu(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(their_node_id);
-               Reference.reachabilityFence(msg);
-               if (this != null) { this.ptrs_to.add(msg); };
-       }
-
-       /**
-        * Handle an incoming `splice` message from the given peer.
-        */
-       public void handle_splice(byte[] their_node_id, org.ldk.structs.Splice msg) {
-               bindings.ChannelMessageHandler_handle_splice(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(their_node_id);
-               Reference.reachabilityFence(msg);
-               if (this != null) { this.ptrs_to.add(msg); };
-       }
-
-       /**
-        * Handle an incoming `splice_ack` message from the given peer.
-        */
-       public void handle_splice_ack(byte[] their_node_id, org.ldk.structs.SpliceAck msg) {
-               bindings.ChannelMessageHandler_handle_splice_ack(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(their_node_id);
-               Reference.reachabilityFence(msg);
-               if (this != null) { this.ptrs_to.add(msg); };
-       }
-
-       /**
-        * Handle an incoming `splice_locked` message from the given peer.
-        */
-       public void handle_splice_locked(byte[] their_node_id, org.ldk.structs.SpliceLocked msg) {
-               bindings.ChannelMessageHandler_handle_splice_locked(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_stfu(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -566,7 +506,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `tx_add_input message` from the given peer.
         */
        public void handle_tx_add_input(byte[] their_node_id, org.ldk.structs.TxAddInput msg) {
-               bindings.ChannelMessageHandler_handle_tx_add_input(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_tx_add_input(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -577,7 +517,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `tx_add_output` message from the given peer.
         */
        public void handle_tx_add_output(byte[] their_node_id, org.ldk.structs.TxAddOutput msg) {
-               bindings.ChannelMessageHandler_handle_tx_add_output(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_tx_add_output(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -588,7 +528,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `tx_remove_input` message from the given peer.
         */
        public void handle_tx_remove_input(byte[] their_node_id, org.ldk.structs.TxRemoveInput msg) {
-               bindings.ChannelMessageHandler_handle_tx_remove_input(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_tx_remove_input(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -599,7 +539,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `tx_remove_output` message from the given peer.
         */
        public void handle_tx_remove_output(byte[] their_node_id, org.ldk.structs.TxRemoveOutput msg) {
-               bindings.ChannelMessageHandler_handle_tx_remove_output(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_tx_remove_output(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -610,7 +550,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `tx_complete message` from the given peer.
         */
        public void handle_tx_complete(byte[] their_node_id, org.ldk.structs.TxComplete msg) {
-               bindings.ChannelMessageHandler_handle_tx_complete(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_tx_complete(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -621,7 +561,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `tx_signatures` message from the given peer.
         */
        public void handle_tx_signatures(byte[] their_node_id, org.ldk.structs.TxSignatures msg) {
-               bindings.ChannelMessageHandler_handle_tx_signatures(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_tx_signatures(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -632,7 +572,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `tx_init_rbf` message from the given peer.
         */
        public void handle_tx_init_rbf(byte[] their_node_id, org.ldk.structs.TxInitRbf msg) {
-               bindings.ChannelMessageHandler_handle_tx_init_rbf(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_tx_init_rbf(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -643,7 +583,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `tx_ack_rbf` message from the given peer.
         */
        public void handle_tx_ack_rbf(byte[] their_node_id, org.ldk.structs.TxAckRbf msg) {
-               bindings.ChannelMessageHandler_handle_tx_ack_rbf(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_tx_ack_rbf(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -654,7 +594,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `tx_abort message` from the given peer.
         */
        public void handle_tx_abort(byte[] their_node_id, org.ldk.structs.TxAbort msg) {
-               bindings.ChannelMessageHandler_handle_tx_abort(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_tx_abort(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -665,7 +605,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `update_add_htlc` message from the given peer.
         */
        public void handle_update_add_htlc(byte[] their_node_id, org.ldk.structs.UpdateAddHTLC msg) {
-               bindings.ChannelMessageHandler_handle_update_add_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_update_add_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -676,7 +616,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `update_fulfill_htlc` message from the given peer.
         */
        public void handle_update_fulfill_htlc(byte[] their_node_id, org.ldk.structs.UpdateFulfillHTLC msg) {
-               bindings.ChannelMessageHandler_handle_update_fulfill_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_update_fulfill_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -687,7 +627,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `update_fail_htlc` message from the given peer.
         */
        public void handle_update_fail_htlc(byte[] their_node_id, org.ldk.structs.UpdateFailHTLC msg) {
-               bindings.ChannelMessageHandler_handle_update_fail_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_update_fail_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -698,7 +638,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `update_fail_malformed_htlc` message from the given peer.
         */
        public void handle_update_fail_malformed_htlc(byte[] their_node_id, org.ldk.structs.UpdateFailMalformedHTLC msg) {
-               bindings.ChannelMessageHandler_handle_update_fail_malformed_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_update_fail_malformed_htlc(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -709,7 +649,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `commitment_signed` message from the given peer.
         */
        public void handle_commitment_signed(byte[] their_node_id, org.ldk.structs.CommitmentSigned msg) {
-               bindings.ChannelMessageHandler_handle_commitment_signed(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_commitment_signed(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -720,7 +660,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `revoke_and_ack` message from the given peer.
         */
        public void handle_revoke_and_ack(byte[] their_node_id, org.ldk.structs.RevokeAndACK msg) {
-               bindings.ChannelMessageHandler_handle_revoke_and_ack(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_revoke_and_ack(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -731,7 +671,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `update_fee` message from the given peer.
         */
        public void handle_update_fee(byte[] their_node_id, org.ldk.structs.UpdateFee msg) {
-               bindings.ChannelMessageHandler_handle_update_fee(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_update_fee(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -742,7 +682,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `announcement_signatures` message from the given peer.
         */
        public void handle_announcement_signatures(byte[] their_node_id, org.ldk.structs.AnnouncementSignatures msg) {
-               bindings.ChannelMessageHandler_handle_announcement_signatures(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_announcement_signatures(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -766,7 +706,7 @@ public class ChannelMessageHandler extends CommonBase {
         * message handlers may still wish to communicate with this peer.
         */
        public Result_NoneNoneZ peer_connected(byte[] their_node_id, org.ldk.structs.Init msg, boolean inbound) {
-               long ret = bindings.ChannelMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr, inbound);
+               long ret = bindings.ChannelMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr, inbound);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -781,7 +721,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `channel_reestablish` message from the given peer.
         */
        public void handle_channel_reestablish(byte[] their_node_id, org.ldk.structs.ChannelReestablish msg) {
-               bindings.ChannelMessageHandler_handle_channel_reestablish(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_channel_reestablish(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -792,7 +732,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `channel_update` message from the given peer.
         */
        public void handle_channel_update(byte[] their_node_id, org.ldk.structs.ChannelUpdate msg) {
-               bindings.ChannelMessageHandler_handle_channel_update(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_channel_update(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -803,7 +743,7 @@ public class ChannelMessageHandler extends CommonBase {
         * Handle an incoming `error` message from the given peer.
         */
        public void handle_error(byte[] their_node_id, org.ldk.structs.ErrorMessage msg) {
-               bindings.ChannelMessageHandler_handle_error(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.ChannelMessageHandler_handle_error(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
index 642c097ab91a335ea24955c7806620cf1b787f60..a255bbcfdf0ec8edbcff6e0ef552a1b97a85bf05 100644 (file)
@@ -64,7 +64,7 @@ public class ChannelMonitor extends CommonBase {
         * panics if the given update is not the next update by update_id.
         */
        public Result_NoneNoneZ update_monitor(org.ldk.structs.ChannelMonitorUpdate updates, org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Logger logger) {
-               long ret = bindings.ChannelMonitor_update_monitor(this.ptr, updates == null ? 0 : updates.ptr, broadcaster.ptr, fee_estimator.ptr, logger.ptr);
+               long ret = bindings.ChannelMonitor_update_monitor(this.ptr, updates.ptr, broadcaster.ptr, fee_estimator.ptr, logger.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(updates);
                Reference.reachabilityFence(broadcaster);
@@ -101,6 +101,18 @@ public class ChannelMonitor extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Gets the channel_id of the channel this ChannelMonitor is monitoring for.
+        */
+       public ChannelId channel_id() {
+               long ret = bindings.ChannelMonitor_channel_id(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
        /**
         * Gets a list of txids, with their output scripts (in the order they appear in the
         * transaction), which we must learn about spends of via block_connected().
@@ -222,7 +234,7 @@ public class ChannelMonitor extends CommonBase {
         * [`Persist::update_persisted_channel`]: crate::chain::chainmonitor::Persist::update_persisted_channel
         */
        public CommitmentTransaction[] counterparty_commitment_txs_from_update(org.ldk.structs.ChannelMonitorUpdate update) {
-               long[] ret = bindings.ChannelMonitor_counterparty_commitment_txs_from_update(this.ptr, update == null ? 0 : update.ptr);
+               long[] ret = bindings.ChannelMonitor_counterparty_commitment_txs_from_update(this.ptr, update.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(update);
                int ret_conv_23_len = ret.length;
@@ -284,27 +296,25 @@ public class ChannelMonitor extends CommonBase {
        }
 
        /**
-        * Used by [`ChannelManager`] deserialization to broadcast the latest holder state if its copy
-        * of the channel state was out-of-date.
-        * 
-        * You may also use this to broadcast the latest local commitment transaction, either because
+        * You may use this to broadcast the latest local commitment transaction, either because
         * a monitor update failed or because we've fallen behind (i.e. we've received proof that our
         * counterparty side knows a revocation secret we gave them that they shouldn't know).
         * 
-        * Broadcasting these transactions in the second case is UNSAFE, as they allow counterparty
+        * Broadcasting these transactions in this manner is UNSAFE, as they allow counterparty
         * side to punish you. Nevertheless you may want to broadcast them if counterparty doesn't
         * close channel with their commitment transaction after a substantial amount of time. Best
         * may be to contact the other node operator out-of-band to coordinate other options available
         * to you.
-        * 
-        * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
         */
-       public byte[][] get_latest_holder_commitment_txn(org.ldk.structs.Logger logger) {
-               byte[][] ret = bindings.ChannelMonitor_get_latest_holder_commitment_txn(this.ptr, logger.ptr);
+       public void broadcast_latest_holder_commitment_txn(org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Logger logger) {
+               bindings.ChannelMonitor_broadcast_latest_holder_commitment_txn(this.ptr, broadcaster.ptr, fee_estimator.ptr, logger.ptr);
                Reference.reachabilityFence(this);
+               Reference.reachabilityFence(broadcaster);
+               Reference.reachabilityFence(fee_estimator);
                Reference.reachabilityFence(logger);
+               if (this != null) { this.ptrs_to.add(broadcaster); };
+               if (this != null) { this.ptrs_to.add(fee_estimator); };
                if (this != null) { this.ptrs_to.add(logger); };
-               return ret;
        }
 
        /**
@@ -321,7 +331,7 @@ public class ChannelMonitor extends CommonBase {
         * [`get_outputs_to_watch`]: #method.get_outputs_to_watch
         */
        public TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ[] block_connected(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height, org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Logger logger) {
-               long[] ret = bindings.ChannelMonitor_block_connected(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray() : null, height, broadcaster.ptr, fee_estimator.ptr, logger.ptr);
+               long[] ret = bindings.ChannelMonitor_block_connected(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28.ptr).toArray() : null, height, broadcaster.ptr, fee_estimator.ptr, logger.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(header);
                Reference.reachabilityFence(txdata);
@@ -370,7 +380,7 @@ public class ChannelMonitor extends CommonBase {
         * [`block_connected`]: Self::block_connected
         */
        public TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ[] transactions_confirmed(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height, org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Logger logger) {
-               long[] ret = bindings.ChannelMonitor_transactions_confirmed(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray() : null, height, broadcaster.ptr, fee_estimator.ptr, logger.ptr);
+               long[] ret = bindings.ChannelMonitor_transactions_confirmed(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28.ptr).toArray() : null, height, broadcaster.ptr, fee_estimator.ptr, logger.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(header);
                Reference.reachabilityFence(txdata);
@@ -491,6 +501,21 @@ public class ChannelMonitor extends CommonBase {
                if (this != null) { this.ptrs_to.add(logger); };
        }
 
+       /**
+        * Triggers rebroadcasts of pending claims from a force-closed channel after a transaction
+        * signature generation failure.
+        */
+       public void signer_unblocked(org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Logger logger) {
+               bindings.ChannelMonitor_signer_unblocked(this.ptr, broadcaster.ptr, fee_estimator.ptr, logger.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(broadcaster);
+               Reference.reachabilityFence(fee_estimator);
+               Reference.reachabilityFence(logger);
+               if (this != null) { this.ptrs_to.add(broadcaster); };
+               if (this != null) { this.ptrs_to.add(fee_estimator); };
+               if (this != null) { this.ptrs_to.add(logger); };
+       }
+
        /**
         * Returns the descriptors for relevant outputs (i.e., those that we can spend) within the
         * transaction if they exist and the transaction has at least [`ANTI_REORG_DELAY`]
@@ -527,6 +552,21 @@ public class ChannelMonitor extends CommonBase {
                return ret_conv_27_arr;
        }
 
+       /**
+        * Checks if the monitor is fully resolved. Resolved monitor is one that has claimed all of
+        * its outputs and balances (i.e. [`Self::get_claimable_balances`] returns an empty set).
+        * 
+        * This function returns true only if [`Self::get_claimable_balances`] has been empty for at least
+        * 4032 blocks as an additional protection against any bugs resulting in spuriously empty balance sets.
+        */
+       public boolean is_fully_resolved(org.ldk.structs.Logger logger) {
+               boolean ret = bindings.ChannelMonitor_is_fully_resolved(this.ptr, logger.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(logger);
+               if (this != null) { this.ptrs_to.add(logger); };
+               return ret;
+       }
+
        /**
         * Gets the balances in this channel which are either claimable by us if we were to
         * force-close the channel now or which are claimable on-chain (possibly awaiting
index 05913a2f797d130989fc58a415ec5c6fa64bae16..5579309f527b1c59df334fda06938ac0b0ad79a3 100644 (file)
@@ -72,6 +72,39 @@ public class ChannelMonitorUpdate extends CommonBase {
                Reference.reachabilityFence(val);
        }
 
+       /**
+        * The channel ID associated with these updates.
+        * 
+        * Will be `None` for `ChannelMonitorUpdate`s constructed on LDK versions prior to 0.0.121 and
+        * always `Some` otherwise.
+        * 
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       @Nullable
+       public ChannelId get_channel_id() {
+               long ret = bindings.ChannelMonitorUpdate_get_channel_id(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * The channel ID associated with these updates.
+        * 
+        * Will be `None` for `ChannelMonitorUpdate`s constructed on LDK versions prior to 0.0.121 and
+        * always `Some` otherwise.
+        * 
+        * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       public void set_channel_id(@Nullable org.ldk.structs.ChannelId val) {
+               bindings.ChannelMonitorUpdate_set_channel_id(this.ptr, val == null ? 0 : val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
+       }
+
        long clone_ptr() {
                long ret = bindings.ChannelMonitorUpdate_clone_ptr(this.ptr);
                Reference.reachabilityFence(this);
@@ -96,7 +129,7 @@ public class ChannelMonitorUpdate extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.ChannelMonitorUpdate b) {
-               boolean ret = bindings.ChannelMonitorUpdate_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ChannelMonitorUpdate_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 28a7706c754ae9827b302640d6a6ff1e0308cf47..2bec9de0a06fa5df969269a864491591c045bcf6 100644 (file)
@@ -62,7 +62,7 @@ public class ChannelPublicKeys extends CommonBase {
         * states.
         */
        public void set_revocation_basepoint(org.ldk.structs.RevocationBasepoint val) {
-               bindings.ChannelPublicKeys_set_revocation_basepoint(this.ptr, val == null ? 0 : val.ptr);
+               bindings.ChannelPublicKeys_set_revocation_basepoint(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -110,7 +110,7 @@ public class ChannelPublicKeys extends CommonBase {
         * after some delay (or can be claimed via the revocation path).
         */
        public void set_delayed_payment_basepoint(org.ldk.structs.DelayedPaymentBasepoint val) {
-               bindings.ChannelPublicKeys_set_delayed_payment_basepoint(this.ptr, val == null ? 0 : val.ptr);
+               bindings.ChannelPublicKeys_set_delayed_payment_basepoint(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -134,7 +134,7 @@ public class ChannelPublicKeys extends CommonBase {
         * which is used to encumber HTLC-in-flight outputs.
         */
        public void set_htlc_basepoint(org.ldk.structs.HtlcBasepoint val) {
-               bindings.ChannelPublicKeys_set_htlc_basepoint(this.ptr, val == null ? 0 : val.ptr);
+               bindings.ChannelPublicKeys_set_htlc_basepoint(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -144,7 +144,7 @@ public class ChannelPublicKeys extends CommonBase {
         * Constructs a new ChannelPublicKeys given each field
         */
        public static ChannelPublicKeys of(byte[] funding_pubkey_arg, org.ldk.structs.RevocationBasepoint revocation_basepoint_arg, byte[] payment_point_arg, org.ldk.structs.DelayedPaymentBasepoint delayed_payment_basepoint_arg, org.ldk.structs.HtlcBasepoint htlc_basepoint_arg) {
-               long ret = bindings.ChannelPublicKeys_new(InternalUtils.check_arr_len(funding_pubkey_arg, 33), revocation_basepoint_arg == null ? 0 : revocation_basepoint_arg.ptr, InternalUtils.check_arr_len(payment_point_arg, 33), delayed_payment_basepoint_arg == null ? 0 : delayed_payment_basepoint_arg.ptr, htlc_basepoint_arg == null ? 0 : htlc_basepoint_arg.ptr);
+               long ret = bindings.ChannelPublicKeys_new(InternalUtils.check_arr_len(funding_pubkey_arg, 33), revocation_basepoint_arg.ptr, InternalUtils.check_arr_len(payment_point_arg, 33), delayed_payment_basepoint_arg.ptr, htlc_basepoint_arg.ptr);
                Reference.reachabilityFence(funding_pubkey_arg);
                Reference.reachabilityFence(revocation_basepoint_arg);
                Reference.reachabilityFence(payment_point_arg);
@@ -195,7 +195,7 @@ public class ChannelPublicKeys extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.ChannelPublicKeys b) {
-               boolean ret = bindings.ChannelPublicKeys_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ChannelPublicKeys_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 8a78bdeab6a87fcba580bfb93391ee83d1fdfe3e..95364b2ca77f32354ce9b2c8319d01e95f50654b 100644 (file)
@@ -25,19 +25,23 @@ public class ChannelReady extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.ChannelReady_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.ChannelReady_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.ChannelReady_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.ChannelReady_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -89,14 +93,15 @@ public class ChannelReady extends CommonBase {
        /**
         * Constructs a new ChannelReady given each field
         */
-       public static ChannelReady of(byte[] channel_id_arg, byte[] next_per_commitment_point_arg, org.ldk.structs.Option_u64Z short_channel_id_alias_arg) {
-               long ret = bindings.ChannelReady_new(InternalUtils.check_arr_len(channel_id_arg, 32), InternalUtils.check_arr_len(next_per_commitment_point_arg, 33), short_channel_id_alias_arg.ptr);
+       public static ChannelReady of(org.ldk.structs.ChannelId channel_id_arg, byte[] next_per_commitment_point_arg, org.ldk.structs.Option_u64Z short_channel_id_alias_arg) {
+               long ret = bindings.ChannelReady_new(channel_id_arg.ptr, InternalUtils.check_arr_len(next_per_commitment_point_arg, 33), short_channel_id_alias_arg.ptr);
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(next_per_commitment_point_arg);
                Reference.reachabilityFence(short_channel_id_alias_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.ChannelReady ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelReady(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(short_channel_id_alias_arg); };
                return ret_hu_conv;
        }
@@ -137,7 +142,7 @@ public class ChannelReady extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.ChannelReady b) {
-               boolean ret = bindings.ChannelReady_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ChannelReady_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index ff195639ebb720d5042995d88fec4ac2a92bf6a5..42c7696cf26aecff061d9237511d7cea215577eb 100644 (file)
@@ -25,19 +25,23 @@ public class ChannelReestablish extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.ChannelReestablish_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.ChannelReestablish_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.ChannelReestablish_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.ChannelReestablish_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -139,8 +143,8 @@ public class ChannelReestablish extends CommonBase {
        /**
         * Constructs a new ChannelReestablish given each field
         */
-       public static ChannelReestablish of(byte[] channel_id_arg, long next_local_commitment_number_arg, long next_remote_commitment_number_arg, byte[] your_last_per_commitment_secret_arg, byte[] my_current_per_commitment_point_arg, org.ldk.structs.Option_ThirtyTwoBytesZ next_funding_txid_arg) {
-               long ret = bindings.ChannelReestablish_new(InternalUtils.check_arr_len(channel_id_arg, 32), next_local_commitment_number_arg, next_remote_commitment_number_arg, InternalUtils.check_arr_len(your_last_per_commitment_secret_arg, 32), InternalUtils.check_arr_len(my_current_per_commitment_point_arg, 33), next_funding_txid_arg.ptr);
+       public static ChannelReestablish of(org.ldk.structs.ChannelId channel_id_arg, long next_local_commitment_number_arg, long next_remote_commitment_number_arg, byte[] your_last_per_commitment_secret_arg, byte[] my_current_per_commitment_point_arg, org.ldk.structs.Option_ThirtyTwoBytesZ next_funding_txid_arg) {
+               long ret = bindings.ChannelReestablish_new(channel_id_arg.ptr, next_local_commitment_number_arg, next_remote_commitment_number_arg, InternalUtils.check_arr_len(your_last_per_commitment_secret_arg, 32), InternalUtils.check_arr_len(my_current_per_commitment_point_arg, 33), next_funding_txid_arg.ptr);
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(next_local_commitment_number_arg);
                Reference.reachabilityFence(next_remote_commitment_number_arg);
@@ -150,6 +154,7 @@ public class ChannelReestablish extends CommonBase {
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.ChannelReestablish ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelReestablish(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(next_funding_txid_arg); };
                return ret_hu_conv;
        }
@@ -190,7 +195,7 @@ public class ChannelReestablish extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.ChannelReestablish b) {
-               boolean ret = bindings.ChannelReestablish_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ChannelReestablish_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index ccd977dc5b8fb14ae6c7bd7e74a1415141ade258..b5e02934e9168dfe401399a5be532428504a5ed6 100644 (file)
@@ -16,7 +16,7 @@ public class ChannelSigner extends CommonBase {
        final bindings.LDKChannelSigner bindings_instance;
        ChannelSigner(Object _dummy, long ptr) { super(ptr); bindings_instance = null; }
        private ChannelSigner(bindings.LDKChannelSigner arg, ChannelPublicKeys pubkeys) {
-               super(bindings.LDKChannelSigner_new(arg, pubkeys == null ? 0 : pubkeys.clone_ptr()));
+               super(bindings.LDKChannelSigner_new(arg, pubkeys.clone_ptr()));
                this.ptrs_to.add(arg);
                this.bindings_instance = arg;
        }
@@ -117,13 +117,13 @@ public class ChannelSigner extends CommonBase {
                                org.ldk.structs.HolderCommitmentTransaction holder_tx_hu_conv = null; if (holder_tx < 0 || holder_tx > 4096) { holder_tx_hu_conv = new org.ldk.structs.HolderCommitmentTransaction(null, holder_tx); }
                                Result_NoneNoneZ ret = arg.validate_holder_commitment(holder_tx_hu_conv, outbound_htlc_preimages);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long validate_counterparty_revocation(long idx, byte[] secret) {
                                Result_NoneNoneZ ret = arg.validate_counterparty_revocation(idx, secret);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public byte[] channel_keys_id() {
@@ -185,7 +185,7 @@ public class ChannelSigner extends CommonBase {
         * irrelevant or duplicate preimages.
         */
        public Result_NoneNoneZ validate_holder_commitment(org.ldk.structs.HolderCommitmentTransaction holder_tx, byte[][] outbound_htlc_preimages) {
-               long ret = bindings.ChannelSigner_validate_holder_commitment(this.ptr, holder_tx == null ? 0 : holder_tx.ptr, outbound_htlc_preimages != null ? Arrays.stream(outbound_htlc_preimages).map(outbound_htlc_preimages_conv_8 -> InternalUtils.check_arr_len(outbound_htlc_preimages_conv_8, 32)).toArray(byte[][]::new) : null);
+               long ret = bindings.ChannelSigner_validate_holder_commitment(this.ptr, holder_tx.ptr, outbound_htlc_preimages != null ? Arrays.stream(outbound_htlc_preimages).map(outbound_htlc_preimages_conv_8 -> InternalUtils.check_arr_len(outbound_htlc_preimages_conv_8, 32)).toArray(byte[][]::new) : null);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(holder_tx);
                Reference.reachabilityFence(outbound_htlc_preimages);
@@ -234,7 +234,7 @@ public class ChannelSigner extends CommonBase {
         * channel_parameters.is_populated() MUST be true.
         */
        public void provide_channel_parameters(org.ldk.structs.ChannelTransactionParameters channel_parameters) {
-               bindings.ChannelSigner_provide_channel_parameters(this.ptr, channel_parameters == null ? 0 : channel_parameters.ptr);
+               bindings.ChannelSigner_provide_channel_parameters(this.ptr, channel_parameters.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(channel_parameters);
                if (this != null) { this.ptrs_to.add(channel_parameters); };
index cba450382f4de9038dd2ee6e54375506a0e5deb0..17c6ffed6677604bee84a2ba36505fea899ba06b 100644 (file)
@@ -40,7 +40,7 @@ public class ChannelTransactionParameters extends CommonBase {
         * Holder public keys
         */
        public void set_holder_pubkeys(org.ldk.structs.ChannelPublicKeys val) {
-               bindings.ChannelTransactionParameters_set_holder_pubkeys(this.ptr, val == null ? 0 : val.ptr);
+               bindings.ChannelTransactionParameters_set_holder_pubkeys(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -158,7 +158,7 @@ public class ChannelTransactionParameters extends CommonBase {
         * wasn't serialized, it will default to static_remote_key at deserialization.
         */
        public void set_channel_type_features(org.ldk.structs.ChannelTypeFeatures val) {
-               bindings.ChannelTransactionParameters_set_channel_type_features(this.ptr, val == null ? 0 : val.ptr);
+               bindings.ChannelTransactionParameters_set_channel_type_features(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -171,7 +171,7 @@ public class ChannelTransactionParameters extends CommonBase {
         * Note that funding_outpoint_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public static ChannelTransactionParameters of(org.ldk.structs.ChannelPublicKeys holder_pubkeys_arg, short holder_selected_contest_delay_arg, boolean is_outbound_from_holder_arg, @Nullable org.ldk.structs.CounterpartyChannelTransactionParameters counterparty_parameters_arg, @Nullable org.ldk.structs.OutPoint funding_outpoint_arg, org.ldk.structs.ChannelTypeFeatures channel_type_features_arg) {
-               long ret = bindings.ChannelTransactionParameters_new(holder_pubkeys_arg == null ? 0 : holder_pubkeys_arg.ptr, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg == null ? 0 : counterparty_parameters_arg.ptr, funding_outpoint_arg == null ? 0 : funding_outpoint_arg.ptr, channel_type_features_arg == null ? 0 : channel_type_features_arg.ptr);
+               long ret = bindings.ChannelTransactionParameters_new(holder_pubkeys_arg.ptr, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg == null ? 0 : counterparty_parameters_arg.ptr, funding_outpoint_arg == null ? 0 : funding_outpoint_arg.ptr, channel_type_features_arg.ptr);
                Reference.reachabilityFence(holder_pubkeys_arg);
                Reference.reachabilityFence(holder_selected_contest_delay_arg);
                Reference.reachabilityFence(is_outbound_from_holder_arg);
@@ -224,7 +224,7 @@ public class ChannelTransactionParameters extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.ChannelTransactionParameters b) {
-               boolean ret = bindings.ChannelTransactionParameters_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ChannelTransactionParameters_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 8071b043b2e47a40e36749b409f7e7d71c0d36b2..2ca9750507732e7b018397dfd1fff6d123ed05b9 100644 (file)
@@ -35,7 +35,7 @@ public class ChannelTypeFeatures extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.ChannelTypeFeatures b) {
-               boolean ret = bindings.ChannelTypeFeatures_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ChannelTypeFeatures_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -91,7 +91,7 @@ public class ChannelTypeFeatures extends CommonBase {
         * Returns true if this `Features` object contains required features unknown by `other`.
         */
        public boolean requires_unknown_bits_from(org.ldk.structs.ChannelTypeFeatures other) {
-               boolean ret = bindings.ChannelTypeFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr);
+               boolean ret = bindings.ChannelTypeFeatures_requires_unknown_bits_from(this.ptr, other.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(other);
                if (this != null) { this.ptrs_to.add(other); };
index e4b5200543414269352e397cadadc5fad31aacb1..93f1cd2c979281ab59ca5d2ae3815298396484b9 100644 (file)
@@ -56,7 +56,7 @@ public class ChannelUpdate extends CommonBase {
         * The actual channel update
         */
        public void set_contents(org.ldk.structs.UnsignedChannelUpdate val) {
-               bindings.ChannelUpdate_set_contents(this.ptr, val == null ? 0 : val.ptr);
+               bindings.ChannelUpdate_set_contents(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -66,7 +66,7 @@ public class ChannelUpdate extends CommonBase {
         * Constructs a new ChannelUpdate given each field
         */
        public static ChannelUpdate of(byte[] signature_arg, org.ldk.structs.UnsignedChannelUpdate contents_arg) {
-               long ret = bindings.ChannelUpdate_new(InternalUtils.check_arr_len(signature_arg, 64), contents_arg == null ? 0 : contents_arg.ptr);
+               long ret = bindings.ChannelUpdate_new(InternalUtils.check_arr_len(signature_arg, 64), contents_arg.ptr);
                Reference.reachabilityFence(signature_arg);
                Reference.reachabilityFence(contents_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -112,7 +112,7 @@ public class ChannelUpdate extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.ChannelUpdate b) {
-               boolean ret = bindings.ChannelUpdate_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ChannelUpdate_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 19e2ffc023e637d27e3254b36ac5e94c3fd55c92..75741d299cae1e13848b64141f684b0145ccf4bb 100644 (file)
@@ -128,7 +128,7 @@ public class ChannelUpdateInfo extends CommonBase {
         * Fees charged when the channel is used for routing
         */
        public void set_fees(org.ldk.structs.RoutingFees val) {
-               bindings.ChannelUpdateInfo_set_fees(this.ptr, val == null ? 0 : val.ptr);
+               bindings.ChannelUpdateInfo_set_fees(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -173,7 +173,7 @@ public class ChannelUpdateInfo extends CommonBase {
         * Note that last_update_message_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public static ChannelUpdateInfo of(int last_update_arg, boolean enabled_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg, long htlc_maximum_msat_arg, org.ldk.structs.RoutingFees fees_arg, @Nullable org.ldk.structs.ChannelUpdate last_update_message_arg) {
-               long ret = bindings.ChannelUpdateInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, fees_arg == null ? 0 : fees_arg.ptr, last_update_message_arg == null ? 0 : last_update_message_arg.ptr);
+               long ret = bindings.ChannelUpdateInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, fees_arg.ptr, last_update_message_arg == null ? 0 : last_update_message_arg.ptr);
                Reference.reachabilityFence(last_update_arg);
                Reference.reachabilityFence(enabled_arg);
                Reference.reachabilityFence(cltv_expiry_delta_arg);
@@ -213,7 +213,7 @@ public class ChannelUpdateInfo extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.ChannelUpdateInfo b) {
-               boolean ret = bindings.ChannelUpdateInfo_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ChannelUpdateInfo_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index fb62979566b34dab1ebddc852d5db59700c0e587..fdb68c062db33d1eff35d5e37b35ae8aac07fa08 100644 (file)
@@ -23,19 +23,23 @@ public class ClaimedHTLC extends CommonBase {
        /**
         * The `channel_id` of the channel over which the HTLC was received.
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.ClaimedHTLC_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.ClaimedHTLC_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The `channel_id` of the channel over which the HTLC was received.
         */
-       public void set_channel_id(byte[] val) {
-               bindings.ClaimedHTLC_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.ClaimedHTLC_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -144,8 +148,8 @@ public class ClaimedHTLC extends CommonBase {
        /**
         * Constructs a new ClaimedHTLC given each field
         */
-       public static ClaimedHTLC of(byte[] channel_id_arg, org.ldk.util.UInt128 user_channel_id_arg, int cltv_expiry_arg, long value_msat_arg, long counterparty_skimmed_fee_msat_arg) {
-               long ret = bindings.ClaimedHTLC_new(InternalUtils.check_arr_len(channel_id_arg, 32), user_channel_id_arg.getLEBytes(), cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg);
+       public static ClaimedHTLC of(org.ldk.structs.ChannelId channel_id_arg, org.ldk.util.UInt128 user_channel_id_arg, int cltv_expiry_arg, long value_msat_arg, long counterparty_skimmed_fee_msat_arg) {
+               long ret = bindings.ClaimedHTLC_new(channel_id_arg.ptr, user_channel_id_arg.getLEBytes(), cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg);
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(user_channel_id_arg);
                Reference.reachabilityFence(cltv_expiry_arg);
@@ -154,6 +158,7 @@ public class ClaimedHTLC extends CommonBase {
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.ClaimedHTLC ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ClaimedHTLC(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                return ret_hu_conv;
        }
 
@@ -181,7 +186,7 @@ public class ClaimedHTLC extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.ClaimedHTLC b) {
-               boolean ret = bindings.ClaimedHTLC_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ClaimedHTLC_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index bcedc0db1c4661bc495ba0a895697fb87423af29..f2bb6b5a2984c5b904d2b72cdf267e08c008e192 100644 (file)
@@ -25,19 +25,23 @@ public class ClosingSigned extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.ClosingSigned_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.ClosingSigned_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.ClosingSigned_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.ClosingSigned_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -110,8 +114,8 @@ public class ClosingSigned extends CommonBase {
         * 
         * Note that fee_range_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public static ClosingSigned of(byte[] channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, @Nullable org.ldk.structs.ClosingSignedFeeRange fee_range_arg) {
-               long ret = bindings.ClosingSigned_new(InternalUtils.check_arr_len(channel_id_arg, 32), fee_satoshis_arg, InternalUtils.check_arr_len(signature_arg, 64), fee_range_arg == null ? 0 : fee_range_arg.ptr);
+       public static ClosingSigned of(org.ldk.structs.ChannelId channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, @Nullable org.ldk.structs.ClosingSignedFeeRange fee_range_arg) {
+               long ret = bindings.ClosingSigned_new(channel_id_arg.ptr, fee_satoshis_arg, InternalUtils.check_arr_len(signature_arg, 64), fee_range_arg == null ? 0 : fee_range_arg.ptr);
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(fee_satoshis_arg);
                Reference.reachabilityFence(signature_arg);
@@ -119,6 +123,7 @@ public class ClosingSigned extends CommonBase {
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.ClosingSigned ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ClosingSigned(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(fee_range_arg); };
                return ret_hu_conv;
        }
@@ -159,7 +164,7 @@ public class ClosingSigned extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.ClosingSigned b) {
-               boolean ret = bindings.ClosingSigned_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ClosingSigned_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 3832b4c3c5f7d5f2f7a5581a4460ff0030c438ea..dc0e6a062417750e884cfcc280b87525983f2e77 100644 (file)
@@ -112,7 +112,7 @@ public class ClosingSignedFeeRange extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.ClosingSignedFeeRange b) {
-               boolean ret = bindings.ClosingSignedFeeRange_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ClosingSignedFeeRange_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index bbe3475d0aba87f8b85b587e3486f4a38cecd631..8dbc3a8e7419b7ca8dbc451544cbdad6fe62e844 100644 (file)
@@ -60,7 +60,7 @@ public class ClosingTransaction extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.ClosingTransaction b) {
-               boolean ret = bindings.ClosingTransaction_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ClosingTransaction_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -75,7 +75,7 @@ public class ClosingTransaction extends CommonBase {
         * Construct an object of the class
         */
        public static ClosingTransaction of(long to_holder_value_sat, long to_counterparty_value_sat, byte[] to_holder_script, byte[] to_counterparty_script, org.ldk.structs.OutPoint funding_outpoint) {
-               long ret = bindings.ClosingTransaction_new(to_holder_value_sat, to_counterparty_value_sat, to_holder_script, to_counterparty_script, funding_outpoint == null ? 0 : funding_outpoint.ptr);
+               long ret = bindings.ClosingTransaction_new(to_holder_value_sat, to_counterparty_value_sat, to_holder_script, to_counterparty_script, funding_outpoint.ptr);
                Reference.reachabilityFence(to_holder_value_sat);
                Reference.reachabilityFence(to_counterparty_value_sat);
                Reference.reachabilityFence(to_holder_script);
@@ -114,7 +114,7 @@ public class ClosingTransaction extends CommonBase {
         * or using the built transaction.
         */
        public Result_TrustedClosingTransactionNoneZ verify(org.ldk.structs.OutPoint funding_outpoint) {
-               long ret = bindings.ClosingTransaction_verify(this.ptr, funding_outpoint == null ? 0 : funding_outpoint.ptr);
+               long ret = bindings.ClosingTransaction_verify(this.ptr, funding_outpoint.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(funding_outpoint);
                if (ret >= 0 && ret <= 4096) { return null; }
index b4da105e045e997a61d117cebb9cb333b08783fe..75dddc614bc81db3ff45086260860f4570dc5c11 100644 (file)
@@ -27,8 +27,14 @@ public class ClosureReason extends CommonBase {
                if (raw_val.getClass() == bindings.LDKClosureReason.HolderForceClosed.class) {
                        return new HolderForceClosed(ptr, (bindings.LDKClosureReason.HolderForceClosed)raw_val);
                }
-               if (raw_val.getClass() == bindings.LDKClosureReason.CooperativeClosure.class) {
-                       return new CooperativeClosure(ptr, (bindings.LDKClosureReason.CooperativeClosure)raw_val);
+               if (raw_val.getClass() == bindings.LDKClosureReason.LegacyCooperativeClosure.class) {
+                       return new LegacyCooperativeClosure(ptr, (bindings.LDKClosureReason.LegacyCooperativeClosure)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKClosureReason.CounterpartyInitiatedCooperativeClosure.class) {
+                       return new CounterpartyInitiatedCooperativeClosure(ptr, (bindings.LDKClosureReason.CounterpartyInitiatedCooperativeClosure)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKClosureReason.LocallyInitiatedCooperativeClosure.class) {
+                       return new LocallyInitiatedCooperativeClosure(ptr, (bindings.LDKClosureReason.LocallyInitiatedCooperativeClosure)raw_val);
                }
                if (raw_val.getClass() == bindings.LDKClosureReason.CommitmentTxConfirmed.class) {
                        return new CommitmentTxConfirmed(ptr, (bindings.LDKClosureReason.CommitmentTxConfirmed)raw_val);
@@ -51,6 +57,9 @@ public class ClosureReason extends CommonBase {
                if (raw_val.getClass() == bindings.LDKClosureReason.FundingBatchClosure.class) {
                        return new FundingBatchClosure(ptr, (bindings.LDKClosureReason.FundingBatchClosure)raw_val);
                }
+               if (raw_val.getClass() == bindings.LDKClosureReason.HTLCsTimedOut.class) {
+                       return new HTLCsTimedOut(ptr, (bindings.LDKClosureReason.HTLCsTimedOut)raw_val);
+               }
                assert false; return null; // Unreachable without extending the (internal) bindings interface
        }
 
@@ -92,9 +101,33 @@ public class ClosureReason extends CommonBase {
        /**
         * The channel was closed after negotiating a cooperative close and we've now broadcasted
         * the cooperative close transaction. Note the shutdown may have been initiated by us.
+        * 
+        * This was only set in versions of LDK prior to 0.0.122.
+        */
+       public final static class LegacyCooperativeClosure extends ClosureReason {
+               private LegacyCooperativeClosure(long ptr, bindings.LDKClosureReason.LegacyCooperativeClosure obj) {
+                       super(null, ptr);
+               }
+       }
+       /**
+        * The channel was closed after negotiating a cooperative close and we've now broadcasted
+        * the cooperative close transaction. This indicates that the shutdown was initiated by our
+        * counterparty.
+        * 
+        * In rare cases where we initiated closure immediately prior to shutting down without
+        * persisting, this value may be provided for channels we initiated closure for.
         */
-       public final static class CooperativeClosure extends ClosureReason {
-               private CooperativeClosure(long ptr, bindings.LDKClosureReason.CooperativeClosure obj) {
+       public final static class CounterpartyInitiatedCooperativeClosure extends ClosureReason {
+               private CounterpartyInitiatedCooperativeClosure(long ptr, bindings.LDKClosureReason.CounterpartyInitiatedCooperativeClosure obj) {
+                       super(null, ptr);
+               }
+       }
+       /**
+        * The channel was closed after negotiating a cooperative close and we've now broadcasted
+        * the cooperative close transaction. This indicates that the shutdown was initiated by us.
+        */
+       public final static class LocallyInitiatedCooperativeClosure extends ClosureReason {
+               private LocallyInitiatedCooperativeClosure(long ptr, bindings.LDKClosureReason.LocallyInitiatedCooperativeClosure obj) {
                        super(null, ptr);
                }
        }
@@ -176,6 +209,14 @@ public class ClosureReason extends CommonBase {
                        super(null, ptr);
                }
        }
+       /**
+        * One of our HTLCs timed out in a channel, causing us to force close the channel.
+        */
+       public final static class HTLCsTimedOut extends ClosureReason {
+               private HTLCsTimedOut(long ptr, bindings.LDKClosureReason.HTLCsTimedOut obj) {
+                       super(null, ptr);
+               }
+       }
        long clone_ptr() {
                long ret = bindings.ClosureReason_clone_ptr(this.ptr);
                Reference.reachabilityFence(this);
@@ -198,7 +239,7 @@ public class ClosureReason extends CommonBase {
         * Utility method to constructs a new CounterpartyForceClosed-variant ClosureReason
         */
        public static ClosureReason counterparty_force_closed(org.ldk.structs.UntrustedString peer_msg) {
-               long ret = bindings.ClosureReason_counterparty_force_closed(peer_msg == null ? 0 : peer_msg.ptr);
+               long ret = bindings.ClosureReason_counterparty_force_closed(peer_msg.ptr);
                Reference.reachabilityFence(peer_msg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
@@ -219,10 +260,32 @@ public class ClosureReason extends CommonBase {
        }
 
        /**
-        * Utility method to constructs a new CooperativeClosure-variant ClosureReason
+        * Utility method to constructs a new LegacyCooperativeClosure-variant ClosureReason
+        */
+       public static ClosureReason legacy_cooperative_closure() {
+               long ret = bindings.ClosureReason_legacy_cooperative_closure();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new CounterpartyInitiatedCooperativeClosure-variant ClosureReason
         */
-       public static ClosureReason cooperative_closure() {
-               long ret = bindings.ClosureReason_cooperative_closure();
+       public static ClosureReason counterparty_initiated_cooperative_closure() {
+               long ret = bindings.ClosureReason_counterparty_initiated_cooperative_closure();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new LocallyInitiatedCooperativeClosure-variant ClosureReason
+        */
+       public static ClosureReason locally_initiated_cooperative_closure() {
+               long ret = bindings.ClosureReason_locally_initiated_cooperative_closure();
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
@@ -307,12 +370,23 @@ public class ClosureReason extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new HTLCsTimedOut-variant ClosureReason
+        */
+       public static ClosureReason htlcs_timed_out() {
+               long ret = bindings.ClosureReason_htlcs_timed_out();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ClosureReason ret_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
        /**
         * Checks if two ClosureReasons contain equal inner contents.
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.ClosureReason b) {
-               boolean ret = bindings.ClosureReason_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ClosureReason_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
index f9ec64959ea26704e5aacea8bdeff8c4d60bd20a..182ed5ecde6f77cf7ce870cdcc210971f25f5d2b 100644 (file)
@@ -44,7 +44,7 @@ public class CoinSelection extends CommonBase {
         * requiring additional fees.
         */
        public void set_confirmed_utxos(Utxo[] val) {
-               bindings.CoinSelection_set_confirmed_utxos(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_6 -> val_conv_6 == null ? 0 : val_conv_6.ptr).toArray() : null);
+               bindings.CoinSelection_set_confirmed_utxos(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_6 -> val_conv_6.ptr).toArray() : null);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                for (Utxo val_conv_6: val) { if (this != null) { this.ptrs_to.add(val_conv_6); }; };
@@ -82,7 +82,7 @@ public class CoinSelection extends CommonBase {
         * Constructs a new CoinSelection given each field
         */
        public static CoinSelection of(Utxo[] confirmed_utxos_arg, org.ldk.structs.Option_TxOutZ change_output_arg) {
-               long ret = bindings.CoinSelection_new(confirmed_utxos_arg != null ? Arrays.stream(confirmed_utxos_arg).mapToLong(confirmed_utxos_arg_conv_6 -> confirmed_utxos_arg_conv_6 == null ? 0 : confirmed_utxos_arg_conv_6.ptr).toArray() : null, change_output_arg.ptr);
+               long ret = bindings.CoinSelection_new(confirmed_utxos_arg != null ? Arrays.stream(confirmed_utxos_arg).mapToLong(confirmed_utxos_arg_conv_6 -> confirmed_utxos_arg_conv_6.ptr).toArray() : null, change_output_arg.ptr);
                Reference.reachabilityFence(confirmed_utxos_arg);
                Reference.reachabilityFence(change_output_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
index 53451dff9f8f2630cbf1aa051035c93e9744d30b..47b28f5c3aa9bb347ee6a9f1fd447467b51317a6 100644 (file)
@@ -100,13 +100,13 @@ public class CoinSelectionSource extends CommonBase {
                                }
                                Result_CoinSelectionNoneZ ret = arg.select_confirmed_utxos(claim_id, must_spend_conv_7_arr, must_pay_to_conv_7_arr, target_feerate_sat_per_1000_weight);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long sign_psbt(byte[] psbt) {
                                Result_TransactionNoneZ ret = arg.sign_psbt(psbt);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                });
@@ -141,7 +141,7 @@ public class CoinSelectionSource extends CommonBase {
         * set of other claims being double spent to a minimum.
         */
        public Result_CoinSelectionNoneZ select_confirmed_utxos(byte[] claim_id, Input[] must_spend, TxOut[] must_pay_to, int target_feerate_sat_per_1000_weight) {
-               long ret = bindings.CoinSelectionSource_select_confirmed_utxos(this.ptr, InternalUtils.check_arr_len(claim_id, 32), must_spend != null ? Arrays.stream(must_spend).mapToLong(must_spend_conv_7 -> must_spend_conv_7 == null ? 0 : must_spend_conv_7.ptr).toArray() : null, must_pay_to != null ? Arrays.stream(must_pay_to).mapToLong(must_pay_to_conv_7 -> must_pay_to_conv_7.ptr).toArray() : null, target_feerate_sat_per_1000_weight);
+               long ret = bindings.CoinSelectionSource_select_confirmed_utxos(this.ptr, InternalUtils.check_arr_len(claim_id, 32), must_spend != null ? Arrays.stream(must_spend).mapToLong(must_spend_conv_7 -> must_spend_conv_7.ptr).toArray() : null, must_pay_to != null ? Arrays.stream(must_pay_to).mapToLong(must_pay_to_conv_7 -> must_pay_to_conv_7.ptr).toArray() : null, target_feerate_sat_per_1000_weight);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(claim_id);
                Reference.reachabilityFence(must_spend);
index 49a550fc3a4c4eeb716592385e29250ddf0f324b..d9f6f2df75432f4ed1564591cff23bfeb4ebb94c 100644 (file)
@@ -25,19 +25,23 @@ public class CommitmentSigned extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.CommitmentSigned_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.CommitmentSigned_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.CommitmentSigned_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.CommitmentSigned_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -81,14 +85,15 @@ public class CommitmentSigned extends CommonBase {
        /**
         * Constructs a new CommitmentSigned given each field
         */
-       public static CommitmentSigned of(byte[] channel_id_arg, byte[] signature_arg, byte[][] htlc_signatures_arg) {
-               long ret = bindings.CommitmentSigned_new(InternalUtils.check_arr_len(channel_id_arg, 32), InternalUtils.check_arr_len(signature_arg, 64), htlc_signatures_arg != null ? Arrays.stream(htlc_signatures_arg).map(htlc_signatures_arg_conv_8 -> InternalUtils.check_arr_len(htlc_signatures_arg_conv_8, 64)).toArray(byte[][]::new) : null);
+       public static CommitmentSigned of(org.ldk.structs.ChannelId channel_id_arg, byte[] signature_arg, byte[][] htlc_signatures_arg) {
+               long ret = bindings.CommitmentSigned_new(channel_id_arg.ptr, InternalUtils.check_arr_len(signature_arg, 64), htlc_signatures_arg != null ? Arrays.stream(htlc_signatures_arg).map(htlc_signatures_arg_conv_8 -> InternalUtils.check_arr_len(htlc_signatures_arg_conv_8, 64)).toArray(byte[][]::new) : null);
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(signature_arg);
                Reference.reachabilityFence(htlc_signatures_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.CommitmentSigned ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommitmentSigned(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                return ret_hu_conv;
        }
 
@@ -128,7 +133,7 @@ public class CommitmentSigned extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.CommitmentSigned b) {
-               boolean ret = bindings.CommitmentSigned_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.CommitmentSigned_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 9c1a693bbf068ad51b6fdcda730cc45928250838..0e67862d66698601e1dc926a0d2979da033b335b 100644 (file)
@@ -134,7 +134,7 @@ public class CommitmentTransaction extends CommonBase {
         * or using the built transaction.
         */
        public Result_TrustedCommitmentTransactionNoneZ verify(org.ldk.structs.DirectedChannelTransactionParameters channel_parameters, org.ldk.structs.ChannelPublicKeys broadcaster_keys, org.ldk.structs.ChannelPublicKeys countersignatory_keys) {
-               long ret = bindings.CommitmentTransaction_verify(this.ptr, channel_parameters == null ? 0 : channel_parameters.ptr, broadcaster_keys == null ? 0 : broadcaster_keys.ptr, countersignatory_keys == null ? 0 : countersignatory_keys.ptr);
+               long ret = bindings.CommitmentTransaction_verify(this.ptr, channel_parameters.ptr, broadcaster_keys.ptr, countersignatory_keys.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(channel_parameters);
                Reference.reachabilityFence(broadcaster_keys);
index 4d8af11b7a6e5c7ec17915da8a0255088f5ad540..7ee8b0b207c763a758f964eb4aafc39b906aa6e3 100644 (file)
@@ -42,7 +42,7 @@ public class CommitmentUpdate extends CommonBase {
         * `update_add_htlc` messages which should be sent
         */
        public void set_update_add_htlcs(UpdateAddHTLC[] val) {
-               bindings.CommitmentUpdate_set_update_add_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_15 -> val_conv_15 == null ? 0 : val_conv_15.ptr).toArray() : null);
+               bindings.CommitmentUpdate_set_update_add_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_15 -> val_conv_15.ptr).toArray() : null);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                for (UpdateAddHTLC val_conv_15: val) { if (this != null) { this.ptrs_to.add(val_conv_15); }; };
@@ -69,7 +69,7 @@ public class CommitmentUpdate extends CommonBase {
         * `update_fulfill_htlc` messages which should be sent
         */
        public void set_update_fulfill_htlcs(UpdateFulfillHTLC[] val) {
-               bindings.CommitmentUpdate_set_update_fulfill_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_19 -> val_conv_19 == null ? 0 : val_conv_19.ptr).toArray() : null);
+               bindings.CommitmentUpdate_set_update_fulfill_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_19 -> val_conv_19.ptr).toArray() : null);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                for (UpdateFulfillHTLC val_conv_19: val) { if (this != null) { this.ptrs_to.add(val_conv_19); }; };
@@ -96,7 +96,7 @@ public class CommitmentUpdate extends CommonBase {
         * `update_fail_htlc` messages which should be sent
         */
        public void set_update_fail_htlcs(UpdateFailHTLC[] val) {
-               bindings.CommitmentUpdate_set_update_fail_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_16 -> val_conv_16 == null ? 0 : val_conv_16.ptr).toArray() : null);
+               bindings.CommitmentUpdate_set_update_fail_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_16 -> val_conv_16.ptr).toArray() : null);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                for (UpdateFailHTLC val_conv_16: val) { if (this != null) { this.ptrs_to.add(val_conv_16); }; };
@@ -123,7 +123,7 @@ public class CommitmentUpdate extends CommonBase {
         * `update_fail_malformed_htlc` messages which should be sent
         */
        public void set_update_fail_malformed_htlcs(UpdateFailMalformedHTLC[] val) {
-               bindings.CommitmentUpdate_set_update_fail_malformed_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_25 -> val_conv_25 == null ? 0 : val_conv_25.ptr).toArray() : null);
+               bindings.CommitmentUpdate_set_update_fail_malformed_htlcs(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_25 -> val_conv_25.ptr).toArray() : null);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                for (UpdateFailMalformedHTLC val_conv_25: val) { if (this != null) { this.ptrs_to.add(val_conv_25); }; };
@@ -172,7 +172,7 @@ public class CommitmentUpdate extends CommonBase {
         * A `commitment_signed` message which should be sent
         */
        public void set_commitment_signed(org.ldk.structs.CommitmentSigned val) {
-               bindings.CommitmentUpdate_set_commitment_signed(this.ptr, val == null ? 0 : val.ptr);
+               bindings.CommitmentUpdate_set_commitment_signed(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -184,7 +184,7 @@ public class CommitmentUpdate extends CommonBase {
         * Note that update_fee_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public static CommitmentUpdate of(UpdateAddHTLC[] update_add_htlcs_arg, UpdateFulfillHTLC[] update_fulfill_htlcs_arg, UpdateFailHTLC[] update_fail_htlcs_arg, UpdateFailMalformedHTLC[] update_fail_malformed_htlcs_arg, @Nullable org.ldk.structs.UpdateFee update_fee_arg, org.ldk.structs.CommitmentSigned commitment_signed_arg) {
-               long ret = bindings.CommitmentUpdate_new(update_add_htlcs_arg != null ? Arrays.stream(update_add_htlcs_arg).mapToLong(update_add_htlcs_arg_conv_15 -> update_add_htlcs_arg_conv_15 == null ? 0 : update_add_htlcs_arg_conv_15.ptr).toArray() : null, update_fulfill_htlcs_arg != null ? Arrays.stream(update_fulfill_htlcs_arg).mapToLong(update_fulfill_htlcs_arg_conv_19 -> update_fulfill_htlcs_arg_conv_19 == null ? 0 : update_fulfill_htlcs_arg_conv_19.ptr).toArray() : null, update_fail_htlcs_arg != null ? Arrays.stream(update_fail_htlcs_arg).mapToLong(update_fail_htlcs_arg_conv_16 -> update_fail_htlcs_arg_conv_16 == null ? 0 : update_fail_htlcs_arg_conv_16.ptr).toArray() : null, update_fail_malformed_htlcs_arg != null ? Arrays.stream(update_fail_malformed_htlcs_arg).mapToLong(update_fail_malformed_htlcs_arg_conv_25 -> update_fail_malformed_htlcs_arg_conv_25 == null ? 0 : update_fail_malformed_htlcs_arg_conv_25.ptr).toArray() : null, update_fee_arg == null ? 0 : update_fee_arg.ptr, commitment_signed_arg == null ? 0 : commitment_signed_arg.ptr);
+               long ret = bindings.CommitmentUpdate_new(update_add_htlcs_arg != null ? Arrays.stream(update_add_htlcs_arg).mapToLong(update_add_htlcs_arg_conv_15 -> update_add_htlcs_arg_conv_15.ptr).toArray() : null, update_fulfill_htlcs_arg != null ? Arrays.stream(update_fulfill_htlcs_arg).mapToLong(update_fulfill_htlcs_arg_conv_19 -> update_fulfill_htlcs_arg_conv_19.ptr).toArray() : null, update_fail_htlcs_arg != null ? Arrays.stream(update_fail_htlcs_arg).mapToLong(update_fail_htlcs_arg_conv_16 -> update_fail_htlcs_arg_conv_16.ptr).toArray() : null, update_fail_malformed_htlcs_arg != null ? Arrays.stream(update_fail_malformed_htlcs_arg).mapToLong(update_fail_malformed_htlcs_arg_conv_25 -> update_fail_malformed_htlcs_arg_conv_25.ptr).toArray() : null, update_fee_arg == null ? 0 : update_fee_arg.ptr, commitment_signed_arg.ptr);
                Reference.reachabilityFence(update_add_htlcs_arg);
                Reference.reachabilityFence(update_fulfill_htlcs_arg);
                Reference.reachabilityFence(update_fail_htlcs_arg);
@@ -239,7 +239,7 @@ public class CommitmentUpdate extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.CommitmentUpdate b) {
-               boolean ret = bindings.CommitmentUpdate_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.CommitmentUpdate_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
diff --git a/src/main/java/org/ldk/structs/CommonAcceptChannelFields.java b/src/main/java/org/ldk/structs/CommonAcceptChannelFields.java
new file mode 100644 (file)
index 0000000..398ae34
--- /dev/null
@@ -0,0 +1,408 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Contains fields that are both common to [`accept_channel`] and `accept_channel2` messages.
+ * 
+ * [`accept_channel`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-accept_channel-message
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class CommonAcceptChannelFields extends CommonBase {
+       CommonAcceptChannelFields(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.CommonAcceptChannelFields_free(ptr); }
+       }
+
+       /**
+        * The same `temporary_channel_id` received from the initiator's `open_channel2` or `open_channel` message.
+        */
+       public ChannelId get_temporary_channel_id() {
+               long ret = bindings.CommonAcceptChannelFields_get_temporary_channel_id(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * The same `temporary_channel_id` received from the initiator's `open_channel2` or `open_channel` message.
+        */
+       public void set_temporary_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.CommonAcceptChannelFields_set_temporary_channel_id(this.ptr, val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
+       }
+
+       /**
+        * The threshold below which outputs on transactions broadcast by the channel acceptor will be
+        * omitted
+        */
+       public long get_dust_limit_satoshis() {
+               long ret = bindings.CommonAcceptChannelFields_get_dust_limit_satoshis(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * The threshold below which outputs on transactions broadcast by the channel acceptor will be
+        * omitted
+        */
+       public void set_dust_limit_satoshis(long val) {
+               bindings.CommonAcceptChannelFields_set_dust_limit_satoshis(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * The maximum inbound HTLC value in flight towards sender, in milli-satoshi
+        */
+       public long get_max_htlc_value_in_flight_msat() {
+               long ret = bindings.CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * The maximum inbound HTLC value in flight towards sender, in milli-satoshi
+        */
+       public void set_max_htlc_value_in_flight_msat(long val) {
+               bindings.CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * The minimum HTLC size incoming to channel acceptor, in milli-satoshi
+        */
+       public long get_htlc_minimum_msat() {
+               long ret = bindings.CommonAcceptChannelFields_get_htlc_minimum_msat(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * The minimum HTLC size incoming to channel acceptor, in milli-satoshi
+        */
+       public void set_htlc_minimum_msat(long val) {
+               bindings.CommonAcceptChannelFields_set_htlc_minimum_msat(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * Minimum depth of the funding transaction before the channel is considered open
+        */
+       public int get_minimum_depth() {
+               int ret = bindings.CommonAcceptChannelFields_get_minimum_depth(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Minimum depth of the funding transaction before the channel is considered open
+        */
+       public void set_minimum_depth(int val) {
+               bindings.CommonAcceptChannelFields_set_minimum_depth(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
+        * broadcast a commitment transaction
+        */
+       public short get_to_self_delay() {
+               short ret = bindings.CommonAcceptChannelFields_get_to_self_delay(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
+        * broadcast a commitment transaction
+        */
+       public void set_to_self_delay(short val) {
+               bindings.CommonAcceptChannelFields_set_to_self_delay(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * The maximum number of inbound HTLCs towards channel acceptor
+        */
+       public short get_max_accepted_htlcs() {
+               short ret = bindings.CommonAcceptChannelFields_get_max_accepted_htlcs(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * The maximum number of inbound HTLCs towards channel acceptor
+        */
+       public void set_max_accepted_htlcs(short val) {
+               bindings.CommonAcceptChannelFields_set_max_accepted_htlcs(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * The channel acceptor's key controlling the funding transaction
+        */
+       public byte[] get_funding_pubkey() {
+               byte[] ret = bindings.CommonAcceptChannelFields_get_funding_pubkey(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * The channel acceptor's key controlling the funding transaction
+        */
+       public void set_funding_pubkey(byte[] val) {
+               bindings.CommonAcceptChannelFields_set_funding_pubkey(this.ptr, InternalUtils.check_arr_len(val, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * Used to derive a revocation key for transactions broadcast by counterparty
+        */
+       public byte[] get_revocation_basepoint() {
+               byte[] ret = bindings.CommonAcceptChannelFields_get_revocation_basepoint(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Used to derive a revocation key for transactions broadcast by counterparty
+        */
+       public void set_revocation_basepoint(byte[] val) {
+               bindings.CommonAcceptChannelFields_set_revocation_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * A payment key to channel acceptor for transactions broadcast by counterparty
+        */
+       public byte[] get_payment_basepoint() {
+               byte[] ret = bindings.CommonAcceptChannelFields_get_payment_basepoint(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * A payment key to channel acceptor for transactions broadcast by counterparty
+        */
+       public void set_payment_basepoint(byte[] val) {
+               bindings.CommonAcceptChannelFields_set_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * Used to derive a payment key to channel acceptor for transactions broadcast by channel
+        * acceptor
+        */
+       public byte[] get_delayed_payment_basepoint() {
+               byte[] ret = bindings.CommonAcceptChannelFields_get_delayed_payment_basepoint(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Used to derive a payment key to channel acceptor for transactions broadcast by channel
+        * acceptor
+        */
+       public void set_delayed_payment_basepoint(byte[] val) {
+               bindings.CommonAcceptChannelFields_set_delayed_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty
+        */
+       public byte[] get_htlc_basepoint() {
+               byte[] ret = bindings.CommonAcceptChannelFields_get_htlc_basepoint(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty
+        */
+       public void set_htlc_basepoint(byte[] val) {
+               bindings.CommonAcceptChannelFields_set_htlc_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point
+        */
+       public byte[] get_first_per_commitment_point() {
+               byte[] ret = bindings.CommonAcceptChannelFields_get_first_per_commitment_point(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point
+        */
+       public void set_first_per_commitment_point(byte[] val) {
+               bindings.CommonAcceptChannelFields_set_first_per_commitment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we
+        * collaboratively close
+        */
+       public Option_CVec_u8ZZ get_shutdown_scriptpubkey() {
+               long ret = bindings.CommonAcceptChannelFields_get_shutdown_scriptpubkey(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we
+        * collaboratively close
+        */
+       public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) {
+               bindings.CommonAcceptChannelFields_set_shutdown_scriptpubkey(this.ptr, val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
+       }
+
+       /**
+        * The channel type that this channel will represent. If none is set, we derive the channel
+        * type from the intersection of our feature bits with our counterparty's feature bits from
+        * the Init message.
+        * 
+        * This is required to match the equivalent field in [`OpenChannel`] or [`OpenChannelV2`]'s
+        * [`CommonOpenChannelFields::channel_type`].
+        * 
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       @Nullable
+       public ChannelTypeFeatures get_channel_type() {
+               long ret = bindings.CommonAcceptChannelFields_get_channel_type(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * The channel type that this channel will represent. If none is set, we derive the channel
+        * type from the intersection of our feature bits with our counterparty's feature bits from
+        * the Init message.
+        * 
+        * This is required to match the equivalent field in [`OpenChannel`] or [`OpenChannelV2`]'s
+        * [`CommonOpenChannelFields::channel_type`].
+        * 
+        * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       public void set_channel_type(@Nullable org.ldk.structs.ChannelTypeFeatures val) {
+               bindings.CommonAcceptChannelFields_set_channel_type(this.ptr, val == null ? 0 : val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
+       }
+
+       /**
+        * Constructs a new CommonAcceptChannelFields given each field
+        * 
+        * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       public static CommonAcceptChannelFields of(org.ldk.structs.ChannelId temporary_channel_id_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, int minimum_depth_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, @Nullable org.ldk.structs.ChannelTypeFeatures channel_type_arg) {
+               long ret = bindings.CommonAcceptChannelFields_new(temporary_channel_id_arg.ptr, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33), InternalUtils.check_arr_len(revocation_basepoint_arg, 33), InternalUtils.check_arr_len(payment_basepoint_arg, 33), InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33), InternalUtils.check_arr_len(htlc_basepoint_arg, 33), InternalUtils.check_arr_len(first_per_commitment_point_arg, 33), shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr);
+               Reference.reachabilityFence(temporary_channel_id_arg);
+               Reference.reachabilityFence(dust_limit_satoshis_arg);
+               Reference.reachabilityFence(max_htlc_value_in_flight_msat_arg);
+               Reference.reachabilityFence(htlc_minimum_msat_arg);
+               Reference.reachabilityFence(minimum_depth_arg);
+               Reference.reachabilityFence(to_self_delay_arg);
+               Reference.reachabilityFence(max_accepted_htlcs_arg);
+               Reference.reachabilityFence(funding_pubkey_arg);
+               Reference.reachabilityFence(revocation_basepoint_arg);
+               Reference.reachabilityFence(payment_basepoint_arg);
+               Reference.reachabilityFence(delayed_payment_basepoint_arg);
+               Reference.reachabilityFence(htlc_basepoint_arg);
+               Reference.reachabilityFence(first_per_commitment_point_arg);
+               Reference.reachabilityFence(shutdown_scriptpubkey_arg);
+               Reference.reachabilityFence(channel_type_arg);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.CommonAcceptChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonAcceptChannelFields(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(temporary_channel_id_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(shutdown_scriptpubkey_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type_arg); };
+               return ret_hu_conv;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CommonAcceptChannelFields_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the CommonAcceptChannelFields
+        */
+       public CommonAcceptChannelFields clone() {
+               long ret = bindings.CommonAcceptChannelFields_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.CommonAcceptChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonAcceptChannelFields(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Generates a non-cryptographic 64-bit hash of the CommonAcceptChannelFields.
+        */
+       public long hash() {
+               long ret = bindings.CommonAcceptChannelFields_hash(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       @Override public int hashCode() {
+               return (int)this.hash();
+       }
+       /**
+        * Checks if two CommonAcceptChannelFieldss 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.
+        */
+       public boolean eq(org.ldk.structs.CommonAcceptChannelFields b) {
+               boolean ret = bindings.CommonAcceptChannelFields_eq(this.ptr, b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof CommonAcceptChannelFields)) return false;
+               return this.eq((CommonAcceptChannelFields)o);
+       }
+}
diff --git a/src/main/java/org/ldk/structs/CommonOpenChannelFields.java b/src/main/java/org/ldk/structs/CommonOpenChannelFields.java
new file mode 100644 (file)
index 0000000..91ef7bf
--- /dev/null
@@ -0,0 +1,469 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Contains fields that are both common to [`open_channel`] and `open_channel2` messages.
+ * 
+ * [`open_channel`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-open_channel-message
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class CommonOpenChannelFields extends CommonBase {
+       CommonOpenChannelFields(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.CommonOpenChannelFields_free(ptr); }
+       }
+
+       /**
+        * The genesis hash of the blockchain where the channel is to be opened
+        */
+       public byte[] get_chain_hash() {
+               byte[] ret = bindings.CommonOpenChannelFields_get_chain_hash(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * The genesis hash of the blockchain where the channel is to be opened
+        */
+       public void set_chain_hash(byte[] val) {
+               bindings.CommonOpenChannelFields_set_chain_hash(this.ptr, InternalUtils.check_arr_len(val, 32));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * A temporary channel ID
+        * For V2 channels: derived using a zeroed out value for the channel acceptor's revocation basepoint
+        * For V1 channels: a temporary channel ID, until the funding outpoint is announced
+        */
+       public ChannelId get_temporary_channel_id() {
+               long ret = bindings.CommonOpenChannelFields_get_temporary_channel_id(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * A temporary channel ID
+        * For V2 channels: derived using a zeroed out value for the channel acceptor's revocation basepoint
+        * For V1 channels: a temporary channel ID, until the funding outpoint is announced
+        */
+       public void set_temporary_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.CommonOpenChannelFields_set_temporary_channel_id(this.ptr, val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
+       }
+
+       /**
+        * For V1 channels: The channel value
+        * For V2 channels: Part of the channel value contributed by the channel initiator
+        */
+       public long get_funding_satoshis() {
+               long ret = bindings.CommonOpenChannelFields_get_funding_satoshis(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * For V1 channels: The channel value
+        * For V2 channels: Part of the channel value contributed by the channel initiator
+        */
+       public void set_funding_satoshis(long val) {
+               bindings.CommonOpenChannelFields_set_funding_satoshis(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * The threshold below which outputs on transactions broadcast by the channel initiator will be
+        * omitted
+        */
+       public long get_dust_limit_satoshis() {
+               long ret = bindings.CommonOpenChannelFields_get_dust_limit_satoshis(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * The threshold below which outputs on transactions broadcast by the channel initiator will be
+        * omitted
+        */
+       public void set_dust_limit_satoshis(long val) {
+               bindings.CommonOpenChannelFields_set_dust_limit_satoshis(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi
+        */
+       public long get_max_htlc_value_in_flight_msat() {
+               long ret = bindings.CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi
+        */
+       public void set_max_htlc_value_in_flight_msat(long val) {
+               bindings.CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * The minimum HTLC size incoming to channel initiator, in milli-satoshi
+        */
+       public long get_htlc_minimum_msat() {
+               long ret = bindings.CommonOpenChannelFields_get_htlc_minimum_msat(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * The minimum HTLC size incoming to channel initiator, in milli-satoshi
+        */
+       public void set_htlc_minimum_msat(long val) {
+               bindings.CommonOpenChannelFields_set_htlc_minimum_msat(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * The feerate for the commitment transaction set by the channel initiator until updated by
+        * [`UpdateFee`]
+        */
+       public int get_commitment_feerate_sat_per_1000_weight() {
+               int ret = bindings.CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * The feerate for the commitment transaction set by the channel initiator until updated by
+        * [`UpdateFee`]
+        */
+       public void set_commitment_feerate_sat_per_1000_weight(int val) {
+               bindings.CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
+        * broadcast a commitment transaction
+        */
+       public short get_to_self_delay() {
+               short ret = bindings.CommonOpenChannelFields_get_to_self_delay(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
+        * broadcast a commitment transaction
+        */
+       public void set_to_self_delay(short val) {
+               bindings.CommonOpenChannelFields_set_to_self_delay(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * The maximum number of inbound HTLCs towards channel initiator
+        */
+       public short get_max_accepted_htlcs() {
+               short ret = bindings.CommonOpenChannelFields_get_max_accepted_htlcs(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * The maximum number of inbound HTLCs towards channel initiator
+        */
+       public void set_max_accepted_htlcs(short val) {
+               bindings.CommonOpenChannelFields_set_max_accepted_htlcs(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * The channel initiator's key controlling the funding transaction
+        */
+       public byte[] get_funding_pubkey() {
+               byte[] ret = bindings.CommonOpenChannelFields_get_funding_pubkey(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * The channel initiator's key controlling the funding transaction
+        */
+       public void set_funding_pubkey(byte[] val) {
+               bindings.CommonOpenChannelFields_set_funding_pubkey(this.ptr, InternalUtils.check_arr_len(val, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * Used to derive a revocation key for transactions broadcast by counterparty
+        */
+       public byte[] get_revocation_basepoint() {
+               byte[] ret = bindings.CommonOpenChannelFields_get_revocation_basepoint(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Used to derive a revocation key for transactions broadcast by counterparty
+        */
+       public void set_revocation_basepoint(byte[] val) {
+               bindings.CommonOpenChannelFields_set_revocation_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * A payment key to channel initiator for transactions broadcast by counterparty
+        */
+       public byte[] get_payment_basepoint() {
+               byte[] ret = bindings.CommonOpenChannelFields_get_payment_basepoint(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * A payment key to channel initiator for transactions broadcast by counterparty
+        */
+       public void set_payment_basepoint(byte[] val) {
+               bindings.CommonOpenChannelFields_set_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * Used to derive a payment key to channel initiator for transactions broadcast by channel
+        * initiator
+        */
+       public byte[] get_delayed_payment_basepoint() {
+               byte[] ret = bindings.CommonOpenChannelFields_get_delayed_payment_basepoint(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Used to derive a payment key to channel initiator for transactions broadcast by channel
+        * initiator
+        */
+       public void set_delayed_payment_basepoint(byte[] val) {
+               bindings.CommonOpenChannelFields_set_delayed_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * Used to derive an HTLC payment key to channel initiator
+        */
+       public byte[] get_htlc_basepoint() {
+               byte[] ret = bindings.CommonOpenChannelFields_get_htlc_basepoint(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Used to derive an HTLC payment key to channel initiator
+        */
+       public void set_htlc_basepoint(byte[] val) {
+               bindings.CommonOpenChannelFields_set_htlc_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * The first to-be-broadcast-by-channel-initiator transaction's per commitment point
+        */
+       public byte[] get_first_per_commitment_point() {
+               byte[] ret = bindings.CommonOpenChannelFields_get_first_per_commitment_point(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * The first to-be-broadcast-by-channel-initiator transaction's per commitment point
+        */
+       public void set_first_per_commitment_point(byte[] val) {
+               bindings.CommonOpenChannelFields_set_first_per_commitment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * The channel flags to be used
+        */
+       public byte get_channel_flags() {
+               byte ret = bindings.CommonOpenChannelFields_get_channel_flags(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * The channel flags to be used
+        */
+       public void set_channel_flags(byte val) {
+               bindings.CommonOpenChannelFields_set_channel_flags(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we
+        * collaboratively close
+        */
+       public Option_CVec_u8ZZ get_shutdown_scriptpubkey() {
+               long ret = bindings.CommonOpenChannelFields_get_shutdown_scriptpubkey(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we
+        * collaboratively close
+        */
+       public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) {
+               bindings.CommonOpenChannelFields_set_shutdown_scriptpubkey(this.ptr, val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
+       }
+
+       /**
+        * The channel type that this channel will represent
+        * 
+        * If this is `None`, we derive the channel type from the intersection of our
+        * feature bits with our counterparty's feature bits from the [`Init`] message.
+        * 
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       @Nullable
+       public ChannelTypeFeatures get_channel_type() {
+               long ret = bindings.CommonOpenChannelFields_get_channel_type(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * The channel type that this channel will represent
+        * 
+        * If this is `None`, we derive the channel type from the intersection of our
+        * feature bits with our counterparty's feature bits from the [`Init`] message.
+        * 
+        * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       public void set_channel_type(@Nullable org.ldk.structs.ChannelTypeFeatures val) {
+               bindings.CommonOpenChannelFields_set_channel_type(this.ptr, val == null ? 0 : val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
+       }
+
+       /**
+        * Constructs a new CommonOpenChannelFields given each field
+        * 
+        * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       public static CommonOpenChannelFields of(byte[] chain_hash_arg, org.ldk.structs.ChannelId temporary_channel_id_arg, long funding_satoshis_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, int commitment_feerate_sat_per_1000_weight_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte channel_flags_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, @Nullable org.ldk.structs.ChannelTypeFeatures channel_type_arg) {
+               long ret = bindings.CommonOpenChannelFields_new(InternalUtils.check_arr_len(chain_hash_arg, 32), temporary_channel_id_arg.ptr, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, commitment_feerate_sat_per_1000_weight_arg, to_self_delay_arg, max_accepted_htlcs_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33), InternalUtils.check_arr_len(revocation_basepoint_arg, 33), InternalUtils.check_arr_len(payment_basepoint_arg, 33), InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33), InternalUtils.check_arr_len(htlc_basepoint_arg, 33), InternalUtils.check_arr_len(first_per_commitment_point_arg, 33), channel_flags_arg, shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr);
+               Reference.reachabilityFence(chain_hash_arg);
+               Reference.reachabilityFence(temporary_channel_id_arg);
+               Reference.reachabilityFence(funding_satoshis_arg);
+               Reference.reachabilityFence(dust_limit_satoshis_arg);
+               Reference.reachabilityFence(max_htlc_value_in_flight_msat_arg);
+               Reference.reachabilityFence(htlc_minimum_msat_arg);
+               Reference.reachabilityFence(commitment_feerate_sat_per_1000_weight_arg);
+               Reference.reachabilityFence(to_self_delay_arg);
+               Reference.reachabilityFence(max_accepted_htlcs_arg);
+               Reference.reachabilityFence(funding_pubkey_arg);
+               Reference.reachabilityFence(revocation_basepoint_arg);
+               Reference.reachabilityFence(payment_basepoint_arg);
+               Reference.reachabilityFence(delayed_payment_basepoint_arg);
+               Reference.reachabilityFence(htlc_basepoint_arg);
+               Reference.reachabilityFence(first_per_commitment_point_arg);
+               Reference.reachabilityFence(channel_flags_arg);
+               Reference.reachabilityFence(shutdown_scriptpubkey_arg);
+               Reference.reachabilityFence(channel_type_arg);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.CommonOpenChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonOpenChannelFields(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(temporary_channel_id_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(shutdown_scriptpubkey_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type_arg); };
+               return ret_hu_conv;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CommonOpenChannelFields_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the CommonOpenChannelFields
+        */
+       public CommonOpenChannelFields clone() {
+               long ret = bindings.CommonOpenChannelFields_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.CommonOpenChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonOpenChannelFields(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Generates a non-cryptographic 64-bit hash of the CommonOpenChannelFields.
+        */
+       public long hash() {
+               long ret = bindings.CommonOpenChannelFields_hash(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       @Override public int hashCode() {
+               return (int)this.hash();
+       }
+       /**
+        * Checks if two CommonOpenChannelFieldss 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.
+        */
+       public boolean eq(org.ldk.structs.CommonOpenChannelFields b) {
+               boolean ret = bindings.CommonOpenChannelFields_eq(this.ptr, b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof CommonOpenChannelFields)) return false;
+               return this.eq((CommonOpenChannelFields)o);
+       }
+}
index df067cae79af917e6ebbf393717458e3c7a40df4..1c9e6629686bf057755fc63e0c63420ec1b9e0c8 100644 (file)
@@ -159,7 +159,7 @@ public class Confirm extends CommonBase {
                        @Override public long[] get_relevant_txids() {
                                ThreeTuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ[] ret = arg.get_relevant_txids();
                                Reference.reachabilityFence(arg);
-                               long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_54 -> ret_conv_54 == null ? 0 : ret_conv_54.clone_ptr()).toArray() : null;
+                               long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_54 -> ret_conv_54.clone_ptr()).toArray() : null;
                                return result;
                        }
                });
@@ -181,7 +181,7 @@ public class Confirm extends CommonBase {
         * [`best_block_updated`]: Self::best_block_updated
         */
        public void transactions_confirmed(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height) {
-               bindings.Confirm_transactions_confirmed(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray() : null, height);
+               bindings.Confirm_transactions_confirmed(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28.ptr).toArray() : null, height);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(header);
                Reference.reachabilityFence(txdata);
index ce9db6448ea2dc2b9b25372224ce6aacedfee248..4d46bb4a45a362e49cad2af9b925cd16ef3b1fcc 100644 (file)
@@ -36,7 +36,7 @@ public class CounterpartyChannelTransactionParameters extends CommonBase {
         * Counter-party public keys
         */
        public void set_pubkeys(org.ldk.structs.ChannelPublicKeys val) {
-               bindings.CounterpartyChannelTransactionParameters_set_pubkeys(this.ptr, val == null ? 0 : val.ptr);
+               bindings.CounterpartyChannelTransactionParameters_set_pubkeys(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -64,7 +64,7 @@ public class CounterpartyChannelTransactionParameters extends CommonBase {
         * Constructs a new CounterpartyChannelTransactionParameters given each field
         */
        public static CounterpartyChannelTransactionParameters of(org.ldk.structs.ChannelPublicKeys pubkeys_arg, short selected_contest_delay_arg) {
-               long ret = bindings.CounterpartyChannelTransactionParameters_new(pubkeys_arg == null ? 0 : pubkeys_arg.ptr, selected_contest_delay_arg);
+               long ret = bindings.CounterpartyChannelTransactionParameters_new(pubkeys_arg.ptr, selected_contest_delay_arg);
                Reference.reachabilityFence(pubkeys_arg);
                Reference.reachabilityFence(selected_contest_delay_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -110,7 +110,7 @@ public class CounterpartyChannelTransactionParameters extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.CounterpartyChannelTransactionParameters b) {
-               boolean ret = bindings.CounterpartyChannelTransactionParameters_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.CounterpartyChannelTransactionParameters_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index b41d1a9a19ee28d59dbe7b95a57d9c8a708aaded..5ca8853ca29f6e123dd60441315847283933dac4 100644 (file)
@@ -83,25 +83,25 @@ public class CustomMessageHandler extends CommonBase {
                                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                                Result_NoneLightningErrorZ ret = arg.handle_custom_message(ret_hu_conv, sender_node_id);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long[] get_and_clear_pending_msg() {
                                TwoTuple_PublicKeyTypeZ[] ret = arg.get_and_clear_pending_msg();
                                Reference.reachabilityFence(arg);
-                               long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_25 -> ret_conv_25 == null ? 0 : ret_conv_25.clone_ptr()).toArray() : null;
+                               long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_25 -> ret_conv_25.clone_ptr()).toArray() : null;
                                return result;
                        }
                        @Override public long provided_node_features() {
                                NodeFeatures ret = arg.provided_node_features();
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long provided_init_features(byte[] their_node_id) {
                                InitFeatures ret = arg.provided_init_features(their_node_id);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                }, CustomMessageReader.new_impl(CustomMessageReader_impl).bindings_instance);
index fa2720f187eddc1d64a71c3aba8fe7dc43eef8a9..2ee519191e629384c9508f23a54f4cf490bd32d5 100644 (file)
@@ -53,7 +53,7 @@ public class CustomMessageReader extends CommonBase {
                        @Override public long read(short message_type, byte[] buffer) {
                                Result_COption_TypeZDecodeErrorZ ret = arg.read(message_type, buffer);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                });
index 4c52481f59c839afc1fd14602b37a225b8c9d0b6..6a1e2be48490efcbec5ac638826d09713dceee09 100644 (file)
@@ -74,20 +74,20 @@ public class CustomOnionMessageHandler extends CommonBase {
                                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                                Option_OnionMessageContentsZ ret = arg.handle_custom_message(ret_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                if (impl_holder.held != null) { impl_holder.held.ptrs_to.add(ret); };
                                return result;
                        }
                        @Override public long read_custom_message(long message_type, byte[] buffer) {
                                Result_COption_OnionMessageContentsZDecodeErrorZ ret = arg.read_custom_message(message_type, buffer);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long[] release_pending_custom_messages() {
                                ThreeTuple_OnionMessageContentsDestinationBlindedPathZ[] ret = arg.release_pending_custom_messages();
                                Reference.reachabilityFence(arg);
-                               long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_56 -> ret_conv_56 == null ? 0 : ret_conv_56.clone_ptr()).toArray() : null;
+                               long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_56 -> ret_conv_56.clone_ptr()).toArray() : null;
                                return result;
                        }
                });
index 5ad42b28c3ba91a984bdb24b1e0a8cdc0f674b3d..24739629709934bd3ab8f19856f536cabe5eff0d 100644 (file)
@@ -42,6 +42,9 @@ public class DecodeError extends CommonBase {
                if (raw_val.getClass() == bindings.LDKDecodeError.UnsupportedCompression.class) {
                        return new UnsupportedCompression(ptr, (bindings.LDKDecodeError.UnsupportedCompression)raw_val);
                }
+               if (raw_val.getClass() == bindings.LDKDecodeError.DangerousValue.class) {
+                       return new DangerousValue(ptr, (bindings.LDKDecodeError.DangerousValue)raw_val);
+               }
                assert false; return null; // Unreachable without extending the (internal) bindings interface
        }
 
@@ -109,6 +112,22 @@ public class DecodeError extends CommonBase {
                        super(null, ptr);
                }
        }
+       /**
+        * Value is validly encoded but is dangerous to use.
+        * 
+        * This is used for things like [`ChannelManager`] deserialization where we want to ensure
+        * that we don't use a [`ChannelManager`] which is in out of sync with the [`ChannelMonitor`].
+        * This indicates that there is a critical implementation flaw in the storage implementation
+        * and it's unsafe to continue.
+        * 
+        * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
+        * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
+        */
+       public final static class DangerousValue extends DecodeError {
+               private DangerousValue(long ptr, bindings.LDKDecodeError.DangerousValue obj) {
+                       super(null, ptr);
+               }
+       }
        long clone_ptr() {
                long ret = bindings.DecodeError_clone_ptr(this.ptr);
                Reference.reachabilityFence(this);
@@ -205,6 +224,17 @@ public class DecodeError extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new DangerousValue-variant DecodeError
+        */
+       public static DecodeError dangerous_value() {
+               long ret = bindings.DecodeError_dangerous_value();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.DecodeError ret_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
        /**
         * Generates a non-cryptographic 64-bit hash of the DecodeError.
         */
@@ -222,7 +252,7 @@ public class DecodeError extends CommonBase {
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.DecodeError b) {
-               boolean ret = bindings.DecodeError_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.DecodeError_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
index 11ddcb87c6a0614f73e53f112569309ff0988be1..24ce1e4b34b8ea671ca27bdf19fef4eb88d39c8d 100644 (file)
@@ -24,7 +24,7 @@ public class DefaultMessageRouter extends CommonBase {
         * Creates a [`DefaultMessageRouter`] using the given [`NetworkGraph`].
         */
        public static DefaultMessageRouter of(org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.EntropySource entropy_source) {
-               long ret = bindings.DefaultMessageRouter_new(network_graph == null ? 0 : network_graph.ptr, entropy_source.ptr);
+               long ret = bindings.DefaultMessageRouter_new(network_graph.ptr, entropy_source.ptr);
                Reference.reachabilityFence(network_graph);
                Reference.reachabilityFence(entropy_source);
                if (ret >= 0 && ret <= 4096) { return null; }
index 57d785688fb45968f6d7b40c4d050e8ada13e57d..ef86bda3d129c25448effb6819b16549d38c51ca 100644 (file)
@@ -24,7 +24,7 @@ public class DefaultRouter extends CommonBase {
         * Creates a new router.
         */
        public static DefaultRouter of(org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.Logger logger, org.ldk.structs.EntropySource entropy_source, org.ldk.structs.LockableScore scorer, org.ldk.structs.ProbabilisticScoringFeeParameters score_params) {
-               long ret = bindings.DefaultRouter_new(network_graph == null ? 0 : network_graph.ptr, logger.ptr, entropy_source.ptr, scorer.ptr, score_params == null ? 0 : score_params.ptr);
+               long ret = bindings.DefaultRouter_new(network_graph.ptr, logger.ptr, entropy_source.ptr, scorer.ptr, score_params.ptr);
                Reference.reachabilityFence(network_graph);
                Reference.reachabilityFence(logger);
                Reference.reachabilityFence(entropy_source);
index 9170bb892e7848f7257bb93f6e91c32a66886114..a454f7e57ca32264190e12e0d4110d83eebd169a 100644 (file)
@@ -54,7 +54,7 @@ public class DelayedPaymentBasepoint extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.DelayedPaymentBasepoint b) {
-               boolean ret = bindings.DelayedPaymentBasepoint_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.DelayedPaymentBasepoint_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -104,6 +104,16 @@ public class DelayedPaymentBasepoint extends CommonBase {
                return ret;
        }
 
+       /**
+        * Derives the \"tweak\" used in calculate [`DelayedPaymentKey::from_basepoint`].\n\n[`DelayedPaymentKey::from_basepoint`] calculates a private key as:\n`privkey = basepoint_secret + SHA256(per_commitment_point || basepoint)`\n\nThis calculates the hash part in the tweak derivation process, which is used to\nensure that each key is unique and cannot be guessed by an external party.
+        */
+       public byte[] derive_add_tweak(byte[] per_commitment_point) {
+               byte[] ret = bindings.DelayedPaymentBasepoint_derive_add_tweak(this.ptr, InternalUtils.check_arr_len(per_commitment_point, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(per_commitment_point);
+               return ret;
+       }
+
        /**
         * Serialize the DelayedPaymentBasepoint object into a byte array which can be read by DelayedPaymentBasepoint_read
         */
index 75be01fc761d7b20f4661c31a5114215ba8222b0..a849ce5c3d04b1ed3311b54fb4f331128fa4dbf0 100644 (file)
@@ -58,7 +58,7 @@ public class DelayedPaymentKey extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.DelayedPaymentKey b) {
-               boolean ret = bindings.DelayedPaymentKey_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.DelayedPaymentKey_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -91,7 +91,7 @@ public class DelayedPaymentKey extends CommonBase {
         * Derive a public delayedpubkey using one node\'s `per_commitment_point` and its countersignatory\'s `basepoint`
         */
        public static DelayedPaymentKey from_basepoint(org.ldk.structs.DelayedPaymentBasepoint countersignatory_basepoint, byte[] per_commitment_point) {
-               long ret = bindings.DelayedPaymentKey_from_basepoint(countersignatory_basepoint == null ? 0 : countersignatory_basepoint.ptr, InternalUtils.check_arr_len(per_commitment_point, 33));
+               long ret = bindings.DelayedPaymentKey_from_basepoint(countersignatory_basepoint.ptr, InternalUtils.check_arr_len(per_commitment_point, 33));
                Reference.reachabilityFence(countersignatory_basepoint);
                Reference.reachabilityFence(per_commitment_point);
                if (ret >= 0 && ret <= 4096) { return null; }
index e9ba860769169b056f99f02b4e47dbb11b2d425d..efaecbcc731aa44b43c38898ef9f01d57307aaf1 100644 (file)
@@ -38,7 +38,7 @@ public class DelayedPaymentOutputDescriptor extends CommonBase {
         * The outpoint which is spendable.
         */
        public void set_outpoint(org.ldk.structs.OutPoint val) {
-               bindings.DelayedPaymentOutputDescriptor_set_outpoint(this.ptr, val == null ? 0 : val.ptr);
+               bindings.DelayedPaymentOutputDescriptor_set_outpoint(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -120,7 +120,7 @@ public class DelayedPaymentOutputDescriptor extends CommonBase {
         * derive the witnessScript for this output.
         */
        public void set_revocation_pubkey(org.ldk.structs.RevocationKey val) {
-               bindings.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this.ptr, val == null ? 0 : val.ptr);
+               bindings.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -164,11 +164,46 @@ public class DelayedPaymentOutputDescriptor extends CommonBase {
                Reference.reachabilityFence(val);
        }
 
+       /**
+        * The channel public keys and other parameters needed to generate a spending transaction or
+        * to provide to a re-derived signer through [`ChannelSigner::provide_channel_parameters`].
+        * 
+        * Added as optional, but always `Some` if the descriptor was produced in v0.0.123 or later.
+        * 
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       @Nullable
+       public ChannelTransactionParameters get_channel_transaction_parameters() {
+               long ret = bindings.DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelTransactionParameters ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTransactionParameters(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * The channel public keys and other parameters needed to generate a spending transaction or
+        * to provide to a re-derived signer through [`ChannelSigner::provide_channel_parameters`].
+        * 
+        * Added as optional, but always `Some` if the descriptor was produced in v0.0.123 or later.
+        * 
+        * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       public void set_channel_transaction_parameters(@Nullable org.ldk.structs.ChannelTransactionParameters val) {
+               bindings.DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(this.ptr, val == null ? 0 : val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
+       }
+
        /**
         * Constructs a new DelayedPaymentOutputDescriptor given each field
+        * 
+        * Note that channel_transaction_parameters_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public static DelayedPaymentOutputDescriptor of(org.ldk.structs.OutPoint outpoint_arg, byte[] per_commitment_point_arg, short to_self_delay_arg, org.ldk.structs.TxOut output_arg, org.ldk.structs.RevocationKey revocation_pubkey_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg) {
-               long ret = bindings.DelayedPaymentOutputDescriptor_new(outpoint_arg == null ? 0 : outpoint_arg.ptr, InternalUtils.check_arr_len(per_commitment_point_arg, 33), to_self_delay_arg, output_arg.ptr, revocation_pubkey_arg == null ? 0 : revocation_pubkey_arg.ptr, InternalUtils.check_arr_len(channel_keys_id_arg, 32), channel_value_satoshis_arg);
+       public static DelayedPaymentOutputDescriptor of(org.ldk.structs.OutPoint outpoint_arg, byte[] per_commitment_point_arg, short to_self_delay_arg, org.ldk.structs.TxOut output_arg, org.ldk.structs.RevocationKey revocation_pubkey_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg, @Nullable org.ldk.structs.ChannelTransactionParameters channel_transaction_parameters_arg) {
+               long ret = bindings.DelayedPaymentOutputDescriptor_new(outpoint_arg.ptr, InternalUtils.check_arr_len(per_commitment_point_arg, 33), to_self_delay_arg, output_arg.ptr, revocation_pubkey_arg.ptr, InternalUtils.check_arr_len(channel_keys_id_arg, 32), channel_value_satoshis_arg, channel_transaction_parameters_arg == null ? 0 : channel_transaction_parameters_arg.ptr);
                Reference.reachabilityFence(outpoint_arg);
                Reference.reachabilityFence(per_commitment_point_arg);
                Reference.reachabilityFence(to_self_delay_arg);
@@ -176,11 +211,13 @@ public class DelayedPaymentOutputDescriptor extends CommonBase {
                Reference.reachabilityFence(revocation_pubkey_arg);
                Reference.reachabilityFence(channel_keys_id_arg);
                Reference.reachabilityFence(channel_value_satoshis_arg);
+               Reference.reachabilityFence(channel_transaction_parameters_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.DelayedPaymentOutputDescriptor ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.DelayedPaymentOutputDescriptor(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(outpoint_arg); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(revocation_pubkey_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_transaction_parameters_arg); };
                return ret_hu_conv;
        }
 
@@ -220,7 +257,7 @@ public class DelayedPaymentOutputDescriptor extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.DelayedPaymentOutputDescriptor b) {
-               boolean ret = bindings.DelayedPaymentOutputDescriptor_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.DelayedPaymentOutputDescriptor_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 1ce3581d2397c18798b8cab1d0798c4fda96e1fb..0e2030160146b4ac7a17e8a49269c1c687c683d6 100644 (file)
@@ -59,7 +59,7 @@ public class Description extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.Description b) {
-               boolean ret = bindings.Description_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Description_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index e41c822339197c9a9f2bf65780ae2d641935ea68..dd4febe4e96bc1f482c4973decfc424296f97fa6 100644 (file)
@@ -87,7 +87,7 @@ public class Destination extends CommonBase {
         * Utility method to constructs a new BlindedPath-variant Destination
         */
        public static Destination blinded_path(org.ldk.structs.BlindedPath a) {
-               long ret = bindings.Destination_blinded_path(a == null ? 0 : a.ptr);
+               long ret = bindings.Destination_blinded_path(a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Destination ret_hu_conv = org.ldk.structs.Destination.constr_from_ptr(ret);
@@ -96,4 +96,43 @@ public class Destination extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Generates a non-cryptographic 64-bit hash of the Destination.
+        */
+       public long hash() {
+               long ret = bindings.Destination_hash(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       @Override public int hashCode() {
+               return (int)this.hash();
+       }
+       /**
+        * Checks if two Destinations contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public boolean eq(org.ldk.structs.Destination b) {
+               boolean ret = bindings.Destination_eq(this.ptr, b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof Destination)) return false;
+               return this.eq((Destination)o);
+       }
+       /**
+        * Attempts to resolve the [`IntroductionNode::DirectedShortChannelId`] of a
+        * [`Destination::BlindedPath`] to a [`IntroductionNode::NodeId`], if applicable, using the
+        * provided [`ReadOnlyNetworkGraph`].
+        */
+       public void resolve(org.ldk.structs.ReadOnlyNetworkGraph network_graph) {
+               bindings.Destination_resolve(this.ptr, network_graph.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(network_graph);
+               if (this != null) { this.ptrs_to.add(network_graph); };
+       }
+
 }
index 4be03838f636dbc34045461fb01b6129d88c4def..c3b0714f1ed7eccbfcd4470a743bb6cc3503f1ea 100644 (file)
@@ -67,4 +67,32 @@ public class DirectedChannelInfo extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Returns the `node_id` of the source hop.
+        * 
+        * Refers to the `node_id` forwarding the payment to the next hop.
+        */
+       public NodeId source() {
+               long ret = bindings.DirectedChannelInfo_source(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.NodeId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.NodeId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Returns the `node_id` of the target hop.
+        * 
+        * Refers to the `node_id` receiving the payment from the previous hop.
+        */
+       public NodeId target() {
+               long ret = bindings.DirectedChannelInfo_target(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.NodeId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.NodeId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
 }
index a84b6c71e0aafc1b0af8aff6ed895b07fe67d43a..d5478d3655d26a7d115c1acda4f6b08b7d5aad2b 100644 (file)
@@ -21,7 +21,7 @@ public class EcdsaChannelSigner extends CommonBase {
        final bindings.LDKEcdsaChannelSigner bindings_instance;
        EcdsaChannelSigner(Object _dummy, long ptr) { super(ptr); bindings_instance = null; }
        private EcdsaChannelSigner(bindings.LDKEcdsaChannelSigner arg, bindings.LDKChannelSigner ChannelSigner, ChannelPublicKeys pubkeys) {
-               super(bindings.LDKEcdsaChannelSigner_new(arg, ChannelSigner, pubkeys == null ? 0 : pubkeys.clone_ptr()));
+               super(bindings.LDKEcdsaChannelSigner_new(arg, ChannelSigner, pubkeys.clone_ptr()));
                this.ptrs_to.add(arg);
                this.ptrs_to.add(ChannelSigner);
                this.bindings_instance = arg;
@@ -71,6 +71,13 @@ public class EcdsaChannelSigner extends CommonBase {
                 * This may be called multiple times for the same transaction.
                 * 
                 * An external signer implementation should check that the commitment has not been revoked.
+                * 
+                * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+                * signature and should be retried later. Once the signer is ready to provide a signature after
+                * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+                * monitor.
+                * 
+                * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
                 */
                Result_ECDSASignatureNoneZ sign_holder_commitment(HolderCommitmentTransaction commitment_tx);
                /**
@@ -88,6 +95,13 @@ public class EcdsaChannelSigner extends CommonBase {
                 * revoked the state which they eventually broadcast. It's not a _holder_ secret key and does
                 * not allow the spending of any funds by itself (you need our holder `revocation_secret` to do
                 * so).
+                * 
+                * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+                * signature and should be retried later. Once the signer is ready to provide a signature after
+                * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+                * monitor.
+                * 
+                * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
                 */
                Result_ECDSASignatureNoneZ sign_justice_revoked_output(byte[] justice_tx, long input, long amount, byte[] per_commitment_key);
                /**
@@ -109,6 +123,13 @@ public class EcdsaChannelSigner extends CommonBase {
                 * 
                 * `htlc` holds HTLC elements (hash, timelock), thus changing the format of the witness script
                 * (which is committed to in the BIP 143 signatures).
+                * 
+                * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+                * signature and should be retried later. Once the signer is ready to provide a signature after
+                * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+                * monitor.
+                * 
+                * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
                 */
                Result_ECDSASignatureNoneZ sign_justice_revoked_htlc(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, HTLCOutputInCommitment htlc);
                /**
@@ -120,8 +141,14 @@ public class EcdsaChannelSigner extends CommonBase {
                 * [`ChannelMonitor`] [replica](https://github.com/lightningdevkit/rust-lightning/blob/main/GLOSSARY.md#monitor-replicas)
                 * broadcasts it before receiving the update for the latest commitment transaction.
                 * 
+                * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+                * signature and should be retried later. Once the signer is ready to provide a signature after
+                * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+                * monitor.
+                * 
                 * [`EcdsaSighashType::All`]: bitcoin::sighash::EcdsaSighashType::All
                 * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
+                * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
                 */
                Result_ECDSASignatureNoneZ sign_holder_htlc_transaction(byte[] htlc_tx, long input, HTLCDescriptor htlc_descriptor);
                /**
@@ -142,6 +169,13 @@ public class EcdsaChannelSigner extends CommonBase {
                 * detected onchain. It has been generated by our counterparty and is used to derive
                 * channel state keys, which are then included in the witness script and committed to in the
                 * BIP 143 signature.
+                * 
+                * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+                * signature and should be retried later. Once the signer is ready to provide a signature after
+                * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+                * monitor.
+                * 
+                * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
                 */
                Result_ECDSASignatureNoneZ sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, HTLCOutputInCommitment htlc);
                /**
@@ -154,6 +188,13 @@ public class EcdsaChannelSigner extends CommonBase {
                /**
                 * Computes the signature for a commitment transaction's anchor output used as an
                 * input within `anchor_tx`, which spends the commitment transaction, at index `input`.
+                * 
+                * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+                * signature and should be retried later. Once the signer is ready to provide a signature after
+                * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+                * monitor.
+                * 
+                * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
                 */
                Result_ECDSASignatureNoneZ sign_holder_anchor_input(byte[] anchor_tx, long input);
                /**
@@ -179,61 +220,61 @@ public class EcdsaChannelSigner extends CommonBase {
                                org.ldk.structs.CommitmentTransaction commitment_tx_hu_conv = null; if (commitment_tx < 0 || commitment_tx > 4096) { commitment_tx_hu_conv = new org.ldk.structs.CommitmentTransaction(null, commitment_tx); }
                                Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ ret = arg.sign_counterparty_commitment(commitment_tx_hu_conv, inbound_htlc_preimages, outbound_htlc_preimages);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long sign_holder_commitment(long commitment_tx) {
                                org.ldk.structs.HolderCommitmentTransaction commitment_tx_hu_conv = null; if (commitment_tx < 0 || commitment_tx > 4096) { commitment_tx_hu_conv = new org.ldk.structs.HolderCommitmentTransaction(null, commitment_tx); }
                                Result_ECDSASignatureNoneZ ret = arg.sign_holder_commitment(commitment_tx_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long sign_justice_revoked_output(byte[] justice_tx, long input, long amount, byte[] per_commitment_key) {
                                Result_ECDSASignatureNoneZ ret = arg.sign_justice_revoked_output(justice_tx, input, amount, per_commitment_key);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long sign_justice_revoked_htlc(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, long htlc) {
                                org.ldk.structs.HTLCOutputInCommitment htlc_hu_conv = null; if (htlc < 0 || htlc > 4096) { htlc_hu_conv = new org.ldk.structs.HTLCOutputInCommitment(null, htlc); }
                                Result_ECDSASignatureNoneZ ret = arg.sign_justice_revoked_htlc(justice_tx, input, amount, per_commitment_key, htlc_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long sign_holder_htlc_transaction(byte[] htlc_tx, long input, long htlc_descriptor) {
                                org.ldk.structs.HTLCDescriptor htlc_descriptor_hu_conv = null; if (htlc_descriptor < 0 || htlc_descriptor > 4096) { htlc_descriptor_hu_conv = new org.ldk.structs.HTLCDescriptor(null, htlc_descriptor); }
                                Result_ECDSASignatureNoneZ ret = arg.sign_holder_htlc_transaction(htlc_tx, input, htlc_descriptor_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc) {
                                org.ldk.structs.HTLCOutputInCommitment htlc_hu_conv = null; if (htlc < 0 || htlc > 4096) { htlc_hu_conv = new org.ldk.structs.HTLCOutputInCommitment(null, htlc); }
                                Result_ECDSASignatureNoneZ ret = arg.sign_counterparty_htlc_transaction(htlc_tx, input, amount, per_commitment_point, htlc_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long sign_closing_transaction(long closing_tx) {
                                org.ldk.structs.ClosingTransaction closing_tx_hu_conv = null; if (closing_tx < 0 || closing_tx > 4096) { closing_tx_hu_conv = new org.ldk.structs.ClosingTransaction(null, closing_tx); }
                                Result_ECDSASignatureNoneZ ret = arg.sign_closing_transaction(closing_tx_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long sign_holder_anchor_input(byte[] anchor_tx, long input) {
                                Result_ECDSASignatureNoneZ ret = arg.sign_holder_anchor_input(anchor_tx, input);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long sign_channel_announcement_with_funding_key(long msg) {
                                org.ldk.structs.UnsignedChannelAnnouncement msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.UnsignedChannelAnnouncement(null, msg); }
                                Result_ECDSASignatureNoneZ ret = arg.sign_channel_announcement_with_funding_key(msg_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                }, ChannelSigner.new_impl(ChannelSigner_impl, pubkeys).bindings_instance, pubkeys);
@@ -266,7 +307,7 @@ public class EcdsaChannelSigner extends CommonBase {
         * irrelevant or duplicate preimages.
         */
        public Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ sign_counterparty_commitment(org.ldk.structs.CommitmentTransaction commitment_tx, byte[][] inbound_htlc_preimages, byte[][] outbound_htlc_preimages) {
-               long ret = bindings.EcdsaChannelSigner_sign_counterparty_commitment(this.ptr, commitment_tx == null ? 0 : commitment_tx.ptr, inbound_htlc_preimages != null ? Arrays.stream(inbound_htlc_preimages).map(inbound_htlc_preimages_conv_8 -> InternalUtils.check_arr_len(inbound_htlc_preimages_conv_8, 32)).toArray(byte[][]::new) : null, outbound_htlc_preimages != null ? Arrays.stream(outbound_htlc_preimages).map(outbound_htlc_preimages_conv_8 -> InternalUtils.check_arr_len(outbound_htlc_preimages_conv_8, 32)).toArray(byte[][]::new) : null);
+               long ret = bindings.EcdsaChannelSigner_sign_counterparty_commitment(this.ptr, commitment_tx.ptr, inbound_htlc_preimages != null ? Arrays.stream(inbound_htlc_preimages).map(inbound_htlc_preimages_conv_8 -> InternalUtils.check_arr_len(inbound_htlc_preimages_conv_8, 32)).toArray(byte[][]::new) : null, outbound_htlc_preimages != null ? Arrays.stream(outbound_htlc_preimages).map(outbound_htlc_preimages_conv_8 -> InternalUtils.check_arr_len(outbound_htlc_preimages_conv_8, 32)).toArray(byte[][]::new) : null);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(commitment_tx);
                Reference.reachabilityFence(inbound_htlc_preimages);
@@ -287,9 +328,16 @@ public class EcdsaChannelSigner extends CommonBase {
         * This may be called multiple times for the same transaction.
         * 
         * An external signer implementation should check that the commitment has not been revoked.
+        * 
+        * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+        * signature and should be retried later. Once the signer is ready to provide a signature after
+        * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+        * monitor.
+        * 
+        * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
         */
        public Result_ECDSASignatureNoneZ sign_holder_commitment(org.ldk.structs.HolderCommitmentTransaction commitment_tx) {
-               long ret = bindings.EcdsaChannelSigner_sign_holder_commitment(this.ptr, commitment_tx == null ? 0 : commitment_tx.ptr);
+               long ret = bindings.EcdsaChannelSigner_sign_holder_commitment(this.ptr, commitment_tx.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(commitment_tx);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -313,6 +361,13 @@ public class EcdsaChannelSigner extends CommonBase {
         * revoked the state which they eventually broadcast. It's not a _holder_ secret key and does
         * not allow the spending of any funds by itself (you need our holder `revocation_secret` to do
         * so).
+        * 
+        * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+        * signature and should be retried later. Once the signer is ready to provide a signature after
+        * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+        * monitor.
+        * 
+        * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
         */
        public Result_ECDSASignatureNoneZ sign_justice_revoked_output(byte[] justice_tx, long input, long amount, byte[] per_commitment_key) {
                long ret = bindings.EcdsaChannelSigner_sign_justice_revoked_output(this.ptr, justice_tx, input, amount, InternalUtils.check_arr_len(per_commitment_key, 32));
@@ -345,9 +400,16 @@ public class EcdsaChannelSigner extends CommonBase {
         * 
         * `htlc` holds HTLC elements (hash, timelock), thus changing the format of the witness script
         * (which is committed to in the BIP 143 signatures).
+        * 
+        * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+        * signature and should be retried later. Once the signer is ready to provide a signature after
+        * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+        * monitor.
+        * 
+        * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
         */
        public Result_ECDSASignatureNoneZ sign_justice_revoked_htlc(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, org.ldk.structs.HTLCOutputInCommitment htlc) {
-               long ret = bindings.EcdsaChannelSigner_sign_justice_revoked_htlc(this.ptr, justice_tx, input, amount, InternalUtils.check_arr_len(per_commitment_key, 32), htlc == null ? 0 : htlc.ptr);
+               long ret = bindings.EcdsaChannelSigner_sign_justice_revoked_htlc(this.ptr, justice_tx, input, amount, InternalUtils.check_arr_len(per_commitment_key, 32), htlc.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(justice_tx);
                Reference.reachabilityFence(input);
@@ -369,11 +431,17 @@ public class EcdsaChannelSigner extends CommonBase {
         * [`ChannelMonitor`] [replica](https://github.com/lightningdevkit/rust-lightning/blob/main/GLOSSARY.md#monitor-replicas)
         * broadcasts it before receiving the update for the latest commitment transaction.
         * 
+        * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+        * signature and should be retried later. Once the signer is ready to provide a signature after
+        * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+        * monitor.
+        * 
         * [`EcdsaSighashType::All`]: bitcoin::sighash::EcdsaSighashType::All
         * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
+        * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
         */
        public Result_ECDSASignatureNoneZ sign_holder_htlc_transaction(byte[] htlc_tx, long input, org.ldk.structs.HTLCDescriptor htlc_descriptor) {
-               long ret = bindings.EcdsaChannelSigner_sign_holder_htlc_transaction(this.ptr, htlc_tx, input, htlc_descriptor == null ? 0 : htlc_descriptor.ptr);
+               long ret = bindings.EcdsaChannelSigner_sign_holder_htlc_transaction(this.ptr, htlc_tx, input, htlc_descriptor.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(htlc_tx);
                Reference.reachabilityFence(input);
@@ -402,9 +470,16 @@ public class EcdsaChannelSigner extends CommonBase {
         * detected onchain. It has been generated by our counterparty and is used to derive
         * channel state keys, which are then included in the witness script and committed to in the
         * BIP 143 signature.
+        * 
+        * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+        * signature and should be retried later. Once the signer is ready to provide a signature after
+        * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+        * monitor.
+        * 
+        * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
         */
        public Result_ECDSASignatureNoneZ sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, org.ldk.structs.HTLCOutputInCommitment htlc) {
-               long ret = bindings.EcdsaChannelSigner_sign_counterparty_htlc_transaction(this.ptr, htlc_tx, input, amount, InternalUtils.check_arr_len(per_commitment_point, 33), htlc == null ? 0 : htlc.ptr);
+               long ret = bindings.EcdsaChannelSigner_sign_counterparty_htlc_transaction(this.ptr, htlc_tx, input, amount, InternalUtils.check_arr_len(per_commitment_point, 33), htlc.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(htlc_tx);
                Reference.reachabilityFence(input);
@@ -424,7 +499,7 @@ public class EcdsaChannelSigner extends CommonBase {
         * chosen to forgo their output as dust.
         */
        public Result_ECDSASignatureNoneZ sign_closing_transaction(org.ldk.structs.ClosingTransaction closing_tx) {
-               long ret = bindings.EcdsaChannelSigner_sign_closing_transaction(this.ptr, closing_tx == null ? 0 : closing_tx.ptr);
+               long ret = bindings.EcdsaChannelSigner_sign_closing_transaction(this.ptr, closing_tx.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(closing_tx);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -436,6 +511,13 @@ public class EcdsaChannelSigner extends CommonBase {
        /**
         * Computes the signature for a commitment transaction's anchor output used as an
         * input within `anchor_tx`, which spends the commitment transaction, at index `input`.
+        * 
+        * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+        * signature and should be retried later. Once the signer is ready to provide a signature after
+        * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+        * monitor.
+        * 
+        * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
         */
        public Result_ECDSASignatureNoneZ sign_holder_anchor_input(byte[] anchor_tx, long input) {
                long ret = bindings.EcdsaChannelSigner_sign_holder_anchor_input(this.ptr, anchor_tx, input);
@@ -461,7 +543,7 @@ public class EcdsaChannelSigner extends CommonBase {
         * [`NodeSigner::sign_gossip_message`]: crate::sign::NodeSigner::sign_gossip_message
         */
        public Result_ECDSASignatureNoneZ sign_channel_announcement_with_funding_key(org.ldk.structs.UnsignedChannelAnnouncement msg) {
-               long ret = bindings.EcdsaChannelSigner_sign_channel_announcement_with_funding_key(this.ptr, msg == null ? 0 : msg.ptr);
+               long ret = bindings.EcdsaChannelSigner_sign_channel_announcement_with_funding_key(this.ptr, msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
diff --git a/src/main/java/org/ldk/structs/EmptyNodeIdLookUp.java b/src/main/java/org/ldk/structs/EmptyNodeIdLookUp.java
new file mode 100644 (file)
index 0000000..b1472d5
--- /dev/null
@@ -0,0 +1,47 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * A [`NodeIdLookUp`] that always returns `None`.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class EmptyNodeIdLookUp extends CommonBase {
+       EmptyNodeIdLookUp(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.EmptyNodeIdLookUp_free(ptr); }
+       }
+
+       /**
+        * Constructs a new EmptyNodeIdLookUp given each field
+        */
+       public static EmptyNodeIdLookUp of() {
+               long ret = bindings.EmptyNodeIdLookUp_new();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.EmptyNodeIdLookUp ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.EmptyNodeIdLookUp(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Constructs a new NodeIdLookUp which calls the relevant methods on this_arg.
+        * This copies the `inner` pointer in this_arg and thus the returned NodeIdLookUp must be freed before this_arg is
+        */
+       public NodeIdLookUp as_NodeIdLookUp() {
+               long ret = bindings.EmptyNodeIdLookUp_as_NodeIdLookUp(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               NodeIdLookUp ret_hu_conv = new NodeIdLookUp(null, ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+}
index 4c0822126b74b4a5ed5406d005366cb8202c95ec..fbbc23840358e0fefba364a434e7bc256399934d 100644 (file)
@@ -169,7 +169,7 @@ public class ErrorAction extends CommonBase {
         * Utility method to constructs a new DisconnectPeer-variant ErrorAction
         */
        public static ErrorAction disconnect_peer(org.ldk.structs.ErrorMessage msg) {
-               long ret = bindings.ErrorAction_disconnect_peer(msg == null ? 0 : msg.ptr);
+               long ret = bindings.ErrorAction_disconnect_peer(msg.ptr);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret);
@@ -182,7 +182,7 @@ public class ErrorAction extends CommonBase {
         * Utility method to constructs a new DisconnectPeerWithWarning-variant ErrorAction
         */
        public static ErrorAction disconnect_peer_with_warning(org.ldk.structs.WarningMessage msg) {
-               long ret = bindings.ErrorAction_disconnect_peer_with_warning(msg == null ? 0 : msg.ptr);
+               long ret = bindings.ErrorAction_disconnect_peer_with_warning(msg.ptr);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret);
@@ -229,7 +229,7 @@ public class ErrorAction extends CommonBase {
         * Utility method to constructs a new SendErrorMessage-variant ErrorAction
         */
        public static ErrorAction send_error_message(org.ldk.structs.ErrorMessage msg) {
-               long ret = bindings.ErrorAction_send_error_message(msg == null ? 0 : msg.ptr);
+               long ret = bindings.ErrorAction_send_error_message(msg.ptr);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret);
@@ -242,7 +242,7 @@ public class ErrorAction extends CommonBase {
         * Utility method to constructs a new SendWarningMessage-variant ErrorAction
         */
        public static ErrorAction send_warning_message(org.ldk.structs.WarningMessage msg, org.ldk.enums.Level log_level) {
-               long ret = bindings.ErrorAction_send_warning_message(msg == null ? 0 : msg.ptr, log_level);
+               long ret = bindings.ErrorAction_send_warning_message(msg.ptr, log_level);
                Reference.reachabilityFence(msg);
                Reference.reachabilityFence(log_level);
                if (ret >= 0 && ret <= 4096) { return null; }
index 3000aad1b49927579ad6fe1ab651862cf06d0038..77880a9fe229ec7d6de135fd08c7abd74c1aa3a8 100644 (file)
@@ -28,10 +28,13 @@ public class ErrorMessage extends CommonBase {
         * All-0s indicates a general error unrelated to a specific channel, after which all channels
         * with the sending peer should be closed.
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.ErrorMessage_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.ErrorMessage_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
@@ -40,10 +43,11 @@ public class ErrorMessage extends CommonBase {
         * All-0s indicates a general error unrelated to a specific channel, after which all channels
         * with the sending peer should be closed.
         */
-       public void set_channel_id(byte[] val) {
-               bindings.ErrorMessage_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.ErrorMessage_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -75,13 +79,14 @@ public class ErrorMessage extends CommonBase {
        /**
         * Constructs a new ErrorMessage given each field
         */
-       public static ErrorMessage of(byte[] channel_id_arg, java.lang.String data_arg) {
-               long ret = bindings.ErrorMessage_new(InternalUtils.check_arr_len(channel_id_arg, 32), data_arg);
+       public static ErrorMessage of(org.ldk.structs.ChannelId channel_id_arg, java.lang.String data_arg) {
+               long ret = bindings.ErrorMessage_new(channel_id_arg.ptr, data_arg);
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(data_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.ErrorMessage ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ErrorMessage(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                return ret_hu_conv;
        }
 
@@ -121,7 +126,7 @@ public class ErrorMessage extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.ErrorMessage b) {
-               boolean ret = bindings.ErrorMessage_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ErrorMessage_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 445b0bda10b817e5ba02e1302aaaff2316b1845f..28b27e8bb444c3d0f5b5cd0bce98c2681aa382d2 100644 (file)
@@ -111,7 +111,7 @@ public class Event extends CommonBase {
                 * 
                 * [`ChannelManager::funding_transaction_generated`]: crate::ln::channelmanager::ChannelManager::funding_transaction_generated
                */
-               public final byte[] temporary_channel_id;
+               public final org.ldk.structs.ChannelId temporary_channel_id;
                /**
                 * The counterparty's node_id, which you'll need to pass back into
                 * [`ChannelManager::funding_transaction_generated`].
@@ -141,7 +141,10 @@ public class Event extends CommonBase {
                public final org.ldk.util.UInt128 user_channel_id;
                private FundingGenerationReady(long ptr, bindings.LDKEvent.FundingGenerationReady obj) {
                        super(null, ptr);
-                       this.temporary_channel_id = obj.temporary_channel_id;
+                       long temporary_channel_id = obj.temporary_channel_id;
+                       org.ldk.structs.ChannelId temporary_channel_id_hu_conv = null; if (temporary_channel_id < 0 || temporary_channel_id > 4096) { temporary_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, temporary_channel_id); }
+                       if (temporary_channel_id_hu_conv != null) { temporary_channel_id_hu_conv.ptrs_to.add(this); };
+                       this.temporary_channel_id = temporary_channel_id_hu_conv;
                        this.counterparty_node_id = obj.counterparty_node_id;
                        this.channel_value_satoshis = obj.channel_value_satoshis;
                        this.output_script = obj.output_script;
@@ -242,8 +245,10 @@ public class Event extends CommonBase {
                public final org.ldk.structs.PaymentPurpose purpose;
                /**
                 * The `channel_id` indicating over which channel we received the payment.
+                * 
+                * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
                */
-               public final org.ldk.structs.Option_ThirtyTwoBytesZ via_channel_id;
+               @Nullable public final org.ldk.structs.ChannelId via_channel_id;
                /**
                 * The `user_channel_id` indicating over which channel we received the payment.
                */
@@ -273,7 +278,7 @@ public class Event extends CommonBase {
                        if (purpose_hu_conv != null) { purpose_hu_conv.ptrs_to.add(this); };
                        this.purpose = purpose_hu_conv;
                        long via_channel_id = obj.via_channel_id;
-                       org.ldk.structs.Option_ThirtyTwoBytesZ via_channel_id_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(via_channel_id);
+                       org.ldk.structs.ChannelId via_channel_id_hu_conv = null; if (via_channel_id < 0 || via_channel_id > 4096) { via_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, via_channel_id); }
                        if (via_channel_id_hu_conv != null) { via_channel_id_hu_conv.ptrs_to.add(this); };
                        this.via_channel_id = via_channel_id_hu_conv;
                        long via_user_channel_id = obj.via_user_channel_id;
@@ -784,9 +789,15 @@ public class Event extends CommonBase {
        /**
         * Used to indicate that an output which you should know how to spend was confirmed on chain
         * and is now spendable.
-        * Such an output will *not* ever be spent by rust-lightning, and are not at risk of your
+        * 
+        * Such an output will *never* be spent directly by LDK, and are not at risk of your
         * counterparty spending them due to some kind of timeout. Thus, you need to store them
         * somewhere and spend them when you create on-chain transactions.
+        * 
+        * You may hand them to the [`OutputSweeper`] utility which will store and (re-)generate spending
+        * transactions for you.
+        * 
+        * [`OutputSweeper`]: crate::util::sweep::OutputSweeper
         */
        public final static class SpendableOutputs extends Event {
                /**
@@ -797,8 +808,10 @@ public class Event extends CommonBase {
                 * The `channel_id` indicating which channel the spendable outputs belong to.
                 * 
                 * This will always be `Some` for events generated by LDK versions 0.0.117 and above.
+                * 
+                * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
                */
-               public final org.ldk.structs.Option_ThirtyTwoBytesZ channel_id;
+               @Nullable public final org.ldk.structs.ChannelId channel_id;
                private SpendableOutputs(long ptr, bindings.LDKEvent.SpendableOutputs obj) {
                        super(null, ptr);
                        long[] outputs = obj.outputs;
@@ -812,7 +825,7 @@ public class Event extends CommonBase {
                        }
                        this.outputs = outputs_conv_27_arr;
                        long channel_id = obj.channel_id;
-                       org.ldk.structs.Option_ThirtyTwoBytesZ channel_id_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(channel_id);
+                       org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); }
                        if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
                        this.channel_id = channel_id_hu_conv;
                }
@@ -823,17 +836,37 @@ public class Event extends CommonBase {
         */
        public final static class PaymentForwarded extends Event {
                /**
-                * The incoming channel between the previous node and us. This is only `None` for events
-                * generated or serialized by versions prior to 0.0.107.
+                * The channel id of the incoming channel between the previous node and us.
+                * 
+                * This is only `None` for events generated or serialized by versions prior to 0.0.107.
+                * 
+                * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
+               */
+               @Nullable public final org.ldk.structs.ChannelId prev_channel_id;
+               /**
+                * The channel id of the outgoing channel between the next node and us.
+                * 
+                * This is only `None` for events generated or serialized by versions prior to 0.0.107.
+                * 
+                * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
+               */
+               @Nullable public final org.ldk.structs.ChannelId next_channel_id;
+               /**
+                * The `user_channel_id` of the incoming channel between the previous node and us.
+                * 
+                * This is only `None` for events generated or serialized by versions prior to 0.0.122.
                */
-               public final org.ldk.structs.Option_ThirtyTwoBytesZ prev_channel_id;
+               public final org.ldk.structs.Option_U128Z prev_user_channel_id;
                /**
-                * The outgoing channel between the next node and us. This is only `None` for events
-                * generated or serialized by versions prior to 0.0.107.
+                * The `user_channel_id` of the outgoing channel between the next node and us.
+                * 
+                * This will be `None` if the payment was settled via an on-chain transaction. See the
+                * caveat described for the `total_fee_earned_msat` field. Moreover it will be `None` for
+                * events generated or serialized by versions prior to 0.0.122.
                */
-               public final org.ldk.structs.Option_ThirtyTwoBytesZ next_channel_id;
+               public final org.ldk.structs.Option_U128Z next_user_channel_id;
                /**
-                * The fee, in milli-satoshis, which was earned as a result of the payment.
+                * The total fee, in milli-satoshis, which was earned as a result of the payment.
                 * 
                 * Note that if we force-closed the channel over which we forwarded an HTLC while the HTLC
                 * was pending, the amount the next hop claimed will have been rounded down to the nearest
@@ -844,10 +877,26 @@ public class Event extends CommonBase {
                 * If the channel which sent us the payment has been force-closed, we will claim the funds
                 * via an on-chain transaction. In that case we do not yet know the on-chain transaction
                 * fees which we will spend and will instead set this to `None`. It is possible duplicate
-                * `PaymentForwarded` events are generated for the same payment iff `fee_earned_msat` is
+                * `PaymentForwarded` events are generated for the same payment iff `total_fee_earned_msat` is
                 * `None`.
                */
-               public final org.ldk.structs.Option_u64Z fee_earned_msat;
+               public final org.ldk.structs.Option_u64Z total_fee_earned_msat;
+               /**
+                * The share of the total fee, in milli-satoshis, which was withheld in addition to the
+                * forwarding fee.
+                * 
+                * This will only be `Some` if we forwarded an intercepted HTLC with less than the
+                * expected amount. This means our counterparty accepted to receive less than the invoice
+                * amount, e.g., by claiming the payment featuring a corresponding
+                * [`PaymentClaimable::counterparty_skimmed_fee_msat`].
+                * 
+                * Will also always be `None` for events serialized with LDK prior to version 0.0.122.
+                * 
+                * The caveat described above the `total_fee_earned_msat` field applies here as well.
+                * 
+                * [`PaymentClaimable::counterparty_skimmed_fee_msat`]: Self::PaymentClaimable::counterparty_skimmed_fee_msat
+               */
+               public final org.ldk.structs.Option_u64Z skimmed_fee_msat;
                /**
                 * If this is `true`, the forwarded HTLC was claimed by our counterparty via an on-chain
                 * transaction.
@@ -856,23 +905,35 @@ public class Event extends CommonBase {
                /**
                 * The final amount forwarded, in milli-satoshis, after the fee is deducted.
                 * 
-                * The caveat described above the `fee_earned_msat` field applies here as well.
+                * The caveat described above the `total_fee_earned_msat` field applies here as well.
                */
                public final org.ldk.structs.Option_u64Z outbound_amount_forwarded_msat;
                private PaymentForwarded(long ptr, bindings.LDKEvent.PaymentForwarded obj) {
                        super(null, ptr);
                        long prev_channel_id = obj.prev_channel_id;
-                       org.ldk.structs.Option_ThirtyTwoBytesZ prev_channel_id_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(prev_channel_id);
+                       org.ldk.structs.ChannelId prev_channel_id_hu_conv = null; if (prev_channel_id < 0 || prev_channel_id > 4096) { prev_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, prev_channel_id); }
                        if (prev_channel_id_hu_conv != null) { prev_channel_id_hu_conv.ptrs_to.add(this); };
                        this.prev_channel_id = prev_channel_id_hu_conv;
                        long next_channel_id = obj.next_channel_id;
-                       org.ldk.structs.Option_ThirtyTwoBytesZ next_channel_id_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(next_channel_id);
+                       org.ldk.structs.ChannelId next_channel_id_hu_conv = null; if (next_channel_id < 0 || next_channel_id > 4096) { next_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, next_channel_id); }
                        if (next_channel_id_hu_conv != null) { next_channel_id_hu_conv.ptrs_to.add(this); };
                        this.next_channel_id = next_channel_id_hu_conv;
-                       long fee_earned_msat = obj.fee_earned_msat;
-                       org.ldk.structs.Option_u64Z fee_earned_msat_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(fee_earned_msat);
-                       if (fee_earned_msat_hu_conv != null) { fee_earned_msat_hu_conv.ptrs_to.add(this); };
-                       this.fee_earned_msat = fee_earned_msat_hu_conv;
+                       long prev_user_channel_id = obj.prev_user_channel_id;
+                       org.ldk.structs.Option_U128Z prev_user_channel_id_hu_conv = org.ldk.structs.Option_U128Z.constr_from_ptr(prev_user_channel_id);
+                       if (prev_user_channel_id_hu_conv != null) { prev_user_channel_id_hu_conv.ptrs_to.add(this); };
+                       this.prev_user_channel_id = prev_user_channel_id_hu_conv;
+                       long next_user_channel_id = obj.next_user_channel_id;
+                       org.ldk.structs.Option_U128Z next_user_channel_id_hu_conv = org.ldk.structs.Option_U128Z.constr_from_ptr(next_user_channel_id);
+                       if (next_user_channel_id_hu_conv != null) { next_user_channel_id_hu_conv.ptrs_to.add(this); };
+                       this.next_user_channel_id = next_user_channel_id_hu_conv;
+                       long total_fee_earned_msat = obj.total_fee_earned_msat;
+                       org.ldk.structs.Option_u64Z total_fee_earned_msat_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(total_fee_earned_msat);
+                       if (total_fee_earned_msat_hu_conv != null) { total_fee_earned_msat_hu_conv.ptrs_to.add(this); };
+                       this.total_fee_earned_msat = total_fee_earned_msat_hu_conv;
+                       long skimmed_fee_msat = obj.skimmed_fee_msat;
+                       org.ldk.structs.Option_u64Z skimmed_fee_msat_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(skimmed_fee_msat);
+                       if (skimmed_fee_msat_hu_conv != null) { skimmed_fee_msat_hu_conv.ptrs_to.add(this); };
+                       this.skimmed_fee_msat = skimmed_fee_msat_hu_conv;
                        this.claim_from_onchain_tx = obj.claim_from_onchain_tx;
                        long outbound_amount_forwarded_msat = obj.outbound_amount_forwarded_msat;
                        org.ldk.structs.Option_u64Z outbound_amount_forwarded_msat_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(outbound_amount_forwarded_msat);
@@ -892,7 +953,7 @@ public class Event extends CommonBase {
                /**
                 * The `channel_id` of the channel that is pending confirmation.
                */
-               public final byte[] channel_id;
+               public final org.ldk.structs.ChannelId channel_id;
                /**
                 * The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound
                 * channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if
@@ -908,8 +969,10 @@ public class Event extends CommonBase {
                 * The `temporary_channel_id` this channel used to be known by during channel establishment.
                 * 
                 * Will be `None` for channels created prior to LDK version 0.0.115.
+                * 
+                * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
                */
-               public final org.ldk.structs.Option_ThirtyTwoBytesZ former_temporary_channel_id;
+               @Nullable public final org.ldk.structs.ChannelId former_temporary_channel_id;
                /**
                 * The `node_id` of the channel counterparty.
                */
@@ -918,14 +981,25 @@ public class Event extends CommonBase {
                 * The outpoint of the channel's funding transaction.
                */
                public final org.ldk.structs.OutPoint funding_txo;
+               /**
+                * The features that this channel will operate with.
+                * 
+                * Will be `None` for channels created prior to LDK version 0.0.122.
+                * 
+                * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
+               */
+               @Nullable public final org.ldk.structs.ChannelTypeFeatures channel_type;
                private ChannelPending(long ptr, bindings.LDKEvent.ChannelPending obj) {
                        super(null, ptr);
-                       this.channel_id = obj.channel_id;
+                       long channel_id = obj.channel_id;
+                       org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); }
+                       if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
+                       this.channel_id = channel_id_hu_conv;
                        byte[] user_channel_id = obj.user_channel_id;
                        org.ldk.util.UInt128 user_channel_id_conv = new org.ldk.util.UInt128(user_channel_id);
                        this.user_channel_id = user_channel_id_conv;
                        long former_temporary_channel_id = obj.former_temporary_channel_id;
-                       org.ldk.structs.Option_ThirtyTwoBytesZ former_temporary_channel_id_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(former_temporary_channel_id);
+                       org.ldk.structs.ChannelId former_temporary_channel_id_hu_conv = null; if (former_temporary_channel_id < 0 || former_temporary_channel_id > 4096) { former_temporary_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, former_temporary_channel_id); }
                        if (former_temporary_channel_id_hu_conv != null) { former_temporary_channel_id_hu_conv.ptrs_to.add(this); };
                        this.former_temporary_channel_id = former_temporary_channel_id_hu_conv;
                        this.counterparty_node_id = obj.counterparty_node_id;
@@ -933,6 +1007,10 @@ public class Event extends CommonBase {
                        org.ldk.structs.OutPoint funding_txo_hu_conv = null; if (funding_txo < 0 || funding_txo > 4096) { funding_txo_hu_conv = new org.ldk.structs.OutPoint(null, funding_txo); }
                        if (funding_txo_hu_conv != null) { funding_txo_hu_conv.ptrs_to.add(this); };
                        this.funding_txo = funding_txo_hu_conv;
+                       long channel_type = obj.channel_type;
+                       org.ldk.structs.ChannelTypeFeatures channel_type_hu_conv = null; if (channel_type < 0 || channel_type > 4096) { channel_type_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, channel_type); }
+                       if (channel_type_hu_conv != null) { channel_type_hu_conv.ptrs_to.add(this); };
+                       this.channel_type = channel_type_hu_conv;
                }
        }
        /**
@@ -945,7 +1023,7 @@ public class Event extends CommonBase {
                /**
                 * The `channel_id` of the channel that is ready.
                */
-               public final byte[] channel_id;
+               public final org.ldk.structs.ChannelId channel_id;
                /**
                 * The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound
                 * channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if
@@ -967,7 +1045,10 @@ public class Event extends CommonBase {
                public final org.ldk.structs.ChannelTypeFeatures channel_type;
                private ChannelReady(long ptr, bindings.LDKEvent.ChannelReady obj) {
                        super(null, ptr);
-                       this.channel_id = obj.channel_id;
+                       long channel_id = obj.channel_id;
+                       org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); }
+                       if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
+                       this.channel_id = channel_id_hu_conv;
                        byte[] user_channel_id = obj.user_channel_id;
                        org.ldk.util.UInt128 user_channel_id_conv = new org.ldk.util.UInt128(user_channel_id);
                        this.user_channel_id = user_channel_id_conv;
@@ -979,8 +1060,8 @@ public class Event extends CommonBase {
                }
        }
        /**
-        * Used to indicate that a previously opened channel with the given `channel_id` is in the
-        * process of closure.
+        * Used to indicate that a channel that got past the initial handshake with the given `channel_id` is in the
+        * process of closure. This includes previously opened channels, and channels that time out from not being funded.
         * 
         * Note that this event is only triggered for accepted channels: if the
         * [`UserConfig::manually_accept_inbound_channels`] config flag is set to true and the channel is
@@ -994,7 +1075,7 @@ public class Event extends CommonBase {
                 * The `channel_id` of the channel which has been closed. Note that on-chain transactions
                 * resolving the channel are likely still awaiting confirmation.
                */
-               public final byte[] channel_id;
+               public final org.ldk.structs.ChannelId channel_id;
                /**
                 * The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound
                 * channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if
@@ -1036,7 +1117,10 @@ public class Event extends CommonBase {
                @Nullable public final org.ldk.structs.OutPoint channel_funding_txo;
                private ChannelClosed(long ptr, bindings.LDKEvent.ChannelClosed obj) {
                        super(null, ptr);
-                       this.channel_id = obj.channel_id;
+                       long channel_id = obj.channel_id;
+                       org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); }
+                       if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
+                       this.channel_id = channel_id_hu_conv;
                        byte[] user_channel_id = obj.user_channel_id;
                        org.ldk.util.UInt128 user_channel_id_conv = new org.ldk.util.UInt128(user_channel_id);
                        this.user_channel_id = user_channel_id_conv;
@@ -1065,14 +1149,17 @@ public class Event extends CommonBase {
                /**
                 * The channel_id of the channel which has been closed.
                */
-               public final byte[] channel_id;
+               public final org.ldk.structs.ChannelId channel_id;
                /**
                 * The full transaction received from the user
                */
                public final byte[] transaction;
                private DiscardFunding(long ptr, bindings.LDKEvent.DiscardFunding obj) {
                        super(null, ptr);
-                       this.channel_id = obj.channel_id;
+                       long channel_id = obj.channel_id;
+                       org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); }
+                       if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
+                       this.channel_id = channel_id_hu_conv;
                        this.transaction = obj.transaction;
                }
        }
@@ -1101,7 +1188,7 @@ public class Event extends CommonBase {
                 * [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
                 * [`ChannelManager::force_close_without_broadcasting_txn`]: crate::ln::channelmanager::ChannelManager::force_close_without_broadcasting_txn
                */
-               public final byte[] temporary_channel_id;
+               public final org.ldk.structs.ChannelId temporary_channel_id;
                /**
                 * The node_id of the counterparty requesting to open the channel.
                 * 
@@ -1142,7 +1229,10 @@ public class Event extends CommonBase {
                public final org.ldk.structs.ChannelTypeFeatures channel_type;
                private OpenChannelRequest(long ptr, bindings.LDKEvent.OpenChannelRequest obj) {
                        super(null, ptr);
-                       this.temporary_channel_id = obj.temporary_channel_id;
+                       long temporary_channel_id = obj.temporary_channel_id;
+                       org.ldk.structs.ChannelId temporary_channel_id_hu_conv = null; if (temporary_channel_id < 0 || temporary_channel_id > 4096) { temporary_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, temporary_channel_id); }
+                       if (temporary_channel_id_hu_conv != null) { temporary_channel_id_hu_conv.ptrs_to.add(this); };
+                       this.temporary_channel_id = temporary_channel_id_hu_conv;
                        this.counterparty_node_id = obj.counterparty_node_id;
                        this.funding_satoshis = obj.funding_satoshis;
                        this.push_msat = obj.push_msat;
@@ -1170,14 +1260,17 @@ public class Event extends CommonBase {
                /**
                 * The channel over which the HTLC was received.
                */
-               public final byte[] prev_channel_id;
+               public final org.ldk.structs.ChannelId prev_channel_id;
                /**
                 * Destination of the HTLC that failed to be processed.
                */
                public final org.ldk.structs.HTLCDestination failed_next_destination;
                private HTLCHandlingFailed(long ptr, bindings.LDKEvent.HTLCHandlingFailed obj) {
                        super(null, ptr);
-                       this.prev_channel_id = obj.prev_channel_id;
+                       long prev_channel_id = obj.prev_channel_id;
+                       org.ldk.structs.ChannelId prev_channel_id_hu_conv = null; if (prev_channel_id < 0 || prev_channel_id > 4096) { prev_channel_id_hu_conv = new org.ldk.structs.ChannelId(null, prev_channel_id); }
+                       if (prev_channel_id_hu_conv != null) { prev_channel_id_hu_conv.ptrs_to.add(this); };
+                       this.prev_channel_id = prev_channel_id_hu_conv;
                        long failed_next_destination = obj.failed_next_destination;
                        org.ldk.structs.HTLCDestination failed_next_destination_hu_conv = org.ldk.structs.HTLCDestination.constr_from_ptr(failed_next_destination);
                        if (failed_next_destination_hu_conv != null) { failed_next_destination_hu_conv.ptrs_to.add(this); };
@@ -1225,8 +1318,8 @@ public class Event extends CommonBase {
        /**
         * Utility method to constructs a new FundingGenerationReady-variant Event
         */
-       public static Event funding_generation_ready(byte[] temporary_channel_id, byte[] counterparty_node_id, long channel_value_satoshis, byte[] output_script, org.ldk.util.UInt128 user_channel_id) {
-               long ret = bindings.Event_funding_generation_ready(InternalUtils.check_arr_len(temporary_channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33), channel_value_satoshis, output_script, user_channel_id.getLEBytes());
+       public static Event funding_generation_ready(org.ldk.structs.ChannelId temporary_channel_id, byte[] counterparty_node_id, long channel_value_satoshis, byte[] output_script, org.ldk.util.UInt128 user_channel_id) {
+               long ret = bindings.Event_funding_generation_ready(temporary_channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), channel_value_satoshis, output_script, user_channel_id.getLEBytes());
                Reference.reachabilityFence(temporary_channel_id);
                Reference.reachabilityFence(counterparty_node_id);
                Reference.reachabilityFence(channel_value_satoshis);
@@ -1235,14 +1328,15 @@ public class Event extends CommonBase {
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(temporary_channel_id); };
                return ret_hu_conv;
        }
 
        /**
         * Utility method to constructs a new PaymentClaimable-variant Event
         */
-       public static Event payment_claimable(byte[] receiver_node_id, byte[] payment_hash, org.ldk.structs.RecipientOnionFields onion_fields, long amount_msat, long counterparty_skimmed_fee_msat, org.ldk.structs.PaymentPurpose purpose, org.ldk.structs.Option_ThirtyTwoBytesZ via_channel_id, org.ldk.structs.Option_U128Z via_user_channel_id, org.ldk.structs.Option_u32Z claim_deadline) {
-               long ret = bindings.Event_payment_claimable(InternalUtils.check_arr_len(receiver_node_id, 33), InternalUtils.check_arr_len(payment_hash, 32), onion_fields == null ? 0 : onion_fields.ptr, amount_msat, counterparty_skimmed_fee_msat, purpose.ptr, via_channel_id.ptr, via_user_channel_id.ptr, claim_deadline.ptr);
+       public static Event payment_claimable(byte[] receiver_node_id, byte[] payment_hash, org.ldk.structs.RecipientOnionFields onion_fields, long amount_msat, long counterparty_skimmed_fee_msat, org.ldk.structs.PaymentPurpose purpose, org.ldk.structs.ChannelId via_channel_id, org.ldk.structs.Option_U128Z via_user_channel_id, org.ldk.structs.Option_u32Z claim_deadline) {
+               long ret = bindings.Event_payment_claimable(InternalUtils.check_arr_len(receiver_node_id, 33), InternalUtils.check_arr_len(payment_hash, 32), onion_fields.ptr, amount_msat, counterparty_skimmed_fee_msat, purpose.ptr, via_channel_id.ptr, via_user_channel_id.ptr, claim_deadline.ptr);
                Reference.reachabilityFence(receiver_node_id);
                Reference.reachabilityFence(payment_hash);
                Reference.reachabilityFence(onion_fields);
@@ -1267,7 +1361,7 @@ public class Event extends CommonBase {
         * Utility method to constructs a new PaymentClaimed-variant Event
         */
        public static Event payment_claimed(byte[] receiver_node_id, byte[] payment_hash, long amount_msat, org.ldk.structs.PaymentPurpose purpose, ClaimedHTLC[] htlcs, org.ldk.structs.Option_u64Z sender_intended_total_msat) {
-               long ret = bindings.Event_payment_claimed(InternalUtils.check_arr_len(receiver_node_id, 33), InternalUtils.check_arr_len(payment_hash, 32), amount_msat, purpose.ptr, htlcs != null ? Arrays.stream(htlcs).mapToLong(htlcs_conv_13 -> htlcs_conv_13 == null ? 0 : htlcs_conv_13.ptr).toArray() : null, sender_intended_total_msat.ptr);
+               long ret = bindings.Event_payment_claimed(InternalUtils.check_arr_len(receiver_node_id, 33), InternalUtils.check_arr_len(payment_hash, 32), amount_msat, purpose.ptr, htlcs != null ? Arrays.stream(htlcs).mapToLong(htlcs_conv_13 -> htlcs_conv_13.ptr).toArray() : null, sender_intended_total_msat.ptr);
                Reference.reachabilityFence(receiver_node_id);
                Reference.reachabilityFence(payment_hash);
                Reference.reachabilityFence(amount_msat);
@@ -1345,7 +1439,7 @@ public class Event extends CommonBase {
         * Utility method to constructs a new PaymentPathSuccessful-variant Event
         */
        public static Event payment_path_successful(byte[] payment_id, org.ldk.structs.Option_ThirtyTwoBytesZ payment_hash, org.ldk.structs.Path path) {
-               long ret = bindings.Event_payment_path_successful(InternalUtils.check_arr_len(payment_id, 32), payment_hash.ptr, path == null ? 0 : path.ptr);
+               long ret = bindings.Event_payment_path_successful(InternalUtils.check_arr_len(payment_id, 32), payment_hash.ptr, path.ptr);
                Reference.reachabilityFence(payment_id);
                Reference.reachabilityFence(payment_hash);
                Reference.reachabilityFence(path);
@@ -1361,7 +1455,7 @@ public class Event extends CommonBase {
         * Utility method to constructs a new PaymentPathFailed-variant Event
         */
        public static Event payment_path_failed(org.ldk.structs.Option_ThirtyTwoBytesZ payment_id, byte[] payment_hash, boolean payment_failed_permanently, org.ldk.structs.PathFailure failure, org.ldk.structs.Path path, org.ldk.structs.Option_u64Z short_channel_id) {
-               long ret = bindings.Event_payment_path_failed(payment_id.ptr, InternalUtils.check_arr_len(payment_hash, 32), payment_failed_permanently, failure.ptr, path == null ? 0 : path.ptr, short_channel_id.ptr);
+               long ret = bindings.Event_payment_path_failed(payment_id.ptr, InternalUtils.check_arr_len(payment_hash, 32), payment_failed_permanently, failure.ptr, path.ptr, short_channel_id.ptr);
                Reference.reachabilityFence(payment_id);
                Reference.reachabilityFence(payment_hash);
                Reference.reachabilityFence(payment_failed_permanently);
@@ -1382,7 +1476,7 @@ public class Event extends CommonBase {
         * Utility method to constructs a new ProbeSuccessful-variant Event
         */
        public static Event probe_successful(byte[] payment_id, byte[] payment_hash, org.ldk.structs.Path path) {
-               long ret = bindings.Event_probe_successful(InternalUtils.check_arr_len(payment_id, 32), InternalUtils.check_arr_len(payment_hash, 32), path == null ? 0 : path.ptr);
+               long ret = bindings.Event_probe_successful(InternalUtils.check_arr_len(payment_id, 32), InternalUtils.check_arr_len(payment_hash, 32), path.ptr);
                Reference.reachabilityFence(payment_id);
                Reference.reachabilityFence(payment_hash);
                Reference.reachabilityFence(path);
@@ -1397,7 +1491,7 @@ public class Event extends CommonBase {
         * Utility method to constructs a new ProbeFailed-variant Event
         */
        public static Event probe_failed(byte[] payment_id, byte[] payment_hash, org.ldk.structs.Path path, org.ldk.structs.Option_u64Z short_channel_id) {
-               long ret = bindings.Event_probe_failed(InternalUtils.check_arr_len(payment_id, 32), InternalUtils.check_arr_len(payment_hash, 32), path == null ? 0 : path.ptr, short_channel_id.ptr);
+               long ret = bindings.Event_probe_failed(InternalUtils.check_arr_len(payment_id, 32), InternalUtils.check_arr_len(payment_hash, 32), path.ptr, short_channel_id.ptr);
                Reference.reachabilityFence(payment_id);
                Reference.reachabilityFence(payment_hash);
                Reference.reachabilityFence(path);
@@ -1441,7 +1535,7 @@ public class Event extends CommonBase {
        /**
         * Utility method to constructs a new SpendableOutputs-variant Event
         */
-       public static Event spendable_outputs(SpendableOutputDescriptor[] outputs, org.ldk.structs.Option_ThirtyTwoBytesZ channel_id) {
+       public static Event spendable_outputs(SpendableOutputDescriptor[] outputs, org.ldk.structs.ChannelId channel_id) {
                long ret = bindings.Event_spendable_outputs(outputs != null ? Arrays.stream(outputs).mapToLong(outputs_conv_27 -> outputs_conv_27.ptr).toArray() : null, channel_id.ptr);
                Reference.reachabilityFence(outputs);
                Reference.reachabilityFence(channel_id);
@@ -1456,11 +1550,14 @@ public class Event extends CommonBase {
        /**
         * Utility method to constructs a new PaymentForwarded-variant Event
         */
-       public static Event payment_forwarded(org.ldk.structs.Option_ThirtyTwoBytesZ prev_channel_id, org.ldk.structs.Option_ThirtyTwoBytesZ next_channel_id, org.ldk.structs.Option_u64Z fee_earned_msat, boolean claim_from_onchain_tx, org.ldk.structs.Option_u64Z outbound_amount_forwarded_msat) {
-               long ret = bindings.Event_payment_forwarded(prev_channel_id.ptr, next_channel_id.ptr, fee_earned_msat.ptr, claim_from_onchain_tx, outbound_amount_forwarded_msat.ptr);
+       public static Event payment_forwarded(org.ldk.structs.ChannelId prev_channel_id, org.ldk.structs.ChannelId next_channel_id, org.ldk.structs.Option_U128Z prev_user_channel_id, org.ldk.structs.Option_U128Z next_user_channel_id, org.ldk.structs.Option_u64Z total_fee_earned_msat, org.ldk.structs.Option_u64Z skimmed_fee_msat, boolean claim_from_onchain_tx, org.ldk.structs.Option_u64Z outbound_amount_forwarded_msat) {
+               long ret = bindings.Event_payment_forwarded(prev_channel_id.ptr, next_channel_id.ptr, prev_user_channel_id.ptr, next_user_channel_id.ptr, total_fee_earned_msat.ptr, skimmed_fee_msat.ptr, claim_from_onchain_tx, outbound_amount_forwarded_msat.ptr);
                Reference.reachabilityFence(prev_channel_id);
                Reference.reachabilityFence(next_channel_id);
-               Reference.reachabilityFence(fee_earned_msat);
+               Reference.reachabilityFence(prev_user_channel_id);
+               Reference.reachabilityFence(next_user_channel_id);
+               Reference.reachabilityFence(total_fee_earned_msat);
+               Reference.reachabilityFence(skimmed_fee_msat);
                Reference.reachabilityFence(claim_from_onchain_tx);
                Reference.reachabilityFence(outbound_amount_forwarded_msat);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1468,7 +1565,10 @@ public class Event extends CommonBase {
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(prev_channel_id); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(next_channel_id); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(fee_earned_msat); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(prev_user_channel_id); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(next_user_channel_id); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(total_fee_earned_msat); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(skimmed_fee_msat); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(outbound_amount_forwarded_msat); };
                return ret_hu_conv;
        }
@@ -1476,26 +1576,29 @@ public class Event extends CommonBase {
        /**
         * Utility method to constructs a new ChannelPending-variant Event
         */
-       public static Event channel_pending(byte[] channel_id, org.ldk.util.UInt128 user_channel_id, org.ldk.structs.Option_ThirtyTwoBytesZ former_temporary_channel_id, byte[] counterparty_node_id, org.ldk.structs.OutPoint funding_txo) {
-               long ret = bindings.Event_channel_pending(InternalUtils.check_arr_len(channel_id, 32), user_channel_id.getLEBytes(), former_temporary_channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), funding_txo == null ? 0 : funding_txo.ptr);
+       public static Event channel_pending(org.ldk.structs.ChannelId channel_id, org.ldk.util.UInt128 user_channel_id, org.ldk.structs.ChannelId former_temporary_channel_id, byte[] counterparty_node_id, org.ldk.structs.OutPoint funding_txo, org.ldk.structs.ChannelTypeFeatures channel_type) {
+               long ret = bindings.Event_channel_pending(channel_id.ptr, user_channel_id.getLEBytes(), former_temporary_channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), funding_txo.ptr, channel_type.ptr);
                Reference.reachabilityFence(channel_id);
                Reference.reachabilityFence(user_channel_id);
                Reference.reachabilityFence(former_temporary_channel_id);
                Reference.reachabilityFence(counterparty_node_id);
                Reference.reachabilityFence(funding_txo);
+               Reference.reachabilityFence(channel_type);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(former_temporary_channel_id); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(funding_txo); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type); };
                return ret_hu_conv;
        }
 
        /**
         * Utility method to constructs a new ChannelReady-variant Event
         */
-       public static Event channel_ready(byte[] channel_id, org.ldk.util.UInt128 user_channel_id, byte[] counterparty_node_id, org.ldk.structs.ChannelTypeFeatures channel_type) {
-               long ret = bindings.Event_channel_ready(InternalUtils.check_arr_len(channel_id, 32), user_channel_id.getLEBytes(), InternalUtils.check_arr_len(counterparty_node_id, 33), channel_type == null ? 0 : channel_type.ptr);
+       public static Event channel_ready(org.ldk.structs.ChannelId channel_id, org.ldk.util.UInt128 user_channel_id, byte[] counterparty_node_id, org.ldk.structs.ChannelTypeFeatures channel_type) {
+               long ret = bindings.Event_channel_ready(channel_id.ptr, user_channel_id.getLEBytes(), InternalUtils.check_arr_len(counterparty_node_id, 33), channel_type.ptr);
                Reference.reachabilityFence(channel_id);
                Reference.reachabilityFence(user_channel_id);
                Reference.reachabilityFence(counterparty_node_id);
@@ -1503,6 +1606,7 @@ public class Event extends CommonBase {
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type); };
                return ret_hu_conv;
        }
@@ -1510,8 +1614,8 @@ public class Event extends CommonBase {
        /**
         * Utility method to constructs a new ChannelClosed-variant Event
         */
-       public static Event channel_closed(byte[] channel_id, org.ldk.util.UInt128 user_channel_id, org.ldk.structs.ClosureReason reason, byte[] counterparty_node_id, org.ldk.structs.Option_u64Z channel_capacity_sats, org.ldk.structs.OutPoint channel_funding_txo) {
-               long ret = bindings.Event_channel_closed(InternalUtils.check_arr_len(channel_id, 32), user_channel_id.getLEBytes(), reason.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), channel_capacity_sats.ptr, channel_funding_txo == null ? 0 : channel_funding_txo.ptr);
+       public static Event channel_closed(org.ldk.structs.ChannelId channel_id, org.ldk.util.UInt128 user_channel_id, org.ldk.structs.ClosureReason reason, byte[] counterparty_node_id, org.ldk.structs.Option_u64Z channel_capacity_sats, org.ldk.structs.OutPoint channel_funding_txo) {
+               long ret = bindings.Event_channel_closed(channel_id.ptr, user_channel_id.getLEBytes(), reason.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), channel_capacity_sats.ptr, channel_funding_txo.ptr);
                Reference.reachabilityFence(channel_id);
                Reference.reachabilityFence(user_channel_id);
                Reference.reachabilityFence(reason);
@@ -1521,6 +1625,7 @@ public class Event extends CommonBase {
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(reason); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_capacity_sats); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_funding_txo); };
@@ -1530,21 +1635,22 @@ public class Event extends CommonBase {
        /**
         * Utility method to constructs a new DiscardFunding-variant Event
         */
-       public static Event discard_funding(byte[] channel_id, byte[] transaction) {
-               long ret = bindings.Event_discard_funding(InternalUtils.check_arr_len(channel_id, 32), transaction);
+       public static Event discard_funding(org.ldk.structs.ChannelId channel_id, byte[] transaction) {
+               long ret = bindings.Event_discard_funding(channel_id.ptr, transaction);
                Reference.reachabilityFence(channel_id);
                Reference.reachabilityFence(transaction);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); };
                return ret_hu_conv;
        }
 
        /**
         * Utility method to constructs a new OpenChannelRequest-variant Event
         */
-       public static Event open_channel_request(byte[] temporary_channel_id, byte[] counterparty_node_id, long funding_satoshis, long push_msat, org.ldk.structs.ChannelTypeFeatures channel_type) {
-               long ret = bindings.Event_open_channel_request(InternalUtils.check_arr_len(temporary_channel_id, 32), InternalUtils.check_arr_len(counterparty_node_id, 33), funding_satoshis, push_msat, channel_type == null ? 0 : channel_type.ptr);
+       public static Event open_channel_request(org.ldk.structs.ChannelId temporary_channel_id, byte[] counterparty_node_id, long funding_satoshis, long push_msat, org.ldk.structs.ChannelTypeFeatures channel_type) {
+               long ret = bindings.Event_open_channel_request(temporary_channel_id.ptr, InternalUtils.check_arr_len(counterparty_node_id, 33), funding_satoshis, push_msat, channel_type.ptr);
                Reference.reachabilityFence(temporary_channel_id);
                Reference.reachabilityFence(counterparty_node_id);
                Reference.reachabilityFence(funding_satoshis);
@@ -1553,6 +1659,7 @@ public class Event extends CommonBase {
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(temporary_channel_id); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type); };
                return ret_hu_conv;
        }
@@ -1560,13 +1667,14 @@ public class Event extends CommonBase {
        /**
         * Utility method to constructs a new HTLCHandlingFailed-variant Event
         */
-       public static Event htlchandling_failed(byte[] prev_channel_id, org.ldk.structs.HTLCDestination failed_next_destination) {
-               long ret = bindings.Event_htlchandling_failed(InternalUtils.check_arr_len(prev_channel_id, 32), failed_next_destination.ptr);
+       public static Event htlchandling_failed(org.ldk.structs.ChannelId prev_channel_id, org.ldk.structs.HTLCDestination failed_next_destination) {
+               long ret = bindings.Event_htlchandling_failed(prev_channel_id.ptr, failed_next_destination.ptr);
                Reference.reachabilityFence(prev_channel_id);
                Reference.reachabilityFence(failed_next_destination);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Event ret_hu_conv = org.ldk.structs.Event.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(prev_channel_id); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(failed_next_destination); };
                return ret_hu_conv;
        }
@@ -1589,7 +1697,7 @@ public class Event extends CommonBase {
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.Event b) {
-               boolean ret = bindings.Event_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Event_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
index 5c916db30952de57911e1ca5e4dd87f0bc383caa..a124b567a482166f1a936fe1c1e5012994859cb7 100644 (file)
@@ -57,7 +57,7 @@ public class ExpiryTime extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.ExpiryTime b) {
-               boolean ret = bindings.ExpiryTime_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ExpiryTime_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index abd00a27c5cd1d668e2ee912822b093c5cdb8b0e..190bbe904b5bb251b2f7ac2718a9251359013b3f 100644 (file)
@@ -130,7 +130,7 @@ public class Fallback extends CommonBase {
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.Fallback b) {
-               boolean ret = bindings.Fallback_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Fallback_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
index e9f6ba9e435a8807225555e897ef702f6b896bb4..ffb05837bae6d058377e63d6e5744f8898f95f44 100644 (file)
@@ -18,6 +18,10 @@ import javax.annotation.Nullable;
  * 
  * Note that all of the functions implemented here *must* be reentrant-safe (obviously - they're
  * called from inside the library in response to chain events, P2P events, or timer events).
+ * 
+ * LDK may generate a substantial number of fee-estimation calls in some cases. You should
+ * pre-calculate and cache the fee estimate results to ensure you don't substantially slow HTLC
+ * handling.
  */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class FeeEstimator extends CommonBase {
index 0070014fdaef1e5974bf9f220fb5c0989cfb4d4c..b5ab9fe76b97243181ac8db6c4912c1565dd8a9f 100644 (file)
@@ -108,7 +108,7 @@ public class Filter extends CommonBase {
         * registered mid-processing.
         */
        public void register_output(org.ldk.structs.WatchedOutput output) {
-               bindings.Filter_register_output(this.ptr, output == null ? 0 : output.ptr);
+               bindings.Filter_register_output(this.ptr, output.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(output);
                if (this != null) { this.ptrs_to.add(output); };
index f57432a2df3eced9de03df096b4c81234b39a601..e651dcbbd7e1cf036a63f9077146cc4665c6a6cb 100644 (file)
@@ -38,7 +38,7 @@ public class ForwardNode extends CommonBase {
         * used for [`BlindedPayInfo`] construction.
         */
        public void set_tlvs(org.ldk.structs.ForwardTlvs val) {
-               bindings.ForwardNode_set_tlvs(this.ptr, val == null ? 0 : val.ptr);
+               bindings.ForwardNode_set_tlvs(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -84,7 +84,7 @@ public class ForwardNode extends CommonBase {
         * Constructs a new ForwardNode given each field
         */
        public static ForwardNode of(org.ldk.structs.ForwardTlvs tlvs_arg, byte[] node_id_arg, long htlc_maximum_msat_arg) {
-               long ret = bindings.ForwardNode_new(tlvs_arg == null ? 0 : tlvs_arg.ptr, InternalUtils.check_arr_len(node_id_arg, 33), htlc_maximum_msat_arg);
+               long ret = bindings.ForwardNode_new(tlvs_arg.ptr, InternalUtils.check_arr_len(node_id_arg, 33), htlc_maximum_msat_arg);
                Reference.reachabilityFence(tlvs_arg);
                Reference.reachabilityFence(node_id_arg);
                Reference.reachabilityFence(htlc_maximum_msat_arg);
index 0dcc10632e28705be24a9ce081ae54b97d0f0767..5cc4d28961bda28c7a2dcaab2d74af3a94613cf8 100644 (file)
@@ -54,7 +54,7 @@ public class ForwardTlvs extends CommonBase {
         * Payment parameters for relaying over [`Self::short_channel_id`].
         */
        public void set_payment_relay(org.ldk.structs.PaymentRelay val) {
-               bindings.ForwardTlvs_set_payment_relay(this.ptr, val == null ? 0 : val.ptr);
+               bindings.ForwardTlvs_set_payment_relay(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -76,7 +76,7 @@ public class ForwardTlvs extends CommonBase {
         * Payment constraints for relaying over [`Self::short_channel_id`].
         */
        public void set_payment_constraints(org.ldk.structs.PaymentConstraints val) {
-               bindings.ForwardTlvs_set_payment_constraints(this.ptr, val == null ? 0 : val.ptr);
+               bindings.ForwardTlvs_set_payment_constraints(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -104,7 +104,7 @@ public class ForwardTlvs extends CommonBase {
         * [`BlindedHop::encrypted_payload`]: crate::blinded_path::BlindedHop::encrypted_payload
         */
        public void set_features(org.ldk.structs.BlindedHopFeatures val) {
-               bindings.ForwardTlvs_set_features(this.ptr, val == null ? 0 : val.ptr);
+               bindings.ForwardTlvs_set_features(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -114,7 +114,7 @@ public class ForwardTlvs extends CommonBase {
         * Constructs a new ForwardTlvs given each field
         */
        public static ForwardTlvs of(long short_channel_id_arg, org.ldk.structs.PaymentRelay payment_relay_arg, org.ldk.structs.PaymentConstraints payment_constraints_arg, org.ldk.structs.BlindedHopFeatures features_arg) {
-               long ret = bindings.ForwardTlvs_new(short_channel_id_arg, payment_relay_arg == null ? 0 : payment_relay_arg.ptr, payment_constraints_arg == null ? 0 : payment_constraints_arg.ptr, features_arg == null ? 0 : features_arg.ptr);
+               long ret = bindings.ForwardTlvs_new(short_channel_id_arg, payment_relay_arg.ptr, payment_constraints_arg.ptr, features_arg.ptr);
                Reference.reachabilityFence(short_channel_id_arg);
                Reference.reachabilityFence(payment_relay_arg);
                Reference.reachabilityFence(payment_constraints_arg);
diff --git a/src/main/java/org/ldk/structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.java b/src/main/java/org/ldk/structs/FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.java
new file mode 100644 (file)
index 0000000..b9f7aae
--- /dev/null
@@ -0,0 +1,110 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ extends CommonBase {
+       FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(ptr); }
+       }
+
+       /**
+        * 
+        */
+       public OutPoint get_a() {
+               long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutPoint(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * 
+        */
+       public ChannelId get_b() {
+               long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * 
+        */
+       public MonitorEvent[] get_c() {
+               long[] ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(this.ptr);
+               Reference.reachabilityFence(this);
+               int ret_conv_14_len = ret.length;
+               MonitorEvent[] ret_conv_14_arr = new MonitorEvent[ret_conv_14_len];
+               for (int o = 0; o < ret_conv_14_len; o++) {
+                       long ret_conv_14 = ret[o];
+                       org.ldk.structs.MonitorEvent ret_conv_14_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret_conv_14);
+                       if (ret_conv_14_hu_conv != null) { ret_conv_14_hu_conv.ptrs_to.add(this); };
+                       ret_conv_14_arr[o] = ret_conv_14_hu_conv;
+               }
+               return ret_conv_14_arr;
+       }
+
+       /**
+        * 
+        */
+       public byte[] get_d() {
+               byte[] ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new tuple which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ clone() {
+               long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_hu_conv = new FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ(null, ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ from the contained elements.
+        */
+       public static FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ of(org.ldk.structs.OutPoint a, org.ldk.structs.ChannelId b, MonitorEvent[] c, byte[] d) {
+               long ret = bindings.C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(a.ptr, b.ptr, c != null ? Arrays.stream(c).mapToLong(c_conv_14 -> c_conv_14.ptr).toArray() : null, InternalUtils.check_arr_len(d, 33));
+               Reference.reachabilityFence(a);
+               Reference.reachabilityFence(b);
+               Reference.reachabilityFence(c);
+               Reference.reachabilityFence(d);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_hu_conv = new FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ(null, ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b); };
+               for (MonitorEvent c_conv_14: c) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(c_conv_14); }; };
+               return ret_hu_conv;
+       }
+
+}
index affc952718b21e39cd34a90167e489a3ea4b97c8..f6d7cb4a6a4ab64e3dc62c90dfe4879dd16ff077 100644 (file)
@@ -27,19 +27,23 @@ public class FundingCreated extends CommonBase {
        /**
         * A temporary channel ID, until the funding is established
         */
-       public byte[] get_temporary_channel_id() {
-               byte[] ret = bindings.FundingCreated_get_temporary_channel_id(this.ptr);
+       public ChannelId get_temporary_channel_id() {
+               long ret = bindings.FundingCreated_get_temporary_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * A temporary channel ID, until the funding is established
         */
-       public void set_temporary_channel_id(byte[] val) {
-               bindings.FundingCreated_set_temporary_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_temporary_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.FundingCreated_set_temporary_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -99,8 +103,8 @@ public class FundingCreated extends CommonBase {
        /**
         * Constructs a new FundingCreated given each field
         */
-       public static FundingCreated of(byte[] temporary_channel_id_arg, byte[] funding_txid_arg, short funding_output_index_arg, byte[] signature_arg) {
-               long ret = bindings.FundingCreated_new(InternalUtils.check_arr_len(temporary_channel_id_arg, 32), InternalUtils.check_arr_len(funding_txid_arg, 32), funding_output_index_arg, InternalUtils.check_arr_len(signature_arg, 64));
+       public static FundingCreated of(org.ldk.structs.ChannelId temporary_channel_id_arg, byte[] funding_txid_arg, short funding_output_index_arg, byte[] signature_arg) {
+               long ret = bindings.FundingCreated_new(temporary_channel_id_arg.ptr, InternalUtils.check_arr_len(funding_txid_arg, 32), funding_output_index_arg, InternalUtils.check_arr_len(signature_arg, 64));
                Reference.reachabilityFence(temporary_channel_id_arg);
                Reference.reachabilityFence(funding_txid_arg);
                Reference.reachabilityFence(funding_output_index_arg);
@@ -108,6 +112,7 @@ public class FundingCreated extends CommonBase {
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.FundingCreated ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.FundingCreated(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(temporary_channel_id_arg); };
                return ret_hu_conv;
        }
 
@@ -147,7 +152,7 @@ public class FundingCreated extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.FundingCreated b) {
-               boolean ret = bindings.FundingCreated_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.FundingCreated_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 93e9a633ba3764307a0fe540e97fd624a6baebb7..8a15428ad5a864114b9880ffa502f62530904afd 100644 (file)
@@ -27,19 +27,23 @@ public class FundingSigned extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.FundingSigned_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.FundingSigned_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.FundingSigned_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.FundingSigned_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -63,13 +67,14 @@ public class FundingSigned extends CommonBase {
        /**
         * Constructs a new FundingSigned given each field
         */
-       public static FundingSigned of(byte[] channel_id_arg, byte[] signature_arg) {
-               long ret = bindings.FundingSigned_new(InternalUtils.check_arr_len(channel_id_arg, 32), InternalUtils.check_arr_len(signature_arg, 64));
+       public static FundingSigned of(org.ldk.structs.ChannelId channel_id_arg, byte[] signature_arg) {
+               long ret = bindings.FundingSigned_new(channel_id_arg.ptr, InternalUtils.check_arr_len(signature_arg, 64));
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(signature_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.FundingSigned ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.FundingSigned(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                return ret_hu_conv;
        }
 
@@ -109,7 +114,7 @@ public class FundingSigned extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.FundingSigned b) {
-               boolean ret = bindings.FundingSigned_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.FundingSigned_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 8e7b97fbe5de8ee1cb5bf35e4e35a081c960639f..38eb28b1b61ba820d8662eddb507dc68a87b5547 100644 (file)
@@ -10,8 +10,6 @@ import javax.annotation.Nullable;
 
 /**
  * A simple future which can complete once, and calls some callback(s) when it does so.
- * 
- * Clones can be made and all futures cloned from the same source will complete at the same time.
  */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class Future extends CommonBase {
@@ -22,24 +20,6 @@ public class Future extends CommonBase {
                if (ptr != 0) { bindings.Future_free(ptr); }
        }
 
-       long clone_ptr() {
-               long ret = bindings.Future_clone_ptr(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * Creates a copy of the Future
-        */
-       public Future clone() {
-               long ret = bindings.Future_clone(this.ptr);
-               Reference.reachabilityFence(this);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Future ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Future(null, ret); }
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
-               return ret_hu_conv;
-       }
-
        /**
         * Registers a callback to be called upon completion of this future. If the future has already
         * completed, the callback will be called immediately.
@@ -57,7 +37,6 @@ public class Future extends CommonBase {
        public void wait_indefinite() {
                bindings.Future_wait(this.ptr);
                Reference.reachabilityFence(this);
-               if (this != null) { this.ptrs_to.add(this); };
        }
 
        /**
@@ -69,7 +48,6 @@ public class Future extends CommonBase {
                boolean ret = bindings.Future_wait_timeout(this.ptr, max_wait);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(max_wait);
-               if (this != null) { this.ptrs_to.add(this); };
                return ret;
        }
 
index 47a9a82a997f0d94f1435fdab904bc930dcf1b07..8833652199c0fc7723c297b818e6334f1bd6c856 100644 (file)
@@ -71,7 +71,7 @@ public class GossipSync extends CommonBase {
         * Utility method to constructs a new P2P-variant GossipSync
         */
        public static GossipSync p2_p(org.ldk.structs.P2PGossipSync a) {
-               long ret = bindings.GossipSync_p2_p(a == null ? 0 : a.ptr);
+               long ret = bindings.GossipSync_p2_p(a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.GossipSync ret_hu_conv = org.ldk.structs.GossipSync.constr_from_ptr(ret);
@@ -84,7 +84,7 @@ public class GossipSync extends CommonBase {
         * Utility method to constructs a new Rapid-variant GossipSync
         */
        public static GossipSync rapid(org.ldk.structs.RapidGossipSync a) {
-               long ret = bindings.GossipSync_rapid(a == null ? 0 : a.ptr);
+               long ret = bindings.GossipSync_rapid(a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.GossipSync ret_hu_conv = org.ldk.structs.GossipSync.constr_from_ptr(ret);
index 8983375ef88a1fd26e6c6e3acbcbd9ab565968ab..e945041d6bfb7cd4c0b881646ba70b710e2d9107 100644 (file)
@@ -128,7 +128,7 @@ public class GossipTimestampFilter extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.GossipTimestampFilter b) {
-               boolean ret = bindings.GossipTimestampFilter_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.GossipTimestampFilter_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index cdc40d5e3d1b87382af005f07f6c3c16e9b4610d..6f55a704e0452f0a0e407fc1dc9bd0d6b20c50de 100644 (file)
@@ -93,7 +93,7 @@ public class GraphSyncError extends CommonBase {
         * Utility method to constructs a new LightningError-variant GraphSyncError
         */
        public static GraphSyncError lightning_error(org.ldk.structs.LightningError a) {
-               long ret = bindings.GraphSyncError_lightning_error(a == null ? 0 : a.ptr);
+               long ret = bindings.GraphSyncError_lightning_error(a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.GraphSyncError ret_hu_conv = org.ldk.structs.GraphSyncError.constr_from_ptr(ret);
index b80c2dce4024483d7bcc9901f79d704d03daf063..b4cc5979a54a001f4c5d67037defd06a9296c85f 100644 (file)
@@ -36,12 +36,30 @@ public class HTLCDescriptor extends CommonBase {
         * The parameters required to derive the signer for the HTLC input.
         */
        public void set_channel_derivation_parameters(org.ldk.structs.ChannelDerivationParameters val) {
-               bindings.HTLCDescriptor_set_channel_derivation_parameters(this.ptr, val == null ? 0 : val.ptr);
+               bindings.HTLCDescriptor_set_channel_derivation_parameters(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
        }
 
+       /**
+        * The txid of the commitment transaction in which the HTLC output lives.
+        */
+       public byte[] get_commitment_txid() {
+               byte[] ret = bindings.HTLCDescriptor_get_commitment_txid(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * The txid of the commitment transaction in which the HTLC output lives.
+        */
+       public void set_commitment_txid(byte[] val) {
+               bindings.HTLCDescriptor_set_commitment_txid(this.ptr, InternalUtils.check_arr_len(val, 32));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
        /**
         * The number of the commitment transaction in which the HTLC output lives.
         */
@@ -124,7 +142,7 @@ public class HTLCDescriptor extends CommonBase {
         * The details of the HTLC as it appears in the commitment transaction.
         */
        public void set_htlc(org.ldk.structs.HTLCOutputInCommitment val) {
-               bindings.HTLCDescriptor_set_htlc(this.ptr, val == null ? 0 : val.ptr);
+               bindings.HTLCDescriptor_set_htlc(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -172,6 +190,28 @@ public class HTLCDescriptor extends CommonBase {
                Reference.reachabilityFence(val);
        }
 
+       /**
+        * Constructs a new HTLCDescriptor given each field
+        */
+       public static HTLCDescriptor of(org.ldk.structs.ChannelDerivationParameters channel_derivation_parameters_arg, byte[] commitment_txid_arg, long per_commitment_number_arg, byte[] per_commitment_point_arg, int feerate_per_kw_arg, org.ldk.structs.HTLCOutputInCommitment htlc_arg, org.ldk.structs.Option_ThirtyTwoBytesZ preimage_arg, byte[] counterparty_sig_arg) {
+               long ret = bindings.HTLCDescriptor_new(channel_derivation_parameters_arg.ptr, InternalUtils.check_arr_len(commitment_txid_arg, 32), per_commitment_number_arg, InternalUtils.check_arr_len(per_commitment_point_arg, 33), feerate_per_kw_arg, htlc_arg.ptr, preimage_arg.ptr, InternalUtils.check_arr_len(counterparty_sig_arg, 64));
+               Reference.reachabilityFence(channel_derivation_parameters_arg);
+               Reference.reachabilityFence(commitment_txid_arg);
+               Reference.reachabilityFence(per_commitment_number_arg);
+               Reference.reachabilityFence(per_commitment_point_arg);
+               Reference.reachabilityFence(feerate_per_kw_arg);
+               Reference.reachabilityFence(htlc_arg);
+               Reference.reachabilityFence(preimage_arg);
+               Reference.reachabilityFence(counterparty_sig_arg);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.HTLCDescriptor ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.HTLCDescriptor(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_derivation_parameters_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(htlc_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(preimage_arg); };
+               return ret_hu_conv;
+       }
+
        long clone_ptr() {
                long ret = bindings.HTLCDescriptor_clone_ptr(this.ptr);
                Reference.reachabilityFence(this);
@@ -196,7 +236,7 @@ public class HTLCDescriptor extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.HTLCDescriptor b) {
-               boolean ret = bindings.HTLCDescriptor_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.HTLCDescriptor_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index df280da439280021e2b55f9145c4ad4512cf862c..f3f56ff195259a470d1b80710d4548efd8775db1 100644 (file)
@@ -30,6 +30,9 @@ public class HTLCDestination extends CommonBase {
                if (raw_val.getClass() == bindings.LDKHTLCDestination.InvalidForward.class) {
                        return new InvalidForward(ptr, (bindings.LDKHTLCDestination.InvalidForward)raw_val);
                }
+               if (raw_val.getClass() == bindings.LDKHTLCDestination.InvalidOnion.class) {
+                       return new InvalidOnion(ptr, (bindings.LDKHTLCDestination.InvalidOnion)raw_val);
+               }
                if (raw_val.getClass() == bindings.LDKHTLCDestination.FailedPayment.class) {
                        return new FailedPayment(ptr, (bindings.LDKHTLCDestination.FailedPayment)raw_val);
                }
@@ -52,11 +55,14 @@ public class HTLCDestination extends CommonBase {
                /**
                 * The outgoing `channel_id` between us and the next node.
                */
-               public final byte[] channel_id;
+               public final org.ldk.structs.ChannelId channel_id;
                private NextHopChannel(long ptr, bindings.LDKHTLCDestination.NextHopChannel obj) {
                        super(null, ptr);
                        this.node_id = obj.node_id;
-                       this.channel_id = obj.channel_id;
+                       long channel_id = obj.channel_id;
+                       org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); }
+                       if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
+                       this.channel_id = channel_id_hu_conv;
                }
        }
        /**
@@ -86,6 +92,14 @@ public class HTLCDestination extends CommonBase {
                        this.requested_forward_scid = obj.requested_forward_scid;
                }
        }
+       /**
+        * We couldn't decode the incoming onion to obtain the forwarding details.
+        */
+       public final static class InvalidOnion extends HTLCDestination {
+               private InvalidOnion(long ptr, bindings.LDKHTLCDestination.InvalidOnion obj) {
+                       super(null, ptr);
+               }
+       }
        /**
         * Failure scenario where an HTLC may have been forwarded to be intended for us,
         * but is invalid for some reason, so we reject it.
@@ -129,13 +143,14 @@ public class HTLCDestination extends CommonBase {
        /**
         * Utility method to constructs a new NextHopChannel-variant HTLCDestination
         */
-       public static HTLCDestination next_hop_channel(byte[] node_id, byte[] channel_id) {
-               long ret = bindings.HTLCDestination_next_hop_channel(InternalUtils.check_arr_len(node_id, 33), InternalUtils.check_arr_len(channel_id, 32));
+       public static HTLCDestination next_hop_channel(byte[] node_id, org.ldk.structs.ChannelId channel_id) {
+               long ret = bindings.HTLCDestination_next_hop_channel(InternalUtils.check_arr_len(node_id, 33), channel_id.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(channel_id);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.HTLCDestination ret_hu_conv = org.ldk.structs.HTLCDestination.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); };
                return ret_hu_conv;
        }
 
@@ -163,6 +178,17 @@ public class HTLCDestination extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new InvalidOnion-variant HTLCDestination
+        */
+       public static HTLCDestination invalid_onion() {
+               long ret = bindings.HTLCDestination_invalid_onion();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.HTLCDestination ret_hu_conv = org.ldk.structs.HTLCDestination.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
        /**
         * Utility method to constructs a new FailedPayment-variant HTLCDestination
         */
@@ -180,7 +206,7 @@ public class HTLCDestination extends CommonBase {
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.HTLCDestination b) {
-               boolean ret = bindings.HTLCDestination_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.HTLCDestination_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
index 66a6de80a583cee6d6893429cd6346a6783acb5e..4a604c5041c1393231b192d49b6e4bc82a0a7acf 100644 (file)
@@ -167,7 +167,7 @@ public class HTLCOutputInCommitment extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.HTLCOutputInCommitment b) {
-               boolean ret = bindings.HTLCOutputInCommitment_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.HTLCOutputInCommitment_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 67050a5bc36c9c8f8bf3003cc3c1648fef5e0c6d..96121a2f9e0526fa46cd8274adb81de006bb9003 100644 (file)
@@ -46,7 +46,7 @@ public class HTLCUpdate extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.HTLCUpdate b) {
-               boolean ret = bindings.HTLCUpdate_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.HTLCUpdate_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 7458cc9b0f1990c570f9371a00675a8311486850..3c2d930f2b213452b0c135056a05a3bfd49df2d0 100644 (file)
@@ -103,7 +103,7 @@ public class HolderCommitmentTransaction extends CommonBase {
         * The funding keys are used to figure out which signature should go first when building the transaction for broadcast.
         */
        public static HolderCommitmentTransaction of(org.ldk.structs.CommitmentTransaction commitment_tx, byte[] counterparty_sig, byte[][] counterparty_htlc_sigs, byte[] holder_funding_key, byte[] counterparty_funding_key) {
-               long ret = bindings.HolderCommitmentTransaction_new(commitment_tx == null ? 0 : commitment_tx.ptr, InternalUtils.check_arr_len(counterparty_sig, 64), counterparty_htlc_sigs != null ? Arrays.stream(counterparty_htlc_sigs).map(counterparty_htlc_sigs_conv_8 -> InternalUtils.check_arr_len(counterparty_htlc_sigs_conv_8, 64)).toArray(byte[][]::new) : null, InternalUtils.check_arr_len(holder_funding_key, 33), InternalUtils.check_arr_len(counterparty_funding_key, 33));
+               long ret = bindings.HolderCommitmentTransaction_new(commitment_tx.ptr, InternalUtils.check_arr_len(counterparty_sig, 64), counterparty_htlc_sigs != null ? Arrays.stream(counterparty_htlc_sigs).map(counterparty_htlc_sigs_conv_8 -> InternalUtils.check_arr_len(counterparty_htlc_sigs_conv_8, 64)).toArray(byte[][]::new) : null, InternalUtils.check_arr_len(holder_funding_key, 33), InternalUtils.check_arr_len(counterparty_funding_key, 33));
                Reference.reachabilityFence(commitment_tx);
                Reference.reachabilityFence(counterparty_sig);
                Reference.reachabilityFence(counterparty_htlc_sigs);
index a6d90d2c67a6b3f9c3dd32048ad77c7b11f98df7..35154e59831983129fcc5d93fb37d6c50568e913 100644 (file)
@@ -62,7 +62,7 @@ public class Hostname extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.Hostname b) {
-               boolean ret = bindings.Hostname_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Hostname_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 2240ccedf903c04aa15427ce5b77a33c260837f9..308f089e836badd2c328522395b5a54fcde8eaae 100644 (file)
@@ -54,7 +54,7 @@ public class HtlcBasepoint extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.HtlcBasepoint b) {
-               boolean ret = bindings.HtlcBasepoint_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.HtlcBasepoint_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -104,6 +104,16 @@ public class HtlcBasepoint extends CommonBase {
                return ret;
        }
 
+       /**
+        * Derives the \"tweak\" used in calculate [`HtlcKey::from_basepoint`].\n\n[`HtlcKey::from_basepoint`] calculates a private key as:\n`privkey = basepoint_secret + SHA256(per_commitment_point || basepoint)`\n\nThis calculates the hash part in the tweak derivation process, which is used to\nensure that each key is unique and cannot be guessed by an external party.
+        */
+       public byte[] derive_add_tweak(byte[] per_commitment_point) {
+               byte[] ret = bindings.HtlcBasepoint_derive_add_tweak(this.ptr, InternalUtils.check_arr_len(per_commitment_point, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(per_commitment_point);
+               return ret;
+       }
+
        /**
         * Serialize the HtlcBasepoint object into a byte array which can be read by HtlcBasepoint_read
         */
index 68a55b8cb8640d63cc99d9a42ec9e91f4f6bfcd3..ec96e61296459d59a0a352bafae98d44a81acff4 100644 (file)
@@ -58,7 +58,7 @@ public class HtlcKey extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.HtlcKey b) {
-               boolean ret = bindings.HtlcKey_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.HtlcKey_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -91,7 +91,7 @@ public class HtlcKey extends CommonBase {
         * Derive a public htlcpubkey using one node\'s `per_commitment_point` and its countersignatory\'s `basepoint`
         */
        public static HtlcKey from_basepoint(org.ldk.structs.HtlcBasepoint countersignatory_basepoint, byte[] per_commitment_point) {
-               long ret = bindings.HtlcKey_from_basepoint(countersignatory_basepoint == null ? 0 : countersignatory_basepoint.ptr, InternalUtils.check_arr_len(per_commitment_point, 33));
+               long ret = bindings.HtlcKey_from_basepoint(countersignatory_basepoint.ptr, InternalUtils.check_arr_len(per_commitment_point, 33));
                Reference.reachabilityFence(countersignatory_basepoint);
                Reference.reachabilityFence(per_commitment_point);
                if (ret >= 0 && ret <= 4096) { return null; }
index 3282013a67a75ff4fc1aba777fccc12980bafccc..de2c4ead75b7bafff46a4e28850a2cc058644b4e 100644 (file)
@@ -54,7 +54,7 @@ public class InFlightHtlcs extends CommonBase {
         * Takes in a path with payer's node id and adds the path's details to `InFlightHtlcs`.
         */
        public void process_path(org.ldk.structs.Path path, byte[] payer_node_id) {
-               bindings.InFlightHtlcs_process_path(this.ptr, path == null ? 0 : path.ptr, InternalUtils.check_arr_len(payer_node_id, 33));
+               bindings.InFlightHtlcs_process_path(this.ptr, path.ptr, InternalUtils.check_arr_len(payer_node_id, 33));
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(path);
                Reference.reachabilityFence(payer_node_id);
@@ -66,7 +66,7 @@ public class InFlightHtlcs extends CommonBase {
         * id.
         */
        public void add_inflight_htlc(org.ldk.structs.NodeId source, org.ldk.structs.NodeId target, long channel_scid, long used_msat) {
-               bindings.InFlightHtlcs_add_inflight_htlc(this.ptr, source == null ? 0 : source.ptr, target == null ? 0 : target.ptr, channel_scid, used_msat);
+               bindings.InFlightHtlcs_add_inflight_htlc(this.ptr, source.ptr, target.ptr, channel_scid, used_msat);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(source);
                Reference.reachabilityFence(target);
@@ -81,7 +81,7 @@ public class InFlightHtlcs extends CommonBase {
         * id.
         */
        public Option_u64Z used_liquidity_msat(org.ldk.structs.NodeId source, org.ldk.structs.NodeId target, long channel_scid) {
-               long ret = bindings.InFlightHtlcs_used_liquidity_msat(this.ptr, source == null ? 0 : source.ptr, target == null ? 0 : target.ptr, channel_scid);
+               long ret = bindings.InFlightHtlcs_used_liquidity_msat(this.ptr, source.ptr, target.ptr, channel_scid);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(source);
                Reference.reachabilityFence(target);
index 1c5c25dbd7f5fea81b7b22605d41113e657015e6..7e53df1f6cd80a35d2c209dbaf6a1fe027f96d9c 100644 (file)
@@ -305,7 +305,7 @@ public class InMemorySigner extends CommonBase {
         * [`descriptor.outpoint`]: StaticPaymentOutputDescriptor::outpoint
         */
        public Result_WitnessNoneZ sign_counterparty_payment_input(byte[] spend_tx, long input_idx, org.ldk.structs.StaticPaymentOutputDescriptor descriptor) {
-               long ret = bindings.InMemorySigner_sign_counterparty_payment_input(this.ptr, spend_tx, input_idx, descriptor == null ? 0 : descriptor.ptr);
+               long ret = bindings.InMemorySigner_sign_counterparty_payment_input(this.ptr, spend_tx, input_idx, descriptor.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(spend_tx);
                Reference.reachabilityFence(input_idx);
@@ -329,7 +329,7 @@ public class InMemorySigner extends CommonBase {
         * [`descriptor.to_self_delay`]: DelayedPaymentOutputDescriptor::to_self_delay
         */
        public Result_WitnessNoneZ sign_dynamic_p2wsh_input(byte[] spend_tx, long input_idx, org.ldk.structs.DelayedPaymentOutputDescriptor descriptor) {
-               long ret = bindings.InMemorySigner_sign_dynamic_p2wsh_input(this.ptr, spend_tx, input_idx, descriptor == null ? 0 : descriptor.ptr);
+               long ret = bindings.InMemorySigner_sign_dynamic_p2wsh_input(this.ptr, spend_tx, input_idx, descriptor.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(spend_tx);
                Reference.reachabilityFence(input_idx);
index 279e4d387b4c2a327b9a03f4134d6b52a9935955..377c84c82110ead0205b0dc6b32bdd77252a7297 100644 (file)
@@ -90,4 +90,51 @@ public class InboundHTLCErr extends CommonBase {
                return ret_hu_conv;
        }
 
+       long clone_ptr() {
+               long ret = bindings.InboundHTLCErr_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the InboundHTLCErr
+        */
+       public InboundHTLCErr clone() {
+               long ret = bindings.InboundHTLCErr_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.InboundHTLCErr ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InboundHTLCErr(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Generates a non-cryptographic 64-bit hash of the InboundHTLCErr.
+        */
+       public long hash() {
+               long ret = bindings.InboundHTLCErr_hash(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       @Override public int hashCode() {
+               return (int)this.hash();
+       }
+       /**
+        * Checks if two InboundHTLCErrs 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.
+        */
+       public boolean eq(org.ldk.structs.InboundHTLCErr b) {
+               boolean ret = bindings.InboundHTLCErr_eq(this.ptr, b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof InboundHTLCErr)) return false;
+               return this.eq((InboundHTLCErr)o);
+       }
 }
index 6379382b67f7d7a80f7f0b780f97486633545014..b2abc86da74967c85584c66b8999cb641aebcf19 100644 (file)
@@ -38,7 +38,7 @@ public class Init extends CommonBase {
         * The relevant features which the sender supports.
         */
        public void set_features(org.ldk.structs.InitFeatures val) {
-               bindings.Init_set_features(this.ptr, val == null ? 0 : val.ptr);
+               bindings.Init_set_features(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -108,7 +108,7 @@ public class Init extends CommonBase {
         * Constructs a new Init given each field
         */
        public static Init of(org.ldk.structs.InitFeatures features_arg, org.ldk.structs.Option_CVec_ThirtyTwoBytesZZ networks_arg, org.ldk.structs.Option_SocketAddressZ remote_network_address_arg) {
-               long ret = bindings.Init_new(features_arg == null ? 0 : features_arg.ptr, networks_arg.ptr, remote_network_address_arg.ptr);
+               long ret = bindings.Init_new(features_arg.ptr, networks_arg.ptr, remote_network_address_arg.ptr);
                Reference.reachabilityFence(features_arg);
                Reference.reachabilityFence(networks_arg);
                Reference.reachabilityFence(remote_network_address_arg);
@@ -157,7 +157,7 @@ public class Init extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.Init b) {
-               boolean ret = bindings.Init_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Init_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index fbd23d8966318766122b5f877b61df17aa7cc56e..418f79e8cc00bd9a0987d809c8593b85197a0065 100644 (file)
@@ -26,7 +26,7 @@ public class InitFeatures extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.InitFeatures b) {
-               boolean ret = bindings.InitFeatures_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.InitFeatures_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -82,7 +82,7 @@ public class InitFeatures extends CommonBase {
         * Returns true if this `Features` object contains required features unknown by `other`.
         */
        public boolean requires_unknown_bits_from(org.ldk.structs.InitFeatures other) {
-               boolean ret = bindings.InitFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr);
+               boolean ret = bindings.InitFeatures_requires_unknown_bits_from(this.ptr, other.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(other);
                if (this != null) { this.ptrs_to.add(other); };
@@ -794,4 +794,38 @@ public class InitFeatures extends CommonBase {
                return ret;
        }
 
+       /**
+        * Set this feature as optional.
+        */
+       public void set_trampoline_routing_optional() {
+               bindings.InitFeatures_set_trampoline_routing_optional(this.ptr);
+               Reference.reachabilityFence(this);
+       }
+
+       /**
+        * Set this feature as required.
+        */
+       public void set_trampoline_routing_required() {
+               bindings.InitFeatures_set_trampoline_routing_required(this.ptr);
+               Reference.reachabilityFence(this);
+       }
+
+       /**
+        * Checks if this feature is supported.
+        */
+       public boolean supports_trampoline_routing() {
+               boolean ret = bindings.InitFeatures_supports_trampoline_routing(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Checks if this feature is required.
+        */
+       public boolean requires_trampoline_routing() {
+               boolean ret = bindings.InitFeatures_requires_trampoline_routing(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
 }
index d010bdb047a08ba4afcf927bdc0b841f4a9282f3..4f25ed3f7decf2b557b814aa6e224694412efce5 100644 (file)
@@ -38,7 +38,7 @@ public class Input extends CommonBase {
         * The unique identifier of the input.
         */
        public void set_outpoint(org.ldk.structs.OutPoint val) {
-               bindings.Input_set_outpoint(this.ptr, val == null ? 0 : val.ptr);
+               bindings.Input_set_outpoint(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -90,7 +90,7 @@ public class Input extends CommonBase {
         * Constructs a new Input given each field
         */
        public static Input of(org.ldk.structs.OutPoint outpoint_arg, org.ldk.structs.TxOut previous_utxo_arg, long satisfaction_weight_arg) {
-               long ret = bindings.Input_new(outpoint_arg == null ? 0 : outpoint_arg.ptr, previous_utxo_arg.ptr, satisfaction_weight_arg);
+               long ret = bindings.Input_new(outpoint_arg.ptr, previous_utxo_arg.ptr, satisfaction_weight_arg);
                Reference.reachabilityFence(outpoint_arg);
                Reference.reachabilityFence(previous_utxo_arg);
                Reference.reachabilityFence(satisfaction_weight_arg);
@@ -137,7 +137,7 @@ public class Input extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.Input b) {
-               boolean ret = bindings.Input_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Input_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
diff --git a/src/main/java/org/ldk/structs/IntroductionNode.java b/src/main/java/org/ldk/structs/IntroductionNode.java
new file mode 100644 (file)
index 0000000..13d25d4
--- /dev/null
@@ -0,0 +1,126 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * The unblinded node in a [`BlindedPath`].
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class IntroductionNode extends CommonBase {
+       private IntroductionNode(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.IntroductionNode_free(ptr); }
+       }
+       static IntroductionNode constr_from_ptr(long ptr) {
+               bindings.LDKIntroductionNode raw_val = bindings.LDKIntroductionNode_ref_from_ptr(ptr);
+               if (raw_val.getClass() == bindings.LDKIntroductionNode.NodeId.class) {
+                       return new NodeId(ptr, (bindings.LDKIntroductionNode.NodeId)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKIntroductionNode.DirectedShortChannelId.class) {
+                       return new DirectedShortChannelId(ptr, (bindings.LDKIntroductionNode.DirectedShortChannelId)raw_val);
+               }
+               assert false; return null; // Unreachable without extending the (internal) bindings interface
+       }
+
+       /**
+        * The node id of the introduction node.
+        */
+       public final static class NodeId extends IntroductionNode {
+               public final byte[] node_id;
+               private NodeId(long ptr, bindings.LDKIntroductionNode.NodeId obj) {
+                       super(null, ptr);
+                       this.node_id = obj.node_id;
+               }
+       }
+       /**
+        * The short channel id of the channel leading to the introduction node. The [`Direction`]
+        * identifies which side of the channel is the introduction node.
+        */
+       public final static class DirectedShortChannelId extends IntroductionNode {
+               public final org.ldk.enums.Direction _0;
+               public final long _1;
+               private DirectedShortChannelId(long ptr, bindings.LDKIntroductionNode.DirectedShortChannelId obj) {
+                       super(null, ptr);
+                       this._0 = obj._0;
+                       this._1 = obj._1;
+               }
+       }
+       long clone_ptr() {
+               long ret = bindings.IntroductionNode_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the IntroductionNode
+        */
+       public IntroductionNode clone() {
+               long ret = bindings.IntroductionNode_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.IntroductionNode ret_hu_conv = org.ldk.structs.IntroductionNode.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new NodeId-variant IntroductionNode
+        */
+       public static IntroductionNode node_id(byte[] a) {
+               long ret = bindings.IntroductionNode_node_id(InternalUtils.check_arr_len(a, 33));
+               Reference.reachabilityFence(a);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.IntroductionNode ret_hu_conv = org.ldk.structs.IntroductionNode.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new DirectedShortChannelId-variant IntroductionNode
+        */
+       public static IntroductionNode directed_short_channel_id(org.ldk.enums.Direction a, long b) {
+               long ret = bindings.IntroductionNode_directed_short_channel_id(a, b);
+               Reference.reachabilityFence(a);
+               Reference.reachabilityFence(b);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.IntroductionNode ret_hu_conv = org.ldk.structs.IntroductionNode.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Generates a non-cryptographic 64-bit hash of the IntroductionNode.
+        */
+       public long hash() {
+               long ret = bindings.IntroductionNode_hash(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       @Override public int hashCode() {
+               return (int)this.hash();
+       }
+       /**
+        * Checks if two IntroductionNodes contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public boolean eq(org.ldk.structs.IntroductionNode b) {
+               boolean ret = bindings.IntroductionNode_eq(this.ptr, b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof IntroductionNode)) return false;
+               return this.eq((IntroductionNode)o);
+       }
+}
index 658186fe088f4a4021765bea6772fbc0787981b2..a61b339c07e7c45a21c74b2e2181e2f714b83d3d 100644 (file)
@@ -72,7 +72,7 @@ public class InvoiceError extends CommonBase {
         * An explanation of the error.
         */
        public void set_message(org.ldk.structs.UntrustedString val) {
-               bindings.InvoiceError_set_message(this.ptr, val == null ? 0 : val.ptr);
+               bindings.InvoiceError_set_message(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -84,7 +84,7 @@ public class InvoiceError extends CommonBase {
         * Note that erroneous_field_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public static InvoiceError of(@Nullable org.ldk.structs.ErroneousField erroneous_field_arg, org.ldk.structs.UntrustedString message_arg) {
-               long ret = bindings.InvoiceError_new(erroneous_field_arg == null ? 0 : erroneous_field_arg.ptr, message_arg == null ? 0 : message_arg.ptr);
+               long ret = bindings.InvoiceError_new(erroneous_field_arg == null ? 0 : erroneous_field_arg.ptr, message_arg.ptr);
                Reference.reachabilityFence(erroneous_field_arg);
                Reference.reachabilityFence(message_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
index 2706e52dd88bc3b09a03951156ae8eeb40725c7a..8f96274fceb61eff83afe74398b161cb4010375d 100644 (file)
@@ -70,15 +70,12 @@ public class InvoiceRequest extends CommonBase {
 
        /**
         * The minimum amount required for a successful payment of a single item.
-        * 
-        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       @Nullable
-       public Amount amount() {
+       public Option_AmountZ amount() {
                long ret = bindings.InvoiceRequest_amount(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); }
+               org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
@@ -86,7 +83,10 @@ public class InvoiceRequest extends CommonBase {
        /**
         * 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
         */
+       @Nullable
        public PrintableString description() {
                long ret = bindings.InvoiceRequest_description(this.ptr);
                Reference.reachabilityFence(this);
@@ -163,14 +163,17 @@ public class InvoiceRequest extends CommonBase {
                long ret = bindings.InvoiceRequest_supported_quantity(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); }
+               org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
        /**
         * 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
         */
+       @Nullable
        public byte[] signing_pubkey() {
                byte[] ret = bindings.InvoiceRequest_signing_pubkey(this.ptr);
                Reference.reachabilityFence(this);
@@ -263,14 +266,58 @@ public class InvoiceRequest extends CommonBase {
        }
 
        /**
-        * Signature of the invoice request using [`payer_id`].
+        * 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.
         * 
-        * [`payer_id`]: Self::payer_id
+        * 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
         */
-       public byte[] signature() {
-               byte[] ret = bindings.InvoiceRequest_signature(this.ptr);
+       public Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ respond_with(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash) {
+               long ret = bindings.InvoiceRequest_respond_with(this.ptr, payment_paths != null ? Arrays.stream(payment_paths).mapToLong(payment_paths_conv_37 -> payment_paths_conv_37.ptr).toArray() : null, InternalUtils.check_arr_len(payment_hash, 32));
                Reference.reachabilityFence(this);
-               return ret;
+               Reference.reachabilityFence(payment_paths);
+               Reference.reachabilityFence(payment_hash);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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
+        */
+       public Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ respond_with_no_std(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash, long created_at) {
+               long ret = bindings.InvoiceRequest_respond_with_no_std(this.ptr, payment_paths != null ? Arrays.stream(payment_paths).mapToLong(payment_paths_conv_37 -> payment_paths_conv_37.ptr).toArray() : null, InternalUtils.check_arr_len(payment_hash, 32), created_at);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(payment_paths);
+               Reference.reachabilityFence(payment_hash);
+               Reference.reachabilityFence(created_at);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
        }
 
        /**
@@ -281,7 +328,7 @@ public class InvoiceRequest extends CommonBase {
         * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
         */
        public Result_VerifiedInvoiceRequestNoneZ verify(org.ldk.structs.ExpandedKey key) {
-               long ret = bindings.InvoiceRequest_verify(this.ptr, key == null ? 0 : key.ptr);
+               long ret = bindings.InvoiceRequest_verify(this.ptr, key.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(key);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -291,6 +338,17 @@ public class InvoiceRequest extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Signature of the invoice request using [`payer_id`].
+        * 
+        * [`payer_id`]: Self::payer_id
+        */
+       public byte[] signature() {
+               byte[] ret = bindings.InvoiceRequest_signature(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
        /**
         * Serialize the InvoiceRequest object into a byte array which can be read by InvoiceRequest_read
         */
index bb0e10aee2c315c38afb63fe7b383894a3f1f669..3d761183194cf9f688e716eda15fe715a60eed52 100644 (file)
@@ -26,7 +26,7 @@ public class InvoiceRequestFeatures extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.InvoiceRequestFeatures b) {
-               boolean ret = bindings.InvoiceRequestFeatures_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.InvoiceRequestFeatures_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -82,7 +82,7 @@ public class InvoiceRequestFeatures extends CommonBase {
         * Returns true if this `Features` object contains required features unknown by `other`.
         */
        public boolean requires_unknown_bits_from(org.ldk.structs.InvoiceRequestFeatures other) {
-               boolean ret = bindings.InvoiceRequestFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr);
+               boolean ret = bindings.InvoiceRequestFeatures_requires_unknown_bits_from(this.ptr, other.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(other);
                if (this != null) { this.ptrs_to.add(other); };
diff --git a/src/main/java/org/ldk/structs/InvoiceRequestFields.java b/src/main/java/org/ldk/structs/InvoiceRequestFields.java
new file mode 100644 (file)
index 0000000..a44ad95
--- /dev/null
@@ -0,0 +1,167 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Fields sent in an [`InvoiceRequest`] message to include in [`PaymentContext::Bolt12Offer`].
+ * 
+ * [`PaymentContext::Bolt12Offer`]: crate::blinded_path::payment::PaymentContext::Bolt12Offer
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class InvoiceRequestFields extends CommonBase {
+       InvoiceRequestFields(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.InvoiceRequestFields_free(ptr); }
+       }
+
+       /**
+        * A possibly transient pubkey used to sign the invoice request.
+        */
+       public byte[] get_payer_id() {
+               byte[] ret = bindings.InvoiceRequestFields_get_payer_id(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * A possibly transient pubkey used to sign the invoice request.
+        */
+       public void set_payer_id(byte[] val) {
+               bindings.InvoiceRequestFields_set_payer_id(this.ptr, InternalUtils.check_arr_len(val, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * The quantity of the offer's item conforming to [`Offer::is_valid_quantity`].
+        */
+       public Option_u64Z get_quantity() {
+               long ret = bindings.InvoiceRequestFields_get_quantity(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_u64Z ret_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * The quantity of the offer's item conforming to [`Offer::is_valid_quantity`].
+        */
+       public void set_quantity(org.ldk.structs.Option_u64Z val) {
+               bindings.InvoiceRequestFields_set_quantity(this.ptr, val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(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
+        */
+       @Nullable
+       public UntrustedString get_payer_note_truncated() {
+               long ret = bindings.InvoiceRequestFields_get_payer_note_truncated(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.UntrustedString ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UntrustedString(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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
+        */
+       public void set_payer_note_truncated(@Nullable org.ldk.structs.UntrustedString val) {
+               bindings.InvoiceRequestFields_set_payer_note_truncated(this.ptr, val == null ? 0 : val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(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
+        */
+       public static InvoiceRequestFields of(byte[] payer_id_arg, org.ldk.structs.Option_u64Z quantity_arg, @Nullable org.ldk.structs.UntrustedString payer_note_truncated_arg) {
+               long ret = bindings.InvoiceRequestFields_new(InternalUtils.check_arr_len(payer_id_arg, 33), quantity_arg.ptr, payer_note_truncated_arg == null ? 0 : payer_note_truncated_arg.ptr);
+               Reference.reachabilityFence(payer_id_arg);
+               Reference.reachabilityFence(quantity_arg);
+               Reference.reachabilityFence(payer_note_truncated_arg);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.InvoiceRequestFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvoiceRequestFields(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(quantity_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payer_note_truncated_arg); };
+               return ret_hu_conv;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.InvoiceRequestFields_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the InvoiceRequestFields
+        */
+       public InvoiceRequestFields clone() {
+               long ret = bindings.InvoiceRequestFields_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.InvoiceRequestFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvoiceRequestFields(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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.
+        */
+       public boolean eq(org.ldk.structs.InvoiceRequestFields b) {
+               boolean ret = bindings.InvoiceRequestFields_eq(this.ptr, b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof InvoiceRequestFields)) return false;
+               return this.eq((InvoiceRequestFields)o);
+       }
+       /**
+        * Serialize the InvoiceRequestFields object into a byte array which can be read by InvoiceRequestFields_read
+        */
+       public byte[] write() {
+               byte[] ret = bindings.InvoiceRequestFields_write(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Read a InvoiceRequestFields from a byte array, created by InvoiceRequestFields_write
+        */
+       public static Result_InvoiceRequestFieldsDecodeErrorZ read(byte[] ser) {
+               long ret = bindings.InvoiceRequestFields_read(ser);
+               Reference.reachabilityFence(ser);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceRequestFieldsDecodeErrorZ ret_hu_conv = Result_InvoiceRequestFieldsDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/InvoiceRequestWithDerivedPayerIdBuilder.java b/src/main/java/org/ldk/structs/InvoiceRequestWithDerivedPayerIdBuilder.java
new file mode 100644 (file)
index 0000000..4ac13bd
--- /dev/null
@@ -0,0 +1,142 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Builds an [`InvoiceRequest`] from an [`Offer`] for the \"offer to be paid\" flow.
+ * 
+ * See [module-level documentation] for usage.
+ * 
+ * [module-level documentation]: self
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class InvoiceRequestWithDerivedPayerIdBuilder extends CommonBase {
+       InvoiceRequestWithDerivedPayerIdBuilder(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.InvoiceRequestWithDerivedPayerIdBuilder_free(ptr); }
+       }
+
+       /**
+        * Builds a signed [`InvoiceRequest`] after checking for valid semantics.
+        */
+       public Result_InvoiceRequestBolt12SemanticErrorZ build_and_sign() {
+               long ret = bindings.InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(this); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid this being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after this call, this is reset to null and is now a dummy object.
+               this.ptr = 0;;
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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.
+        */
+       public Result_NoneBolt12SemanticErrorZ chain(org.ldk.enums.Network network) {
+               long ret = bindings.InvoiceRequestWithDerivedPayerIdBuilder_chain(this.ptr, network);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(network);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(this); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid this being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after this call, this is reset to null and is now a dummy object.
+               this.ptr = 0;;
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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
+        */
+       public Result_NoneBolt12SemanticErrorZ amount_msats(long amount_msats) {
+               long ret = bindings.InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(this.ptr, amount_msats);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(amount_msats);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(this); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid this being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after this call, this is reset to null and is now a dummy object.
+               this.ptr = 0;;
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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.
+        */
+       public Result_NoneBolt12SemanticErrorZ quantity(long quantity) {
+               long ret = bindings.InvoiceRequestWithDerivedPayerIdBuilder_quantity(this.ptr, quantity);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(quantity);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(this); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid this being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after this call, this is reset to null and is now a dummy object.
+               this.ptr = 0;;
+               return ret_hu_conv;
+       }
+
+       /**
+        * Sets the [`InvoiceRequest::payer_note`].
+        * 
+        * Successive calls to this method will override the previous setting.
+        */
+       public void payer_note(java.lang.String payer_note) {
+               bindings.InvoiceRequestWithDerivedPayerIdBuilder_payer_note(this.ptr, payer_note);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(payer_note);
+               if (this != null) { this.ptrs_to.add(this); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid this being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after this call, this is reset to null and is now a dummy object.
+               this.ptr = 0;;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/InvoiceRequestWithExplicitPayerIdBuilder.java b/src/main/java/org/ldk/structs/InvoiceRequestWithExplicitPayerIdBuilder.java
new file mode 100644 (file)
index 0000000..974301c
--- /dev/null
@@ -0,0 +1,143 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Builds an [`InvoiceRequest`] from an [`Offer`] for the \"offer to be paid\" flow.
+ * 
+ * See [module-level documentation] for usage.
+ * 
+ * [module-level documentation]: self
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class InvoiceRequestWithExplicitPayerIdBuilder extends CommonBase {
+       InvoiceRequestWithExplicitPayerIdBuilder(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.InvoiceRequestWithExplicitPayerIdBuilder_free(ptr); }
+       }
+
+       /**
+        * Builds an unsigned [`InvoiceRequest`] after checking for valid semantics. It can be signed
+        * by [`UnsignedInvoiceRequest::sign`].
+        */
+       public Result_UnsignedInvoiceRequestBolt12SemanticErrorZ build() {
+               long ret = bindings.InvoiceRequestWithExplicitPayerIdBuilder_build(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_UnsignedInvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(this); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid this being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after this call, this is reset to null and is now a dummy object.
+               this.ptr = 0;;
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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.
+        */
+       public Result_NoneBolt12SemanticErrorZ chain(org.ldk.enums.Network network) {
+               long ret = bindings.InvoiceRequestWithExplicitPayerIdBuilder_chain(this.ptr, network);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(network);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(this); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid this being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after this call, this is reset to null and is now a dummy object.
+               this.ptr = 0;;
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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
+        */
+       public Result_NoneBolt12SemanticErrorZ amount_msats(long amount_msats) {
+               long ret = bindings.InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(this.ptr, amount_msats);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(amount_msats);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(this); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid this being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after this call, this is reset to null and is now a dummy object.
+               this.ptr = 0;;
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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.
+        */
+       public Result_NoneBolt12SemanticErrorZ quantity(long quantity) {
+               long ret = bindings.InvoiceRequestWithExplicitPayerIdBuilder_quantity(this.ptr, quantity);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(quantity);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(this); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid this being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after this call, this is reset to null and is now a dummy object.
+               this.ptr = 0;;
+               return ret_hu_conv;
+       }
+
+       /**
+        * Sets the [`InvoiceRequest::payer_note`].
+        * 
+        * Successive calls to this method will override the previous setting.
+        */
+       public void payer_note(java.lang.String payer_note) {
+               bindings.InvoiceRequestWithExplicitPayerIdBuilder_payer_note(this.ptr, payer_note);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(payer_note);
+               if (this != null) { this.ptrs_to.add(this); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid this being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after this call, this is reset to null and is now a dummy object.
+               this.ptr = 0;;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/InvoiceWithDerivedSigningPubkeyBuilder.java b/src/main/java/org/ldk/structs/InvoiceWithDerivedSigningPubkeyBuilder.java
new file mode 100644 (file)
index 0000000..be96052
--- /dev/null
@@ -0,0 +1,154 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Builds a [`Bolt12Invoice`] from either:
+ * - an [`InvoiceRequest`] for the \"offer to be paid\" flow or
+ * - a [`Refund`] for the \"offer for money\" flow.
+ * 
+ * See [module-level documentation] for usage.
+ * 
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`Refund`]: crate::offers::refund::Refund
+ * [module-level documentation]: self
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class InvoiceWithDerivedSigningPubkeyBuilder extends CommonBase {
+       InvoiceWithDerivedSigningPubkeyBuilder(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.InvoiceWithDerivedSigningPubkeyBuilder_free(ptr); }
+       }
+
+       /**
+        * Builds a signed [`Bolt12Invoice`] after checking for valid semantics.
+        */
+       public Result_Bolt12InvoiceBolt12SemanticErrorZ build_and_sign() {
+               long ret = bindings.InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_Bolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(this); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid this being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after this call, this is reset to null and is now a dummy object.
+               this.ptr = 0;;
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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.
+        */
+       public void relative_expiry(int relative_expiry_secs) {
+               bindings.InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(this.ptr, relative_expiry_secs);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(relative_expiry_secs);
+               if (this != null) { this.ptrs_to.add(this); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid this being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after this call, this is reset to null and is now a dummy object.
+               this.ptr = 0;;
+       }
+
+       /**
+        * 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.
+        */
+       public void fallback_v0_p2wsh(byte[] script_hash) {
+               bindings.InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(this.ptr, InternalUtils.check_arr_len(script_hash, 32));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(script_hash);
+               if (this != null) { this.ptrs_to.add(this); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid this being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after this call, this is reset to null and is now a dummy object.
+               this.ptr = 0;;
+       }
+
+       /**
+        * 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.
+        */
+       public void fallback_v0_p2wpkh(byte[] pubkey_hash) {
+               bindings.InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(this.ptr, InternalUtils.check_arr_len(pubkey_hash, 20));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(pubkey_hash);
+               if (this != null) { this.ptrs_to.add(this); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid this being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after this call, this is reset to null and is now a dummy object.
+               this.ptr = 0;;
+       }
+
+       /**
+        * 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.
+        */
+       public void fallback_v1_p2tr_tweaked(byte[] utput_key) {
+               bindings.InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this.ptr, InternalUtils.check_arr_len(utput_key, 32));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(utput_key);
+               if (this != null) { this.ptrs_to.add(this); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid this being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after this call, this is reset to null and is now a dummy object.
+               this.ptr = 0;;
+       }
+
+       /**
+        * Sets [`Bolt12Invoice::invoice_features`] to indicate MPP may be used. Otherwise, MPP is
+        * disallowed.
+        */
+       public void allow_mpp() {
+               bindings.InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(this.ptr);
+               Reference.reachabilityFence(this);
+               if (this != null) { this.ptrs_to.add(this); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid this being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after this call, this is reset to null and is now a dummy object.
+               this.ptr = 0;;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/InvoiceWithExplicitSigningPubkeyBuilder.java b/src/main/java/org/ldk/structs/InvoiceWithExplicitSigningPubkeyBuilder.java
new file mode 100644 (file)
index 0000000..5843ee2
--- /dev/null
@@ -0,0 +1,155 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Builds a [`Bolt12Invoice`] from either:
+ * - an [`InvoiceRequest`] for the \"offer to be paid\" flow or
+ * - a [`Refund`] for the \"offer for money\" flow.
+ * 
+ * See [module-level documentation] for usage.
+ * 
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`Refund`]: crate::offers::refund::Refund
+ * [module-level documentation]: self
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class InvoiceWithExplicitSigningPubkeyBuilder extends CommonBase {
+       InvoiceWithExplicitSigningPubkeyBuilder(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.InvoiceWithExplicitSigningPubkeyBuilder_free(ptr); }
+       }
+
+       /**
+        * Builds an unsigned [`Bolt12Invoice`] after checking for valid semantics. It can be signed by
+        * [`UnsignedBolt12Invoice::sign`].
+        */
+       public Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ build() {
+               long ret = bindings.InvoiceWithExplicitSigningPubkeyBuilder_build(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(this); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid this being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after this call, this is reset to null and is now a dummy object.
+               this.ptr = 0;;
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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.
+        */
+       public void relative_expiry(int relative_expiry_secs) {
+               bindings.InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(this.ptr, relative_expiry_secs);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(relative_expiry_secs);
+               if (this != null) { this.ptrs_to.add(this); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid this being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after this call, this is reset to null and is now a dummy object.
+               this.ptr = 0;;
+       }
+
+       /**
+        * 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.
+        */
+       public void fallback_v0_p2wsh(byte[] script_hash) {
+               bindings.InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(this.ptr, InternalUtils.check_arr_len(script_hash, 32));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(script_hash);
+               if (this != null) { this.ptrs_to.add(this); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid this being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after this call, this is reset to null and is now a dummy object.
+               this.ptr = 0;;
+       }
+
+       /**
+        * 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.
+        */
+       public void fallback_v0_p2wpkh(byte[] pubkey_hash) {
+               bindings.InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(this.ptr, InternalUtils.check_arr_len(pubkey_hash, 20));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(pubkey_hash);
+               if (this != null) { this.ptrs_to.add(this); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid this being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after this call, this is reset to null and is now a dummy object.
+               this.ptr = 0;;
+       }
+
+       /**
+        * 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.
+        */
+       public void fallback_v1_p2tr_tweaked(byte[] utput_key) {
+               bindings.InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this.ptr, InternalUtils.check_arr_len(utput_key, 32));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(utput_key);
+               if (this != null) { this.ptrs_to.add(this); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid this being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after this call, this is reset to null and is now a dummy object.
+               this.ptr = 0;;
+       }
+
+       /**
+        * Sets [`Bolt12Invoice::invoice_features`] to indicate MPP may be used. Otherwise, MPP is
+        * disallowed.
+        */
+       public void allow_mpp() {
+               bindings.InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(this.ptr);
+               Reference.reachabilityFence(this);
+               if (this != null) { this.ptrs_to.add(this); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid this being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after this call, this is reset to null and is now a dummy object.
+               this.ptr = 0;;
+       }
+
+}
index ed39c4d6dae558dfedf5541e337e79ecfab35faf..9864b42b235cf30735607d929455cc446539b79b 100644 (file)
@@ -108,25 +108,25 @@ public class KVStore extends CommonBase {
                        @Override public long read(String primary_namespace, String secondary_namespace, String key) {
                                Result_CVec_u8ZIOErrorZ ret = arg.read(primary_namespace, secondary_namespace, key);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long write(String primary_namespace, String secondary_namespace, String key, byte[] buf) {
                                Result_NoneIOErrorZ ret = arg.write(primary_namespace, secondary_namespace, key, buf);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long remove(String primary_namespace, String secondary_namespace, String key, boolean lazy) {
                                Result_NoneIOErrorZ ret = arg.remove(primary_namespace, secondary_namespace, key, lazy);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long list(String primary_namespace, String secondary_namespace) {
                                Result_CVec_StrZIOErrorZ ret = arg.list(primary_namespace, secondary_namespace);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                });
index 02fcf7115d0ca74e49a071d6c62f309a20b9ba62..4aa05cae74d89d8abab6895d4e78cb00d2f97259 100644 (file)
@@ -106,40 +106,6 @@ public class KeysManager extends CommonBase {
                return ret_hu_conv;
        }
 
-       /**
-        * Creates a [`Transaction`] which spends the given descriptors to the given outputs, plus an
-        * output to the given change destination (if sufficient change value remains). The
-        * transaction will have a feerate, at least, of the given value.
-        * 
-        * The `locktime` argument is used to set the transaction's locktime. If `None`, the
-        * transaction will have a locktime of 0. It it recommended to set this to the current block
-        * height to avoid fee sniping, unless you have some specific reason to use a different
-        * locktime.
-        * 
-        * Returns `Err(())` if the output value is greater than the input value minus required fee,
-        * if a descriptor was duplicated, or if an output descriptor `script_pubkey`
-        * does not match the one we can spend.
-        * 
-        * We do not enforce that outputs meet the dust limit or that any output scripts are standard.
-        * 
-        * May panic if the [`SpendableOutputDescriptor`]s were not generated by channels which used
-        * this [`KeysManager`] or one of the [`InMemorySigner`] created by this [`KeysManager`].
-        */
-       public Result_TransactionNoneZ spend_spendable_outputs(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, org.ldk.structs.Option_u32Z locktime) {
-               long ret = bindings.KeysManager_spend_spendable_outputs(this.ptr, descriptors != null ? Arrays.stream(descriptors).mapToLong(descriptors_conv_27 -> descriptors_conv_27.ptr).toArray() : null, outputs != null ? Arrays.stream(outputs).mapToLong(outputs_conv_7 -> outputs_conv_7.ptr).toArray() : null, change_destination_script, feerate_sat_per_1000_weight, locktime.ptr);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(descriptors);
-               Reference.reachabilityFence(outputs);
-               Reference.reachabilityFence(change_destination_script);
-               Reference.reachabilityFence(feerate_sat_per_1000_weight);
-               Reference.reachabilityFence(locktime);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
-               for (SpendableOutputDescriptor descriptors_conv_27: descriptors) { if (this != null) { this.ptrs_to.add(descriptors_conv_27); }; };
-               if (this != null) { this.ptrs_to.add(locktime); };
-               return ret_hu_conv;
-       }
-
        /**
         * Constructs a new EntropySource which calls the relevant methods on this_arg.
         * This copies the `inner` pointer in this_arg and thus the returned EntropySource must be freed before this_arg is
@@ -166,6 +132,19 @@ public class KeysManager extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Constructs a new OutputSpender which calls the relevant methods on this_arg.
+        * This copies the `inner` pointer in this_arg and thus the returned OutputSpender must be freed before this_arg is
+        */
+       public OutputSpender as_OutputSpender() {
+               long ret = bindings.KeysManager_as_OutputSpender(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               OutputSpender ret_hu_conv = new OutputSpender(null, ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
        /**
         * Constructs a new SignerProvider which calls the relevant methods on this_arg.
         * This copies the `inner` pointer in this_arg and thus the returned SignerProvider must be freed before this_arg is
index 80794622312fcd30c5d621a8da4b6f49d5816cdb..ada394d95c1f13fc8b3691b301207955e2260f14 100644 (file)
@@ -93,7 +93,7 @@ public class Listen extends CommonBase {
         * possibly filtered.
         */
        public void filtered_block_connected(byte[] header, TwoTuple_usizeTransactionZ[] txdata, int height) {
-               bindings.Listen_filtered_block_connected(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28 != null ? txdata_conv_28.ptr : 0).toArray() : null, height);
+               bindings.Listen_filtered_block_connected(this.ptr, InternalUtils.check_arr_len(header, 80), txdata != null ? Arrays.stream(txdata).mapToLong(txdata_conv_28 -> txdata_conv_28.ptr).toArray() : null, height);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(header);
                Reference.reachabilityFence(txdata);
index 15837fd3044e27affb9b9e818037772fafdb0011..2bd6f0c100681c73c7cd8a3f06e29f25813472a3 100644 (file)
@@ -9,7 +9,7 @@ import javax.annotation.Nullable;
 
 
 /**
- * Options for how to set the max dust HTLC exposure allowed on a channel. See
+ * Options for how to set the max dust exposure allowed on a channel. See
  * [`ChannelConfig::max_dust_htlc_exposure`] for details.
  */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
@@ -50,19 +50,17 @@ public class MaxDustHTLCExposure extends CommonBase {
                }
        }
        /**
-        * This sets a multiplier on the estimated high priority feerate (sats/KW, as obtained from
-        * [`FeeEstimator`]) to determine the maximum allowed dust exposure. If this variant is used
-        * then the maximum dust exposure in millisatoshis is calculated as:
-        * `high_priority_feerate_per_kw * value`. For example, with our default value
-        * `FeeRateMultiplier(5000)`:
+        * This sets a multiplier on the [`ConfirmationTarget::OnChainSweep`] feerate (in sats/KW) to
+        * determine the maximum allowed dust exposure. If this variant is used then the maximum dust
+        * exposure in millisatoshis is calculated as:
+        * `feerate_per_kw * value`. For example, with our default value
+        * `FeeRateMultiplier(10_000)`:
         * 
         * - For the minimum fee rate of 1 sat/vByte (250 sat/KW, although the minimum
         * defaults to 253 sats/KW for rounding, see [`FeeEstimator`]), the max dust exposure would
-        * be 253 * 5000 = 1,265,000 msats.
+        * be 253 * 10_000 = 2,530,000 msats.
         * - For a fee rate of 30 sat/vByte (7500 sat/KW), the max dust exposure would be
-        * 7500 * 5000 = 37,500,000 msats.
-        * 
-        * This allows the maximum dust exposure to automatically scale with fee rate changes.
+        * 7500 * 50_000 = 75,000,000 msats (0.00075 BTC).
         * 
         * Note, if you're using a third-party fee estimator, this may leave you more exposed to a
         * fee griefing attack, where your fee estimator may purposely overestimate the fee rate,
@@ -77,6 +75,7 @@ public class MaxDustHTLCExposure extends CommonBase {
         * by default this will be set to a [`Self::FixedLimitMsat`] of 5,000,000 msat.
         * 
         * [`FeeEstimator`]: crate::chain::chaininterface::FeeEstimator
+        * [`ConfirmationTarget::OnChainSweep`]: crate::chain::chaininterface::ConfirmationTarget::OnChainSweep
         */
        public final static class FeeRateMultiplier extends MaxDustHTLCExposure {
                public final long fee_rate_multiplier;
@@ -132,7 +131,7 @@ public class MaxDustHTLCExposure extends CommonBase {
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.MaxDustHTLCExposure b) {
-               boolean ret = bindings.MaxDustHTLCExposure_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.MaxDustHTLCExposure_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
index a00d5e0a234849faac4648fd85b8def419d113ac..04c36d21d68f737fdda7c6db4bb82d59055f282b 100644 (file)
@@ -56,13 +56,13 @@ public class MessageRouter extends CommonBase {
                                if (destination_hu_conv != null) { destination_hu_conv.ptrs_to.add(this); };
                                Result_OnionMessagePathNoneZ ret = arg.find_path(sender, peers, destination_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long create_blinded_paths(byte[] recipient, byte[][] peers) {
                                Result_CVec_BlindedPathZNoneZ ret = arg.create_blinded_paths(recipient, peers);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                });
index 595ad52fcc6f2eb096aa41fbf43d33dd2c770838..61d968b9ee5c5b2c18051be15f4aa91355e15bb9 100644 (file)
@@ -935,7 +935,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendAcceptChannel-variant MessageSendEvent
         */
        public static MessageSendEvent send_accept_channel(byte[] node_id, org.ldk.structs.AcceptChannel msg) {
-               long ret = bindings.MessageSendEvent_send_accept_channel(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_accept_channel(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -949,7 +949,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendAcceptChannelV2-variant MessageSendEvent
         */
        public static MessageSendEvent send_accept_channel_v2(byte[] node_id, org.ldk.structs.AcceptChannelV2 msg) {
-               long ret = bindings.MessageSendEvent_send_accept_channel_v2(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_accept_channel_v2(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -963,7 +963,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendOpenChannel-variant MessageSendEvent
         */
        public static MessageSendEvent send_open_channel(byte[] node_id, org.ldk.structs.OpenChannel msg) {
-               long ret = bindings.MessageSendEvent_send_open_channel(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_open_channel(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -977,7 +977,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendOpenChannelV2-variant MessageSendEvent
         */
        public static MessageSendEvent send_open_channel_v2(byte[] node_id, org.ldk.structs.OpenChannelV2 msg) {
-               long ret = bindings.MessageSendEvent_send_open_channel_v2(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_open_channel_v2(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -991,7 +991,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendFundingCreated-variant MessageSendEvent
         */
        public static MessageSendEvent send_funding_created(byte[] node_id, org.ldk.structs.FundingCreated msg) {
-               long ret = bindings.MessageSendEvent_send_funding_created(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_funding_created(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1005,7 +1005,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendFundingSigned-variant MessageSendEvent
         */
        public static MessageSendEvent send_funding_signed(byte[] node_id, org.ldk.structs.FundingSigned msg) {
-               long ret = bindings.MessageSendEvent_send_funding_signed(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_funding_signed(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1019,7 +1019,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendStfu-variant MessageSendEvent
         */
        public static MessageSendEvent send_stfu(byte[] node_id, org.ldk.structs.Stfu msg) {
-               long ret = bindings.MessageSendEvent_send_stfu(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_stfu(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1033,7 +1033,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendSplice-variant MessageSendEvent
         */
        public static MessageSendEvent send_splice(byte[] node_id, org.ldk.structs.Splice msg) {
-               long ret = bindings.MessageSendEvent_send_splice(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_splice(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1047,7 +1047,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendSpliceAck-variant MessageSendEvent
         */
        public static MessageSendEvent send_splice_ack(byte[] node_id, org.ldk.structs.SpliceAck msg) {
-               long ret = bindings.MessageSendEvent_send_splice_ack(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_splice_ack(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1061,7 +1061,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendSpliceLocked-variant MessageSendEvent
         */
        public static MessageSendEvent send_splice_locked(byte[] node_id, org.ldk.structs.SpliceLocked msg) {
-               long ret = bindings.MessageSendEvent_send_splice_locked(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_splice_locked(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1075,7 +1075,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendTxAddInput-variant MessageSendEvent
         */
        public static MessageSendEvent send_tx_add_input(byte[] node_id, org.ldk.structs.TxAddInput msg) {
-               long ret = bindings.MessageSendEvent_send_tx_add_input(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_tx_add_input(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1089,7 +1089,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendTxAddOutput-variant MessageSendEvent
         */
        public static MessageSendEvent send_tx_add_output(byte[] node_id, org.ldk.structs.TxAddOutput msg) {
-               long ret = bindings.MessageSendEvent_send_tx_add_output(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_tx_add_output(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1103,7 +1103,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendTxRemoveInput-variant MessageSendEvent
         */
        public static MessageSendEvent send_tx_remove_input(byte[] node_id, org.ldk.structs.TxRemoveInput msg) {
-               long ret = bindings.MessageSendEvent_send_tx_remove_input(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_tx_remove_input(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1117,7 +1117,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendTxRemoveOutput-variant MessageSendEvent
         */
        public static MessageSendEvent send_tx_remove_output(byte[] node_id, org.ldk.structs.TxRemoveOutput msg) {
-               long ret = bindings.MessageSendEvent_send_tx_remove_output(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_tx_remove_output(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1131,7 +1131,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendTxComplete-variant MessageSendEvent
         */
        public static MessageSendEvent send_tx_complete(byte[] node_id, org.ldk.structs.TxComplete msg) {
-               long ret = bindings.MessageSendEvent_send_tx_complete(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_tx_complete(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1145,7 +1145,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendTxSignatures-variant MessageSendEvent
         */
        public static MessageSendEvent send_tx_signatures(byte[] node_id, org.ldk.structs.TxSignatures msg) {
-               long ret = bindings.MessageSendEvent_send_tx_signatures(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_tx_signatures(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1159,7 +1159,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendTxInitRbf-variant MessageSendEvent
         */
        public static MessageSendEvent send_tx_init_rbf(byte[] node_id, org.ldk.structs.TxInitRbf msg) {
-               long ret = bindings.MessageSendEvent_send_tx_init_rbf(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_tx_init_rbf(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1173,7 +1173,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendTxAckRbf-variant MessageSendEvent
         */
        public static MessageSendEvent send_tx_ack_rbf(byte[] node_id, org.ldk.structs.TxAckRbf msg) {
-               long ret = bindings.MessageSendEvent_send_tx_ack_rbf(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_tx_ack_rbf(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1187,7 +1187,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendTxAbort-variant MessageSendEvent
         */
        public static MessageSendEvent send_tx_abort(byte[] node_id, org.ldk.structs.TxAbort msg) {
-               long ret = bindings.MessageSendEvent_send_tx_abort(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_tx_abort(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1201,7 +1201,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendChannelReady-variant MessageSendEvent
         */
        public static MessageSendEvent send_channel_ready(byte[] node_id, org.ldk.structs.ChannelReady msg) {
-               long ret = bindings.MessageSendEvent_send_channel_ready(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_channel_ready(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1215,7 +1215,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendAnnouncementSignatures-variant MessageSendEvent
         */
        public static MessageSendEvent send_announcement_signatures(byte[] node_id, org.ldk.structs.AnnouncementSignatures msg) {
-               long ret = bindings.MessageSendEvent_send_announcement_signatures(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_announcement_signatures(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1229,7 +1229,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new UpdateHTLCs-variant MessageSendEvent
         */
        public static MessageSendEvent update_htlcs(byte[] node_id, org.ldk.structs.CommitmentUpdate updates) {
-               long ret = bindings.MessageSendEvent_update_htlcs(InternalUtils.check_arr_len(node_id, 33), updates == null ? 0 : updates.ptr);
+               long ret = bindings.MessageSendEvent_update_htlcs(InternalUtils.check_arr_len(node_id, 33), updates.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(updates);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1243,7 +1243,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendRevokeAndACK-variant MessageSendEvent
         */
        public static MessageSendEvent send_revoke_and_ack(byte[] node_id, org.ldk.structs.RevokeAndACK msg) {
-               long ret = bindings.MessageSendEvent_send_revoke_and_ack(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_revoke_and_ack(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1257,7 +1257,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendClosingSigned-variant MessageSendEvent
         */
        public static MessageSendEvent send_closing_signed(byte[] node_id, org.ldk.structs.ClosingSigned msg) {
-               long ret = bindings.MessageSendEvent_send_closing_signed(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_closing_signed(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1271,7 +1271,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendShutdown-variant MessageSendEvent
         */
        public static MessageSendEvent send_shutdown(byte[] node_id, org.ldk.structs.Shutdown msg) {
-               long ret = bindings.MessageSendEvent_send_shutdown(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_shutdown(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1285,7 +1285,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendChannelReestablish-variant MessageSendEvent
         */
        public static MessageSendEvent send_channel_reestablish(byte[] node_id, org.ldk.structs.ChannelReestablish msg) {
-               long ret = bindings.MessageSendEvent_send_channel_reestablish(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_channel_reestablish(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1299,7 +1299,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendChannelAnnouncement-variant MessageSendEvent
         */
        public static MessageSendEvent send_channel_announcement(byte[] node_id, org.ldk.structs.ChannelAnnouncement msg, org.ldk.structs.ChannelUpdate update_msg) {
-               long ret = bindings.MessageSendEvent_send_channel_announcement(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr, update_msg == null ? 0 : update_msg.ptr);
+               long ret = bindings.MessageSendEvent_send_channel_announcement(InternalUtils.check_arr_len(node_id, 33), msg.ptr, update_msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                Reference.reachabilityFence(update_msg);
@@ -1315,7 +1315,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new BroadcastChannelAnnouncement-variant MessageSendEvent
         */
        public static MessageSendEvent broadcast_channel_announcement(org.ldk.structs.ChannelAnnouncement msg, org.ldk.structs.ChannelUpdate update_msg) {
-               long ret = bindings.MessageSendEvent_broadcast_channel_announcement(msg == null ? 0 : msg.ptr, update_msg == null ? 0 : update_msg.ptr);
+               long ret = bindings.MessageSendEvent_broadcast_channel_announcement(msg.ptr, update_msg.ptr);
                Reference.reachabilityFence(msg);
                Reference.reachabilityFence(update_msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1330,7 +1330,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new BroadcastChannelUpdate-variant MessageSendEvent
         */
        public static MessageSendEvent broadcast_channel_update(org.ldk.structs.ChannelUpdate msg) {
-               long ret = bindings.MessageSendEvent_broadcast_channel_update(msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_broadcast_channel_update(msg.ptr);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
@@ -1343,7 +1343,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new BroadcastNodeAnnouncement-variant MessageSendEvent
         */
        public static MessageSendEvent broadcast_node_announcement(org.ldk.structs.NodeAnnouncement msg) {
-               long ret = bindings.MessageSendEvent_broadcast_node_announcement(msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_broadcast_node_announcement(msg.ptr);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.MessageSendEvent ret_hu_conv = org.ldk.structs.MessageSendEvent.constr_from_ptr(ret);
@@ -1356,7 +1356,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendChannelUpdate-variant MessageSendEvent
         */
        public static MessageSendEvent send_channel_update(byte[] node_id, org.ldk.structs.ChannelUpdate msg) {
-               long ret = bindings.MessageSendEvent_send_channel_update(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_channel_update(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1384,7 +1384,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendChannelRangeQuery-variant MessageSendEvent
         */
        public static MessageSendEvent send_channel_range_query(byte[] node_id, org.ldk.structs.QueryChannelRange msg) {
-               long ret = bindings.MessageSendEvent_send_channel_range_query(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_channel_range_query(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1398,7 +1398,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendShortIdsQuery-variant MessageSendEvent
         */
        public static MessageSendEvent send_short_ids_query(byte[] node_id, org.ldk.structs.QueryShortChannelIds msg) {
-               long ret = bindings.MessageSendEvent_send_short_ids_query(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_short_ids_query(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1412,7 +1412,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendReplyChannelRange-variant MessageSendEvent
         */
        public static MessageSendEvent send_reply_channel_range(byte[] node_id, org.ldk.structs.ReplyChannelRange msg) {
-               long ret = bindings.MessageSendEvent_send_reply_channel_range(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_reply_channel_range(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -1426,7 +1426,7 @@ public class MessageSendEvent extends CommonBase {
         * Utility method to constructs a new SendGossipTimestampFilter-variant MessageSendEvent
         */
        public static MessageSendEvent send_gossip_timestamp_filter(byte[] node_id, org.ldk.structs.GossipTimestampFilter msg) {
-               long ret = bindings.MessageSendEvent_send_gossip_timestamp_filter(InternalUtils.check_arr_len(node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.MessageSendEvent_send_gossip_timestamp_filter(InternalUtils.check_arr_len(node_id, 33), msg.ptr);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
index 85194aeaa62b49a1eac52e743f6d59ab78ff9075..05e7e15473aea39031143ea158454c846f303b0f 100644 (file)
@@ -50,7 +50,7 @@ public class MessageSendEventsProvider extends CommonBase {
                        @Override public long[] get_and_clear_pending_msg_events() {
                                MessageSendEvent[] ret = arg.get_and_clear_pending_msg_events();
                                Reference.reachabilityFence(arg);
-                               long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_18 -> ret_conv_18 == null ? 0 : ret_conv_18.clone_ptr()).toArray() : null;
+                               long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_18 -> ret_conv_18.clone_ptr()).toArray() : null;
                                for (MessageSendEvent ret_conv_18: ret) { if (impl_holder.held != null) { impl_holder.held.ptrs_to.add(ret_conv_18); }; };
                                return result;
                        }
index c67801dc31ea63806fb97004aee0dc235db1a909..67cdf11e35adc3d4f10331919316659d5c402e30 100644 (file)
@@ -80,7 +80,7 @@ public class MinFinalCltvExpiryDelta extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.MinFinalCltvExpiryDelta b) {
-               boolean ret = bindings.MinFinalCltvExpiryDelta_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.MinFinalCltvExpiryDelta_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 7f8ae11f03ac288e4b4c01f47b59c3b467a792af..5908a1de4fdad31cad65bc1e4a970cfdbf26c7eb 100644 (file)
@@ -24,6 +24,9 @@ public class MonitorEvent extends CommonBase {
                if (raw_val.getClass() == bindings.LDKMonitorEvent.HTLCEvent.class) {
                        return new HTLCEvent(ptr, (bindings.LDKMonitorEvent.HTLCEvent)raw_val);
                }
+               if (raw_val.getClass() == bindings.LDKMonitorEvent.HolderForceClosedWithInfo.class) {
+                       return new HolderForceClosedWithInfo(ptr, (bindings.LDKMonitorEvent.HolderForceClosedWithInfo)raw_val);
+               }
                if (raw_val.getClass() == bindings.LDKMonitorEvent.HolderForceClosed.class) {
                        return new HolderForceClosed(ptr, (bindings.LDKMonitorEvent.HolderForceClosed)raw_val);
                }
@@ -46,6 +49,39 @@ public class MonitorEvent extends CommonBase {
                        this.htlc_event = htlc_event_hu_conv;
                }
        }
+       /**
+        * Indicates we broadcasted the channel's latest commitment transaction and thus closed the
+        * channel. Holds information about the channel and why it was closed.
+        */
+       public final static class HolderForceClosedWithInfo extends MonitorEvent {
+               /**
+                * The reason the channel was closed.
+               */
+               public final org.ldk.structs.ClosureReason reason;
+               /**
+                * The funding outpoint of the channel.
+               */
+               public final org.ldk.structs.OutPoint outpoint;
+               /**
+                * The channel ID of the channel.
+               */
+               public final org.ldk.structs.ChannelId channel_id;
+               private HolderForceClosedWithInfo(long ptr, bindings.LDKMonitorEvent.HolderForceClosedWithInfo obj) {
+                       super(null, ptr);
+                       long reason = obj.reason;
+                       org.ldk.structs.ClosureReason reason_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(reason);
+                       if (reason_hu_conv != null) { reason_hu_conv.ptrs_to.add(this); };
+                       this.reason = reason_hu_conv;
+                       long outpoint = obj.outpoint;
+                       org.ldk.structs.OutPoint outpoint_hu_conv = null; if (outpoint < 0 || outpoint > 4096) { outpoint_hu_conv = new org.ldk.structs.OutPoint(null, outpoint); }
+                       if (outpoint_hu_conv != null) { outpoint_hu_conv.ptrs_to.add(this); };
+                       this.outpoint = outpoint_hu_conv;
+                       long channel_id = obj.channel_id;
+                       org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); }
+                       if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
+                       this.channel_id = channel_id_hu_conv;
+               }
+       }
        /**
         * Indicates we broadcasted the channel's latest commitment transaction and thus closed the
         * channel.
@@ -71,6 +107,10 @@ public class MonitorEvent extends CommonBase {
                 * The funding outpoint of the [`ChannelMonitor`] that was updated
                */
                public final org.ldk.structs.OutPoint funding_txo;
+               /**
+                * The channel ID of the channel associated with the [`ChannelMonitor`]
+               */
+               public final org.ldk.structs.ChannelId channel_id;
                /**
                 * The Update ID from [`ChannelMonitorUpdate::update_id`] which was applied or
                 * [`ChannelMonitor::get_latest_update_id`].
@@ -85,6 +125,10 @@ public class MonitorEvent extends CommonBase {
                        org.ldk.structs.OutPoint funding_txo_hu_conv = null; if (funding_txo < 0 || funding_txo > 4096) { funding_txo_hu_conv = new org.ldk.structs.OutPoint(null, funding_txo); }
                        if (funding_txo_hu_conv != null) { funding_txo_hu_conv.ptrs_to.add(this); };
                        this.funding_txo = funding_txo_hu_conv;
+                       long channel_id = obj.channel_id;
+                       org.ldk.structs.ChannelId channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.ChannelId(null, channel_id); }
+                       if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
+                       this.channel_id = channel_id_hu_conv;
                        this.monitor_update_id = obj.monitor_update_id;
                }
        }
@@ -110,7 +154,7 @@ public class MonitorEvent extends CommonBase {
         * Utility method to constructs a new HTLCEvent-variant MonitorEvent
         */
        public static MonitorEvent htlcevent(org.ldk.structs.HTLCUpdate a) {
-               long ret = bindings.MonitorEvent_htlcevent(a == null ? 0 : a.ptr);
+               long ret = bindings.MonitorEvent_htlcevent(a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.MonitorEvent ret_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret);
@@ -119,11 +163,28 @@ public class MonitorEvent extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new HolderForceClosedWithInfo-variant MonitorEvent
+        */
+       public static MonitorEvent holder_force_closed_with_info(org.ldk.structs.ClosureReason reason, org.ldk.structs.OutPoint outpoint, org.ldk.structs.ChannelId channel_id) {
+               long ret = bindings.MonitorEvent_holder_force_closed_with_info(reason.ptr, outpoint.ptr, channel_id.ptr);
+               Reference.reachabilityFence(reason);
+               Reference.reachabilityFence(outpoint);
+               Reference.reachabilityFence(channel_id);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.MonitorEvent ret_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(reason); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(outpoint); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); };
+               return ret_hu_conv;
+       }
+
        /**
         * Utility method to constructs a new HolderForceClosed-variant MonitorEvent
         */
        public static MonitorEvent holder_force_closed(org.ldk.structs.OutPoint a) {
-               long ret = bindings.MonitorEvent_holder_force_closed(a == null ? 0 : a.ptr);
+               long ret = bindings.MonitorEvent_holder_force_closed(a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.MonitorEvent ret_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret);
@@ -135,14 +196,16 @@ public class MonitorEvent extends CommonBase {
        /**
         * Utility method to constructs a new Completed-variant MonitorEvent
         */
-       public static MonitorEvent completed(org.ldk.structs.OutPoint funding_txo, long monitor_update_id) {
-               long ret = bindings.MonitorEvent_completed(funding_txo == null ? 0 : funding_txo.ptr, monitor_update_id);
+       public static MonitorEvent completed(org.ldk.structs.OutPoint funding_txo, org.ldk.structs.ChannelId channel_id, long monitor_update_id) {
+               long ret = bindings.MonitorEvent_completed(funding_txo.ptr, channel_id.ptr, monitor_update_id);
                Reference.reachabilityFence(funding_txo);
+               Reference.reachabilityFence(channel_id);
                Reference.reachabilityFence(monitor_update_id);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.MonitorEvent ret_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(funding_txo); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id); };
                return ret_hu_conv;
        }
 
@@ -151,7 +214,7 @@ public class MonitorEvent extends CommonBase {
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.MonitorEvent b) {
-               boolean ret = bindings.MonitorEvent_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.MonitorEvent_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
index eb3e74c9708d00e21e11fd8e65ed54283a643d2e..14c6d5ca2207049a0808433768beb106907e1191 100644 (file)
@@ -56,7 +56,7 @@ public class MonitorUpdateId extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.MonitorUpdateId b) {
-               boolean ret = bindings.MonitorUpdateId_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.MonitorUpdateId_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index adb402ffd7005505f900d715d833bcd664639cfe..fd6651282ca935ba6a57871d515ce8e6b9c29e17 100644 (file)
@@ -28,7 +28,7 @@ public class NetworkGraph extends CommonBase {
         * [`Event`]: crate::events::Event
         */
        public void handle_network_update(org.ldk.structs.NetworkUpdate network_update) {
-               bindings.NetworkGraph_handle_network_update(this.ptr, network_update == null ? 0 : network_update.ptr);
+               bindings.NetworkGraph_handle_network_update(this.ptr, network_update.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(network_update);
        }
@@ -122,7 +122,7 @@ public class NetworkGraph extends CommonBase {
         * routing messages from a source using a protocol other than the lightning P2P protocol.
         */
        public Result_NoneLightningErrorZ update_node_from_announcement(org.ldk.structs.NodeAnnouncement msg) {
-               long ret = bindings.NetworkGraph_update_node_from_announcement(this.ptr, msg == null ? 0 : msg.ptr);
+               long ret = bindings.NetworkGraph_update_node_from_announcement(this.ptr, msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -138,7 +138,7 @@ public class NetworkGraph extends CommonBase {
         * peers.
         */
        public Result_NoneLightningErrorZ update_node_from_unsigned_announcement(org.ldk.structs.UnsignedNodeAnnouncement msg) {
-               long ret = bindings.NetworkGraph_update_node_from_unsigned_announcement(this.ptr, msg == null ? 0 : msg.ptr);
+               long ret = bindings.NetworkGraph_update_node_from_unsigned_announcement(this.ptr, msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -158,7 +158,7 @@ public class NetworkGraph extends CommonBase {
         * the corresponding UTXO exists on chain and is correctly-formatted.
         */
        public Result_NoneLightningErrorZ update_channel_from_announcement(org.ldk.structs.ChannelAnnouncement msg, org.ldk.structs.Option_UtxoLookupZ utxo_lookup) {
-               long ret = bindings.NetworkGraph_update_channel_from_announcement(this.ptr, msg == null ? 0 : msg.ptr, utxo_lookup.ptr);
+               long ret = bindings.NetworkGraph_update_channel_from_announcement(this.ptr, msg.ptr, utxo_lookup.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(msg);
                Reference.reachabilityFence(utxo_lookup);
@@ -179,7 +179,7 @@ public class NetworkGraph extends CommonBase {
         * This will skip verification of if the channel is actually on-chain.
         */
        public Result_NoneLightningErrorZ update_channel_from_announcement_no_lookup(org.ldk.structs.ChannelAnnouncement msg) {
-               long ret = bindings.NetworkGraph_update_channel_from_announcement_no_lookup(this.ptr, msg == null ? 0 : msg.ptr);
+               long ret = bindings.NetworkGraph_update_channel_from_announcement_no_lookup(this.ptr, msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -197,7 +197,7 @@ public class NetworkGraph extends CommonBase {
         * the corresponding UTXO exists on chain and is correctly-formatted.
         */
        public Result_NoneLightningErrorZ update_channel_from_unsigned_announcement(org.ldk.structs.UnsignedChannelAnnouncement msg, org.ldk.structs.Option_UtxoLookupZ utxo_lookup) {
-               long ret = bindings.NetworkGraph_update_channel_from_unsigned_announcement(this.ptr, msg == null ? 0 : msg.ptr, utxo_lookup.ptr);
+               long ret = bindings.NetworkGraph_update_channel_from_unsigned_announcement(this.ptr, msg.ptr, utxo_lookup.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(msg);
                Reference.reachabilityFence(utxo_lookup);
@@ -217,7 +217,7 @@ public class NetworkGraph extends CommonBase {
         * All other parameters as used in [`msgs::UnsignedChannelAnnouncement`] fields.
         */
        public Result_NoneLightningErrorZ add_channel_from_partial_announcement(long short_channel_id, long timestamp, org.ldk.structs.ChannelFeatures features, byte[] node_id_1, byte[] node_id_2) {
-               long ret = bindings.NetworkGraph_add_channel_from_partial_announcement(this.ptr, short_channel_id, timestamp, features == null ? 0 : features.ptr, InternalUtils.check_arr_len(node_id_1, 33), InternalUtils.check_arr_len(node_id_2, 33));
+               long ret = bindings.NetworkGraph_add_channel_from_partial_announcement(this.ptr, short_channel_id, timestamp, features.ptr, InternalUtils.check_arr_len(node_id_1, 33), InternalUtils.check_arr_len(node_id_2, 33));
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(short_channel_id);
                Reference.reachabilityFence(timestamp);
@@ -307,7 +307,7 @@ public class NetworkGraph extends CommonBase {
         * materially in the future will be rejected.
         */
        public Result_NoneLightningErrorZ update_channel(org.ldk.structs.ChannelUpdate msg) {
-               long ret = bindings.NetworkGraph_update_channel(this.ptr, msg == null ? 0 : msg.ptr);
+               long ret = bindings.NetworkGraph_update_channel(this.ptr, msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -325,7 +325,7 @@ public class NetworkGraph extends CommonBase {
         * materially in the future will be rejected.
         */
        public Result_NoneLightningErrorZ update_channel_unsigned(org.ldk.structs.UnsignedChannelUpdate msg) {
-               long ret = bindings.NetworkGraph_update_channel_unsigned(this.ptr, msg == null ? 0 : msg.ptr);
+               long ret = bindings.NetworkGraph_update_channel_unsigned(this.ptr, msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -343,7 +343,7 @@ public class NetworkGraph extends CommonBase {
         * materially in the future will be rejected.
         */
        public Result_NoneLightningErrorZ verify_channel_update(org.ldk.structs.ChannelUpdate msg) {
-               long ret = bindings.NetworkGraph_verify_channel_update(this.ptr, msg == null ? 0 : msg.ptr);
+               long ret = bindings.NetworkGraph_verify_channel_update(this.ptr, msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
index d03c58f0912b85fb8cfa602ab2a4ec4f11965ef7..e1d1be454199d5282dde2ac081c256262b8df736 100644 (file)
@@ -115,7 +115,7 @@ public class NetworkUpdate extends CommonBase {
         * Utility method to constructs a new ChannelUpdateMessage-variant NetworkUpdate
         */
        public static NetworkUpdate channel_update_message(org.ldk.structs.ChannelUpdate msg) {
-               long ret = bindings.NetworkUpdate_channel_update_message(msg == null ? 0 : msg.ptr);
+               long ret = bindings.NetworkUpdate_channel_update_message(msg.ptr);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.NetworkUpdate ret_hu_conv = org.ldk.structs.NetworkUpdate.constr_from_ptr(ret);
@@ -155,7 +155,7 @@ public class NetworkUpdate extends CommonBase {
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.NetworkUpdate b) {
-               boolean ret = bindings.NetworkUpdate_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.NetworkUpdate_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
diff --git a/src/main/java/org/ldk/structs/NextMessageHop.java b/src/main/java/org/ldk/structs/NextMessageHop.java
new file mode 100644 (file)
index 0000000..8dd7d3d
--- /dev/null
@@ -0,0 +1,124 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * The next hop to forward an onion message along its path.
+ * 
+ * Note that payment blinded paths always specify their next hop using an explicit node id.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class NextMessageHop extends CommonBase {
+       private NextMessageHop(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.NextMessageHop_free(ptr); }
+       }
+       static NextMessageHop constr_from_ptr(long ptr) {
+               bindings.LDKNextMessageHop raw_val = bindings.LDKNextMessageHop_ref_from_ptr(ptr);
+               if (raw_val.getClass() == bindings.LDKNextMessageHop.NodeId.class) {
+                       return new NodeId(ptr, (bindings.LDKNextMessageHop.NodeId)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKNextMessageHop.ShortChannelId.class) {
+                       return new ShortChannelId(ptr, (bindings.LDKNextMessageHop.ShortChannelId)raw_val);
+               }
+               assert false; return null; // Unreachable without extending the (internal) bindings interface
+       }
+
+       /**
+        * The node id of the next hop.
+        */
+       public final static class NodeId extends NextMessageHop {
+               public final byte[] node_id;
+               private NodeId(long ptr, bindings.LDKNextMessageHop.NodeId obj) {
+                       super(null, ptr);
+                       this.node_id = obj.node_id;
+               }
+       }
+       /**
+        * The short channel id leading to the next hop.
+        */
+       public final static class ShortChannelId extends NextMessageHop {
+               public final long short_channel_id;
+               private ShortChannelId(long ptr, bindings.LDKNextMessageHop.ShortChannelId obj) {
+                       super(null, ptr);
+                       this.short_channel_id = obj.short_channel_id;
+               }
+       }
+       long clone_ptr() {
+               long ret = bindings.NextMessageHop_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the NextMessageHop
+        */
+       public NextMessageHop clone() {
+               long ret = bindings.NextMessageHop_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.NextMessageHop ret_hu_conv = org.ldk.structs.NextMessageHop.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new NodeId-variant NextMessageHop
+        */
+       public static NextMessageHop node_id(byte[] a) {
+               long ret = bindings.NextMessageHop_node_id(InternalUtils.check_arr_len(a, 33));
+               Reference.reachabilityFence(a);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.NextMessageHop ret_hu_conv = org.ldk.structs.NextMessageHop.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new ShortChannelId-variant NextMessageHop
+        */
+       public static NextMessageHop short_channel_id(long a) {
+               long ret = bindings.NextMessageHop_short_channel_id(a);
+               Reference.reachabilityFence(a);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.NextMessageHop ret_hu_conv = org.ldk.structs.NextMessageHop.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Generates a non-cryptographic 64-bit hash of the NextMessageHop.
+        */
+       public long hash() {
+               long ret = bindings.NextMessageHop_hash(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       @Override public int hashCode() {
+               return (int)this.hash();
+       }
+       /**
+        * Checks if two NextMessageHops contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public boolean eq(org.ldk.structs.NextMessageHop b) {
+               boolean ret = bindings.NextMessageHop_eq(this.ptr, b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof NextMessageHop)) return false;
+               return this.eq((NextMessageHop)o);
+       }
+}
index 472b597bd90c6f8b8cc3e362de5112e86311493b..7323049976cdbfaf9c34d021d2382839fcbb2288 100644 (file)
@@ -83,7 +83,7 @@ public class NodeAlias extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.NodeAlias b) {
-               boolean ret = bindings.NodeAlias_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.NodeAlias_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index f665ee6589cb43006e6636274b821a13b5f3ae8d..d43231761eda7b11846e2d3b220b290969ca23b8 100644 (file)
@@ -56,7 +56,7 @@ public class NodeAnnouncement extends CommonBase {
         * The actual content of the announcement
         */
        public void set_contents(org.ldk.structs.UnsignedNodeAnnouncement val) {
-               bindings.NodeAnnouncement_set_contents(this.ptr, val == null ? 0 : val.ptr);
+               bindings.NodeAnnouncement_set_contents(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -66,7 +66,7 @@ public class NodeAnnouncement extends CommonBase {
         * Constructs a new NodeAnnouncement given each field
         */
        public static NodeAnnouncement of(byte[] signature_arg, org.ldk.structs.UnsignedNodeAnnouncement contents_arg) {
-               long ret = bindings.NodeAnnouncement_new(InternalUtils.check_arr_len(signature_arg, 64), contents_arg == null ? 0 : contents_arg.ptr);
+               long ret = bindings.NodeAnnouncement_new(InternalUtils.check_arr_len(signature_arg, 64), contents_arg.ptr);
                Reference.reachabilityFence(signature_arg);
                Reference.reachabilityFence(contents_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -112,7 +112,7 @@ public class NodeAnnouncement extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.NodeAnnouncement b) {
-               boolean ret = bindings.NodeAnnouncement_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.NodeAnnouncement_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 6dd6c51c0e1b4d08ca714a134fe92b5faf7aa97b..92b69eaf4c669d6448d3e111804821c03d2b9e72 100644 (file)
@@ -36,7 +36,7 @@ public class NodeAnnouncementInfo extends CommonBase {
         * Protocol features the node announced support for
         */
        public void set_features(org.ldk.structs.NodeFeatures val) {
-               bindings.NodeAnnouncementInfo_set_features(this.ptr, val == null ? 0 : val.ptr);
+               bindings.NodeAnnouncementInfo_set_features(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -100,7 +100,7 @@ public class NodeAnnouncementInfo extends CommonBase {
         * should not be exposed to the user.
         */
        public void set_alias(org.ldk.structs.NodeAlias val) {
-               bindings.NodeAnnouncementInfo_set_alias(this.ptr, val == null ? 0 : val.ptr);
+               bindings.NodeAnnouncementInfo_set_alias(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -145,7 +145,7 @@ public class NodeAnnouncementInfo extends CommonBase {
         * Note that announcement_message_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public static NodeAnnouncementInfo of(org.ldk.structs.NodeFeatures features_arg, int last_update_arg, byte[] rgb_arg, org.ldk.structs.NodeAlias alias_arg, @Nullable org.ldk.structs.NodeAnnouncement announcement_message_arg) {
-               long ret = bindings.NodeAnnouncementInfo_new(features_arg == null ? 0 : features_arg.ptr, last_update_arg, InternalUtils.check_arr_len(rgb_arg, 3), alias_arg == null ? 0 : alias_arg.ptr, announcement_message_arg == null ? 0 : announcement_message_arg.ptr);
+               long ret = bindings.NodeAnnouncementInfo_new(features_arg.ptr, last_update_arg, InternalUtils.check_arr_len(rgb_arg, 3), alias_arg.ptr, announcement_message_arg == null ? 0 : announcement_message_arg.ptr);
                Reference.reachabilityFence(features_arg);
                Reference.reachabilityFence(last_update_arg);
                Reference.reachabilityFence(rgb_arg);
@@ -184,7 +184,7 @@ public class NodeAnnouncementInfo extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.NodeAnnouncementInfo b) {
-               boolean ret = bindings.NodeAnnouncementInfo_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.NodeAnnouncementInfo_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 032f6f67b5068b800037baf2ec2c36b4e44c0375..bebcc26b8e80fba0d569d094407e64cece13e357 100644 (file)
@@ -26,7 +26,7 @@ public class NodeFeatures extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.NodeFeatures b) {
-               boolean ret = bindings.NodeFeatures_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.NodeFeatures_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -82,7 +82,7 @@ public class NodeFeatures extends CommonBase {
         * Returns true if this `Features` object contains required features unknown by `other`.
         */
        public boolean requires_unknown_bits_from(org.ldk.structs.NodeFeatures other) {
-               boolean ret = bindings.NodeFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr);
+               boolean ret = bindings.NodeFeatures_requires_unknown_bits_from(this.ptr, other.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(other);
                if (this != null) { this.ptrs_to.add(other); };
@@ -803,4 +803,38 @@ public class NodeFeatures extends CommonBase {
                return ret;
        }
 
+       /**
+        * Set this feature as optional.
+        */
+       public void set_trampoline_routing_optional() {
+               bindings.NodeFeatures_set_trampoline_routing_optional(this.ptr);
+               Reference.reachabilityFence(this);
+       }
+
+       /**
+        * Set this feature as required.
+        */
+       public void set_trampoline_routing_required() {
+               bindings.NodeFeatures_set_trampoline_routing_required(this.ptr);
+               Reference.reachabilityFence(this);
+       }
+
+       /**
+        * Checks if this feature is supported.
+        */
+       public boolean supports_trampoline_routing() {
+               boolean ret = bindings.NodeFeatures_supports_trampoline_routing(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Checks if this feature is required.
+        */
+       public boolean requires_trampoline_routing() {
+               boolean ret = bindings.NodeFeatures_requires_trampoline_routing(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
 }
index 830cfdc322e07c2da8fe6258a051e27dedde7faa..73e903f9e0a603b93b4cfd3e8de9bfce59aef231 100644 (file)
@@ -50,6 +50,17 @@ public class NodeId extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Create a new NodeId from a slice of bytes
+        */
+       public static Result_NodeIdDecodeErrorZ from_slice(byte[] bytes) {
+               long ret = bindings.NodeId_from_slice(bytes);
+               Reference.reachabilityFence(bytes);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_NodeIdDecodeErrorZ ret_hu_conv = Result_NodeIdDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
        /**
         * Get the public key slice from this NodeId
         */
diff --git a/src/main/java/org/ldk/structs/NodeIdLookUp.java b/src/main/java/org/ldk/structs/NodeIdLookUp.java
new file mode 100644 (file)
index 0000000..8351d90
--- /dev/null
@@ -0,0 +1,86 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+/**
+ * An interface for looking up the node id of a channel counterparty for the purpose of forwarding
+ * an [`OnionMessage`].
+ * 
+ * [`OnionMessage`]: crate::ln::msgs::OnionMessage
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class NodeIdLookUp extends CommonBase {
+       final bindings.LDKNodeIdLookUp bindings_instance;
+       NodeIdLookUp(Object _dummy, long ptr) { super(ptr); bindings_instance = null; }
+       private NodeIdLookUp(bindings.LDKNodeIdLookUp arg) {
+               super(bindings.LDKNodeIdLookUp_new(arg));
+               this.ptrs_to.add(arg);
+               this.bindings_instance = arg;
+       }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.NodeIdLookUp_free(ptr); } super.finalize();
+       }
+       /**
+        * Destroys the object, freeing associated resources. After this call, any access
+        * to this object may result in a SEGFAULT or worse.
+        *
+        * You should generally NEVER call this method. You should let the garbage collector
+        * do this for you when it finalizes objects. However, it may be useful for types
+        * which represent locks and should be closed immediately to avoid holding locks
+        * until the GC runs.
+        */
+       public void destroy() {
+               if (ptr != 0) { bindings.NodeIdLookUp_free(ptr); }
+               ptr = 0;
+       }
+       public static interface NodeIdLookUpInterface {
+               /**
+                * Returns the node id of the forwarding node's channel counterparty with `short_channel_id`.
+                * 
+                * Here, the forwarding node is referring to the node of the [`OnionMessenger`] parameterized
+                * by the [`NodeIdLookUp`] and the counterparty to one of that node's peers.
+                * 
+                * [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger
+                * 
+                * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+                */
+               byte[] next_node_id(long short_channel_id);
+       }
+       private static class LDKNodeIdLookUpHolder { NodeIdLookUp held; }
+       public static NodeIdLookUp new_impl(NodeIdLookUpInterface arg) {
+               final LDKNodeIdLookUpHolder impl_holder = new LDKNodeIdLookUpHolder();
+               impl_holder.held = new NodeIdLookUp(new bindings.LDKNodeIdLookUp() {
+                       @Override public byte[] next_node_id(long short_channel_id) {
+                               byte[] ret = arg.next_node_id(short_channel_id);
+                               Reference.reachabilityFence(arg);
+                               byte[] result = InternalUtils.check_arr_len(ret, 33);
+                               return result;
+                       }
+               });
+               return impl_holder.held;
+       }
+       /**
+        * Returns the node id of the forwarding node's channel counterparty with `short_channel_id`.
+        * 
+        * Here, the forwarding node is referring to the node of the [`OnionMessenger`] parameterized
+        * by the [`NodeIdLookUp`] and the counterparty to one of that node's peers.
+        * 
+        * [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger
+        * 
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       @Nullable
+       public byte[] next_node_id(long short_channel_id) {
+               byte[] ret = bindings.NodeIdLookUp_next_node_id(this.ptr, short_channel_id);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(short_channel_id);
+               return ret;
+       }
+
+}
index e1617e846f53b1ffd4a75b086e3f3b106665f97c..d65f4332768981b59f0a787b196181c35a417dc0 100644 (file)
@@ -111,7 +111,7 @@ public class NodeInfo extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.NodeInfo b) {
-               boolean ret = bindings.NodeInfo_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.NodeInfo_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -122,6 +122,15 @@ public class NodeInfo extends CommonBase {
                if (!(o instanceof NodeInfo)) return false;
                return this.eq((NodeInfo)o);
        }
+       /**
+        * Returns whether the node has only announced Tor addresses.
+        */
+       public boolean is_tor_only() {
+               boolean ret = bindings.NodeInfo_is_tor_only(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
        /**
         * Serialize the NodeInfo object into a byte array which can be read by NodeInfo_read
         */
index 3b3a7f2bae1760525faf417fd02fded27bd85bd3..2125088727dfc2d327668b4a9356b5ce32948fe4 100644 (file)
@@ -134,7 +134,7 @@ public class NodeSigner extends CommonBase {
                        @Override public long get_node_id(Recipient recipient) {
                                Result_PublicKeyNoneZ ret = arg.get_node_id(recipient);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long ecdh(Recipient recipient, byte[] other_key, long tweak) {
@@ -142,7 +142,7 @@ public class NodeSigner extends CommonBase {
                                if (tweak_hu_conv != null) { tweak_hu_conv.ptrs_to.add(this); };
                                Result_ThirtyTwoBytesNoneZ ret = arg.ecdh(recipient, other_key, tweak_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long sign_invoice(byte[] hrp_bytes, byte[] invoice_data, Recipient recipient) {
@@ -155,21 +155,21 @@ public class NodeSigner extends CommonBase {
                                }
                                Result_RecoverableSignatureNoneZ ret = arg.sign_invoice(hrp_bytes, invoice_data_conv_7_arr, recipient);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long sign_bolt12_invoice_request(long invoice_request) {
                                org.ldk.structs.UnsignedInvoiceRequest invoice_request_hu_conv = null; if (invoice_request < 0 || invoice_request > 4096) { invoice_request_hu_conv = new org.ldk.structs.UnsignedInvoiceRequest(null, invoice_request); }
                                Result_SchnorrSignatureNoneZ ret = arg.sign_bolt12_invoice_request(invoice_request_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long sign_bolt12_invoice(long invoice) {
                                org.ldk.structs.UnsignedBolt12Invoice invoice_hu_conv = null; if (invoice < 0 || invoice > 4096) { invoice_hu_conv = new org.ldk.structs.UnsignedBolt12Invoice(null, invoice); }
                                Result_SchnorrSignatureNoneZ ret = arg.sign_bolt12_invoice(invoice_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long sign_gossip_message(long msg) {
@@ -177,7 +177,7 @@ public class NodeSigner extends CommonBase {
                                if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.add(this); };
                                Result_ECDSASignatureNoneZ ret = arg.sign_gossip_message(msg_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                });
@@ -277,7 +277,7 @@ public class NodeSigner extends CommonBase {
         * [`TaggedHash`]: crate::offers::merkle::TaggedHash
         */
        public Result_SchnorrSignatureNoneZ sign_bolt12_invoice_request(org.ldk.structs.UnsignedInvoiceRequest invoice_request) {
-               long ret = bindings.NodeSigner_sign_bolt12_invoice_request(this.ptr, invoice_request == null ? 0 : invoice_request.ptr);
+               long ret = bindings.NodeSigner_sign_bolt12_invoice_request(this.ptr, invoice_request.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(invoice_request);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -300,7 +300,7 @@ public class NodeSigner extends CommonBase {
         * [`TaggedHash`]: crate::offers::merkle::TaggedHash
         */
        public Result_SchnorrSignatureNoneZ sign_bolt12_invoice(org.ldk.structs.UnsignedBolt12Invoice invoice) {
-               long ret = bindings.NodeSigner_sign_bolt12_invoice(this.ptr, invoice == null ? 0 : invoice.ptr);
+               long ret = bindings.NodeSigner_sign_bolt12_invoice(this.ptr, invoice.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(invoice);
                if (ret >= 0 && ret <= 4096) { return null; }
index 5a9827909b0d1c0e9a999793c5ef28711e45b87a..6a4cf62b1c97fd163555e674556ddad3177c65a4 100644 (file)
@@ -76,15 +76,12 @@ public class Offer extends CommonBase {
 
        /**
         * The minimum amount required for a successful payment of a single item.
-        * 
-        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       @Nullable
-       public Amount amount() {
+       public Option_AmountZ amount() {
                long ret = bindings.Offer_amount(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); }
+               org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
@@ -92,7 +89,10 @@ public class Offer extends CommonBase {
        /**
         * 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
         */
+       @Nullable
        public PrintableString description() {
                long ret = bindings.Offer_description(this.ptr);
                Reference.reachabilityFence(this);
@@ -169,20 +169,35 @@ public class Offer extends CommonBase {
                long ret = bindings.Offer_supported_quantity(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); }
+               org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
        /**
         * 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
         */
+       @Nullable
        public byte[] signing_pubkey() {
                byte[] ret = bindings.Offer_signing_pubkey(this.ptr);
                Reference.reachabilityFence(this);
                return ret;
        }
 
+       /**
+        * Returns the id of the offer.
+        */
+       public OfferId id() {
+               long ret = bindings.Offer_id(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.OfferId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
        /**
         * Returns whether the given chain is supported by the offer.
         */
@@ -233,6 +248,95 @@ public class Offer extends CommonBase {
                return ret;
        }
 
+       /**
+        * 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
+        */
+       public Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ request_invoice_deriving_payer_id(org.ldk.structs.ExpandedKey expanded_key, org.ldk.structs.EntropySource entropy_source, byte[] payment_id) {
+               long ret = bindings.Offer_request_invoice_deriving_payer_id(this.ptr, expanded_key.ptr, entropy_source.ptr, InternalUtils.check_arr_len(payment_id, 32));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(expanded_key);
+               Reference.reachabilityFence(entropy_source);
+               Reference.reachabilityFence(payment_id);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(expanded_key); };
+               if (this != null) { this.ptrs_to.add(entropy_source); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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
+        */
+       public Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ request_invoice_deriving_metadata(byte[] payer_id, org.ldk.structs.ExpandedKey expanded_key, org.ldk.structs.EntropySource entropy_source, byte[] payment_id) {
+               long ret = bindings.Offer_request_invoice_deriving_metadata(this.ptr, InternalUtils.check_arr_len(payer_id, 33), expanded_key.ptr, entropy_source.ptr, InternalUtils.check_arr_len(payment_id, 32));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(payer_id);
+               Reference.reachabilityFence(expanded_key);
+               Reference.reachabilityFence(entropy_source);
+               Reference.reachabilityFence(payment_id);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(expanded_key); };
+               if (this != null) { this.ptrs_to.add(entropy_source); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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
+        */
+       public Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ request_invoice(byte[] metadata, byte[] payer_id) {
+               long ret = bindings.Offer_request_invoice(this.ptr, metadata, InternalUtils.check_arr_len(payer_id, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(metadata);
+               Reference.reachabilityFence(payer_id);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Generates a non-cryptographic 64-bit hash of the Offer.
+        */
+       public long hash() {
+               long ret = bindings.Offer_hash(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       @Override public int hashCode() {
+               return (int)this.hash();
+       }
        /**
         * Serialize the Offer object into a byte array which can be read by Offer_read
         */
index c560267e09feb2f15f7c8229f9787f6e5101a027..e269852c91dc128b62ed1560c10c4d0ba86684cd 100644 (file)
@@ -26,7 +26,7 @@ public class OfferFeatures extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.OfferFeatures b) {
-               boolean ret = bindings.OfferFeatures_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.OfferFeatures_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -82,7 +82,7 @@ public class OfferFeatures extends CommonBase {
         * Returns true if this `Features` object contains required features unknown by `other`.
         */
        public boolean requires_unknown_bits_from(org.ldk.structs.OfferFeatures other) {
-               boolean ret = bindings.OfferFeatures_requires_unknown_bits_from(this.ptr, other == null ? 0 : other.ptr);
+               boolean ret = bindings.OfferFeatures_requires_unknown_bits_from(this.ptr, other.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(other);
                if (this != null) { this.ptrs_to.add(other); };
diff --git a/src/main/java/org/ldk/structs/OfferId.java b/src/main/java/org/ldk/structs/OfferId.java
new file mode 100644 (file)
index 0000000..b5e5ba1
--- /dev/null
@@ -0,0 +1,102 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * An identifier for an [`Offer`] built using [`DerivedMetadata`].
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class OfferId extends CommonBase {
+       OfferId(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.OfferId_free(ptr); }
+       }
+
+       public byte[] get_a() {
+               byte[] ret = bindings.OfferId_get_a(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       public void set_a(byte[] val) {
+               bindings.OfferId_set_a(this.ptr, InternalUtils.check_arr_len(val, 32));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * Constructs a new OfferId given each field
+        */
+       public static OfferId of(byte[] a_arg) {
+               long ret = bindings.OfferId_new(InternalUtils.check_arr_len(a_arg, 32));
+               Reference.reachabilityFence(a_arg);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.OfferId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.OfferId_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the OfferId
+        */
+       public OfferId clone() {
+               long ret = bindings.OfferId_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.OfferId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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.
+        */
+       public boolean eq(org.ldk.structs.OfferId b) {
+               boolean ret = bindings.OfferId_eq(this.ptr, b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof OfferId)) return false;
+               return this.eq((OfferId)o);
+       }
+       /**
+        * Serialize the OfferId object into a byte array which can be read by OfferId_read
+        */
+       public byte[] write() {
+               byte[] ret = bindings.OfferId_write(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Read a OfferId from a byte array, created by OfferId_write
+        */
+       public static Result_OfferIdDecodeErrorZ read(byte[] ser) {
+               long ret = bindings.OfferId_read(ser);
+               Reference.reachabilityFence(ser);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_OfferIdDecodeErrorZ ret_hu_conv = Result_OfferIdDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/OfferWithDerivedMetadataBuilder.java b/src/main/java/org/ldk/structs/OfferWithDerivedMetadataBuilder.java
new file mode 100644 (file)
index 0000000..ca06e84
--- /dev/null
@@ -0,0 +1,176 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Builds an [`Offer`] for the \"offer to be paid\" flow.
+ * 
+ * See [module-level documentation] for usage.
+ * 
+ * [module-level documentation]: self
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class OfferWithDerivedMetadataBuilder extends CommonBase {
+       OfferWithDerivedMetadataBuilder(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.OfferWithDerivedMetadataBuilder_free(ptr); }
+       }
+
+       long clone_ptr() {
+               long ret = bindings.OfferWithDerivedMetadataBuilder_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the OfferWithDerivedMetadataBuilder
+        */
+       public OfferWithDerivedMetadataBuilder clone() {
+               long ret = bindings.OfferWithDerivedMetadataBuilder_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.OfferWithDerivedMetadataBuilder ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferWithDerivedMetadataBuilder(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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
+        */
+       public static OfferWithDerivedMetadataBuilder deriving_signing_pubkey(byte[] node_id, org.ldk.structs.ExpandedKey expanded_key, org.ldk.structs.EntropySource entropy_source) {
+               long ret = bindings.OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(InternalUtils.check_arr_len(node_id, 33), expanded_key.ptr, entropy_source.ptr);
+               Reference.reachabilityFence(node_id);
+               Reference.reachabilityFence(expanded_key);
+               Reference.reachabilityFence(entropy_source);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.OfferWithDerivedMetadataBuilder ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferWithDerivedMetadataBuilder(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(expanded_key); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(entropy_source); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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.
+        */
+       public void chain(org.ldk.enums.Network network) {
+               bindings.OfferWithDerivedMetadataBuilder_chain(this.ptr, network);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(network);
+               if (this != null) { this.ptrs_to.add(this); };
+       }
+
+       /**
+        * Sets the [`Offer::amount`] as an [`Amount::Bitcoin`].
+        * 
+        * Successive calls to this method will override the previous setting.
+        */
+       public void amount_msats(long amount_msats) {
+               bindings.OfferWithDerivedMetadataBuilder_amount_msats(this.ptr, amount_msats);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(amount_msats);
+               if (this != null) { this.ptrs_to.add(this); };
+       }
+
+       /**
+        * 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.
+        */
+       public void absolute_expiry(long absolute_expiry) {
+               bindings.OfferWithDerivedMetadataBuilder_absolute_expiry(this.ptr, absolute_expiry);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(absolute_expiry);
+               if (this != null) { this.ptrs_to.add(this); };
+       }
+
+       /**
+        * Sets the [`Offer::description`].
+        * 
+        * Successive calls to this method will override the previous setting.
+        */
+       public void description(java.lang.String description) {
+               bindings.OfferWithDerivedMetadataBuilder_description(this.ptr, description);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(description);
+               if (this != null) { this.ptrs_to.add(this); };
+       }
+
+       /**
+        * Sets the [`Offer::issuer`].
+        * 
+        * Successive calls to this method will override the previous setting.
+        */
+       public void issuer(java.lang.String issuer) {
+               bindings.OfferWithDerivedMetadataBuilder_issuer(this.ptr, issuer);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(issuer);
+               if (this != null) { this.ptrs_to.add(this); };
+       }
+
+       /**
+        * 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.
+        */
+       public void path(org.ldk.structs.BlindedPath path) {
+               bindings.OfferWithDerivedMetadataBuilder_path(this.ptr, path.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(path);
+               if (this != null) { this.ptrs_to.add(path); };
+               if (this != null) { this.ptrs_to.add(this); };
+       }
+
+       /**
+        * 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.
+        */
+       public void supported_quantity(org.ldk.structs.Quantity quantity) {
+               bindings.OfferWithDerivedMetadataBuilder_supported_quantity(this.ptr, quantity.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(quantity);
+               if (this != null) { this.ptrs_to.add(quantity); };
+               if (this != null) { this.ptrs_to.add(this); };
+       }
+
+       /**
+        * Builds an [`Offer`] from the builder's settings.
+        */
+       public Result_OfferBolt12SemanticErrorZ build() {
+               long ret = bindings.OfferWithDerivedMetadataBuilder_build(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_OfferBolt12SemanticErrorZ ret_hu_conv = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/OfferWithExplicitMetadataBuilder.java b/src/main/java/org/ldk/structs/OfferWithExplicitMetadataBuilder.java
new file mode 100644 (file)
index 0000000..d92f263
--- /dev/null
@@ -0,0 +1,188 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Builds an [`Offer`] for the \"offer to be paid\" flow.
+ * 
+ * See [module-level documentation] for usage.
+ * 
+ * [module-level documentation]: self
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class OfferWithExplicitMetadataBuilder extends CommonBase {
+       OfferWithExplicitMetadataBuilder(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.OfferWithExplicitMetadataBuilder_free(ptr); }
+       }
+
+       long clone_ptr() {
+               long ret = bindings.OfferWithExplicitMetadataBuilder_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the OfferWithExplicitMetadataBuilder
+        */
+       public OfferWithExplicitMetadataBuilder clone() {
+               long ret = bindings.OfferWithExplicitMetadataBuilder_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.OfferWithExplicitMetadataBuilder ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferWithExplicitMetadataBuilder(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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
+        */
+       public static OfferWithExplicitMetadataBuilder of(byte[] signing_pubkey) {
+               long ret = bindings.OfferWithExplicitMetadataBuilder_new(InternalUtils.check_arr_len(signing_pubkey, 33));
+               Reference.reachabilityFence(signing_pubkey);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.OfferWithExplicitMetadataBuilder ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferWithExplicitMetadataBuilder(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Sets the [`Offer::metadata`] to the given bytes.
+        * 
+        * Successive calls to this method will override the previous setting.
+        */
+       public Result_NoneBolt12SemanticErrorZ metadata(byte[] metadata) {
+               long ret = bindings.OfferWithExplicitMetadataBuilder_metadata(this.ptr, metadata);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(metadata);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_NoneBolt12SemanticErrorZ ret_hu_conv = Result_NoneBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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.
+        */
+       public void chain(org.ldk.enums.Network network) {
+               bindings.OfferWithExplicitMetadataBuilder_chain(this.ptr, network);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(network);
+               if (this != null) { this.ptrs_to.add(this); };
+       }
+
+       /**
+        * Sets the [`Offer::amount`] as an [`Amount::Bitcoin`].
+        * 
+        * Successive calls to this method will override the previous setting.
+        */
+       public void amount_msats(long amount_msats) {
+               bindings.OfferWithExplicitMetadataBuilder_amount_msats(this.ptr, amount_msats);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(amount_msats);
+               if (this != null) { this.ptrs_to.add(this); };
+       }
+
+       /**
+        * 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.
+        */
+       public void absolute_expiry(long absolute_expiry) {
+               bindings.OfferWithExplicitMetadataBuilder_absolute_expiry(this.ptr, absolute_expiry);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(absolute_expiry);
+               if (this != null) { this.ptrs_to.add(this); };
+       }
+
+       /**
+        * Sets the [`Offer::description`].
+        * 
+        * Successive calls to this method will override the previous setting.
+        */
+       public void description(java.lang.String description) {
+               bindings.OfferWithExplicitMetadataBuilder_description(this.ptr, description);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(description);
+               if (this != null) { this.ptrs_to.add(this); };
+       }
+
+       /**
+        * Sets the [`Offer::issuer`].
+        * 
+        * Successive calls to this method will override the previous setting.
+        */
+       public void issuer(java.lang.String issuer) {
+               bindings.OfferWithExplicitMetadataBuilder_issuer(this.ptr, issuer);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(issuer);
+               if (this != null) { this.ptrs_to.add(this); };
+       }
+
+       /**
+        * 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.
+        */
+       public void path(org.ldk.structs.BlindedPath path) {
+               bindings.OfferWithExplicitMetadataBuilder_path(this.ptr, path.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(path);
+               if (this != null) { this.ptrs_to.add(path); };
+               if (this != null) { this.ptrs_to.add(this); };
+       }
+
+       /**
+        * 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.
+        */
+       public void supported_quantity(org.ldk.structs.Quantity quantity) {
+               bindings.OfferWithExplicitMetadataBuilder_supported_quantity(this.ptr, quantity.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(quantity);
+               if (this != null) { this.ptrs_to.add(quantity); };
+               if (this != null) { this.ptrs_to.add(this); };
+       }
+
+       /**
+        * Builds an [`Offer`] from the builder's settings.
+        */
+       public Result_OfferBolt12SemanticErrorZ build() {
+               long ret = bindings.OfferWithExplicitMetadataBuilder_build(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_OfferBolt12SemanticErrorZ ret_hu_conv = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+}
index a3c2da2c6793ec2d3bef8e4481bb227c6c05759c..9ce513119ee4b9f17909e0a491dada084c11a3fe 100644 (file)
@@ -100,7 +100,7 @@ public class OffersMessage extends CommonBase {
         * Utility method to constructs a new InvoiceRequest-variant OffersMessage
         */
        public static OffersMessage invoice_request(org.ldk.structs.InvoiceRequest a) {
-               long ret = bindings.OffersMessage_invoice_request(a == null ? 0 : a.ptr);
+               long ret = bindings.OffersMessage_invoice_request(a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.OffersMessage ret_hu_conv = org.ldk.structs.OffersMessage.constr_from_ptr(ret);
@@ -113,7 +113,7 @@ public class OffersMessage extends CommonBase {
         * Utility method to constructs a new Invoice-variant OffersMessage
         */
        public static OffersMessage invoice(org.ldk.structs.Bolt12Invoice a) {
-               long ret = bindings.OffersMessage_invoice(a == null ? 0 : a.ptr);
+               long ret = bindings.OffersMessage_invoice(a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.OffersMessage ret_hu_conv = org.ldk.structs.OffersMessage.constr_from_ptr(ret);
@@ -126,7 +126,7 @@ public class OffersMessage extends CommonBase {
         * Utility method to constructs a new InvoiceError-variant OffersMessage
         */
        public static OffersMessage invoice_error(org.ldk.structs.InvoiceError a) {
-               long ret = bindings.OffersMessage_invoice_error(a == null ? 0 : a.ptr);
+               long ret = bindings.OffersMessage_invoice_error(a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.OffersMessage ret_hu_conv = org.ldk.structs.OffersMessage.constr_from_ptr(ret);
index 14046d51a72d1e5494ba053b23e7a87cede851ac..471e53c27e0f529a09762635f4d1a693b9676195 100644 (file)
@@ -65,14 +65,14 @@ public class OffersMessageHandler extends CommonBase {
                                if (message_hu_conv != null) { message_hu_conv.ptrs_to.add(this); };
                                Option_OffersMessageZ ret = arg.handle_message(message_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                if (impl_holder.held != null) { impl_holder.held.ptrs_to.add(ret); };
                                return result;
                        }
                        @Override public long[] release_pending_messages() {
                                ThreeTuple_OffersMessageDestinationBlindedPathZ[] ret = arg.release_pending_messages();
                                Reference.reachabilityFence(arg);
-                               long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_49 -> ret_conv_49 == null ? 0 : ret_conv_49.clone_ptr()).toArray() : null;
+                               long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_49 -> ret_conv_49.clone_ptr()).toArray() : null;
                                return result;
                        }
                });
index c171b0a9f496564acc57bb49c831486296a46218..d16ba3a58c315fb5a018a41afbcb141c100175cf 100644 (file)
@@ -54,7 +54,7 @@ public class OnionMessage extends CommonBase {
         * The full onion packet including hop data, pubkey, and hmac
         */
        public void set_onion_routing_packet(org.ldk.structs.Packet val) {
-               bindings.OnionMessage_set_onion_routing_packet(this.ptr, val == null ? 0 : val.ptr);
+               bindings.OnionMessage_set_onion_routing_packet(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -64,7 +64,7 @@ public class OnionMessage extends CommonBase {
         * Constructs a new OnionMessage given each field
         */
        public static OnionMessage of(byte[] blinding_point_arg, org.ldk.structs.Packet onion_routing_packet_arg) {
-               long ret = bindings.OnionMessage_new(InternalUtils.check_arr_len(blinding_point_arg, 33), onion_routing_packet_arg == null ? 0 : onion_routing_packet_arg.ptr);
+               long ret = bindings.OnionMessage_new(InternalUtils.check_arr_len(blinding_point_arg, 33), onion_routing_packet_arg.ptr);
                Reference.reachabilityFence(blinding_point_arg);
                Reference.reachabilityFence(onion_routing_packet_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -110,7 +110,7 @@ public class OnionMessage extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.OnionMessage b) {
-               boolean ret = bindings.OnionMessage_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.OnionMessage_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 4b8abe04b148c4205a6c95caf2680ecbc7a8da4e..3667968f7e1f7154fed24bd6c1907f769cde5738 100644 (file)
@@ -98,7 +98,7 @@ public class OnionMessageHandler extends CommonBase {
                        @Override public long[] get_and_clear_connections_needed() {
                                TwoTuple_PublicKeyCVec_SocketAddressZZ[] ret = arg.get_and_clear_connections_needed();
                                Reference.reachabilityFence(arg);
-                               long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_40 -> ret_conv_40 == null ? 0 : ret_conv_40.clone_ptr()).toArray() : null;
+                               long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_40 -> ret_conv_40.clone_ptr()).toArray() : null;
                                return result;
                        }
                        @Override public void handle_onion_message(byte[] peer_node_id, long msg) {
@@ -116,7 +116,7 @@ public class OnionMessageHandler extends CommonBase {
                                org.ldk.structs.Init init_hu_conv = null; if (init < 0 || init > 4096) { init_hu_conv = new org.ldk.structs.Init(null, init); }
                                Result_NoneNoneZ ret = arg.peer_connected(their_node_id, init_hu_conv, inbound);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public void peer_disconnected(byte[] their_node_id) {
@@ -130,13 +130,13 @@ public class OnionMessageHandler extends CommonBase {
                        @Override public long provided_node_features() {
                                NodeFeatures ret = arg.provided_node_features();
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long provided_init_features(byte[] their_node_id) {
                                InitFeatures ret = arg.provided_init_features(their_node_id);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                });
@@ -169,7 +169,7 @@ public class OnionMessageHandler extends CommonBase {
         * Handle an incoming `onion_message` message from the given peer.
         */
        public void handle_onion_message(byte[] peer_node_id, org.ldk.structs.OnionMessage msg) {
-               bindings.OnionMessageHandler_handle_onion_message(this.ptr, InternalUtils.check_arr_len(peer_node_id, 33), msg == null ? 0 : msg.ptr);
+               bindings.OnionMessageHandler_handle_onion_message(this.ptr, InternalUtils.check_arr_len(peer_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(peer_node_id);
                Reference.reachabilityFence(msg);
@@ -201,7 +201,7 @@ public class OnionMessageHandler extends CommonBase {
         * message handlers may still wish to communicate with this peer.
         */
        public Result_NoneNoneZ peer_connected(byte[] their_node_id, org.ldk.structs.Init init, boolean inbound) {
-               long ret = bindings.OnionMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), init == null ? 0 : init.ptr, inbound);
+               long ret = bindings.OnionMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), init.ptr, inbound);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(init);
index 758a784f5d9d5b5cbe206613360f44e3681074e9..6aa48fdfaaefb52aa83111f2a697b7e1b09e52ad 100644 (file)
@@ -128,7 +128,10 @@ public class OnionMessagePath extends CommonBase {
 
        /**
         * Returns the first node in the path.
+        * 
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
+       @Nullable
        public byte[] first_node() {
                byte[] ret = bindings.OnionMessagePath_first_node(this.ptr);
                Reference.reachabilityFence(this);
index 6096f379b27fbab29abc75d65827590e68a90bca..0f8771934edf89b4a5151ba9591348e207541d05 100644 (file)
@@ -32,7 +32,7 @@ import javax.annotation.Nullable;
  * # use bitcoin::hashes::_export::_core::time::Duration;
  * # use bitcoin::hashes::hex::FromHex;
  * # use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey, self};
- * # use lightning::blinded_path::BlindedPath;
+ * # use lightning::blinded_path::{BlindedPath, EmptyNodeIdLookUp};
  * # use lightning::sign::{EntropySource, KeysManager};
  * # use lightning::ln::peer_handler::IgnoringMessageHandler;
  * # use lightning::onion_message::messenger::{Destination, MessageRouter, OnionMessagePath, OnionMessenger};
@@ -73,14 +73,15 @@ import javax.annotation.Nullable;
  * # let hop_node_id1 = PublicKey::from_secret_key(&secp_ctx, &node_secret);
  * # let (hop_node_id3, hop_node_id4) = (hop_node_id1, hop_node_id1);
  * # let destination_node_id = hop_node_id1;
+ * # let node_id_lookup = EmptyNodeIdLookUp {};
  * # let message_router = Arc::new(FakeMessageRouter {});
  * # let custom_message_handler = IgnoringMessageHandler {};
  * # let offers_message_handler = IgnoringMessageHandler {};
  * Create the onion messenger. This must use the same `keys_manager` as is passed to your
  * ChannelManager.
  * let onion_messenger = OnionMessenger::new(
- * &keys_manager, &keys_manager, logger, message_router, &offers_message_handler,
- * &custom_message_handler
+ * &keys_manager, &keys_manager, logger, &node_id_lookup, message_router,
+ * &offers_message_handler, &custom_message_handler
  * );
  * 
  * # #[derive(Debug, Clone)]
@@ -131,11 +132,12 @@ public class OnionMessenger extends CommonBase {
         * Constructs a new `OnionMessenger` to send, forward, and delegate received onion messages to
         * their respective handlers.
         */
-       public static OnionMessenger of(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.structs.MessageRouter message_router, org.ldk.structs.OffersMessageHandler offers_handler, org.ldk.structs.CustomOnionMessageHandler custom_handler) {
-               long ret = bindings.OnionMessenger_new(entropy_source.ptr, node_signer.ptr, logger.ptr, message_router.ptr, offers_handler.ptr, custom_handler.ptr);
+       public static OnionMessenger of(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.structs.NodeIdLookUp node_id_lookup, org.ldk.structs.MessageRouter message_router, org.ldk.structs.OffersMessageHandler offers_handler, org.ldk.structs.CustomOnionMessageHandler custom_handler) {
+               long ret = bindings.OnionMessenger_new(entropy_source.ptr, node_signer.ptr, logger.ptr, node_id_lookup.ptr, message_router.ptr, offers_handler.ptr, custom_handler.ptr);
                Reference.reachabilityFence(entropy_source);
                Reference.reachabilityFence(node_signer);
                Reference.reachabilityFence(logger);
+               Reference.reachabilityFence(node_id_lookup);
                Reference.reachabilityFence(message_router);
                Reference.reachabilityFence(offers_handler);
                Reference.reachabilityFence(custom_handler);
@@ -145,6 +147,7 @@ public class OnionMessenger extends CommonBase {
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(entropy_source); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_signer); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(logger); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_id_lookup); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(message_router); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(offers_handler); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(custom_handler); };
index 8db0a31066350be03e2b38f4a22b0a3db6152a5d..38e8c6c815e9e2d671ad1a647424c5609ce959b4 100644 (file)
@@ -63,7 +63,7 @@ public class OnionPacket extends CommonBase {
         * like.
         */
        public void set_public_key(org.ldk.structs.Result_PublicKeySecp256k1ErrorZ val) {
-               bindings.OnionPacket_set_public_key(this.ptr, val != null ? val.ptr : 0);
+               bindings.OnionPacket_set_public_key(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
        }
@@ -122,7 +122,7 @@ public class OnionPacket extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.OnionPacket b) {
-               boolean ret = bindings.OnionPacket_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.OnionPacket_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 7040d9ea6b4ab2c874bd6c38fb8bf12def884218..7df31138809c0a8eae7141563ebd2c191811ac5f 100644 (file)
@@ -25,57 +25,25 @@ public class OpenChannel extends CommonBase {
        }
 
        /**
-        * The genesis hash of the blockchain where the channel is to be opened
+        * Common fields of `open_channel(2)`-like messages
         */
-       public byte[] get_chain_hash() {
-               byte[] ret = bindings.OpenChannel_get_chain_hash(this.ptr);
+       public CommonOpenChannelFields get_common_fields() {
+               long ret = bindings.OpenChannel_get_common_fields(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The genesis hash of the blockchain where the channel is to be opened
-        */
-       public void set_chain_hash(byte[] val) {
-               bindings.OpenChannel_set_chain_hash(this.ptr, InternalUtils.check_arr_len(val, 32));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * A temporary channel ID, until the funding outpoint is announced
-        */
-       public byte[] get_temporary_channel_id() {
-               byte[] ret = bindings.OpenChannel_get_temporary_channel_id(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * A temporary channel ID, until the funding outpoint is announced
-        */
-       public void set_temporary_channel_id(byte[] val) {
-               bindings.OpenChannel_set_temporary_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The channel value
-        */
-       public long get_funding_satoshis() {
-               long ret = bindings.OpenChannel_get_funding_satoshis(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.CommonOpenChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonOpenChannelFields(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
-        * The channel value
+        * Common fields of `open_channel(2)`-like messages
         */
-       public void set_funding_satoshis(long val) {
-               bindings.OpenChannel_set_funding_satoshis(this.ptr, val);
+       public void set_common_fields(org.ldk.structs.CommonOpenChannelFields val) {
+               bindings.OpenChannel_set_common_fields(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -96,42 +64,6 @@ public class OpenChannel extends CommonBase {
                Reference.reachabilityFence(val);
        }
 
-       /**
-        * The threshold below which outputs on transactions broadcast by sender will be omitted
-        */
-       public long get_dust_limit_satoshis() {
-               long ret = bindings.OpenChannel_get_dust_limit_satoshis(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The threshold below which outputs on transactions broadcast by sender will be omitted
-        */
-       public void set_dust_limit_satoshis(long val) {
-               bindings.OpenChannel_set_dust_limit_satoshis(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The maximum inbound HTLC value in flight towards sender, in milli-satoshi
-        */
-       public long get_max_htlc_value_in_flight_msat() {
-               long ret = bindings.OpenChannel_get_max_htlc_value_in_flight_msat(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The maximum inbound HTLC value in flight towards sender, in milli-satoshi
-        */
-       public void set_max_htlc_value_in_flight_msat(long val) {
-               bindings.OpenChannel_set_max_htlc_value_in_flight_msat(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
        /**
         * The minimum value unencumbered by HTLCs for the counterparty to keep in the channel
         */
@@ -150,295 +82,18 @@ public class OpenChannel extends CommonBase {
                Reference.reachabilityFence(val);
        }
 
-       /**
-        * The minimum HTLC size incoming to sender, in milli-satoshi
-        */
-       public long get_htlc_minimum_msat() {
-               long ret = bindings.OpenChannel_get_htlc_minimum_msat(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The minimum HTLC size incoming to sender, in milli-satoshi
-        */
-       public void set_htlc_minimum_msat(long val) {
-               bindings.OpenChannel_set_htlc_minimum_msat(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The feerate per 1000-weight of sender generated transactions, until updated by
-        * [`UpdateFee`]
-        */
-       public int get_feerate_per_kw() {
-               int ret = bindings.OpenChannel_get_feerate_per_kw(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The feerate per 1000-weight of sender generated transactions, until updated by
-        * [`UpdateFee`]
-        */
-       public void set_feerate_per_kw(int val) {
-               bindings.OpenChannel_set_feerate_per_kw(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The number of blocks which the counterparty will have to wait to claim on-chain funds if
-        * they broadcast a commitment transaction
-        */
-       public short get_to_self_delay() {
-               short ret = bindings.OpenChannel_get_to_self_delay(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The number of blocks which the counterparty will have to wait to claim on-chain funds if
-        * they broadcast a commitment transaction
-        */
-       public void set_to_self_delay(short val) {
-               bindings.OpenChannel_set_to_self_delay(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The maximum number of inbound HTLCs towards sender
-        */
-       public short get_max_accepted_htlcs() {
-               short ret = bindings.OpenChannel_get_max_accepted_htlcs(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The maximum number of inbound HTLCs towards sender
-        */
-       public void set_max_accepted_htlcs(short val) {
-               bindings.OpenChannel_set_max_accepted_htlcs(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The sender's key controlling the funding transaction
-        */
-       public byte[] get_funding_pubkey() {
-               byte[] ret = bindings.OpenChannel_get_funding_pubkey(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The sender's key controlling the funding transaction
-        */
-       public void set_funding_pubkey(byte[] val) {
-               bindings.OpenChannel_set_funding_pubkey(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * Used to derive a revocation key for transactions broadcast by counterparty
-        */
-       public byte[] get_revocation_basepoint() {
-               byte[] ret = bindings.OpenChannel_get_revocation_basepoint(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * Used to derive a revocation key for transactions broadcast by counterparty
-        */
-       public void set_revocation_basepoint(byte[] val) {
-               bindings.OpenChannel_set_revocation_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * A payment key to sender for transactions broadcast by counterparty
-        */
-       public byte[] get_payment_point() {
-               byte[] ret = bindings.OpenChannel_get_payment_point(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * A payment key to sender for transactions broadcast by counterparty
-        */
-       public void set_payment_point(byte[] val) {
-               bindings.OpenChannel_set_payment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * Used to derive a payment key to sender for transactions broadcast by sender
-        */
-       public byte[] get_delayed_payment_basepoint() {
-               byte[] ret = bindings.OpenChannel_get_delayed_payment_basepoint(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * Used to derive a payment key to sender for transactions broadcast by sender
-        */
-       public void set_delayed_payment_basepoint(byte[] val) {
-               bindings.OpenChannel_set_delayed_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * Used to derive an HTLC payment key to sender
-        */
-       public byte[] get_htlc_basepoint() {
-               byte[] ret = bindings.OpenChannel_get_htlc_basepoint(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * Used to derive an HTLC payment key to sender
-        */
-       public void set_htlc_basepoint(byte[] val) {
-               bindings.OpenChannel_set_htlc_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The first to-be-broadcast-by-sender transaction's per commitment point
-        */
-       public byte[] get_first_per_commitment_point() {
-               byte[] ret = bindings.OpenChannel_get_first_per_commitment_point(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The first to-be-broadcast-by-sender transaction's per commitment point
-        */
-       public void set_first_per_commitment_point(byte[] val) {
-               bindings.OpenChannel_set_first_per_commitment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The channel flags to be used
-        */
-       public byte get_channel_flags() {
-               byte ret = bindings.OpenChannel_get_channel_flags(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The channel flags to be used
-        */
-       public void set_channel_flags(byte val) {
-               bindings.OpenChannel_set_channel_flags(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * A request to pre-set the to-sender output's `scriptPubkey` for when we collaboratively close
-        */
-       public Option_CVec_u8ZZ get_shutdown_scriptpubkey() {
-               long ret = bindings.OpenChannel_get_shutdown_scriptpubkey(this.ptr);
-               Reference.reachabilityFence(this);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
-               return ret_hu_conv;
-       }
-
-       /**
-        * A request to pre-set the to-sender output's `scriptPubkey` for when we collaboratively close
-        */
-       public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) {
-               bindings.OpenChannel_set_shutdown_scriptpubkey(this.ptr, val.ptr);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-               if (this != null) { this.ptrs_to.add(val); };
-       }
-
-       /**
-        * The channel type that this channel will represent
-        * 
-        * If this is `None`, we derive the channel type from the intersection of our
-        * feature bits with our counterparty's feature bits from the [`Init`] message.
-        * 
-        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
-        */
-       @Nullable
-       public ChannelTypeFeatures get_channel_type() {
-               long ret = bindings.OpenChannel_get_channel_type(this.ptr);
-               Reference.reachabilityFence(this);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); }
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
-               return ret_hu_conv;
-       }
-
-       /**
-        * The channel type that this channel will represent
-        * 
-        * If this is `None`, we derive the channel type from the intersection of our
-        * feature bits with our counterparty's feature bits from the [`Init`] message.
-        * 
-        * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
-        */
-       public void set_channel_type(@Nullable org.ldk.structs.ChannelTypeFeatures val) {
-               bindings.OpenChannel_set_channel_type(this.ptr, val == null ? 0 : val.ptr);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-               if (this != null) { this.ptrs_to.add(val); };
-       }
-
        /**
         * Constructs a new OpenChannel given each field
-        * 
-        * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public static OpenChannel of(byte[] chain_hash_arg, byte[] temporary_channel_id_arg, long funding_satoshis_arg, long push_msat_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long channel_reserve_satoshis_arg, long htlc_minimum_msat_arg, int feerate_per_kw_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_point_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte channel_flags_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, @Nullable org.ldk.structs.ChannelTypeFeatures channel_type_arg) {
-               long ret = bindings.OpenChannel_new(InternalUtils.check_arr_len(chain_hash_arg, 32), InternalUtils.check_arr_len(temporary_channel_id_arg, 32), funding_satoshis_arg, push_msat_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, feerate_per_kw_arg, to_self_delay_arg, max_accepted_htlcs_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33), InternalUtils.check_arr_len(revocation_basepoint_arg, 33), InternalUtils.check_arr_len(payment_point_arg, 33), InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33), InternalUtils.check_arr_len(htlc_basepoint_arg, 33), InternalUtils.check_arr_len(first_per_commitment_point_arg, 33), channel_flags_arg, shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr);
-               Reference.reachabilityFence(chain_hash_arg);
-               Reference.reachabilityFence(temporary_channel_id_arg);
-               Reference.reachabilityFence(funding_satoshis_arg);
+       public static OpenChannel of(org.ldk.structs.CommonOpenChannelFields common_fields_arg, long push_msat_arg, long channel_reserve_satoshis_arg) {
+               long ret = bindings.OpenChannel_new(common_fields_arg.ptr, push_msat_arg, channel_reserve_satoshis_arg);
+               Reference.reachabilityFence(common_fields_arg);
                Reference.reachabilityFence(push_msat_arg);
-               Reference.reachabilityFence(dust_limit_satoshis_arg);
-               Reference.reachabilityFence(max_htlc_value_in_flight_msat_arg);
                Reference.reachabilityFence(channel_reserve_satoshis_arg);
-               Reference.reachabilityFence(htlc_minimum_msat_arg);
-               Reference.reachabilityFence(feerate_per_kw_arg);
-               Reference.reachabilityFence(to_self_delay_arg);
-               Reference.reachabilityFence(max_accepted_htlcs_arg);
-               Reference.reachabilityFence(funding_pubkey_arg);
-               Reference.reachabilityFence(revocation_basepoint_arg);
-               Reference.reachabilityFence(payment_point_arg);
-               Reference.reachabilityFence(delayed_payment_basepoint_arg);
-               Reference.reachabilityFence(htlc_basepoint_arg);
-               Reference.reachabilityFence(first_per_commitment_point_arg);
-               Reference.reachabilityFence(channel_flags_arg);
-               Reference.reachabilityFence(shutdown_scriptpubkey_arg);
-               Reference.reachabilityFence(channel_type_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.OpenChannel ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OpenChannel(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(shutdown_scriptpubkey_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(common_fields_arg); };
                return ret_hu_conv;
        }
 
@@ -478,7 +133,7 @@ public class OpenChannel extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.OpenChannel b) {
-               boolean ret = bindings.OpenChannel_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.OpenChannel_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 93fad93591af913ff030dcc1176f095a4956a3dd..114e942aa3b3804c8098d9114599e827ee9f37be 100644 (file)
@@ -23,39 +23,25 @@ public class OpenChannelV2 extends CommonBase {
        }
 
        /**
-        * The genesis hash of the blockchain where the channel is to be opened
+        * Common fields of `open_channel(2)`-like messages
         */
-       public byte[] get_chain_hash() {
-               byte[] ret = bindings.OpenChannelV2_get_chain_hash(this.ptr);
+       public CommonOpenChannelFields get_common_fields() {
+               long ret = bindings.OpenChannelV2_get_common_fields(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The genesis hash of the blockchain where the channel is to be opened
-        */
-       public void set_chain_hash(byte[] val) {
-               bindings.OpenChannelV2_set_chain_hash(this.ptr, InternalUtils.check_arr_len(val, 32));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * A temporary channel ID derived using a zeroed out value for the channel acceptor's revocation basepoint
-        */
-       public byte[] get_temporary_channel_id() {
-               byte[] ret = bindings.OpenChannelV2_get_temporary_channel_id(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.CommonOpenChannelFields ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.CommonOpenChannelFields(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
-        * A temporary channel ID derived using a zeroed out value for the channel acceptor's revocation basepoint
+        * Common fields of `open_channel(2)`-like messages
         */
-       public void set_temporary_channel_id(byte[] val) {
-               bindings.OpenChannelV2_set_temporary_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_common_fields(org.ldk.structs.CommonOpenChannelFields val) {
+               bindings.OpenChannelV2_set_common_fields(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -76,136 +62,6 @@ public class OpenChannelV2 extends CommonBase {
                Reference.reachabilityFence(val);
        }
 
-       /**
-        * The feerate for the commitment transaction set by the channel initiator
-        */
-       public int get_commitment_feerate_sat_per_1000_weight() {
-               int ret = bindings.OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The feerate for the commitment transaction set by the channel initiator
-        */
-       public void set_commitment_feerate_sat_per_1000_weight(int val) {
-               bindings.OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * Part of the channel value contributed by the channel initiator
-        */
-       public long get_funding_satoshis() {
-               long ret = bindings.OpenChannelV2_get_funding_satoshis(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * Part of the channel value contributed by the channel initiator
-        */
-       public void set_funding_satoshis(long val) {
-               bindings.OpenChannelV2_set_funding_satoshis(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The threshold below which outputs on transactions broadcast by the channel initiator will be
-        * omitted
-        */
-       public long get_dust_limit_satoshis() {
-               long ret = bindings.OpenChannelV2_get_dust_limit_satoshis(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The threshold below which outputs on transactions broadcast by the channel initiator will be
-        * omitted
-        */
-       public void set_dust_limit_satoshis(long val) {
-               bindings.OpenChannelV2_set_dust_limit_satoshis(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi
-        */
-       public long get_max_htlc_value_in_flight_msat() {
-               long ret = bindings.OpenChannelV2_get_max_htlc_value_in_flight_msat(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi
-        */
-       public void set_max_htlc_value_in_flight_msat(long val) {
-               bindings.OpenChannelV2_set_max_htlc_value_in_flight_msat(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The minimum HTLC size incoming to channel initiator, in milli-satoshi
-        */
-       public long get_htlc_minimum_msat() {
-               long ret = bindings.OpenChannelV2_get_htlc_minimum_msat(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The minimum HTLC size incoming to channel initiator, in milli-satoshi
-        */
-       public void set_htlc_minimum_msat(long val) {
-               bindings.OpenChannelV2_set_htlc_minimum_msat(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
-        * broadcast a commitment transaction
-        */
-       public short get_to_self_delay() {
-               short ret = bindings.OpenChannelV2_get_to_self_delay(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
-        * broadcast a commitment transaction
-        */
-       public void set_to_self_delay(short val) {
-               bindings.OpenChannelV2_set_to_self_delay(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The maximum number of inbound HTLCs towards channel initiator
-        */
-       public short get_max_accepted_htlcs() {
-               short ret = bindings.OpenChannelV2_get_max_accepted_htlcs(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The maximum number of inbound HTLCs towards channel initiator
-        */
-       public void set_max_accepted_htlcs(short val) {
-               bindings.OpenChannelV2_set_max_accepted_htlcs(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
        /**
         * The locktime for the funding transaction
         */
@@ -224,116 +80,6 @@ public class OpenChannelV2 extends CommonBase {
                Reference.reachabilityFence(val);
        }
 
-       /**
-        * The channel initiator's key controlling the funding transaction
-        */
-       public byte[] get_funding_pubkey() {
-               byte[] ret = bindings.OpenChannelV2_get_funding_pubkey(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The channel initiator's key controlling the funding transaction
-        */
-       public void set_funding_pubkey(byte[] val) {
-               bindings.OpenChannelV2_set_funding_pubkey(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * Used to derive a revocation key for transactions broadcast by counterparty
-        */
-       public byte[] get_revocation_basepoint() {
-               byte[] ret = bindings.OpenChannelV2_get_revocation_basepoint(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * Used to derive a revocation key for transactions broadcast by counterparty
-        */
-       public void set_revocation_basepoint(byte[] val) {
-               bindings.OpenChannelV2_set_revocation_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * A payment key to channel initiator for transactions broadcast by counterparty
-        */
-       public byte[] get_payment_basepoint() {
-               byte[] ret = bindings.OpenChannelV2_get_payment_basepoint(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * A payment key to channel initiator for transactions broadcast by counterparty
-        */
-       public void set_payment_basepoint(byte[] val) {
-               bindings.OpenChannelV2_set_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * Used to derive a payment key to channel initiator for transactions broadcast by channel
-        * initiator
-        */
-       public byte[] get_delayed_payment_basepoint() {
-               byte[] ret = bindings.OpenChannelV2_get_delayed_payment_basepoint(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * Used to derive a payment key to channel initiator for transactions broadcast by channel
-        * initiator
-        */
-       public void set_delayed_payment_basepoint(byte[] val) {
-               bindings.OpenChannelV2_set_delayed_payment_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * Used to derive an HTLC payment key to channel initiator
-        */
-       public byte[] get_htlc_basepoint() {
-               byte[] ret = bindings.OpenChannelV2_get_htlc_basepoint(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * Used to derive an HTLC payment key to channel initiator
-        */
-       public void set_htlc_basepoint(byte[] val) {
-               bindings.OpenChannelV2_set_htlc_basepoint(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * The first to-be-broadcast-by-channel-initiator transaction's per commitment point
-        */
-       public byte[] get_first_per_commitment_point() {
-               byte[] ret = bindings.OpenChannelV2_get_first_per_commitment_point(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * The first to-be-broadcast-by-channel-initiator transaction's per commitment point
-        */
-       public void set_first_per_commitment_point(byte[] val) {
-               bindings.OpenChannelV2_set_first_per_commitment_point(this.ptr, InternalUtils.check_arr_len(val, 33));
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
        /**
         * The second to-be-broadcast-by-channel-initiator transaction's per commitment point
         */
@@ -352,79 +98,6 @@ public class OpenChannelV2 extends CommonBase {
                Reference.reachabilityFence(val);
        }
 
-       /**
-        * Channel flags
-        */
-       public byte get_channel_flags() {
-               byte ret = bindings.OpenChannelV2_get_channel_flags(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * Channel flags
-        */
-       public void set_channel_flags(byte val) {
-               bindings.OpenChannelV2_set_channel_flags(this.ptr, val);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-       }
-
-       /**
-        * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we
-        * collaboratively close
-        */
-       public Option_CVec_u8ZZ get_shutdown_scriptpubkey() {
-               long ret = bindings.OpenChannelV2_get_shutdown_scriptpubkey(this.ptr);
-               Reference.reachabilityFence(this);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Option_CVec_u8ZZ ret_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
-               return ret_hu_conv;
-       }
-
-       /**
-        * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we
-        * collaboratively close
-        */
-       public void set_shutdown_scriptpubkey(org.ldk.structs.Option_CVec_u8ZZ val) {
-               bindings.OpenChannelV2_set_shutdown_scriptpubkey(this.ptr, val.ptr);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-               if (this != null) { this.ptrs_to.add(val); };
-       }
-
-       /**
-        * The channel type that this channel will represent. If none is set, we derive the channel
-        * type from the intersection of our feature bits with our counterparty's feature bits from
-        * the Init message.
-        * 
-        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
-        */
-       @Nullable
-       public ChannelTypeFeatures get_channel_type() {
-               long ret = bindings.OpenChannelV2_get_channel_type(this.ptr);
-               Reference.reachabilityFence(this);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.ChannelTypeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelTypeFeatures(null, ret); }
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
-               return ret_hu_conv;
-       }
-
-       /**
-        * The channel type that this channel will represent. If none is set, we derive the channel
-        * type from the intersection of our feature bits with our counterparty's feature bits from
-        * the Init message.
-        * 
-        * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
-        */
-       public void set_channel_type(@Nullable org.ldk.structs.ChannelTypeFeatures val) {
-               bindings.OpenChannelV2_set_channel_type(this.ptr, val == null ? 0 : val.ptr);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(val);
-               if (this != null) { this.ptrs_to.add(val); };
-       }
-
        /**
         * Optionally, a requirement that only confirmed inputs can be added
         */
@@ -445,38 +118,18 @@ public class OpenChannelV2 extends CommonBase {
 
        /**
         * Constructs a new OpenChannelV2 given each field
-        * 
-        * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public static OpenChannelV2 of(byte[] chain_hash_arg, byte[] temporary_channel_id_arg, int funding_feerate_sat_per_1000_weight_arg, int commitment_feerate_sat_per_1000_weight_arg, long funding_satoshis_arg, long dust_limit_satoshis_arg, long max_htlc_value_in_flight_msat_arg, long htlc_minimum_msat_arg, short to_self_delay_arg, short max_accepted_htlcs_arg, int locktime_arg, byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_basepoint_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg, byte[] first_per_commitment_point_arg, byte[] second_per_commitment_point_arg, byte channel_flags_arg, org.ldk.structs.Option_CVec_u8ZZ shutdown_scriptpubkey_arg, @Nullable org.ldk.structs.ChannelTypeFeatures channel_type_arg, org.ldk.enums.COption_NoneZ require_confirmed_inputs_arg) {
-               long ret = bindings.OpenChannelV2_new(InternalUtils.check_arr_len(chain_hash_arg, 32), InternalUtils.check_arr_len(temporary_channel_id_arg, 32), funding_feerate_sat_per_1000_weight_arg, commitment_feerate_sat_per_1000_weight_arg, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, to_self_delay_arg, max_accepted_htlcs_arg, locktime_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33), InternalUtils.check_arr_len(revocation_basepoint_arg, 33), InternalUtils.check_arr_len(payment_basepoint_arg, 33), InternalUtils.check_arr_len(delayed_payment_basepoint_arg, 33), InternalUtils.check_arr_len(htlc_basepoint_arg, 33), InternalUtils.check_arr_len(first_per_commitment_point_arg, 33), InternalUtils.check_arr_len(second_per_commitment_point_arg, 33), channel_flags_arg, shutdown_scriptpubkey_arg.ptr, channel_type_arg == null ? 0 : channel_type_arg.ptr, require_confirmed_inputs_arg);
-               Reference.reachabilityFence(chain_hash_arg);
-               Reference.reachabilityFence(temporary_channel_id_arg);
+       public static OpenChannelV2 of(org.ldk.structs.CommonOpenChannelFields common_fields_arg, int funding_feerate_sat_per_1000_weight_arg, int locktime_arg, byte[] second_per_commitment_point_arg, org.ldk.enums.COption_NoneZ require_confirmed_inputs_arg) {
+               long ret = bindings.OpenChannelV2_new(common_fields_arg.ptr, funding_feerate_sat_per_1000_weight_arg, locktime_arg, InternalUtils.check_arr_len(second_per_commitment_point_arg, 33), require_confirmed_inputs_arg);
+               Reference.reachabilityFence(common_fields_arg);
                Reference.reachabilityFence(funding_feerate_sat_per_1000_weight_arg);
-               Reference.reachabilityFence(commitment_feerate_sat_per_1000_weight_arg);
-               Reference.reachabilityFence(funding_satoshis_arg);
-               Reference.reachabilityFence(dust_limit_satoshis_arg);
-               Reference.reachabilityFence(max_htlc_value_in_flight_msat_arg);
-               Reference.reachabilityFence(htlc_minimum_msat_arg);
-               Reference.reachabilityFence(to_self_delay_arg);
-               Reference.reachabilityFence(max_accepted_htlcs_arg);
                Reference.reachabilityFence(locktime_arg);
-               Reference.reachabilityFence(funding_pubkey_arg);
-               Reference.reachabilityFence(revocation_basepoint_arg);
-               Reference.reachabilityFence(payment_basepoint_arg);
-               Reference.reachabilityFence(delayed_payment_basepoint_arg);
-               Reference.reachabilityFence(htlc_basepoint_arg);
-               Reference.reachabilityFence(first_per_commitment_point_arg);
                Reference.reachabilityFence(second_per_commitment_point_arg);
-               Reference.reachabilityFence(channel_flags_arg);
-               Reference.reachabilityFence(shutdown_scriptpubkey_arg);
-               Reference.reachabilityFence(channel_type_arg);
                Reference.reachabilityFence(require_confirmed_inputs_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.OpenChannelV2 ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OpenChannelV2(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(shutdown_scriptpubkey_arg); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_type_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(common_fields_arg); };
                return ret_hu_conv;
        }
 
@@ -516,7 +169,7 @@ public class OpenChannelV2 extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.OpenChannelV2 b) {
-               boolean ret = bindings.OpenChannelV2_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.OpenChannelV2_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
diff --git a/src/main/java/org/ldk/structs/Option_AmountZ.java b/src/main/java/org/ldk/structs/Option_AmountZ.java
new file mode 100644 (file)
index 0000000..e65d45d
--- /dev/null
@@ -0,0 +1,97 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * An enum which can either contain a crate::lightning::offers::offer::Amount or not
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Option_AmountZ extends CommonBase {
+       private Option_AmountZ(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.COption_AmountZ_free(ptr); }
+       }
+       static Option_AmountZ constr_from_ptr(long ptr) {
+               bindings.LDKCOption_AmountZ raw_val = bindings.LDKCOption_AmountZ_ref_from_ptr(ptr);
+               if (raw_val.getClass() == bindings.LDKCOption_AmountZ.Some.class) {
+                       return new Some(ptr, (bindings.LDKCOption_AmountZ.Some)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKCOption_AmountZ.None.class) {
+                       return new None(ptr, (bindings.LDKCOption_AmountZ.None)raw_val);
+               }
+               assert false; return null; // Unreachable without extending the (internal) bindings interface
+       }
+
+       /**
+        * When we're in this state, this COption_AmountZ contains a crate::lightning::offers::offer::Amount
+        */
+       public final static class Some extends Option_AmountZ {
+               public final org.ldk.structs.Amount some;
+               private Some(long ptr, bindings.LDKCOption_AmountZ.Some obj) {
+                       super(null, ptr);
+                       long some = obj.some;
+                       org.ldk.structs.Amount some_hu_conv = org.ldk.structs.Amount.constr_from_ptr(some);
+                       if (some_hu_conv != null) { some_hu_conv.ptrs_to.add(this); };
+                       this.some = some_hu_conv;
+               }
+       }
+       /**
+        * When we're in this state, this COption_AmountZ contains nothing
+        */
+       public final static class None extends Option_AmountZ {
+               private None(long ptr, bindings.LDKCOption_AmountZ.None obj) {
+                       super(null, ptr);
+               }
+       }
+       /**
+        * Constructs a new COption_AmountZ containing a crate::lightning::offers::offer::Amount
+        */
+       public static Option_AmountZ some(org.ldk.structs.Amount o) {
+               long ret = bindings.COption_AmountZ_some(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Constructs a new COption_AmountZ containing nothing
+        */
+       public static Option_AmountZ none() {
+               long ret = bindings.COption_AmountZ_none();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.COption_AmountZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new COption_AmountZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Option_AmountZ clone() {
+               long ret = bindings.COption_AmountZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+}
index 6b6df6a0d9f72401354b77750538b159e09296a3..36995059a641af7dca3b75e32cc0049029995fb1 100644 (file)
@@ -53,13 +53,12 @@ public class Option_BigEndianScalarZ extends CommonBase {
        /**
         * Constructs a new COption_BigEndianScalarZ containing a crate::c_types::BigEndianScalar
         */
-       public static Option_BigEndianScalarZ some(byte[] o_big_endian_bytes) {
-               long ret = bindings.COption_BigEndianScalarZ_some(bindings.BigEndianScalar_new(InternalUtils.check_arr_len(o_big_endian_bytes, 32)));
-               Reference.reachabilityFence(o_big_endian_bytes);
+       public static Option_BigEndianScalarZ some(org.ldk.structs.BigEndianScalar o) {
+               long ret = bindings.COption_BigEndianScalarZ_some(o.ptr);
+               Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Option_BigEndianScalarZ ret_hu_conv = org.ldk.structs.Option_BigEndianScalarZ.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
-               ;
                return ret_hu_conv;
        }
 
index 55decc808dd76a00e2b0e8592fde4be86571674c..2c858205ac096ee7472240841e5f40674ec708a8 100644 (file)
@@ -55,7 +55,7 @@ public class Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ extends CommonBase {
         * Constructs a new COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ containing a crate::c_types::derived::C2Tuple__u1632_u1632Z
         */
        public static Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ some(org.ldk.structs.TwoTuple__u1632_u1632Z o) {
-               long ret = bindings.COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_some(o != null ? o.ptr : 0);
+               long ret = bindings.COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_some(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ.constr_from_ptr(ret);
index bfb9fd98113c7394b5603ea07a75452251d097f9..8f56bd90dc177721270ad964773d07eb3eedc771 100644 (file)
@@ -55,7 +55,7 @@ public class Option_C2Tuple_u64u16ZZ extends CommonBase {
         * Constructs a new COption_C2Tuple_u64u16ZZ containing a crate::c_types::derived::C2Tuple_u64u16Z
         */
        public static Option_C2Tuple_u64u16ZZ some(org.ldk.structs.TwoTuple_u64u16Z o) {
-               long ret = bindings.COption_C2Tuple_u64u16ZZ_some(o != null ? o.ptr : 0);
+               long ret = bindings.COption_C2Tuple_u64u16ZZ_some(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Option_C2Tuple_u64u16ZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_u64u16ZZ.constr_from_ptr(ret);
index c8ba0da5059bf11a9993037727963d98f1baeba9..d0a1ab80b617c8bfbed4b0126a77204db61fea8f 100644 (file)
@@ -55,7 +55,7 @@ public class Option_C2Tuple_u64u64ZZ extends CommonBase {
         * Constructs a new COption_C2Tuple_u64u64ZZ containing a crate::c_types::derived::C2Tuple_u64u64Z
         */
        public static Option_C2Tuple_u64u64ZZ some(org.ldk.structs.TwoTuple_u64u64Z o) {
-               long ret = bindings.COption_C2Tuple_u64u64ZZ_some(o != null ? o.ptr : 0);
+               long ret = bindings.COption_C2Tuple_u64u64ZZ_some(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Option_C2Tuple_u64u64ZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_u64u64ZZ.constr_from_ptr(ret);
index 4e9f8d383f39d2495c4feb834a9a5e1454c00ca0..9d1971e669888f45d53429939609ded4f1f5cbde 100644 (file)
@@ -55,7 +55,7 @@ public class Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ exte
         * Constructs a new COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ containing a crate::c_types::derived::C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ
         */
        public static Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ some(org.ldk.structs.ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ o) {
-               long ret = bindings.COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_some(o != null ? o.ptr : 0);
+               long ret = bindings.COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_some(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_hu_conv = org.ldk.structs.Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ.constr_from_ptr(ret);
diff --git a/src/main/java/org/ldk/structs/Option_ECDSASignatureZ.java b/src/main/java/org/ldk/structs/Option_ECDSASignatureZ.java
new file mode 100644 (file)
index 0000000..ebdc68d
--- /dev/null
@@ -0,0 +1,93 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * An enum which can either contain a crate::c_types::ECDSASignature or not
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Option_ECDSASignatureZ extends CommonBase {
+       private Option_ECDSASignatureZ(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.COption_ECDSASignatureZ_free(ptr); }
+       }
+       static Option_ECDSASignatureZ constr_from_ptr(long ptr) {
+               bindings.LDKCOption_ECDSASignatureZ raw_val = bindings.LDKCOption_ECDSASignatureZ_ref_from_ptr(ptr);
+               if (raw_val.getClass() == bindings.LDKCOption_ECDSASignatureZ.Some.class) {
+                       return new Some(ptr, (bindings.LDKCOption_ECDSASignatureZ.Some)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKCOption_ECDSASignatureZ.None.class) {
+                       return new None(ptr, (bindings.LDKCOption_ECDSASignatureZ.None)raw_val);
+               }
+               assert false; return null; // Unreachable without extending the (internal) bindings interface
+       }
+
+       /**
+        * When we're in this state, this COption_ECDSASignatureZ contains a crate::c_types::ECDSASignature
+        */
+       public final static class Some extends Option_ECDSASignatureZ {
+               public final byte[] some;
+               private Some(long ptr, bindings.LDKCOption_ECDSASignatureZ.Some obj) {
+                       super(null, ptr);
+                       this.some = obj.some;
+               }
+       }
+       /**
+        * When we're in this state, this COption_ECDSASignatureZ contains nothing
+        */
+       public final static class None extends Option_ECDSASignatureZ {
+               private None(long ptr, bindings.LDKCOption_ECDSASignatureZ.None obj) {
+                       super(null, ptr);
+               }
+       }
+       /**
+        * Constructs a new COption_ECDSASignatureZ containing a crate::c_types::ECDSASignature
+        */
+       public static Option_ECDSASignatureZ some(byte[] o) {
+               long ret = bindings.COption_ECDSASignatureZ_some(InternalUtils.check_arr_len(o, 64));
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_ECDSASignatureZ ret_hu_conv = org.ldk.structs.Option_ECDSASignatureZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Constructs a new COption_ECDSASignatureZ containing nothing
+        */
+       public static Option_ECDSASignatureZ none() {
+               long ret = bindings.COption_ECDSASignatureZ_none();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_ECDSASignatureZ ret_hu_conv = org.ldk.structs.Option_ECDSASignatureZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.COption_ECDSASignatureZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new COption_ECDSASignatureZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Option_ECDSASignatureZ clone() {
+               long ret = bindings.COption_ECDSASignatureZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_ECDSASignatureZ ret_hu_conv = org.ldk.structs.Option_ECDSASignatureZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/Option_PaymentContextZ.java b/src/main/java/org/ldk/structs/Option_PaymentContextZ.java
new file mode 100644 (file)
index 0000000..89dec36
--- /dev/null
@@ -0,0 +1,97 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * An enum which can either contain a crate::lightning::blinded_path::payment::PaymentContext or not
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Option_PaymentContextZ extends CommonBase {
+       private Option_PaymentContextZ(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.COption_PaymentContextZ_free(ptr); }
+       }
+       static Option_PaymentContextZ constr_from_ptr(long ptr) {
+               bindings.LDKCOption_PaymentContextZ raw_val = bindings.LDKCOption_PaymentContextZ_ref_from_ptr(ptr);
+               if (raw_val.getClass() == bindings.LDKCOption_PaymentContextZ.Some.class) {
+                       return new Some(ptr, (bindings.LDKCOption_PaymentContextZ.Some)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKCOption_PaymentContextZ.None.class) {
+                       return new None(ptr, (bindings.LDKCOption_PaymentContextZ.None)raw_val);
+               }
+               assert false; return null; // Unreachable without extending the (internal) bindings interface
+       }
+
+       /**
+        * When we're in this state, this COption_PaymentContextZ contains a crate::lightning::blinded_path::payment::PaymentContext
+        */
+       public final static class Some extends Option_PaymentContextZ {
+               public final org.ldk.structs.PaymentContext some;
+               private Some(long ptr, bindings.LDKCOption_PaymentContextZ.Some obj) {
+                       super(null, ptr);
+                       long some = obj.some;
+                       org.ldk.structs.PaymentContext some_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(some);
+                       if (some_hu_conv != null) { some_hu_conv.ptrs_to.add(this); };
+                       this.some = some_hu_conv;
+               }
+       }
+       /**
+        * When we're in this state, this COption_PaymentContextZ contains nothing
+        */
+       public final static class None extends Option_PaymentContextZ {
+               private None(long ptr, bindings.LDKCOption_PaymentContextZ.None obj) {
+                       super(null, ptr);
+               }
+       }
+       /**
+        * Constructs a new COption_PaymentContextZ containing a crate::lightning::blinded_path::payment::PaymentContext
+        */
+       public static Option_PaymentContextZ some(org.ldk.structs.PaymentContext o) {
+               long ret = bindings.COption_PaymentContextZ_some(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_PaymentContextZ ret_hu_conv = org.ldk.structs.Option_PaymentContextZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Constructs a new COption_PaymentContextZ containing nothing
+        */
+       public static Option_PaymentContextZ none() {
+               long ret = bindings.COption_PaymentContextZ_none();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_PaymentContextZ ret_hu_conv = org.ldk.structs.Option_PaymentContextZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.COption_PaymentContextZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new COption_PaymentContextZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Option_PaymentContextZ clone() {
+               long ret = bindings.COption_PaymentContextZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_PaymentContextZ ret_hu_conv = org.ldk.structs.Option_PaymentContextZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/Option_QuantityZ.java b/src/main/java/org/ldk/structs/Option_QuantityZ.java
new file mode 100644 (file)
index 0000000..e457bb1
--- /dev/null
@@ -0,0 +1,97 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * An enum which can either contain a crate::lightning::offers::offer::Quantity or not
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Option_QuantityZ extends CommonBase {
+       private Option_QuantityZ(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.COption_QuantityZ_free(ptr); }
+       }
+       static Option_QuantityZ constr_from_ptr(long ptr) {
+               bindings.LDKCOption_QuantityZ raw_val = bindings.LDKCOption_QuantityZ_ref_from_ptr(ptr);
+               if (raw_val.getClass() == bindings.LDKCOption_QuantityZ.Some.class) {
+                       return new Some(ptr, (bindings.LDKCOption_QuantityZ.Some)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKCOption_QuantityZ.None.class) {
+                       return new None(ptr, (bindings.LDKCOption_QuantityZ.None)raw_val);
+               }
+               assert false; return null; // Unreachable without extending the (internal) bindings interface
+       }
+
+       /**
+        * When we're in this state, this COption_QuantityZ contains a crate::lightning::offers::offer::Quantity
+        */
+       public final static class Some extends Option_QuantityZ {
+               public final org.ldk.structs.Quantity some;
+               private Some(long ptr, bindings.LDKCOption_QuantityZ.Some obj) {
+                       super(null, ptr);
+                       long some = obj.some;
+                       org.ldk.structs.Quantity some_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(some);
+                       if (some_hu_conv != null) { some_hu_conv.ptrs_to.add(this); };
+                       this.some = some_hu_conv;
+               }
+       }
+       /**
+        * When we're in this state, this COption_QuantityZ contains nothing
+        */
+       public final static class None extends Option_QuantityZ {
+               private None(long ptr, bindings.LDKCOption_QuantityZ.None obj) {
+                       super(null, ptr);
+               }
+       }
+       /**
+        * Constructs a new COption_QuantityZ containing a crate::lightning::offers::offer::Quantity
+        */
+       public static Option_QuantityZ some(org.ldk.structs.Quantity o) {
+               long ret = bindings.COption_QuantityZ_some(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_QuantityZ ret_hu_conv = org.ldk.structs.Option_QuantityZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Constructs a new COption_QuantityZ containing nothing
+        */
+       public static Option_QuantityZ none() {
+               long ret = bindings.COption_QuantityZ_none();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_QuantityZ ret_hu_conv = org.ldk.structs.Option_QuantityZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.COption_QuantityZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new COption_QuantityZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Option_QuantityZ clone() {
+               long ret = bindings.COption_QuantityZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_QuantityZ ret_hu_conv = org.ldk.structs.Option_QuantityZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+}
index 22125dd3713ac733360388997487bfe7ff6b544f..c3b6137cedc9b6cf35d23ba639c0124156374973 100644 (file)
@@ -96,7 +96,7 @@ public class OutPoint extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.OutPoint b) {
-               boolean ret = bindings.OutPoint_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.OutPoint_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -119,15 +119,6 @@ public class OutPoint extends CommonBase {
        @Override public int hashCode() {
                return (int)this.hash();
        }
-       /**
-        * Convert an `OutPoint` to a lightning channel id.
-        */
-       public byte[] to_channel_id() {
-               byte[] ret = bindings.OutPoint_to_channel_id(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
        /**
         * Serialize the OutPoint object into a byte array which can be read by OutPoint_read
         */
diff --git a/src/main/java/org/ldk/structs/OutputSpendStatus.java b/src/main/java/org/ldk/structs/OutputSpendStatus.java
new file mode 100644 (file)
index 0000000..ed4f80d
--- /dev/null
@@ -0,0 +1,206 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * The current status of the output spend.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class OutputSpendStatus extends CommonBase {
+       private OutputSpendStatus(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.OutputSpendStatus_free(ptr); }
+       }
+       static OutputSpendStatus constr_from_ptr(long ptr) {
+               bindings.LDKOutputSpendStatus raw_val = bindings.LDKOutputSpendStatus_ref_from_ptr(ptr);
+               if (raw_val.getClass() == bindings.LDKOutputSpendStatus.PendingInitialBroadcast.class) {
+                       return new PendingInitialBroadcast(ptr, (bindings.LDKOutputSpendStatus.PendingInitialBroadcast)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKOutputSpendStatus.PendingFirstConfirmation.class) {
+                       return new PendingFirstConfirmation(ptr, (bindings.LDKOutputSpendStatus.PendingFirstConfirmation)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKOutputSpendStatus.PendingThresholdConfirmations.class) {
+                       return new PendingThresholdConfirmations(ptr, (bindings.LDKOutputSpendStatus.PendingThresholdConfirmations)raw_val);
+               }
+               assert false; return null; // Unreachable without extending the (internal) bindings interface
+       }
+
+       /**
+        * The output is tracked but an initial spending transaction hasn't been generated and
+        * broadcasted yet.
+        */
+       public final static class PendingInitialBroadcast extends OutputSpendStatus {
+               /**
+                * The height at which we will first generate and broadcast a spending transaction.
+               */
+               public final org.ldk.structs.Option_u32Z delayed_until_height;
+               private PendingInitialBroadcast(long ptr, bindings.LDKOutputSpendStatus.PendingInitialBroadcast obj) {
+                       super(null, ptr);
+                       long delayed_until_height = obj.delayed_until_height;
+                       org.ldk.structs.Option_u32Z delayed_until_height_hu_conv = org.ldk.structs.Option_u32Z.constr_from_ptr(delayed_until_height);
+                       if (delayed_until_height_hu_conv != null) { delayed_until_height_hu_conv.ptrs_to.add(this); };
+                       this.delayed_until_height = delayed_until_height_hu_conv;
+               }
+       }
+       /**
+        * A transaction spending the output has been broadcasted but is pending its first confirmation on-chain.
+        */
+       public final static class PendingFirstConfirmation extends OutputSpendStatus {
+               /**
+                * The hash of the chain tip when we first broadcast a transaction spending this output.
+               */
+               public final byte[] first_broadcast_hash;
+               /**
+                * The best height when we last broadcast a transaction spending this output.
+               */
+               public final int latest_broadcast_height;
+               /**
+                * The transaction spending this output we last broadcasted.
+               */
+               public final byte[] latest_spending_tx;
+               private PendingFirstConfirmation(long ptr, bindings.LDKOutputSpendStatus.PendingFirstConfirmation obj) {
+                       super(null, ptr);
+                       this.first_broadcast_hash = obj.first_broadcast_hash;
+                       this.latest_broadcast_height = obj.latest_broadcast_height;
+                       this.latest_spending_tx = obj.latest_spending_tx;
+               }
+       }
+       /**
+        * A transaction spending the output has been confirmed on-chain but will be tracked until it
+        * reaches [`ANTI_REORG_DELAY`] confirmations.
+        */
+       public final static class PendingThresholdConfirmations extends OutputSpendStatus {
+               /**
+                * The hash of the chain tip when we first broadcast a transaction spending this output.
+               */
+               public final byte[] first_broadcast_hash;
+               /**
+                * The best height when we last broadcast a transaction spending this output.
+               */
+               public final int latest_broadcast_height;
+               /**
+                * The transaction spending this output we saw confirmed on-chain.
+               */
+               public final byte[] latest_spending_tx;
+               /**
+                * The height at which the spending transaction was confirmed.
+               */
+               public final int confirmation_height;
+               /**
+                * The hash of the block in which the spending transaction was confirmed.
+               */
+               public final byte[] confirmation_hash;
+               private PendingThresholdConfirmations(long ptr, bindings.LDKOutputSpendStatus.PendingThresholdConfirmations obj) {
+                       super(null, ptr);
+                       this.first_broadcast_hash = obj.first_broadcast_hash;
+                       this.latest_broadcast_height = obj.latest_broadcast_height;
+                       this.latest_spending_tx = obj.latest_spending_tx;
+                       this.confirmation_height = obj.confirmation_height;
+                       this.confirmation_hash = obj.confirmation_hash;
+               }
+       }
+       long clone_ptr() {
+               long ret = bindings.OutputSpendStatus_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the OutputSpendStatus
+        */
+       public OutputSpendStatus clone() {
+               long ret = bindings.OutputSpendStatus_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.OutputSpendStatus ret_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new PendingInitialBroadcast-variant OutputSpendStatus
+        */
+       public static OutputSpendStatus pending_initial_broadcast(org.ldk.structs.Option_u32Z delayed_until_height) {
+               long ret = bindings.OutputSpendStatus_pending_initial_broadcast(delayed_until_height.ptr);
+               Reference.reachabilityFence(delayed_until_height);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.OutputSpendStatus ret_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(delayed_until_height); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new PendingFirstConfirmation-variant OutputSpendStatus
+        */
+       public static OutputSpendStatus pending_first_confirmation(byte[] first_broadcast_hash, int latest_broadcast_height, byte[] latest_spending_tx) {
+               long ret = bindings.OutputSpendStatus_pending_first_confirmation(InternalUtils.check_arr_len(first_broadcast_hash, 32), latest_broadcast_height, latest_spending_tx);
+               Reference.reachabilityFence(first_broadcast_hash);
+               Reference.reachabilityFence(latest_broadcast_height);
+               Reference.reachabilityFence(latest_spending_tx);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.OutputSpendStatus ret_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new PendingThresholdConfirmations-variant OutputSpendStatus
+        */
+       public static OutputSpendStatus pending_threshold_confirmations(byte[] first_broadcast_hash, int latest_broadcast_height, byte[] latest_spending_tx, int confirmation_height, byte[] confirmation_hash) {
+               long ret = bindings.OutputSpendStatus_pending_threshold_confirmations(InternalUtils.check_arr_len(first_broadcast_hash, 32), latest_broadcast_height, latest_spending_tx, confirmation_height, InternalUtils.check_arr_len(confirmation_hash, 32));
+               Reference.reachabilityFence(first_broadcast_hash);
+               Reference.reachabilityFence(latest_broadcast_height);
+               Reference.reachabilityFence(latest_spending_tx);
+               Reference.reachabilityFence(confirmation_height);
+               Reference.reachabilityFence(confirmation_hash);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.OutputSpendStatus ret_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if two OutputSpendStatuss contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public boolean eq(org.ldk.structs.OutputSpendStatus b) {
+               boolean ret = bindings.OutputSpendStatus_eq(this.ptr, b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof OutputSpendStatus)) return false;
+               return this.eq((OutputSpendStatus)o);
+       }
+       /**
+        * Serialize the OutputSpendStatus object into a byte array which can be read by OutputSpendStatus_read
+        */
+       public byte[] write() {
+               byte[] ret = bindings.OutputSpendStatus_write(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Read a OutputSpendStatus from a byte array, created by OutputSpendStatus_write
+        */
+       public static Result_OutputSpendStatusDecodeErrorZ read(byte[] ser) {
+               long ret = bindings.OutputSpendStatus_read(ser);
+               Reference.reachabilityFence(ser);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_OutputSpendStatusDecodeErrorZ ret_hu_conv = Result_OutputSpendStatusDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/OutputSpender.java b/src/main/java/org/ldk/structs/OutputSpender.java
new file mode 100644 (file)
index 0000000..325ba25
--- /dev/null
@@ -0,0 +1,116 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+/**
+ * A trait that describes a wallet capable of creating a spending [`Transaction`] from a set of
+ * [`SpendableOutputDescriptor`]s.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class OutputSpender extends CommonBase {
+       final bindings.LDKOutputSpender bindings_instance;
+       OutputSpender(Object _dummy, long ptr) { super(ptr); bindings_instance = null; }
+       private OutputSpender(bindings.LDKOutputSpender arg) {
+               super(bindings.LDKOutputSpender_new(arg));
+               this.ptrs_to.add(arg);
+               this.bindings_instance = arg;
+       }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.OutputSpender_free(ptr); } super.finalize();
+       }
+       /**
+        * Destroys the object, freeing associated resources. After this call, any access
+        * to this object may result in a SEGFAULT or worse.
+        *
+        * You should generally NEVER call this method. You should let the garbage collector
+        * do this for you when it finalizes objects. However, it may be useful for types
+        * which represent locks and should be closed immediately to avoid holding locks
+        * until the GC runs.
+        */
+       public void destroy() {
+               if (ptr != 0) { bindings.OutputSpender_free(ptr); }
+               ptr = 0;
+       }
+       public static interface OutputSpenderInterface {
+               /**
+                * Creates a [`Transaction`] which spends the given descriptors to the given outputs, plus an
+                * output to the given change destination (if sufficient change value remains). The
+                * transaction will have a feerate, at least, of the given value.
+                * 
+                * The `locktime` argument is used to set the transaction's locktime. If `None`, the
+                * transaction will have a locktime of 0. It it recommended to set this to the current block
+                * height to avoid fee sniping, unless you have some specific reason to use a different
+                * locktime.
+                * 
+                * Returns `Err(())` if the output value is greater than the input value minus required fee,
+                * if a descriptor was duplicated, or if an output descriptor `script_pubkey`
+                * does not match the one we can spend.
+                */
+               Result_TransactionNoneZ spend_spendable_outputs(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, Option_u32Z locktime);
+       }
+       private static class LDKOutputSpenderHolder { OutputSpender held; }
+       public static OutputSpender new_impl(OutputSpenderInterface arg) {
+               final LDKOutputSpenderHolder impl_holder = new LDKOutputSpenderHolder();
+               impl_holder.held = new OutputSpender(new bindings.LDKOutputSpender() {
+                       @Override public long spend_spendable_outputs(long[] descriptors, long[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, long locktime) {
+                               int descriptors_conv_27_len = descriptors.length;
+                               SpendableOutputDescriptor[] descriptors_conv_27_arr = new SpendableOutputDescriptor[descriptors_conv_27_len];
+                               for (int b = 0; b < descriptors_conv_27_len; b++) {
+                                       long descriptors_conv_27 = descriptors[b];
+                                       org.ldk.structs.SpendableOutputDescriptor descriptors_conv_27_hu_conv = org.ldk.structs.SpendableOutputDescriptor.constr_from_ptr(descriptors_conv_27);
+                                       if (descriptors_conv_27_hu_conv != null) { descriptors_conv_27_hu_conv.ptrs_to.add(this); };
+                                       descriptors_conv_27_arr[b] = descriptors_conv_27_hu_conv;
+                               }
+                               int outputs_conv_7_len = outputs.length;
+                               TxOut[] outputs_conv_7_arr = new TxOut[outputs_conv_7_len];
+                               for (int h = 0; h < outputs_conv_7_len; h++) {
+                                       long outputs_conv_7 = outputs[h];
+                                       TxOut outputs_conv_7_conv = new TxOut(null, outputs_conv_7);
+                                       outputs_conv_7_arr[h] = outputs_conv_7_conv;
+                               }
+                               org.ldk.structs.Option_u32Z locktime_hu_conv = org.ldk.structs.Option_u32Z.constr_from_ptr(locktime);
+                               if (locktime_hu_conv != null) { locktime_hu_conv.ptrs_to.add(this); };
+                               Result_TransactionNoneZ ret = arg.spend_spendable_outputs(descriptors_conv_27_arr, outputs_conv_7_arr, change_destination_script, feerate_sat_per_1000_weight, locktime_hu_conv);
+                               Reference.reachabilityFence(arg);
+                               long result = ret.clone_ptr();
+                               return result;
+                       }
+               });
+               return impl_holder.held;
+       }
+       /**
+        * Creates a [`Transaction`] which spends the given descriptors to the given outputs, plus an
+        * output to the given change destination (if sufficient change value remains). The
+        * transaction will have a feerate, at least, of the given value.
+        * 
+        * The `locktime` argument is used to set the transaction's locktime. If `None`, the
+        * transaction will have a locktime of 0. It it recommended to set this to the current block
+        * height to avoid fee sniping, unless you have some specific reason to use a different
+        * locktime.
+        * 
+        * Returns `Err(())` if the output value is greater than the input value minus required fee,
+        * if a descriptor was duplicated, or if an output descriptor `script_pubkey`
+        * does not match the one we can spend.
+        */
+       public Result_TransactionNoneZ spend_spendable_outputs(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, org.ldk.structs.Option_u32Z locktime) {
+               long ret = bindings.OutputSpender_spend_spendable_outputs(this.ptr, descriptors != null ? Arrays.stream(descriptors).mapToLong(descriptors_conv_27 -> descriptors_conv_27.ptr).toArray() : null, outputs != null ? Arrays.stream(outputs).mapToLong(outputs_conv_7 -> outputs_conv_7.ptr).toArray() : null, change_destination_script, feerate_sat_per_1000_weight, locktime.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(descriptors);
+               Reference.reachabilityFence(outputs);
+               Reference.reachabilityFence(change_destination_script);
+               Reference.reachabilityFence(feerate_sat_per_1000_weight);
+               Reference.reachabilityFence(locktime);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
+               for (SpendableOutputDescriptor descriptors_conv_27: descriptors) { if (this != null) { this.ptrs_to.add(descriptors_conv_27); }; };
+               if (this != null) { this.ptrs_to.add(locktime); };
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/OutputSweeper.java b/src/main/java/org/ldk/structs/OutputSweeper.java
new file mode 100644 (file)
index 0000000..a42f834
--- /dev/null
@@ -0,0 +1,181 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * A utility that keeps track of [`SpendableOutputDescriptor`]s, persists them in a given
+ * [`KVStore`] and regularly retries sweeping them based on a callback given to the constructor
+ * methods.
+ * 
+ * Users should call [`Self::track_spendable_outputs`] for any [`SpendableOutputDescriptor`]s received via [`Event::SpendableOutputs`].
+ * 
+ * This needs to be notified of chain state changes either via its [`Listen`] or [`Confirm`]
+ * implementation and hence has to be connected with the utilized chain data sources.
+ * 
+ * If chain data is provided via the [`Confirm`] interface or via filtered blocks, users are
+ * required to give their chain data sources (i.e., [`Filter`] implementation) to the respective
+ * constructor.
+ * 
+ * [`Event::SpendableOutputs`]: crate::events::Event::SpendableOutputs
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class OutputSweeper extends CommonBase {
+       OutputSweeper(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.OutputSweeper_free(ptr); }
+       }
+
+       /**
+        * Constructs a new [`OutputSweeper`].
+        * 
+        * If chain data is provided via the [`Confirm`] interface or via filtered blocks, users also
+        * need to register their [`Filter`] implementation via the given `chain_data_source`.
+        */
+       public static OutputSweeper of(org.ldk.structs.BestBlock best_block, org.ldk.structs.BroadcasterInterface broadcaster, org.ldk.structs.FeeEstimator fee_estimator, org.ldk.structs.Option_FilterZ chain_data_source, org.ldk.structs.OutputSpender output_spender, org.ldk.structs.ChangeDestinationSource change_destination_source, org.ldk.structs.KVStore kv_store, org.ldk.structs.Logger logger) {
+               long ret = bindings.OutputSweeper_new(best_block.ptr, broadcaster.ptr, fee_estimator.ptr, chain_data_source.ptr, output_spender.ptr, change_destination_source.ptr, kv_store.ptr, logger.ptr);
+               Reference.reachabilityFence(best_block);
+               Reference.reachabilityFence(broadcaster);
+               Reference.reachabilityFence(fee_estimator);
+               Reference.reachabilityFence(chain_data_source);
+               Reference.reachabilityFence(output_spender);
+               Reference.reachabilityFence(change_destination_source);
+               Reference.reachabilityFence(kv_store);
+               Reference.reachabilityFence(logger);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.OutputSweeper ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutputSweeper(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(best_block); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(broadcaster); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(fee_estimator); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(chain_data_source); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(output_spender); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(change_destination_source); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(kv_store); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(logger); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Tells the sweeper to track the given outputs descriptors.
+        * 
+        * Usually, this should be called based on the values emitted by the
+        * [`Event::SpendableOutputs`].
+        * 
+        * The given `exclude_static_outputs` flag controls whether the sweeper will filter out
+        * [`SpendableOutputDescriptor::StaticOutput`]s, which may be handled directly by the on-chain
+        * wallet implementation.
+        * 
+        * If `delay_until_height` is set, we will delay the spending until the respective block
+        * height is reached. This can be used to batch spends, e.g., to reduce on-chain fees.
+        * 
+        * Returns `Err` on persistence failure, in which case the call may be safely retried.
+        * 
+        * [`Event::SpendableOutputs`]: crate::events::Event::SpendableOutputs
+        * 
+        * Note that channel_id (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       public Result_NoneNoneZ track_spendable_outputs(SpendableOutputDescriptor[] output_descriptors, @Nullable org.ldk.structs.ChannelId channel_id, boolean exclude_static_outputs, org.ldk.structs.Option_u32Z delay_until_height) {
+               long ret = bindings.OutputSweeper_track_spendable_outputs(this.ptr, output_descriptors != null ? Arrays.stream(output_descriptors).mapToLong(output_descriptors_conv_27 -> output_descriptors_conv_27.ptr).toArray() : null, channel_id == null ? 0 : channel_id.ptr, exclude_static_outputs, delay_until_height.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(output_descriptors);
+               Reference.reachabilityFence(channel_id);
+               Reference.reachabilityFence(exclude_static_outputs);
+               Reference.reachabilityFence(delay_until_height);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret);
+               for (SpendableOutputDescriptor output_descriptors_conv_27: output_descriptors) { if (this != null) { this.ptrs_to.add(output_descriptors_conv_27); }; };
+               if (this != null) { this.ptrs_to.add(channel_id); };
+               if (this != null) { this.ptrs_to.add(delay_until_height); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Returns a list of the currently tracked spendable outputs.
+        */
+       public TrackedSpendableOutput[] tracked_spendable_outputs() {
+               long[] ret = bindings.OutputSweeper_tracked_spendable_outputs(this.ptr);
+               Reference.reachabilityFence(this);
+               int ret_conv_24_len = ret.length;
+               TrackedSpendableOutput[] ret_conv_24_arr = new TrackedSpendableOutput[ret_conv_24_len];
+               for (int y = 0; y < ret_conv_24_len; y++) {
+                       long ret_conv_24 = ret[y];
+                       org.ldk.structs.TrackedSpendableOutput ret_conv_24_hu_conv = null; if (ret_conv_24 < 0 || ret_conv_24 > 4096) { ret_conv_24_hu_conv = new org.ldk.structs.TrackedSpendableOutput(null, ret_conv_24); }
+                       if (ret_conv_24_hu_conv != null) { ret_conv_24_hu_conv.ptrs_to.add(this); };
+                       ret_conv_24_arr[y] = ret_conv_24_hu_conv;
+               }
+               return ret_conv_24_arr;
+       }
+
+       /**
+        * Gets the latest best block which was connected either via the [`Listen`] or
+        * [`Confirm`] interfaces.
+        */
+       public BestBlock current_best_block() {
+               long ret = bindings.OutputSweeper_current_best_block(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.BestBlock ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BestBlock(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Constructs a new Listen which calls the relevant methods on this_arg.
+        * This copies the `inner` pointer in this_arg and thus the returned Listen must be freed before this_arg is
+        */
+       public Listen as_Listen() {
+               long ret = bindings.OutputSweeper_as_Listen(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Listen ret_hu_conv = new Listen(null, ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Constructs a new Confirm which calls the relevant methods on this_arg.
+        * This copies the `inner` pointer in this_arg and thus the returned Confirm must be freed before this_arg is
+        */
+       public Confirm as_Confirm() {
+               long ret = bindings.OutputSweeper_as_Confirm(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Confirm ret_hu_conv = new Confirm(null, ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Read a OutputSweeper from a byte array, created by OutputSweeper_write
+        */
+       public static Result_OutputSweeperDecodeErrorZ read(byte[] ser, org.ldk.structs.BroadcasterInterface arg_a, org.ldk.structs.FeeEstimator arg_b, org.ldk.structs.Option_FilterZ arg_c, org.ldk.structs.OutputSpender arg_d, org.ldk.structs.ChangeDestinationSource arg_e, org.ldk.structs.KVStore arg_f, org.ldk.structs.Logger arg_g) {
+               long ret = bindings.OutputSweeper_read(ser, arg_a.ptr, arg_b.ptr, arg_c.ptr, arg_d.ptr, arg_e.ptr, arg_f.ptr, arg_g.ptr);
+               Reference.reachabilityFence(ser);
+               Reference.reachabilityFence(arg_a);
+               Reference.reachabilityFence(arg_b);
+               Reference.reachabilityFence(arg_c);
+               Reference.reachabilityFence(arg_d);
+               Reference.reachabilityFence(arg_e);
+               Reference.reachabilityFence(arg_f);
+               Reference.reachabilityFence(arg_g);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_OutputSweeperDecodeErrorZ ret_hu_conv = Result_OutputSweeperDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_a); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_b); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_c); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_d); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_e); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_f); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_g); };
+               return ret_hu_conv;
+       }
+
+}
index 57544fdc719fac09cf70c9013c7b535c378632cf..31647390aeb45172989a90208bd47198690f6be4 100644 (file)
@@ -31,7 +31,7 @@ public class P2PGossipSync extends CommonBase {
         * correct, and the announcement is signed with channel owners' keys.
         */
        public static P2PGossipSync of(org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.Option_UtxoLookupZ utxo_lookup, org.ldk.structs.Logger logger) {
-               long ret = bindings.P2PGossipSync_new(network_graph == null ? 0 : network_graph.ptr, utxo_lookup.ptr, logger.ptr);
+               long ret = bindings.P2PGossipSync_new(network_graph.ptr, utxo_lookup.ptr, logger.ptr);
                Reference.reachabilityFence(network_graph);
                Reference.reachabilityFence(utxo_lookup);
                Reference.reachabilityFence(logger);
index ada9a681b59149d88d460715a4bb0bd9b70d3547..68f4f834b40daf255a872fbdc3f27772679a05e4 100644 (file)
@@ -145,7 +145,7 @@ public class Packet extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.Packet b) {
-               boolean ret = bindings.Packet_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Packet_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 8e0027379ef2b2942faafa6c90bf8d177594efa3..66fd0ed6777d4e09a3f5e2de41ae06098b79e252 100644 (file)
@@ -103,7 +103,7 @@ public class ParseOrSemanticError extends CommonBase {
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.ParseOrSemanticError b) {
-               boolean ret = bindings.ParseOrSemanticError_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ParseOrSemanticError_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
index e7b777d4f5a9e919bb5c72491686b6eedeecd607..72b6a875f9f58519c21a9cbed3b2c40c34f11548 100644 (file)
@@ -42,7 +42,7 @@ public class Path extends CommonBase {
         * The list of unblinded hops in this [`Path`]. Must be at least length one.
         */
        public void set_hops(RouteHop[] val) {
-               bindings.Path_set_hops(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_10 -> val_conv_10 == null ? 0 : val_conv_10.ptr).toArray() : null);
+               bindings.Path_set_hops(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_10 -> val_conv_10.ptr).toArray() : null);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                for (RouteHop val_conv_10: val) { if (this != null) { this.ptrs_to.add(val_conv_10); }; };
@@ -81,7 +81,7 @@ public class Path extends CommonBase {
         * Note that blinded_tail_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public static Path of(RouteHop[] hops_arg, @Nullable org.ldk.structs.BlindedTail blinded_tail_arg) {
-               long ret = bindings.Path_new(hops_arg != null ? Arrays.stream(hops_arg).mapToLong(hops_arg_conv_10 -> hops_arg_conv_10 == null ? 0 : hops_arg_conv_10.ptr).toArray() : null, blinded_tail_arg == null ? 0 : blinded_tail_arg.ptr);
+               long ret = bindings.Path_new(hops_arg != null ? Arrays.stream(hops_arg).mapToLong(hops_arg_conv_10 -> hops_arg_conv_10.ptr).toArray() : null, blinded_tail_arg == null ? 0 : blinded_tail_arg.ptr);
                Reference.reachabilityFence(hops_arg);
                Reference.reachabilityFence(blinded_tail_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -128,7 +128,7 @@ public class Path extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.Path b) {
-               boolean ret = bindings.Path_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Path_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 6726624488a674044d38d7ffdc42092759c2c8c0..7c631d80e8758c837acd97c08ca9e82c9640f4f3 100644 (file)
@@ -120,7 +120,7 @@ public class PathFailure extends CommonBase {
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.PathFailure b) {
-               boolean ret = bindings.PathFailure_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.PathFailure_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
index 74dad1a5ffeec86d4ff9ebbe3f044a9b41f3e559..bf515f7adf33439984cf520ee59b1bfaed61e51c 100644 (file)
@@ -137,7 +137,7 @@ public class Payee extends CommonBase {
         * Utility method to constructs a new Blinded-variant Payee
         */
        public static Payee blinded(TwoTuple_BlindedPayInfoBlindedPathZ[] route_hints, org.ldk.structs.Bolt12InvoiceFeatures features) {
-               long ret = bindings.Payee_blinded(route_hints != null ? Arrays.stream(route_hints).mapToLong(route_hints_conv_37 -> route_hints_conv_37 != null ? route_hints_conv_37.ptr : 0).toArray() : null, features == null ? 0 : features.ptr);
+               long ret = bindings.Payee_blinded(route_hints != null ? Arrays.stream(route_hints).mapToLong(route_hints_conv_37 -> route_hints_conv_37.ptr).toArray() : null, features.ptr);
                Reference.reachabilityFence(route_hints);
                Reference.reachabilityFence(features);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -151,7 +151,7 @@ public class Payee extends CommonBase {
         * Utility method to constructs a new Clear-variant Payee
         */
        public static Payee clear(byte[] node_id, RouteHint[] route_hints, org.ldk.structs.Bolt11InvoiceFeatures features, int final_cltv_expiry_delta) {
-               long ret = bindings.Payee_clear(InternalUtils.check_arr_len(node_id, 33), route_hints != null ? Arrays.stream(route_hints).mapToLong(route_hints_conv_11 -> route_hints_conv_11 == null ? 0 : route_hints_conv_11.ptr).toArray() : null, features == null ? 0 : features.ptr, final_cltv_expiry_delta);
+               long ret = bindings.Payee_clear(InternalUtils.check_arr_len(node_id, 33), route_hints != null ? Arrays.stream(route_hints).mapToLong(route_hints_conv_11 -> route_hints_conv_11.ptr).toArray() : null, features.ptr, final_cltv_expiry_delta);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(route_hints);
                Reference.reachabilityFence(features);
@@ -181,7 +181,7 @@ public class Payee extends CommonBase {
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.Payee b) {
-               boolean ret = bindings.Payee_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Payee_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
index 53ad74f3528fc3b50f4f5dffe857f367f48120e7..2605380226e871498850182add3a0d6f591080a7 100644 (file)
@@ -80,7 +80,7 @@ public class PayeePubKey extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.PayeePubKey b) {
-               boolean ret = bindings.PayeePubKey_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.PayeePubKey_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
diff --git a/src/main/java/org/ldk/structs/PaymentContext.java b/src/main/java/org/ldk/structs/PaymentContext.java
new file mode 100644 (file)
index 0000000..0204f15
--- /dev/null
@@ -0,0 +1,175 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * The context of an inbound payment, which is included in a [`BlindedPath`] via [`ReceiveTlvs`]
+ * and surfaced in [`PaymentPurpose`].
+ * 
+ * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ * [`PaymentPurpose`]: crate::events::PaymentPurpose
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class PaymentContext extends CommonBase {
+       private PaymentContext(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.PaymentContext_free(ptr); }
+       }
+       static PaymentContext constr_from_ptr(long ptr) {
+               bindings.LDKPaymentContext raw_val = bindings.LDKPaymentContext_ref_from_ptr(ptr);
+               if (raw_val.getClass() == bindings.LDKPaymentContext.Unknown.class) {
+                       return new Unknown(ptr, (bindings.LDKPaymentContext.Unknown)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKPaymentContext.Bolt12Offer.class) {
+                       return new Bolt12Offer(ptr, (bindings.LDKPaymentContext.Bolt12Offer)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKPaymentContext.Bolt12Refund.class) {
+                       return new Bolt12Refund(ptr, (bindings.LDKPaymentContext.Bolt12Refund)raw_val);
+               }
+               assert false; return null; // Unreachable without extending the (internal) bindings interface
+       }
+
+       /**
+        * The payment context was unknown.
+        */
+       public final static class Unknown extends PaymentContext {
+               public final org.ldk.structs.UnknownPaymentContext unknown;
+               private Unknown(long ptr, bindings.LDKPaymentContext.Unknown obj) {
+                       super(null, ptr);
+                       long unknown = obj.unknown;
+                       org.ldk.structs.UnknownPaymentContext unknown_hu_conv = null; if (unknown < 0 || unknown > 4096) { unknown_hu_conv = new org.ldk.structs.UnknownPaymentContext(null, unknown); }
+                       if (unknown_hu_conv != null) { unknown_hu_conv.ptrs_to.add(this); };
+                       this.unknown = unknown_hu_conv;
+               }
+       }
+       /**
+        * The payment was made for an invoice requested from a BOLT 12 [`Offer`].
+        * 
+        * [`Offer`]: crate::offers::offer::Offer
+        */
+       public final static class Bolt12Offer extends PaymentContext {
+               public final org.ldk.structs.Bolt12OfferContext bolt12_offer;
+               private Bolt12Offer(long ptr, bindings.LDKPaymentContext.Bolt12Offer obj) {
+                       super(null, ptr);
+                       long bolt12_offer = obj.bolt12_offer;
+                       org.ldk.structs.Bolt12OfferContext bolt12_offer_hu_conv = null; if (bolt12_offer < 0 || bolt12_offer > 4096) { bolt12_offer_hu_conv = new org.ldk.structs.Bolt12OfferContext(null, bolt12_offer); }
+                       if (bolt12_offer_hu_conv != null) { bolt12_offer_hu_conv.ptrs_to.add(this); };
+                       this.bolt12_offer = bolt12_offer_hu_conv;
+               }
+       }
+       /**
+        * The payment was made for an invoice sent for a BOLT 12 [`Refund`].
+        * 
+        * [`Refund`]: crate::offers::refund::Refund
+        */
+       public final static class Bolt12Refund extends PaymentContext {
+               public final org.ldk.structs.Bolt12RefundContext bolt12_refund;
+               private Bolt12Refund(long ptr, bindings.LDKPaymentContext.Bolt12Refund obj) {
+                       super(null, ptr);
+                       long bolt12_refund = obj.bolt12_refund;
+                       org.ldk.structs.Bolt12RefundContext bolt12_refund_hu_conv = null; if (bolt12_refund < 0 || bolt12_refund > 4096) { bolt12_refund_hu_conv = new org.ldk.structs.Bolt12RefundContext(null, bolt12_refund); }
+                       if (bolt12_refund_hu_conv != null) { bolt12_refund_hu_conv.ptrs_to.add(this); };
+                       this.bolt12_refund = bolt12_refund_hu_conv;
+               }
+       }
+       long clone_ptr() {
+               long ret = bindings.PaymentContext_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the PaymentContext
+        */
+       public PaymentContext clone() {
+               long ret = bindings.PaymentContext_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.PaymentContext ret_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new Unknown-variant PaymentContext
+        */
+       public static PaymentContext unknown(org.ldk.structs.UnknownPaymentContext a) {
+               long ret = bindings.PaymentContext_unknown(a.ptr);
+               Reference.reachabilityFence(a);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.PaymentContext ret_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new Bolt12Offer-variant PaymentContext
+        */
+       public static PaymentContext bolt12_offer(org.ldk.structs.Bolt12OfferContext a) {
+               long ret = bindings.PaymentContext_bolt12_offer(a.ptr);
+               Reference.reachabilityFence(a);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.PaymentContext ret_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new Bolt12Refund-variant PaymentContext
+        */
+       public static PaymentContext bolt12_refund(org.ldk.structs.Bolt12RefundContext a) {
+               long ret = bindings.PaymentContext_bolt12_refund(a.ptr);
+               Reference.reachabilityFence(a);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.PaymentContext ret_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if two PaymentContexts contain equal inner contents.
+        * This ignores pointers and is_owned flags and looks at the values in fields.
+        */
+       public boolean eq(org.ldk.structs.PaymentContext b) {
+               boolean ret = bindings.PaymentContext_eq(this.ptr, b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof PaymentContext)) return false;
+               return this.eq((PaymentContext)o);
+       }
+       /**
+        * Serialize the PaymentContext object into a byte array which can be read by PaymentContext_read
+        */
+       public byte[] write() {
+               byte[] ret = bindings.PaymentContext_write(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Read a PaymentContext from a byte array, created by PaymentContext_write
+        */
+       public static Result_PaymentContextDecodeErrorZ read(byte[] ser) {
+               long ret = bindings.PaymentContext_read(ser);
+               Reference.reachabilityFence(ser);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_PaymentContextDecodeErrorZ ret_hu_conv = Result_PaymentContextDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
index edf8d24c66c2206f75b945b2374d140793096f12..4be6c0247032f28a5d63f527c88533329101665f 100644 (file)
@@ -250,7 +250,7 @@ public class PaymentParameters extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.PaymentParameters b) {
-               boolean ret = bindings.PaymentParameters_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.PaymentParameters_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -328,7 +328,7 @@ public class PaymentParameters extends CommonBase {
         * [`PaymentParameters::expiry_time`].
         */
        public static PaymentParameters from_bolt12_invoice(org.ldk.structs.Bolt12Invoice invoice) {
-               long ret = bindings.PaymentParameters_from_bolt12_invoice(invoice == null ? 0 : invoice.ptr);
+               long ret = bindings.PaymentParameters_from_bolt12_invoice(invoice.ptr);
                Reference.reachabilityFence(invoice);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.PaymentParameters ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PaymentParameters(null, ret); }
@@ -341,7 +341,7 @@ public class PaymentParameters extends CommonBase {
         * Creates parameters for paying to a blinded payee from the provided blinded route hints.
         */
        public static PaymentParameters blinded(TwoTuple_BlindedPayInfoBlindedPathZ[] blinded_route_hints) {
-               long ret = bindings.PaymentParameters_blinded(blinded_route_hints != null ? Arrays.stream(blinded_route_hints).mapToLong(blinded_route_hints_conv_37 -> blinded_route_hints_conv_37 != null ? blinded_route_hints_conv_37.ptr : 0).toArray() : null);
+               long ret = bindings.PaymentParameters_blinded(blinded_route_hints != null ? Arrays.stream(blinded_route_hints).mapToLong(blinded_route_hints_conv_37 -> blinded_route_hints_conv_37.ptr).toArray() : null);
                Reference.reachabilityFence(blinded_route_hints);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.PaymentParameters ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PaymentParameters(null, ret); }
index 4b969dd16412f336ee5dac217755dcc6c399ed34..5b915e2f8e1954a0670a9e5a26a961e37934c934 100644 (file)
@@ -22,8 +22,14 @@ public class PaymentPurpose extends CommonBase {
        }
        static PaymentPurpose constr_from_ptr(long ptr) {
                bindings.LDKPaymentPurpose raw_val = bindings.LDKPaymentPurpose_ref_from_ptr(ptr);
-               if (raw_val.getClass() == bindings.LDKPaymentPurpose.InvoicePayment.class) {
-                       return new InvoicePayment(ptr, (bindings.LDKPaymentPurpose.InvoicePayment)raw_val);
+               if (raw_val.getClass() == bindings.LDKPaymentPurpose.Bolt11InvoicePayment.class) {
+                       return new Bolt11InvoicePayment(ptr, (bindings.LDKPaymentPurpose.Bolt11InvoicePayment)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKPaymentPurpose.Bolt12OfferPayment.class) {
+                       return new Bolt12OfferPayment(ptr, (bindings.LDKPaymentPurpose.Bolt12OfferPayment)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKPaymentPurpose.Bolt12RefundPayment.class) {
+                       return new Bolt12RefundPayment(ptr, (bindings.LDKPaymentPurpose.Bolt12RefundPayment)raw_val);
                }
                if (raw_val.getClass() == bindings.LDKPaymentPurpose.SpontaneousPayment.class) {
                        return new SpontaneousPayment(ptr, (bindings.LDKPaymentPurpose.SpontaneousPayment)raw_val);
@@ -32,13 +38,14 @@ public class PaymentPurpose extends CommonBase {
        }
 
        /**
-        * Information for receiving a payment that we generated an invoice for.
+        * A payment for a BOLT 11 invoice.
         */
-       public final static class InvoicePayment extends PaymentPurpose {
+       public final static class Bolt11InvoicePayment extends PaymentPurpose {
                /**
                 * The preimage to the payment_hash, if the payment hash (and secret) were fetched via
-                * [`ChannelManager::create_inbound_payment`]. If provided, this can be handed directly to
-                * [`ChannelManager::claim_funds`].
+                * [`ChannelManager::create_inbound_payment`]. When handling [`Event::PaymentClaimable`],
+                * this can be passed directly to [`ChannelManager::claim_funds`] to claim the payment. No
+                * action is needed when seen in [`Event::PaymentClaimed`].
                 * 
                 * [`ChannelManager::create_inbound_payment`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment
                 * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds
@@ -57,13 +64,95 @@ public class PaymentPurpose extends CommonBase {
                 * [`ChannelManager::create_inbound_payment_for_hash`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash
                */
                public final byte[] payment_secret;
-               private InvoicePayment(long ptr, bindings.LDKPaymentPurpose.InvoicePayment obj) {
+               private Bolt11InvoicePayment(long ptr, bindings.LDKPaymentPurpose.Bolt11InvoicePayment obj) {
+                       super(null, ptr);
+                       long payment_preimage = obj.payment_preimage;
+                       org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(payment_preimage);
+                       if (payment_preimage_hu_conv != null) { payment_preimage_hu_conv.ptrs_to.add(this); };
+                       this.payment_preimage = payment_preimage_hu_conv;
+                       this.payment_secret = obj.payment_secret;
+               }
+       }
+       /**
+        * A payment for a BOLT 12 [`Offer`].
+        * 
+        * [`Offer`]: crate::offers::offer::Offer
+        */
+       public final static class Bolt12OfferPayment extends PaymentPurpose {
+               /**
+                * The preimage to the payment hash. When handling [`Event::PaymentClaimable`], this can be
+                * passed directly to [`ChannelManager::claim_funds`], if provided. No action is needed
+                * when seen in [`Event::PaymentClaimed`].
+                * 
+                * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds
+               */
+               public final org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage;
+               /**
+                * The secret used to authenticate the sender to the recipient, preventing a number of
+                * de-anonymization attacks while routing a payment.
+                * 
+                * See [`PaymentPurpose::Bolt11InvoicePayment::payment_secret`] for further details.
+               */
+               public final byte[] payment_secret;
+               /**
+                * The context of the payment such as information about the corresponding [`Offer`] and
+                * [`InvoiceRequest`].
+                * 
+                * [`Offer`]: crate::offers::offer::Offer
+                * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+               */
+               public final org.ldk.structs.Bolt12OfferContext payment_context;
+               private Bolt12OfferPayment(long ptr, bindings.LDKPaymentPurpose.Bolt12OfferPayment obj) {
+                       super(null, ptr);
+                       long payment_preimage = obj.payment_preimage;
+                       org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(payment_preimage);
+                       if (payment_preimage_hu_conv != null) { payment_preimage_hu_conv.ptrs_to.add(this); };
+                       this.payment_preimage = payment_preimage_hu_conv;
+                       this.payment_secret = obj.payment_secret;
+                       long payment_context = obj.payment_context;
+                       org.ldk.structs.Bolt12OfferContext payment_context_hu_conv = null; if (payment_context < 0 || payment_context > 4096) { payment_context_hu_conv = new org.ldk.structs.Bolt12OfferContext(null, payment_context); }
+                       if (payment_context_hu_conv != null) { payment_context_hu_conv.ptrs_to.add(this); };
+                       this.payment_context = payment_context_hu_conv;
+               }
+       }
+       /**
+        * A payment for a BOLT 12 [`Refund`].
+        * 
+        * [`Refund`]: crate::offers::refund::Refund
+        */
+       public final static class Bolt12RefundPayment extends PaymentPurpose {
+               /**
+                * The preimage to the payment hash. When handling [`Event::PaymentClaimable`], this can be
+                * passed directly to [`ChannelManager::claim_funds`], if provided. No action is needed
+                * when seen in [`Event::PaymentClaimed`].
+                * 
+                * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds
+               */
+               public final org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage;
+               /**
+                * The secret used to authenticate the sender to the recipient, preventing a number of
+                * de-anonymization attacks while routing a payment.
+                * 
+                * See [`PaymentPurpose::Bolt11InvoicePayment::payment_secret`] for further details.
+               */
+               public final byte[] payment_secret;
+               /**
+                * The context of the payment such as information about the corresponding [`Refund`].
+                * 
+                * [`Refund`]: crate::offers::refund::Refund
+               */
+               public final org.ldk.structs.Bolt12RefundContext payment_context;
+               private Bolt12RefundPayment(long ptr, bindings.LDKPaymentPurpose.Bolt12RefundPayment obj) {
                        super(null, ptr);
                        long payment_preimage = obj.payment_preimage;
                        org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(payment_preimage);
                        if (payment_preimage_hu_conv != null) { payment_preimage_hu_conv.ptrs_to.add(this); };
                        this.payment_preimage = payment_preimage_hu_conv;
                        this.payment_secret = obj.payment_secret;
+                       long payment_context = obj.payment_context;
+                       org.ldk.structs.Bolt12RefundContext payment_context_hu_conv = null; if (payment_context < 0 || payment_context > 4096) { payment_context_hu_conv = new org.ldk.structs.Bolt12RefundContext(null, payment_context); }
+                       if (payment_context_hu_conv != null) { payment_context_hu_conv.ptrs_to.add(this); };
+                       this.payment_context = payment_context_hu_conv;
                }
        }
        /**
@@ -96,16 +185,48 @@ public class PaymentPurpose extends CommonBase {
        }
 
        /**
-        * Utility method to constructs a new InvoicePayment-variant PaymentPurpose
+        * Utility method to constructs a new Bolt11InvoicePayment-variant PaymentPurpose
+        */
+       public static PaymentPurpose bolt11_invoice_payment(org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, byte[] payment_secret) {
+               long ret = bindings.PaymentPurpose_bolt11_invoice_payment(payment_preimage.ptr, InternalUtils.check_arr_len(payment_secret, 32));
+               Reference.reachabilityFence(payment_preimage);
+               Reference.reachabilityFence(payment_secret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.PaymentPurpose ret_hu_conv = org.ldk.structs.PaymentPurpose.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_preimage); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new Bolt12OfferPayment-variant PaymentPurpose
+        */
+       public static PaymentPurpose bolt12_offer_payment(org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, byte[] payment_secret, org.ldk.structs.Bolt12OfferContext payment_context) {
+               long ret = bindings.PaymentPurpose_bolt12_offer_payment(payment_preimage.ptr, InternalUtils.check_arr_len(payment_secret, 32), payment_context.ptr);
+               Reference.reachabilityFence(payment_preimage);
+               Reference.reachabilityFence(payment_secret);
+               Reference.reachabilityFence(payment_context);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.PaymentPurpose ret_hu_conv = org.ldk.structs.PaymentPurpose.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_preimage); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_context); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new Bolt12RefundPayment-variant PaymentPurpose
         */
-       public static PaymentPurpose invoice_payment(org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, byte[] payment_secret) {
-               long ret = bindings.PaymentPurpose_invoice_payment(payment_preimage.ptr, InternalUtils.check_arr_len(payment_secret, 32));
+       public static PaymentPurpose bolt12_refund_payment(org.ldk.structs.Option_ThirtyTwoBytesZ payment_preimage, byte[] payment_secret, org.ldk.structs.Bolt12RefundContext payment_context) {
+               long ret = bindings.PaymentPurpose_bolt12_refund_payment(payment_preimage.ptr, InternalUtils.check_arr_len(payment_secret, 32), payment_context.ptr);
                Reference.reachabilityFence(payment_preimage);
                Reference.reachabilityFence(payment_secret);
+               Reference.reachabilityFence(payment_context);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.PaymentPurpose ret_hu_conv = org.ldk.structs.PaymentPurpose.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_preimage); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_context); };
                return ret_hu_conv;
        }
 
@@ -126,7 +247,7 @@ public class PaymentPurpose extends CommonBase {
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.PaymentPurpose b) {
-               boolean ret = bindings.PaymentPurpose_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.PaymentPurpose_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
index 19bf83e59f68dd5038ff476733ee3f294d090764..5805c66baa48bad25f52e1995d69e855bdcedab7 100644 (file)
@@ -216,7 +216,7 @@ public class PaymentSendFailure extends CommonBase {
         * Utility method to constructs a new PathParameterError-variant PaymentSendFailure
         */
        public static PaymentSendFailure path_parameter_error(Result_NoneAPIErrorZ[] a) {
-               long ret = bindings.PaymentSendFailure_path_parameter_error(a != null ? Arrays.stream(a).mapToLong(a_conv_22 -> a_conv_22 != null ? a_conv_22.ptr : 0).toArray() : null);
+               long ret = bindings.PaymentSendFailure_path_parameter_error(a != null ? Arrays.stream(a).mapToLong(a_conv_22 -> a_conv_22.ptr).toArray() : null);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.PaymentSendFailure ret_hu_conv = org.ldk.structs.PaymentSendFailure.constr_from_ptr(ret);
@@ -252,7 +252,7 @@ public class PaymentSendFailure extends CommonBase {
         * Utility method to constructs a new PartialFailure-variant PaymentSendFailure
         */
        public static PaymentSendFailure partial_failure(Result_NoneAPIErrorZ[] results, org.ldk.structs.RouteParameters failed_paths_retry, byte[] payment_id) {
-               long ret = bindings.PaymentSendFailure_partial_failure(results != null ? Arrays.stream(results).mapToLong(results_conv_22 -> results_conv_22 != null ? results_conv_22.ptr : 0).toArray() : null, failed_paths_retry == null ? 0 : failed_paths_retry.ptr, InternalUtils.check_arr_len(payment_id, 32));
+               long ret = bindings.PaymentSendFailure_partial_failure(results != null ? Arrays.stream(results).mapToLong(results_conv_22 -> results_conv_22.ptr).toArray() : null, failed_paths_retry.ptr, InternalUtils.check_arr_len(payment_id, 32));
                Reference.reachabilityFence(results);
                Reference.reachabilityFence(failed_paths_retry);
                Reference.reachabilityFence(payment_id);
@@ -268,7 +268,7 @@ public class PaymentSendFailure extends CommonBase {
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.PaymentSendFailure b) {
-               boolean ret = bindings.PaymentSendFailure_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.PaymentSendFailure_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
index 7787d1f407eddf004b04f40a62a104fe30cb842d..587c32b9d71cb4ad79f7e1bb820c606ee9b64edc 100644 (file)
@@ -35,11 +35,14 @@ public class PeeledOnion extends CommonBase {
         * Forwarded onion, with the next node id and a new onion
         */
        public final static class Forward extends PeeledOnion {
-               public final byte[] _0;
+               public final org.ldk.structs.NextMessageHop _0;
                public final org.ldk.structs.OnionMessage _1;
                private Forward(long ptr, bindings.LDKPeeledOnion.Forward obj) {
                        super(null, ptr);
-                       this._0 = obj._0;
+                       long _0 = obj._0;
+                       org.ldk.structs.NextMessageHop _0_hu_conv = org.ldk.structs.NextMessageHop.constr_from_ptr(_0);
+                       if (_0_hu_conv != null) { _0_hu_conv.ptrs_to.add(this); };
+                       this._0 = _0_hu_conv;
                        long _1 = obj._1;
                        org.ldk.structs.OnionMessage _1_hu_conv = null; if (_1 < 0 || _1 > 4096) { _1_hu_conv = new org.ldk.structs.OnionMessage(null, _1); }
                        if (_1_hu_conv != null) { _1_hu_conv.ptrs_to.add(this); };
@@ -93,13 +96,14 @@ public class PeeledOnion extends CommonBase {
        /**
         * Utility method to constructs a new Forward-variant PeeledOnion
         */
-       public static PeeledOnion forward(byte[] a, org.ldk.structs.OnionMessage b) {
-               long ret = bindings.PeeledOnion_forward(InternalUtils.check_arr_len(a, 33), b == null ? 0 : b.ptr);
+       public static PeeledOnion forward(org.ldk.structs.NextMessageHop a, org.ldk.structs.OnionMessage b) {
+               long ret = bindings.PeeledOnion_forward(a.ptr, b.ptr);
                Reference.reachabilityFence(a);
                Reference.reachabilityFence(b);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.PeeledOnion ret_hu_conv = org.ldk.structs.PeeledOnion.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b); };
                return ret_hu_conv;
        }
@@ -108,7 +112,7 @@ public class PeeledOnion extends CommonBase {
         * Utility method to constructs a new Receive-variant PeeledOnion
         */
        public static PeeledOnion receive(org.ldk.structs.ParsedOnionMessageContents a, byte[] b, org.ldk.structs.BlindedPath c) {
-               long ret = bindings.PeeledOnion_receive(a.ptr, InternalUtils.check_arr_len(b, 32), c == null ? 0 : c.ptr);
+               long ret = bindings.PeeledOnion_receive(a.ptr, InternalUtils.check_arr_len(b, 32), c.ptr);
                Reference.reachabilityFence(a);
                Reference.reachabilityFence(b);
                Reference.reachabilityFence(c);
diff --git a/src/main/java/org/ldk/structs/PeerDetails.java b/src/main/java/org/ldk/structs/PeerDetails.java
new file mode 100644 (file)
index 0000000..9e44910
--- /dev/null
@@ -0,0 +1,138 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Details of a connected peer as returned by [`PeerManager::list_peers`].
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class PeerDetails extends CommonBase {
+       PeerDetails(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.PeerDetails_free(ptr); }
+       }
+
+       /**
+        * The node id of the peer.
+        * 
+        * For outbound connections, this [`PublicKey`] will be the same as the `their_node_id` parameter
+        * passed in to [`PeerManager::new_outbound_connection`].
+        */
+       public byte[] get_counterparty_node_id() {
+               byte[] ret = bindings.PeerDetails_get_counterparty_node_id(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * The node id of the peer.
+        * 
+        * For outbound connections, this [`PublicKey`] will be the same as the `their_node_id` parameter
+        * passed in to [`PeerManager::new_outbound_connection`].
+        */
+       public void set_counterparty_node_id(byte[] val) {
+               bindings.PeerDetails_set_counterparty_node_id(this.ptr, InternalUtils.check_arr_len(val, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * The socket address the peer provided in the initial handshake.
+        * 
+        * Will only be `Some` if an address had been previously provided to
+        * [`PeerManager::new_outbound_connection`] or [`PeerManager::new_inbound_connection`].
+        * 
+        * Returns a copy of the field.
+        */
+       public Option_SocketAddressZ get_socket_address() {
+               long ret = bindings.PeerDetails_get_socket_address(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_SocketAddressZ ret_hu_conv = org.ldk.structs.Option_SocketAddressZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * The socket address the peer provided in the initial handshake.
+        * 
+        * Will only be `Some` if an address had been previously provided to
+        * [`PeerManager::new_outbound_connection`] or [`PeerManager::new_inbound_connection`].
+        */
+       public void set_socket_address(org.ldk.structs.Option_SocketAddressZ val) {
+               bindings.PeerDetails_set_socket_address(this.ptr, val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
+       }
+
+       /**
+        * The features the peer provided in the initial handshake.
+        */
+       public InitFeatures get_init_features() {
+               long ret = bindings.PeerDetails_get_init_features(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.InitFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InitFeatures(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * The features the peer provided in the initial handshake.
+        */
+       public void set_init_features(org.ldk.structs.InitFeatures val) {
+               bindings.PeerDetails_set_init_features(this.ptr, val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
+       }
+
+       /**
+        * Indicates the direction of the peer connection.
+        * 
+        * Will be `true` for inbound connections, and `false` for outbound connections.
+        */
+       public boolean get_is_inbound_connection() {
+               boolean ret = bindings.PeerDetails_get_is_inbound_connection(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Indicates the direction of the peer connection.
+        * 
+        * Will be `true` for inbound connections, and `false` for outbound connections.
+        */
+       public void set_is_inbound_connection(boolean val) {
+               bindings.PeerDetails_set_is_inbound_connection(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * Constructs a new PeerDetails given each field
+        */
+       public static PeerDetails of(byte[] counterparty_node_id_arg, org.ldk.structs.Option_SocketAddressZ socket_address_arg, org.ldk.structs.InitFeatures init_features_arg, boolean is_inbound_connection_arg) {
+               long ret = bindings.PeerDetails_new(InternalUtils.check_arr_len(counterparty_node_id_arg, 33), socket_address_arg.ptr, init_features_arg.ptr, is_inbound_connection_arg);
+               Reference.reachabilityFence(counterparty_node_id_arg);
+               Reference.reachabilityFence(socket_address_arg);
+               Reference.reachabilityFence(init_features_arg);
+               Reference.reachabilityFence(is_inbound_connection_arg);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.PeerDetails ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PeerDetails(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(socket_address_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(init_features_arg); };
+               return ret_hu_conv;
+       }
+
+}
index c12f1d159c57587c0602d994aaf1fadc41ad47ee..fbec38a6401979550ed4bf11b14da55390a880ab 100644 (file)
@@ -72,29 +72,39 @@ public class PeerManager extends CommonBase {
        }
 
        /**
-        * Get a list of tuples mapping from node id to network addresses for peers which have
-        * completed the initial handshake.
+        * Returns a list of [`PeerDetails`] for connected peers that have completed the initial
+        * handshake.
+        */
+       public PeerDetails[] list_peers() {
+               long[] ret = bindings.PeerManager_list_peers(this.ptr);
+               Reference.reachabilityFence(this);
+               int ret_conv_13_len = ret.length;
+               PeerDetails[] ret_conv_13_arr = new PeerDetails[ret_conv_13_len];
+               for (int n = 0; n < ret_conv_13_len; n++) {
+                       long ret_conv_13 = ret[n];
+                       org.ldk.structs.PeerDetails ret_conv_13_hu_conv = null; if (ret_conv_13 < 0 || ret_conv_13 > 4096) { ret_conv_13_hu_conv = new org.ldk.structs.PeerDetails(null, ret_conv_13); }
+                       if (ret_conv_13_hu_conv != null) { ret_conv_13_hu_conv.ptrs_to.add(this); };
+                       ret_conv_13_arr[n] = ret_conv_13_hu_conv;
+               }
+               return ret_conv_13_arr;
+       }
+
+       /**
+        * Returns the [`PeerDetails`] of a connected peer that has completed the initial handshake.
         * 
-        * For outbound connections, the [`PublicKey`] will be the same as the `their_node_id` parameter
-        * passed in to [`Self::new_outbound_connection`], however entries will only appear once the initial
-        * handshake has completed and we are sure the remote peer has the private key for the given
-        * [`PublicKey`].
+        * Will return `None` if the peer is unknown or it hasn't completed the initial handshake.
         * 
-        * The returned `Option`s will only be `Some` if an address had been previously given via
-        * [`Self::new_outbound_connection`] or [`Self::new_inbound_connection`].
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public TwoTuple_PublicKeyCOption_SocketAddressZZ[] get_peer_node_ids() {
-               long[] ret = bindings.PeerManager_get_peer_node_ids(this.ptr);
+       @Nullable
+       public PeerDetails peer_by_node_id(byte[] their_node_id) {
+               long ret = bindings.PeerManager_peer_by_node_id(this.ptr, InternalUtils.check_arr_len(their_node_id, 33));
                Reference.reachabilityFence(this);
-               int ret_conv_43_len = ret.length;
-               TwoTuple_PublicKeyCOption_SocketAddressZZ[] ret_conv_43_arr = new TwoTuple_PublicKeyCOption_SocketAddressZZ[ret_conv_43_len];
-               for (int r = 0; r < ret_conv_43_len; r++) {
-                       long ret_conv_43 = ret[r];
-                       TwoTuple_PublicKeyCOption_SocketAddressZZ ret_conv_43_hu_conv = new TwoTuple_PublicKeyCOption_SocketAddressZZ(null, ret_conv_43);
-                       if (ret_conv_43_hu_conv != null) { ret_conv_43_hu_conv.ptrs_to.add(this); };
-                       ret_conv_43_arr[r] = ret_conv_43_hu_conv;
-               }
-               return ret_conv_43_arr;
+               Reference.reachabilityFence(their_node_id);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.PeerDetails ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PeerDetails(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
index 58e3433af79c3e1b516314e7bd0fbc113b316102..2284ea64f58d2f11b5b1e0011ed0b32f9f83f8e2 100644 (file)
@@ -90,6 +90,13 @@ public class PendingHTLCRouting extends CommonBase {
                 * [`RecipientOnionFields::payment_metadata`].
                */
                public final org.ldk.structs.Option_CVec_u8ZZ payment_metadata;
+               /**
+                * The context of the payment included by the recipient in a blinded path, or `None` if a
+                * blinded path was not used.
+                * 
+                * Used in part to determine the [`events::PaymentPurpose`].
+               */
+               public final org.ldk.structs.Option_PaymentContextZ payment_context;
                /**
                 * CLTV expiry of the received HTLC.
                 * 
@@ -126,6 +133,10 @@ public class PendingHTLCRouting extends CommonBase {
                        org.ldk.structs.Option_CVec_u8ZZ payment_metadata_hu_conv = org.ldk.structs.Option_CVec_u8ZZ.constr_from_ptr(payment_metadata);
                        if (payment_metadata_hu_conv != null) { payment_metadata_hu_conv.ptrs_to.add(this); };
                        this.payment_metadata = payment_metadata_hu_conv;
+                       long payment_context = obj.payment_context;
+                       org.ldk.structs.Option_PaymentContextZ payment_context_hu_conv = org.ldk.structs.Option_PaymentContextZ.constr_from_ptr(payment_context);
+                       if (payment_context_hu_conv != null) { payment_context_hu_conv.ptrs_to.add(this); };
+                       this.payment_context = payment_context_hu_conv;
                        this.incoming_cltv_expiry = obj.incoming_cltv_expiry;
                        this.phantom_shared_secret = obj.phantom_shared_secret;
                        long[] custom_tlvs = obj.custom_tlvs;
@@ -182,6 +193,10 @@ public class PendingHTLCRouting extends CommonBase {
                 * [`RecipientOnionFields::custom_tlvs`].
                */
                public final TwoTuple_u64CVec_u8ZZ[] custom_tlvs;
+               /**
+                * Set if this HTLC is the final hop in a multi-hop blinded path.
+               */
+               public final boolean requires_blinded_error;
                private ReceiveKeysend(long ptr, bindings.LDKPendingHTLCRouting.ReceiveKeysend obj) {
                        super(null, ptr);
                        long payment_data = obj.payment_data;
@@ -204,6 +219,7 @@ public class PendingHTLCRouting extends CommonBase {
                                custom_tlvs_conv_23_arr[x] = custom_tlvs_conv_23_hu_conv;
                        }
                        this.custom_tlvs = custom_tlvs_conv_23_arr;
+                       this.requires_blinded_error = obj.requires_blinded_error;
                }
        }
        long clone_ptr() {
@@ -228,7 +244,7 @@ public class PendingHTLCRouting extends CommonBase {
         * Utility method to constructs a new Forward-variant PendingHTLCRouting
         */
        public static PendingHTLCRouting forward(org.ldk.structs.OnionPacket onion_packet, long short_channel_id, org.ldk.structs.BlindedForward blinded) {
-               long ret = bindings.PendingHTLCRouting_forward(onion_packet == null ? 0 : onion_packet.ptr, short_channel_id, blinded == null ? 0 : blinded.ptr);
+               long ret = bindings.PendingHTLCRouting_forward(onion_packet.ptr, short_channel_id, blinded.ptr);
                Reference.reachabilityFence(onion_packet);
                Reference.reachabilityFence(short_channel_id);
                Reference.reachabilityFence(blinded);
@@ -243,10 +259,11 @@ public class PendingHTLCRouting extends CommonBase {
        /**
         * Utility method to constructs a new Receive-variant PendingHTLCRouting
         */
-       public static PendingHTLCRouting receive(org.ldk.structs.FinalOnionHopData payment_data, org.ldk.structs.Option_CVec_u8ZZ payment_metadata, int incoming_cltv_expiry, byte[] phantom_shared_secret, TwoTuple_u64CVec_u8ZZ[] custom_tlvs, boolean requires_blinded_error) {
-               long ret = bindings.PendingHTLCRouting_receive(payment_data == null ? 0 : payment_data.ptr, payment_metadata.ptr, incoming_cltv_expiry, InternalUtils.check_arr_len(phantom_shared_secret, 32), custom_tlvs != null ? Arrays.stream(custom_tlvs).mapToLong(custom_tlvs_conv_23 -> custom_tlvs_conv_23 != null ? custom_tlvs_conv_23.ptr : 0).toArray() : null, requires_blinded_error);
+       public static PendingHTLCRouting receive(org.ldk.structs.FinalOnionHopData payment_data, org.ldk.structs.Option_CVec_u8ZZ payment_metadata, org.ldk.structs.Option_PaymentContextZ payment_context, int incoming_cltv_expiry, byte[] phantom_shared_secret, TwoTuple_u64CVec_u8ZZ[] custom_tlvs, boolean requires_blinded_error) {
+               long ret = bindings.PendingHTLCRouting_receive(payment_data.ptr, payment_metadata.ptr, payment_context.ptr, incoming_cltv_expiry, InternalUtils.check_arr_len(phantom_shared_secret, 32), custom_tlvs != null ? Arrays.stream(custom_tlvs).mapToLong(custom_tlvs_conv_23 -> custom_tlvs_conv_23.ptr).toArray() : null, requires_blinded_error);
                Reference.reachabilityFence(payment_data);
                Reference.reachabilityFence(payment_metadata);
+               Reference.reachabilityFence(payment_context);
                Reference.reachabilityFence(incoming_cltv_expiry);
                Reference.reachabilityFence(phantom_shared_secret);
                Reference.reachabilityFence(custom_tlvs);
@@ -256,19 +273,21 @@ public class PendingHTLCRouting extends CommonBase {
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_data); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_metadata); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_context); };
                return ret_hu_conv;
        }
 
        /**
         * Utility method to constructs a new ReceiveKeysend-variant PendingHTLCRouting
         */
-       public static PendingHTLCRouting receive_keysend(org.ldk.structs.FinalOnionHopData payment_data, byte[] payment_preimage, org.ldk.structs.Option_CVec_u8ZZ payment_metadata, int incoming_cltv_expiry, TwoTuple_u64CVec_u8ZZ[] custom_tlvs) {
-               long ret = bindings.PendingHTLCRouting_receive_keysend(payment_data == null ? 0 : payment_data.ptr, InternalUtils.check_arr_len(payment_preimage, 32), payment_metadata.ptr, incoming_cltv_expiry, custom_tlvs != null ? Arrays.stream(custom_tlvs).mapToLong(custom_tlvs_conv_23 -> custom_tlvs_conv_23 != null ? custom_tlvs_conv_23.ptr : 0).toArray() : null);
+       public static PendingHTLCRouting receive_keysend(org.ldk.structs.FinalOnionHopData payment_data, byte[] payment_preimage, org.ldk.structs.Option_CVec_u8ZZ payment_metadata, int incoming_cltv_expiry, TwoTuple_u64CVec_u8ZZ[] custom_tlvs, boolean requires_blinded_error) {
+               long ret = bindings.PendingHTLCRouting_receive_keysend(payment_data.ptr, InternalUtils.check_arr_len(payment_preimage, 32), payment_metadata.ptr, incoming_cltv_expiry, custom_tlvs != null ? Arrays.stream(custom_tlvs).mapToLong(custom_tlvs_conv_23 -> custom_tlvs_conv_23.ptr).toArray() : null, requires_blinded_error);
                Reference.reachabilityFence(payment_data);
                Reference.reachabilityFence(payment_preimage);
                Reference.reachabilityFence(payment_metadata);
                Reference.reachabilityFence(incoming_cltv_expiry);
                Reference.reachabilityFence(custom_tlvs);
+               Reference.reachabilityFence(requires_blinded_error);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.PendingHTLCRouting ret_hu_conv = org.ldk.structs.PendingHTLCRouting.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
index db7a6114b84d10f2a8253601422c1a28d75671a0..baf592f11f76698e95354690e6c3a0cd38daf2c2 100644 (file)
@@ -108,7 +108,7 @@ public class Persist extends CommonBase {
                 * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
                 * [`Writeable::write`]: crate::util::ser::Writeable::write
                 */
-               ChannelMonitorUpdateStatus persist_new_channel(OutPoint channel_id, ChannelMonitor data, MonitorUpdateId update_id);
+               ChannelMonitorUpdateStatus persist_new_channel(OutPoint channel_funding_outpoint, ChannelMonitor data, MonitorUpdateId update_id);
                /**
                 * Update one channel's data. The provided [`ChannelMonitor`] has already applied the given
                 * update.
@@ -146,34 +146,47 @@ public class Persist extends CommonBase {
                 * 
                 * Note that update (or a relevant inner pointer) may be NULL or all-0s to represent None
                 */
-               ChannelMonitorUpdateStatus update_persisted_channel(OutPoint channel_id, ChannelMonitorUpdate update, ChannelMonitor data, MonitorUpdateId update_id);
+               ChannelMonitorUpdateStatus update_persisted_channel(OutPoint channel_funding_outpoint, ChannelMonitorUpdate update, ChannelMonitor data, MonitorUpdateId update_id);
+               /**
+                * Prevents the channel monitor from being loaded on startup.
+                * 
+                * Archiving the data in a backup location (rather than deleting it fully) is useful for
+                * hedging against data loss in case of unexpected failure.
+                */
+               void archive_persisted_channel(OutPoint channel_funding_outpoint);
        }
        private static class LDKPersistHolder { Persist held; }
        public static Persist new_impl(PersistInterface arg) {
                final LDKPersistHolder impl_holder = new LDKPersistHolder();
                impl_holder.held = new Persist(new bindings.LDKPersist() {
-                       @Override public ChannelMonitorUpdateStatus persist_new_channel(long channel_id, long data, long update_id) {
-                               org.ldk.structs.OutPoint channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.OutPoint(null, channel_id); }
-                               if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
+                       @Override public ChannelMonitorUpdateStatus persist_new_channel(long channel_funding_outpoint, long data, long update_id) {
+                               org.ldk.structs.OutPoint channel_funding_outpoint_hu_conv = null; if (channel_funding_outpoint < 0 || channel_funding_outpoint > 4096) { channel_funding_outpoint_hu_conv = new org.ldk.structs.OutPoint(null, channel_funding_outpoint); }
+                               if (channel_funding_outpoint_hu_conv != null) { channel_funding_outpoint_hu_conv.ptrs_to.add(this); };
                                org.ldk.structs.ChannelMonitor data_hu_conv = null; if (data < 0 || data > 4096) { data_hu_conv = new org.ldk.structs.ChannelMonitor(null, data); }
                                org.ldk.structs.MonitorUpdateId update_id_hu_conv = null; if (update_id < 0 || update_id > 4096) { update_id_hu_conv = new org.ldk.structs.MonitorUpdateId(null, update_id); }
                                if (update_id_hu_conv != null) { update_id_hu_conv.ptrs_to.add(this); };
-                               ChannelMonitorUpdateStatus ret = arg.persist_new_channel(channel_id_hu_conv, data_hu_conv, update_id_hu_conv);
+                               ChannelMonitorUpdateStatus ret = arg.persist_new_channel(channel_funding_outpoint_hu_conv, data_hu_conv, update_id_hu_conv);
                                Reference.reachabilityFence(arg);
                                return ret;
                        }
-                       @Override public ChannelMonitorUpdateStatus update_persisted_channel(long channel_id, long update, long data, long update_id) {
-                               org.ldk.structs.OutPoint channel_id_hu_conv = null; if (channel_id < 0 || channel_id > 4096) { channel_id_hu_conv = new org.ldk.structs.OutPoint(null, channel_id); }
-                               if (channel_id_hu_conv != null) { channel_id_hu_conv.ptrs_to.add(this); };
+                       @Override public ChannelMonitorUpdateStatus update_persisted_channel(long channel_funding_outpoint, long update, long data, long update_id) {
+                               org.ldk.structs.OutPoint channel_funding_outpoint_hu_conv = null; if (channel_funding_outpoint < 0 || channel_funding_outpoint > 4096) { channel_funding_outpoint_hu_conv = new org.ldk.structs.OutPoint(null, channel_funding_outpoint); }
+                               if (channel_funding_outpoint_hu_conv != null) { channel_funding_outpoint_hu_conv.ptrs_to.add(this); };
                                org.ldk.structs.ChannelMonitorUpdate update_hu_conv = null; if (update < 0 || update > 4096) { update_hu_conv = new org.ldk.structs.ChannelMonitorUpdate(null, update); }
                                if (update_hu_conv != null) { update_hu_conv.ptrs_to.add(this); };
                                org.ldk.structs.ChannelMonitor data_hu_conv = null; if (data < 0 || data > 4096) { data_hu_conv = new org.ldk.structs.ChannelMonitor(null, data); }
                                org.ldk.structs.MonitorUpdateId update_id_hu_conv = null; if (update_id < 0 || update_id > 4096) { update_id_hu_conv = new org.ldk.structs.MonitorUpdateId(null, update_id); }
                                if (update_id_hu_conv != null) { update_id_hu_conv.ptrs_to.add(this); };
-                               ChannelMonitorUpdateStatus ret = arg.update_persisted_channel(channel_id_hu_conv, update_hu_conv, data_hu_conv, update_id_hu_conv);
+                               ChannelMonitorUpdateStatus ret = arg.update_persisted_channel(channel_funding_outpoint_hu_conv, update_hu_conv, data_hu_conv, update_id_hu_conv);
                                Reference.reachabilityFence(arg);
                                return ret;
                        }
+                       @Override public void archive_persisted_channel(long channel_funding_outpoint) {
+                               org.ldk.structs.OutPoint channel_funding_outpoint_hu_conv = null; if (channel_funding_outpoint < 0 || channel_funding_outpoint > 4096) { channel_funding_outpoint_hu_conv = new org.ldk.structs.OutPoint(null, channel_funding_outpoint); }
+                               if (channel_funding_outpoint_hu_conv != null) { channel_funding_outpoint_hu_conv.ptrs_to.add(this); };
+                               arg.archive_persisted_channel(channel_funding_outpoint_hu_conv);
+                               Reference.reachabilityFence(arg);
+                       }
                });
                return impl_holder.held;
        }
@@ -194,13 +207,13 @@ public class Persist extends CommonBase {
         * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
         * [`Writeable::write`]: crate::util::ser::Writeable::write
         */
-       public ChannelMonitorUpdateStatus persist_new_channel(org.ldk.structs.OutPoint channel_id, org.ldk.structs.ChannelMonitor data, org.ldk.structs.MonitorUpdateId update_id) {
-               ChannelMonitorUpdateStatus ret = bindings.Persist_persist_new_channel(this.ptr, channel_id == null ? 0 : channel_id.ptr, data == null ? 0 : data.ptr, update_id == null ? 0 : update_id.ptr);
+       public ChannelMonitorUpdateStatus persist_new_channel(org.ldk.structs.OutPoint channel_funding_outpoint, org.ldk.structs.ChannelMonitor data, org.ldk.structs.MonitorUpdateId update_id) {
+               ChannelMonitorUpdateStatus ret = bindings.Persist_persist_new_channel(this.ptr, channel_funding_outpoint.ptr, data.ptr, update_id.ptr);
                Reference.reachabilityFence(this);
-               Reference.reachabilityFence(channel_id);
+               Reference.reachabilityFence(channel_funding_outpoint);
                Reference.reachabilityFence(data);
                Reference.reachabilityFence(update_id);
-               if (this != null) { this.ptrs_to.add(channel_id); };
+               if (this != null) { this.ptrs_to.add(channel_funding_outpoint); };
                if (this != null) { this.ptrs_to.add(data); };
                if (this != null) { this.ptrs_to.add(update_id); };
                return ret;
@@ -243,18 +256,31 @@ public class Persist extends CommonBase {
         * 
         * Note that update (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public ChannelMonitorUpdateStatus update_persisted_channel(org.ldk.structs.OutPoint channel_id, @Nullable org.ldk.structs.ChannelMonitorUpdate update, org.ldk.structs.ChannelMonitor data, org.ldk.structs.MonitorUpdateId update_id) {
-               ChannelMonitorUpdateStatus ret = bindings.Persist_update_persisted_channel(this.ptr, channel_id == null ? 0 : channel_id.ptr, update == null ? 0 : update.ptr, data == null ? 0 : data.ptr, update_id == null ? 0 : update_id.ptr);
+       public ChannelMonitorUpdateStatus update_persisted_channel(org.ldk.structs.OutPoint channel_funding_outpoint, @Nullable org.ldk.structs.ChannelMonitorUpdate update, org.ldk.structs.ChannelMonitor data, org.ldk.structs.MonitorUpdateId update_id) {
+               ChannelMonitorUpdateStatus ret = bindings.Persist_update_persisted_channel(this.ptr, channel_funding_outpoint.ptr, update == null ? 0 : update.ptr, data.ptr, update_id.ptr);
                Reference.reachabilityFence(this);
-               Reference.reachabilityFence(channel_id);
+               Reference.reachabilityFence(channel_funding_outpoint);
                Reference.reachabilityFence(update);
                Reference.reachabilityFence(data);
                Reference.reachabilityFence(update_id);
-               if (this != null) { this.ptrs_to.add(channel_id); };
+               if (this != null) { this.ptrs_to.add(channel_funding_outpoint); };
                if (this != null) { this.ptrs_to.add(update); };
                if (this != null) { this.ptrs_to.add(data); };
                if (this != null) { this.ptrs_to.add(update_id); };
                return ret;
        }
 
+       /**
+        * Prevents the channel monitor from being loaded on startup.
+        * 
+        * Archiving the data in a backup location (rather than deleting it fully) is useful for
+        * hedging against data loss in case of unexpected failure.
+        */
+       public void archive_persisted_channel(org.ldk.structs.OutPoint channel_funding_outpoint) {
+               bindings.Persist_archive_persisted_channel(this.ptr, channel_funding_outpoint.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(channel_funding_outpoint);
+               if (this != null) { this.ptrs_to.add(channel_funding_outpoint); };
+       }
+
 }
index 3a63215fb06b1e34258b57e1bdf48433914097ec..039004fb33b2f339cad9daa2528635fa72972bfc 100644 (file)
@@ -9,6 +9,8 @@ import javax.annotation.Nullable;
 
 /**
  * Trait that handles persisting a [`ChannelManager`], [`NetworkGraph`], and [`WriteableScore`] to disk.
+ * 
+ * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
  */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class Persister extends CommonBase {
@@ -39,6 +41,8 @@ public class Persister extends CommonBase {
        public static interface PersisterInterface {
                /**
                 * Persist the given ['ChannelManager'] to disk, returning an error if persistence failed.
+                * 
+                * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
                 */
                Result_NoneIOErrorZ persist_manager(ChannelManager channel_manager);
                /**
@@ -58,14 +62,14 @@ public class Persister extends CommonBase {
                                org.ldk.structs.ChannelManager channel_manager_hu_conv = null; if (channel_manager < 0 || channel_manager > 4096) { channel_manager_hu_conv = new org.ldk.structs.ChannelManager(null, channel_manager); }
                                Result_NoneIOErrorZ ret = arg.persist_manager(channel_manager_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long persist_graph(long network_graph) {
                                org.ldk.structs.NetworkGraph network_graph_hu_conv = null; if (network_graph < 0 || network_graph > 4096) { network_graph_hu_conv = new org.ldk.structs.NetworkGraph(null, network_graph); }
                                Result_NoneIOErrorZ ret = arg.persist_graph(network_graph_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long persist_scorer(long scorer) {
@@ -73,7 +77,7 @@ public class Persister extends CommonBase {
                                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                                Result_NoneIOErrorZ ret = arg.persist_scorer(ret_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                });
@@ -81,9 +85,11 @@ public class Persister extends CommonBase {
        }
        /**
         * Persist the given ['ChannelManager'] to disk, returning an error if persistence failed.
+        * 
+        * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
         */
        public Result_NoneIOErrorZ persist_manager(org.ldk.structs.ChannelManager channel_manager) {
-               long ret = bindings.Persister_persist_manager(this.ptr, channel_manager == null ? 0 : channel_manager.ptr);
+               long ret = bindings.Persister_persist_manager(this.ptr, channel_manager.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(channel_manager);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -96,7 +102,7 @@ public class Persister extends CommonBase {
         * Persist the given [`NetworkGraph`] to disk, returning an error if persistence failed.
         */
        public Result_NoneIOErrorZ persist_graph(org.ldk.structs.NetworkGraph network_graph) {
-               long ret = bindings.Persister_persist_graph(this.ptr, network_graph == null ? 0 : network_graph.ptr);
+               long ret = bindings.Persister_persist_graph(this.ptr, network_graph.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(network_graph);
                if (ret >= 0 && ret <= 4096) { return null; }
index f3791cf6fa43ffefbbcbb827f82a9ebe3d13cf45..3d8e66f68781ec791a2ca9c71a2641fc600ed77e 100644 (file)
@@ -60,6 +60,19 @@ public class PhantomKeysManager extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Constructs a new OutputSpender which calls the relevant methods on this_arg.
+        * This copies the `inner` pointer in this_arg and thus the returned OutputSpender must be freed before this_arg is
+        */
+       public OutputSpender as_OutputSpender() {
+               long ret = bindings.PhantomKeysManager_as_OutputSpender(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               OutputSpender ret_hu_conv = new OutputSpender(null, ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
        /**
         * Constructs a new SignerProvider which calls the relevant methods on this_arg.
         * This copies the `inner` pointer in this_arg and thus the returned SignerProvider must be freed before this_arg is
@@ -98,24 +111,6 @@ public class PhantomKeysManager extends CommonBase {
                return ret_hu_conv;
        }
 
-       /**
-        * See [`KeysManager::spend_spendable_outputs`] for documentation on this method.
-        */
-       public Result_TransactionNoneZ spend_spendable_outputs(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight, org.ldk.structs.Option_u32Z locktime) {
-               long ret = bindings.PhantomKeysManager_spend_spendable_outputs(this.ptr, descriptors != null ? Arrays.stream(descriptors).mapToLong(descriptors_conv_27 -> descriptors_conv_27.ptr).toArray() : null, outputs != null ? Arrays.stream(outputs).mapToLong(outputs_conv_7 -> outputs_conv_7.ptr).toArray() : null, change_destination_script, feerate_sat_per_1000_weight, locktime.ptr);
-               Reference.reachabilityFence(this);
-               Reference.reachabilityFence(descriptors);
-               Reference.reachabilityFence(outputs);
-               Reference.reachabilityFence(change_destination_script);
-               Reference.reachabilityFence(feerate_sat_per_1000_weight);
-               Reference.reachabilityFence(locktime);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
-               for (SpendableOutputDescriptor descriptors_conv_27: descriptors) { if (this != null) { this.ptrs_to.add(descriptors_conv_27); }; };
-               if (this != null) { this.ptrs_to.add(locktime); };
-               return ret_hu_conv;
-       }
-
        /**
         * See [`KeysManager::derive_channel_keys`] for documentation on this method.
         */
index 680ad1cdb7ce54e45d8fcb7c8ba6a77cc9743359..19b2686b853ea27b643b40038984b5c2dc1fb6ad 100644 (file)
@@ -43,7 +43,7 @@ public class PhantomRouteHints extends CommonBase {
         * The list of channels to be included in the invoice route hints.
         */
        public void set_channels(ChannelDetails[] val) {
-               bindings.PhantomRouteHints_set_channels(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_16 -> val_conv_16 == null ? 0 : val_conv_16.ptr).toArray() : null);
+               bindings.PhantomRouteHints_set_channels(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_16 -> val_conv_16.ptr).toArray() : null);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                for (ChannelDetails val_conv_16: val) { if (this != null) { this.ptrs_to.add(val_conv_16); }; };
@@ -91,7 +91,7 @@ public class PhantomRouteHints extends CommonBase {
         * Constructs a new PhantomRouteHints given each field
         */
        public static PhantomRouteHints of(ChannelDetails[] channels_arg, long phantom_scid_arg, byte[] real_node_pubkey_arg) {
-               long ret = bindings.PhantomRouteHints_new(channels_arg != null ? Arrays.stream(channels_arg).mapToLong(channels_arg_conv_16 -> channels_arg_conv_16 == null ? 0 : channels_arg_conv_16.ptr).toArray() : null, phantom_scid_arg, InternalUtils.check_arr_len(real_node_pubkey_arg, 33));
+               long ret = bindings.PhantomRouteHints_new(channels_arg != null ? Arrays.stream(channels_arg).mapToLong(channels_arg_conv_16 -> channels_arg_conv_16.ptr).toArray() : null, phantom_scid_arg, InternalUtils.check_arr_len(real_node_pubkey_arg, 33));
                Reference.reachabilityFence(channels_arg);
                Reference.reachabilityFence(phantom_scid_arg);
                Reference.reachabilityFence(real_node_pubkey_arg);
index e36edb4c5a535079082011548ae49051dbd555f8..bf08203738f1a08b71e45f31d9fee9702b8da99b 100644 (file)
@@ -111,7 +111,7 @@ public class Ping extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.Ping b) {
-               boolean ret = bindings.Ping_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Ping_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 822558a57d5fdfdac9e3b20d2dc4cd6db1139ef5..f77f89cb5c9d8a6c2ce55d0712553d1a6504a04c 100644 (file)
@@ -92,7 +92,7 @@ public class Pong extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.Pong b) {
-               boolean ret = bindings.Pong_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Pong_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index bbb55597c51b96eb6f45484541bc4a955b5a6c65..5a7cbc9b72fc84b7eceefc37d0e2d6fcfdb3b58c 100644 (file)
@@ -31,7 +31,7 @@ public class PositiveTimestamp extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.PositiveTimestamp b) {
-               boolean ret = bindings.PositiveTimestamp_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.PositiveTimestamp_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index c4168ae504c521dc1bbe426d04320e5a4c5a7df1..5524d3c227036a2beb1b9e5231fea9f856a9a8fb 100644 (file)
@@ -59,7 +59,7 @@ public class PrivateRoute extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.PrivateRoute b) {
-               boolean ret = bindings.PrivateRoute_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.PrivateRoute_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -74,7 +74,7 @@ public class PrivateRoute extends CommonBase {
         * Creates a new (partial) route from a list of hops
         */
        public static Result_PrivateRouteCreationErrorZ of(org.ldk.structs.RouteHint hops) {
-               long ret = bindings.PrivateRoute_new(hops == null ? 0 : hops.ptr);
+               long ret = bindings.PrivateRoute_new(hops.ptr);
                Reference.reachabilityFence(hops);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PrivateRouteCreationErrorZ ret_hu_conv = Result_PrivateRouteCreationErrorZ.constr_from_ptr(ret);
index 922889251f3888faac7b285bb833455300d969d0..6ade87c7703a14596718ae978b23f08b8b0f8bca 100644 (file)
@@ -55,7 +55,7 @@ public class ProbabilisticScorer extends CommonBase {
         * through a network graph.
         */
        public static ProbabilisticScorer of(org.ldk.structs.ProbabilisticScoringDecayParameters decay_params, org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.Logger logger) {
-               long ret = bindings.ProbabilisticScorer_new(decay_params == null ? 0 : decay_params.ptr, network_graph == null ? 0 : network_graph.ptr, logger.ptr);
+               long ret = bindings.ProbabilisticScorer_new(decay_params.ptr, network_graph.ptr, logger.ptr);
                Reference.reachabilityFence(decay_params);
                Reference.reachabilityFence(network_graph);
                Reference.reachabilityFence(logger);
@@ -84,7 +84,7 @@ public class ProbabilisticScorer extends CommonBase {
         * channel with `scid` towards the given `target` node.
         */
        public Option_C2Tuple_u64u64ZZ estimated_channel_liquidity_range(long scid, org.ldk.structs.NodeId target) {
-               long ret = bindings.ProbabilisticScorer_estimated_channel_liquidity_range(this.ptr, scid, target == null ? 0 : target.ptr);
+               long ret = bindings.ProbabilisticScorer_estimated_channel_liquidity_range(this.ptr, scid, target.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(scid);
                Reference.reachabilityFence(target);
@@ -124,7 +124,7 @@ public class ProbabilisticScorer extends CommonBase {
         * the scoring model, see [`Self::historical_estimated_payment_success_probability`].
         */
        public Option_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ historical_estimated_channel_liquidity_probabilities(long scid, org.ldk.structs.NodeId target) {
-               long ret = bindings.ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities(this.ptr, scid, target == null ? 0 : target.ptr);
+               long ret = bindings.ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities(this.ptr, scid, target.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(scid);
                Reference.reachabilityFence(target);
@@ -145,7 +145,7 @@ public class ProbabilisticScorer extends CommonBase {
         * [`Self::estimated_channel_liquidity_range`]).
         */
        public Option_f64Z historical_estimated_payment_success_probability(long scid, org.ldk.structs.NodeId target, long amount_msat, org.ldk.structs.ProbabilisticScoringFeeParameters params) {
-               long ret = bindings.ProbabilisticScorer_historical_estimated_payment_success_probability(this.ptr, scid, target == null ? 0 : target.ptr, amount_msat, params == null ? 0 : params.ptr);
+               long ret = bindings.ProbabilisticScorer_historical_estimated_payment_success_probability(this.ptr, scid, target.ptr, amount_msat, params.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(scid);
                Reference.reachabilityFence(target);
@@ -211,7 +211,7 @@ public class ProbabilisticScorer extends CommonBase {
         * Read a ProbabilisticScorer from a byte array, created by ProbabilisticScorer_write
         */
        public static Result_ProbabilisticScorerDecodeErrorZ read(byte[] ser, org.ldk.structs.ProbabilisticScoringDecayParameters arg_a, org.ldk.structs.NetworkGraph arg_b, org.ldk.structs.Logger arg_c) {
-               long ret = bindings.ProbabilisticScorer_read(ser, arg_a == null ? 0 : arg_a.ptr, arg_b == null ? 0 : arg_b.ptr, arg_c.ptr);
+               long ret = bindings.ProbabilisticScorer_read(ser, arg_a.ptr, arg_b.ptr, arg_c.ptr);
                Reference.reachabilityFence(ser);
                Reference.reachabilityFence(arg_a);
                Reference.reachabilityFence(arg_b);
index 68e5e54529c7227a74c47cf77752877620c8a573..82489802c983ec09bd6ec3e87546b977b7d408b2 100644 (file)
@@ -462,7 +462,7 @@ public class ProbabilisticScoringFeeParameters extends CommonBase {
         * i.e it will be avoided during path finding.
         */
        public void add_banned(org.ldk.structs.NodeId node_id) {
-               bindings.ProbabilisticScoringFeeParameters_add_banned(this.ptr, node_id == null ? 0 : node_id.ptr);
+               bindings.ProbabilisticScoringFeeParameters_add_banned(this.ptr, node_id.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(node_id);
                if (this != null) { this.ptrs_to.add(node_id); };
@@ -473,7 +473,7 @@ public class ProbabilisticScoringFeeParameters extends CommonBase {
         * they will be avoided during path finding.
         */
        public void add_banned_from_list(NodeId[] node_ids) {
-               bindings.ProbabilisticScoringFeeParameters_add_banned_from_list(this.ptr, node_ids != null ? Arrays.stream(node_ids).mapToLong(node_ids_conv_8 -> node_ids_conv_8 == null ? 0 : node_ids_conv_8.ptr).toArray() : null);
+               bindings.ProbabilisticScoringFeeParameters_add_banned_from_list(this.ptr, node_ids != null ? Arrays.stream(node_ids).mapToLong(node_ids_conv_8 -> node_ids_conv_8.ptr).toArray() : null);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(node_ids);
                for (NodeId node_ids_conv_8: node_ids) { if (this != null) { this.ptrs_to.add(node_ids_conv_8); }; };
@@ -483,7 +483,7 @@ public class ProbabilisticScoringFeeParameters extends CommonBase {
         * Removes the node with the given `node_id` from the list of nodes to avoid.
         */
        public void remove_banned(org.ldk.structs.NodeId node_id) {
-               bindings.ProbabilisticScoringFeeParameters_remove_banned(this.ptr, node_id == null ? 0 : node_id.ptr);
+               bindings.ProbabilisticScoringFeeParameters_remove_banned(this.ptr, node_id.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(node_id);
                if (this != null) { this.ptrs_to.add(node_id); };
@@ -493,7 +493,7 @@ public class ProbabilisticScoringFeeParameters extends CommonBase {
         * Sets a manual penalty for the given node.
         */
        public void set_manual_penalty(org.ldk.structs.NodeId node_id, long penalty) {
-               bindings.ProbabilisticScoringFeeParameters_set_manual_penalty(this.ptr, node_id == null ? 0 : node_id.ptr, penalty);
+               bindings.ProbabilisticScoringFeeParameters_set_manual_penalty(this.ptr, node_id.ptr, penalty);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(node_id);
                Reference.reachabilityFence(penalty);
@@ -504,7 +504,7 @@ public class ProbabilisticScoringFeeParameters extends CommonBase {
         * Removes the node with the given `node_id` from the list of manual penalties.
         */
        public void remove_manual_penalty(org.ldk.structs.NodeId node_id) {
-               bindings.ProbabilisticScoringFeeParameters_remove_manual_penalty(this.ptr, node_id == null ? 0 : node_id.ptr);
+               bindings.ProbabilisticScoringFeeParameters_remove_manual_penalty(this.ptr, node_id.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(node_id);
                if (this != null) { this.ptrs_to.add(node_id); };
index 927c3f4ff3d66e538935c41dcb4afbf4c93b6cf4..bb1438dd691d77c6589b2f58b5893b6e71f91835 100644 (file)
@@ -101,7 +101,7 @@ public class ProbeSendFailure extends CommonBase {
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.ProbeSendFailure b) {
-               boolean ret = bindings.ProbeSendFailure_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ProbeSendFailure_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
index cd6d386339f58f1afef14bca0d38c62b29816ae6..6cf03047169b7904c4d556686b0cdb411b3a8bd6 100644 (file)
@@ -13,13 +13,56 @@ import javax.annotation.Nullable;
  */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class Quantity extends CommonBase {
-       Quantity(Object _dummy, long ptr) { super(ptr); }
+       private Quantity(Object _dummy, long ptr) { super(ptr); }
        @Override @SuppressWarnings("deprecation")
        protected void finalize() throws Throwable {
                super.finalize();
                if (ptr != 0) { bindings.Quantity_free(ptr); }
        }
+       static Quantity constr_from_ptr(long ptr) {
+               bindings.LDKQuantity raw_val = bindings.LDKQuantity_ref_from_ptr(ptr);
+               if (raw_val.getClass() == bindings.LDKQuantity.Bounded.class) {
+                       return new Bounded(ptr, (bindings.LDKQuantity.Bounded)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKQuantity.Unbounded.class) {
+                       return new Unbounded(ptr, (bindings.LDKQuantity.Unbounded)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKQuantity.One.class) {
+                       return new One(ptr, (bindings.LDKQuantity.One)raw_val);
+               }
+               assert false; return null; // Unreachable without extending the (internal) bindings interface
+       }
 
+       /**
+        * Up to a specific number of items (inclusive). Use when more than one item can be requested
+        * but is limited (e.g., because of per customer or inventory limits).
+        * 
+        * May be used with `NonZeroU64::new(1)` but prefer to use [`Quantity::One`] if only one item
+        * is supported.
+        */
+       public final static class Bounded extends Quantity {
+               public final long bounded;
+               private Bounded(long ptr, bindings.LDKQuantity.Bounded obj) {
+                       super(null, ptr);
+                       this.bounded = obj.bounded;
+               }
+       }
+       /**
+        * One or more items. Use when more than one item can be requested without any limit.
+        */
+       public final static class Unbounded extends Quantity {
+               private Unbounded(long ptr, bindings.LDKQuantity.Unbounded obj) {
+                       super(null, ptr);
+               }
+       }
+       /**
+        * Only one item. Use when only a single item can be requested.
+        */
+       public final static class One extends Quantity {
+               private One(long ptr, bindings.LDKQuantity.One obj) {
+                       super(null, ptr);
+               }
+       }
        long clone_ptr() {
                long ret = bindings.Quantity_clone_ptr(this.ptr);
                Reference.reachabilityFence(this);
@@ -33,9 +76,43 @@ public class Quantity extends CommonBase {
                long ret = bindings.Quantity_clone(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); }
+               org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new Bounded-variant Quantity
+        */
+       public static Quantity bounded(long a) {
+               long ret = bindings.Quantity_bounded(a);
+               Reference.reachabilityFence(a);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new Unbounded-variant Quantity
+        */
+       public static Quantity unbounded() {
+               long ret = bindings.Quantity_unbounded();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new One-variant Quantity
+        */
+       public static Quantity one() {
+               long ret = bindings.Quantity_one();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
 }
index c4a416e71f926c9700fd082505225fa287a937da..30095f035d9da7467d641b7a0f983611d3e03f64 100644 (file)
@@ -129,7 +129,7 @@ public class QueryChannelRange extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.QueryChannelRange b) {
-               boolean ret = bindings.QueryChannelRange_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.QueryChannelRange_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 46b6edd15377261d93e6cc92d7f590588bfe288e..67a9bc8664d6169c689821c7f7adf1c0d5424eaf 100644 (file)
@@ -117,7 +117,7 @@ public class QueryShortChannelIds extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.QueryShortChannelIds b) {
-               boolean ret = bindings.QueryShortChannelIds_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.QueryShortChannelIds_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
diff --git a/src/main/java/org/ldk/structs/RandomBytes.java b/src/main/java/org/ldk/structs/RandomBytes.java
new file mode 100644 (file)
index 0000000..32af07f
--- /dev/null
@@ -0,0 +1,48 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * An implementation of [`EntropySource`] using ChaCha20.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class RandomBytes extends CommonBase {
+       RandomBytes(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.RandomBytes_free(ptr); }
+       }
+
+       /**
+        * Creates a new instance using the given seed.
+        */
+       public static RandomBytes of(byte[] seed) {
+               long ret = bindings.RandomBytes_new(InternalUtils.check_arr_len(seed, 32));
+               Reference.reachabilityFence(seed);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.RandomBytes ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RandomBytes(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Constructs a new EntropySource which calls the relevant methods on this_arg.
+        * This copies the `inner` pointer in this_arg and thus the returned EntropySource must be freed before this_arg is
+        */
+       public EntropySource as_EntropySource() {
+               long ret = bindings.RandomBytes_as_EntropySource(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               EntropySource ret_hu_conv = new EntropySource(null, ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+}
index 46cd9b5b781865f9a420c0a1279db107564c2623..54e4717be2f1ec02fabcd2c733a78f5d7333088e 100644 (file)
@@ -28,7 +28,7 @@ public class RapidGossipSync extends CommonBase {
         * Instantiate a new [`RapidGossipSync`] instance.
         */
        public static RapidGossipSync of(org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.Logger logger) {
-               long ret = bindings.RapidGossipSync_new(network_graph == null ? 0 : network_graph.ptr, logger.ptr);
+               long ret = bindings.RapidGossipSync_new(network_graph.ptr, logger.ptr);
                Reference.reachabilityFence(network_graph);
                Reference.reachabilityFence(logger);
                if (ret >= 0 && ret <= 4096) { return null; }
index f40cf8c724de29bcfc1980a438cd87a6efd39802..29e49b8bc1c1bc1a58b444865b2adcdd8bae51e3 100644 (file)
@@ -40,7 +40,7 @@ public class RawBolt11Invoice extends CommonBase {
         * data part
         */
        public void set_data(org.ldk.structs.RawDataPart val) {
-               bindings.RawBolt11Invoice_set_data(this.ptr, val == null ? 0 : val.ptr);
+               bindings.RawBolt11Invoice_set_data(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -52,7 +52,7 @@ public class RawBolt11Invoice extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.RawBolt11Invoice b) {
-               boolean ret = bindings.RawBolt11Invoice_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.RawBolt11Invoice_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -225,6 +225,9 @@ public class RawBolt11Invoice extends CommonBase {
                return ret_conv_14_arr;
        }
 
+       /**
+        * Returns `None` if no amount is set or on overflow.
+        */
        public Option_u64Z amount_pico_btc() {
                long ret = bindings.RawBolt11Invoice_amount_pico_btc(this.ptr);
                Reference.reachabilityFence(this);
index d7885133c9659d7021b45d4840ab1c6337cbfa77..3c730c9cfd94d5086880aa6c251c5ea51b3e5188 100644 (file)
@@ -36,7 +36,7 @@ public class RawDataPart extends CommonBase {
         * generation time of the invoice
         */
        public void set_timestamp(org.ldk.structs.PositiveTimestamp val) {
-               bindings.RawDataPart_set_timestamp(this.ptr, val == null ? 0 : val.ptr);
+               bindings.RawDataPart_set_timestamp(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -48,7 +48,7 @@ public class RawDataPart extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.RawDataPart b) {
-               boolean ret = bindings.RawDataPart_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.RawDataPart_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 81f29a32115ef3fdfa425720a76830bd961421f8..0271d99815099d9afcd1d4d2315a2070a485cd8d 100644 (file)
@@ -50,7 +50,7 @@ public class ReadOnlyNetworkGraph extends CommonBase implements AutoCloseable {
         */
        @Nullable
        public NodeInfo node(org.ldk.structs.NodeId node_id) {
-               long ret = bindings.ReadOnlyNetworkGraph_node(this.ptr, node_id == null ? 0 : node_id.ptr);
+               long ret = bindings.ReadOnlyNetworkGraph_node(this.ptr, node_id.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(node_id);
                if (ret >= 0 && ret <= 4096) { return null; }
index a3b87f33d83cbd2cadc923dfb8590c79a7032279..9b095526acb9608d7fb3b74113d32a464e11ed13 100644 (file)
@@ -55,7 +55,29 @@ public class ReceiveTlvs extends CommonBase {
         * Constraints for the receiver of this payment.
         */
        public void set_payment_constraints(org.ldk.structs.PaymentConstraints val) {
-               bindings.ReceiveTlvs_set_payment_constraints(this.ptr, val == null ? 0 : val.ptr);
+               bindings.ReceiveTlvs_set_payment_constraints(this.ptr, val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
+       }
+
+       /**
+        * Context for the receiver of this payment.
+        */
+       public PaymentContext get_payment_context() {
+               long ret = bindings.ReceiveTlvs_get_payment_context(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.PaymentContext ret_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Context for the receiver of this payment.
+        */
+       public void set_payment_context(org.ldk.structs.PaymentContext val) {
+               bindings.ReceiveTlvs_set_payment_context(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -64,14 +86,16 @@ public class ReceiveTlvs extends CommonBase {
        /**
         * Constructs a new ReceiveTlvs given each field
         */
-       public static ReceiveTlvs of(byte[] payment_secret_arg, org.ldk.structs.PaymentConstraints payment_constraints_arg) {
-               long ret = bindings.ReceiveTlvs_new(InternalUtils.check_arr_len(payment_secret_arg, 32), payment_constraints_arg == null ? 0 : payment_constraints_arg.ptr);
+       public static ReceiveTlvs of(byte[] payment_secret_arg, org.ldk.structs.PaymentConstraints payment_constraints_arg, org.ldk.structs.PaymentContext payment_context_arg) {
+               long ret = bindings.ReceiveTlvs_new(InternalUtils.check_arr_len(payment_secret_arg, 32), payment_constraints_arg.ptr, payment_context_arg.ptr);
                Reference.reachabilityFence(payment_secret_arg);
                Reference.reachabilityFence(payment_constraints_arg);
+               Reference.reachabilityFence(payment_context_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.ReceiveTlvs ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ReceiveTlvs(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_constraints_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(payment_context_arg); };
                return ret_hu_conv;
        }
 
index b9ca6082e037f4e31c06dc6aca40f77be19914b9..cf4a30948c85389854deee0abd8f3786cc6ae202 100644 (file)
@@ -135,7 +135,7 @@ public class RecipientOnionFields extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.RecipientOnionFields b) {
-               boolean ret = bindings.RecipientOnionFields_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.RecipientOnionFields_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -210,7 +210,7 @@ public class RecipientOnionFields extends CommonBase {
         * See [`Self::custom_tlvs`] for more info.
         */
        public Result_RecipientOnionFieldsNoneZ with_custom_tlvs(TwoTuple_u64CVec_u8ZZ[] custom_tlvs) {
-               long ret = bindings.RecipientOnionFields_with_custom_tlvs(this.ptr, custom_tlvs != null ? Arrays.stream(custom_tlvs).mapToLong(custom_tlvs_conv_23 -> custom_tlvs_conv_23 != null ? custom_tlvs_conv_23.ptr : 0).toArray() : null);
+               long ret = bindings.RecipientOnionFields_with_custom_tlvs(this.ptr, custom_tlvs != null ? Arrays.stream(custom_tlvs).mapToLong(custom_tlvs_conv_23 -> custom_tlvs_conv_23.ptr).toArray() : null);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(custom_tlvs);
                if (ret >= 0 && ret <= 4096) { return null; }
index 200bbf5f1a55a5e355b827e0c1161d99bb5aec1c..6e9bd3e625d690a1ae5bda24024b3bb829df088c 100644 (file)
@@ -73,12 +73,15 @@ public class Record extends CommonBase {
        /**
         * The channel id of the channel pertaining to the logged record. May be a temporary id before
         * the channel has been funded.
+        * 
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public Option_ThirtyTwoBytesZ get_channel_id() {
+       @Nullable
+       public ChannelId get_channel_id() {
                long ret = bindings.Record_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Option_ThirtyTwoBytesZ ret_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(ret);
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
@@ -86,9 +89,11 @@ public class Record extends CommonBase {
        /**
         * The channel id of the channel pertaining to the logged record. May be a temporary id before
         * the channel has been funded.
+        * 
+        * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public void set_channel_id(org.ldk.structs.Option_ThirtyTwoBytesZ val) {
-               bindings.Record_set_channel_id(this.ptr, val.ptr);
+       public void set_channel_id(@Nullable org.ldk.structs.ChannelId val) {
+               bindings.Record_set_channel_id(this.ptr, val == null ? 0 : val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -170,9 +175,10 @@ public class Record extends CommonBase {
         * Constructs a new Record given each field
         * 
         * Note that peer_id_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+        * Note that channel_id_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public static Record of(org.ldk.enums.Level level_arg, @Nullable byte[] peer_id_arg, org.ldk.structs.Option_ThirtyTwoBytesZ channel_id_arg, java.lang.String args_arg, java.lang.String module_path_arg, java.lang.String file_arg, int line_arg) {
-               long ret = bindings.Record_new(level_arg, InternalUtils.check_arr_len(peer_id_arg, 33), channel_id_arg.ptr, args_arg, module_path_arg, file_arg, line_arg);
+       public static Record of(org.ldk.enums.Level level_arg, @Nullable byte[] peer_id_arg, @Nullable org.ldk.structs.ChannelId channel_id_arg, java.lang.String args_arg, java.lang.String module_path_arg, java.lang.String file_arg, int line_arg) {
+               long ret = bindings.Record_new(level_arg, InternalUtils.check_arr_len(peer_id_arg, 33), channel_id_arg == null ? 0 : channel_id_arg.ptr, args_arg, module_path_arg, file_arg, line_arg);
                Reference.reachabilityFence(level_arg);
                Reference.reachabilityFence(peer_id_arg);
                Reference.reachabilityFence(channel_id_arg);
index 2479eb9b2cb1e32a9351ac923428d06238eaa21e..f7750ac01163f619673a0d03ed0981feca459727 100644 (file)
@@ -208,6 +208,18 @@ public class Refund extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Generates a non-cryptographic 64-bit hash of the Refund.
+        */
+       public long hash() {
+               long ret = bindings.Refund_hash(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       @Override public int hashCode() {
+               return (int)this.hash();
+       }
        /**
         * Serialize the Refund object into a byte array which can be read by Refund_read
         */
diff --git a/src/main/java/org/ldk/structs/RefundMaybeWithDerivedMetadataBuilder.java b/src/main/java/org/ldk/structs/RefundMaybeWithDerivedMetadataBuilder.java
new file mode 100644 (file)
index 0000000..0d34700
--- /dev/null
@@ -0,0 +1,206 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Builds a [`Refund`] for the \"offer for money\" flow.
+ * 
+ * See [module-level documentation] for usage.
+ * 
+ * [module-level documentation]: self
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class RefundMaybeWithDerivedMetadataBuilder extends CommonBase {
+       RefundMaybeWithDerivedMetadataBuilder(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.RefundMaybeWithDerivedMetadataBuilder_free(ptr); }
+       }
+
+       long clone_ptr() {
+               long ret = bindings.RefundMaybeWithDerivedMetadataBuilder_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the RefundMaybeWithDerivedMetadataBuilder
+        */
+       public RefundMaybeWithDerivedMetadataBuilder clone() {
+               long ret = bindings.RefundMaybeWithDerivedMetadataBuilder_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.RefundMaybeWithDerivedMetadataBuilder ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RefundMaybeWithDerivedMetadataBuilder(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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
+        */
+       public static Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ of(byte[] metadata, byte[] payer_id, long amount_msats) {
+               long ret = bindings.RefundMaybeWithDerivedMetadataBuilder_new(metadata, InternalUtils.check_arr_len(payer_id, 33), amount_msats);
+               Reference.reachabilityFence(metadata);
+               Reference.reachabilityFence(payer_id);
+               Reference.reachabilityFence(amount_msats);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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
+        */
+       public static Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ deriving_payer_id(byte[] node_id, org.ldk.structs.ExpandedKey expanded_key, org.ldk.structs.EntropySource entropy_source, long amount_msats, byte[] payment_id) {
+               long ret = bindings.RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(InternalUtils.check_arr_len(node_id, 33), expanded_key.ptr, entropy_source.ptr, amount_msats, InternalUtils.check_arr_len(payment_id, 32));
+               Reference.reachabilityFence(node_id);
+               Reference.reachabilityFence(expanded_key);
+               Reference.reachabilityFence(entropy_source);
+               Reference.reachabilityFence(amount_msats);
+               Reference.reachabilityFence(payment_id);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(expanded_key); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(entropy_source); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Sets the [`Refund::description`].
+        * 
+        * Successive calls to this method will override the previous setting.
+        */
+       public void description(java.lang.String description) {
+               bindings.RefundMaybeWithDerivedMetadataBuilder_description(this.ptr, description);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(description);
+               if (this != null) { this.ptrs_to.add(this); };
+       }
+
+       /**
+        * 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.
+        */
+       public void absolute_expiry(long absolute_expiry) {
+               bindings.RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(this.ptr, absolute_expiry);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(absolute_expiry);
+               if (this != null) { this.ptrs_to.add(this); };
+       }
+
+       /**
+        * Sets the [`Refund::issuer`].
+        * 
+        * Successive calls to this method will override the previous setting.
+        */
+       public void issuer(java.lang.String issuer) {
+               bindings.RefundMaybeWithDerivedMetadataBuilder_issuer(this.ptr, issuer);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(issuer);
+               if (this != null) { this.ptrs_to.add(this); };
+       }
+
+       /**
+        * 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.
+        */
+       public void path(org.ldk.structs.BlindedPath path) {
+               bindings.RefundMaybeWithDerivedMetadataBuilder_path(this.ptr, path.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(path);
+               if (this != null) { this.ptrs_to.add(path); };
+               if (this != null) { this.ptrs_to.add(this); };
+       }
+
+       /**
+        * 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.
+        */
+       public void chain(org.ldk.enums.Network network) {
+               bindings.RefundMaybeWithDerivedMetadataBuilder_chain(this.ptr, network);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(network);
+               if (this != null) { this.ptrs_to.add(this); };
+       }
+
+       /**
+        * 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
+        */
+       public void quantity(long quantity) {
+               bindings.RefundMaybeWithDerivedMetadataBuilder_quantity(this.ptr, quantity);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(quantity);
+               if (this != null) { this.ptrs_to.add(this); };
+       }
+
+       /**
+        * Sets the [`Refund::payer_note`].
+        * 
+        * Successive calls to this method will override the previous setting.
+        */
+       public void payer_note(java.lang.String payer_note) {
+               bindings.RefundMaybeWithDerivedMetadataBuilder_payer_note(this.ptr, payer_note);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(payer_note);
+               if (this != null) { this.ptrs_to.add(this); };
+       }
+
+       /**
+        * Builds a [`Refund`] after checking for valid semantics.
+        */
+       public Result_RefundBolt12SemanticErrorZ build() {
+               long ret = bindings.RefundMaybeWithDerivedMetadataBuilder_build(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_RefundBolt12SemanticErrorZ ret_hu_conv = Result_RefundBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+}
index 10ca61a3c511c876873c1c270abd9791d23b9288..0e703d1081a3826af6abc8981651fad6322a5a69 100644 (file)
@@ -174,7 +174,7 @@ public class ReplyChannelRange extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.ReplyChannelRange b) {
-               boolean ret = bindings.ReplyChannelRange_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ReplyChannelRange_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 8af922d85d8294d725eb4d6f2537582896bbe9c9..f272db043d0510758947777bf11397dea9a50f1a 100644 (file)
@@ -112,7 +112,7 @@ public class ReplyShortChannelIdsEnd extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.ReplyShortChannelIdsEnd b) {
-               boolean ret = bindings.ReplyShortChannelIdsEnd_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ReplyShortChannelIdsEnd_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 61100382b14de8724a56f24aeaa3de5400f5d4ae..9d542e446216621c5e0fee3a761aac97d210f48e 100644 (file)
@@ -13,6 +13,10 @@ public class Result_AcceptChannelDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_AcceptChannelDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_AcceptChannelDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_AcceptChannelDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_AcceptChannelDecodeErrorZ_is_ok(ptr)) {
                        return new Result_AcceptChannelDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_AcceptChannelDecodeErrorZ extends CommonBase {
         * Creates a new CResult_AcceptChannelDecodeErrorZ in the success state.
         */
        public static Result_AcceptChannelDecodeErrorZ ok(org.ldk.structs.AcceptChannel o) {
-               long ret = bindings.CResult_AcceptChannelDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_AcceptChannelDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
index f66c4113e0d8832b4f76a650310fc23ddd0d821e..04d923a3351f5aebd8ab31474dfbaaf1da8b1daa 100644 (file)
@@ -13,6 +13,10 @@ public class Result_AcceptChannelV2DecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_AcceptChannelV2DecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_AcceptChannelV2DecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_AcceptChannelV2DecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_AcceptChannelV2DecodeErrorZ_is_ok(ptr)) {
                        return new Result_AcceptChannelV2DecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_AcceptChannelV2DecodeErrorZ extends CommonBase {
         * Creates a new CResult_AcceptChannelV2DecodeErrorZ in the success state.
         */
        public static Result_AcceptChannelV2DecodeErrorZ ok(org.ldk.structs.AcceptChannelV2 o) {
-               long ret = bindings.CResult_AcceptChannelV2DecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_AcceptChannelV2DecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_AcceptChannelV2DecodeErrorZ ret_hu_conv = Result_AcceptChannelV2DecodeErrorZ.constr_from_ptr(ret);
index c0021221628f55326d2d1338a5f923d499052de7..af832ca4663a9ccd2a99b82d2cb5ba2ca4ec6587 100644 (file)
@@ -13,6 +13,10 @@ public class Result_AnnouncementSignaturesDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_AnnouncementSignaturesDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_AnnouncementSignaturesDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_AnnouncementSignaturesDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(ptr)) {
                        return new Result_AnnouncementSignaturesDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_AnnouncementSignaturesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the success state.
         */
        public static Result_AnnouncementSignaturesDecodeErrorZ ok(org.ldk.structs.AnnouncementSignatures o) {
-               long ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
diff --git a/src/main/java/org/ldk/structs/Result_BestBlockDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_BestBlockDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..a027231
--- /dev/null
@@ -0,0 +1,100 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_BestBlockDecodeErrorZ extends CommonBase {
+       private Result_BestBlockDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_BestBlockDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_BestBlockDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_BestBlockDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_BestBlockDecodeErrorZ_is_ok(ptr)) {
+                       return new Result_BestBlockDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_BestBlockDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_BestBlockDecodeErrorZ_OK extends Result_BestBlockDecodeErrorZ {
+               public final BestBlock res;
+               private Result_BestBlockDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_BestBlockDecodeErrorZ_get_ok(ptr);
+                       org.ldk.structs.BestBlock res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.BestBlock(null, res); }
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_BestBlockDecodeErrorZ_Err extends Result_BestBlockDecodeErrorZ {
+               public final DecodeError err;
+               private Result_BestBlockDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.CResult_BestBlockDecodeErrorZ_get_err(ptr);
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+                       if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+                       this.err = err_hu_conv;
+               }
+       }
+
+       /**
+        * Creates a new CResult_BestBlockDecodeErrorZ in the success state.
+        */
+       public static Result_BestBlockDecodeErrorZ ok(org.ldk.structs.BestBlock o) {
+               long ret = bindings.CResult_BestBlockDecodeErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_BestBlockDecodeErrorZ ret_hu_conv = Result_BestBlockDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_BestBlockDecodeErrorZ in the error state.
+        */
+       public static Result_BestBlockDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+               long ret = bindings.CResult_BestBlockDecodeErrorZ_err(e.ptr);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_BestBlockDecodeErrorZ ret_hu_conv = Result_BestBlockDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_BestBlockDecodeErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CResult_BestBlockDecodeErrorZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_BestBlockDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_BestBlockDecodeErrorZ clone() {
+               long ret = bindings.CResult_BestBlockDecodeErrorZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_BestBlockDecodeErrorZ ret_hu_conv = Result_BestBlockDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
index be248c022350f9c67724f0ecd6d36667172c07f2..63d1f604ec8988304be35cfef1a2175229780daa 100644 (file)
@@ -13,6 +13,10 @@ public class Result_BigSizeDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_BigSizeDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_BigSizeDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_BigSizeDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_BigSizeDecodeErrorZ_is_ok(ptr)) {
                        return new Result_BigSizeDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_BigSizeDecodeErrorZ extends CommonBase {
         * Creates a new CResult_BigSizeDecodeErrorZ in the success state.
         */
        public static Result_BigSizeDecodeErrorZ ok(org.ldk.structs.BigSize o) {
-               long ret = bindings.CResult_BigSizeDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_BigSizeDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_BigSizeDecodeErrorZ ret_hu_conv = Result_BigSizeDecodeErrorZ.constr_from_ptr(ret);
index 025835061c6e9279b6390592cdfbfdb8775b4be0..dc95d603891cc1d3b542737c556c2721cbbb3a38 100644 (file)
@@ -13,6 +13,10 @@ public class Result_BlindedFailureDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_BlindedFailureDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_BlindedFailureDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_BlindedFailureDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_BlindedFailureDecodeErrorZ_is_ok(ptr)) {
                        return new Result_BlindedFailureDecodeErrorZ_OK(null, ptr);
index 7ba9ed1cf1a5ea42ef643cf4c1de97c802f0a318..1bf34cc0e34ae9a42402d2970ee9acd1a0400777 100644 (file)
@@ -13,6 +13,10 @@ public class Result_BlindedForwardDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_BlindedForwardDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_BlindedForwardDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_BlindedForwardDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_BlindedForwardDecodeErrorZ_is_ok(ptr)) {
                        return new Result_BlindedForwardDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_BlindedForwardDecodeErrorZ extends CommonBase {
         * Creates a new CResult_BlindedForwardDecodeErrorZ in the success state.
         */
        public static Result_BlindedForwardDecodeErrorZ ok(org.ldk.structs.BlindedForward o) {
-               long ret = bindings.CResult_BlindedForwardDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_BlindedForwardDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_BlindedForwardDecodeErrorZ ret_hu_conv = Result_BlindedForwardDecodeErrorZ.constr_from_ptr(ret);
index 2d9d60212388c2bb57bccb9d5921507157c5defd..def097744570c343e25bacf9a0e79062702ebf3a 100644 (file)
@@ -13,6 +13,10 @@ public class Result_BlindedHopDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_BlindedHopDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_BlindedHopDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_BlindedHopDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_BlindedHopDecodeErrorZ_is_ok(ptr)) {
                        return new Result_BlindedHopDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_BlindedHopDecodeErrorZ extends CommonBase {
         * Creates a new CResult_BlindedHopDecodeErrorZ in the success state.
         */
        public static Result_BlindedHopDecodeErrorZ ok(org.ldk.structs.BlindedHop o) {
-               long ret = bindings.CResult_BlindedHopDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_BlindedHopDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_BlindedHopDecodeErrorZ ret_hu_conv = Result_BlindedHopDecodeErrorZ.constr_from_ptr(ret);
index 80ffa046435b1dbc833acd8fb635dec14f2e8d01..aa5d82de53b5f8976545876b7d9ea0f0aca462a4 100644 (file)
@@ -13,6 +13,10 @@ public class Result_BlindedHopFeaturesDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_BlindedHopFeaturesDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_BlindedHopFeaturesDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_BlindedHopFeaturesDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_BlindedHopFeaturesDecodeErrorZ_is_ok(ptr)) {
                        return new Result_BlindedHopFeaturesDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_BlindedHopFeaturesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_BlindedHopFeaturesDecodeErrorZ in the success state.
         */
        public static Result_BlindedHopFeaturesDecodeErrorZ ok(org.ldk.structs.BlindedHopFeatures o) {
-               long ret = bindings.CResult_BlindedHopFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_BlindedHopFeaturesDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_BlindedHopFeaturesDecodeErrorZ ret_hu_conv = Result_BlindedHopFeaturesDecodeErrorZ.constr_from_ptr(ret);
index 16c4efbbf318e467d6142a524bf070dd8dce59cc..28364c1472e077ff8d487cf1e4247174586714ed 100644 (file)
@@ -13,6 +13,10 @@ public class Result_BlindedPathDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_BlindedPathDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_BlindedPathDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_BlindedPathDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_BlindedPathDecodeErrorZ_is_ok(ptr)) {
                        return new Result_BlindedPathDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_BlindedPathDecodeErrorZ extends CommonBase {
         * Creates a new CResult_BlindedPathDecodeErrorZ in the success state.
         */
        public static Result_BlindedPathDecodeErrorZ ok(org.ldk.structs.BlindedPath o) {
-               long ret = bindings.CResult_BlindedPathDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_BlindedPathDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_BlindedPathDecodeErrorZ ret_hu_conv = Result_BlindedPathDecodeErrorZ.constr_from_ptr(ret);
index 6dcd916d7c7224e6accfa7bdbc5edbd4099db3b7..81d152bdc55451850e3320f4146471ad71e0b0ed 100644 (file)
@@ -13,6 +13,10 @@ public class Result_BlindedPathNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_BlindedPathNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_BlindedPathNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_BlindedPathNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_BlindedPathNoneZ_is_ok(ptr)) {
                        return new Result_BlindedPathNoneZ_OK(null, ptr);
@@ -41,7 +45,7 @@ public class Result_BlindedPathNoneZ extends CommonBase {
         * Creates a new CResult_BlindedPathNoneZ in the success state.
         */
        public static Result_BlindedPathNoneZ ok(org.ldk.structs.BlindedPath o) {
-               long ret = bindings.CResult_BlindedPathNoneZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_BlindedPathNoneZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_BlindedPathNoneZ ret_hu_conv = Result_BlindedPathNoneZ.constr_from_ptr(ret);
index d492a4adeb5f8ee88aa1cf782310ad27f1dd94e3..25eb505d9b276ad80967cd287356d8265cd9d6c2 100644 (file)
@@ -13,6 +13,10 @@ public class Result_BlindedPayInfoDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_BlindedPayInfoDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_BlindedPayInfoDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_BlindedPayInfoDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_BlindedPayInfoDecodeErrorZ_is_ok(ptr)) {
                        return new Result_BlindedPayInfoDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_BlindedPayInfoDecodeErrorZ extends CommonBase {
         * Creates a new CResult_BlindedPayInfoDecodeErrorZ in the success state.
         */
        public static Result_BlindedPayInfoDecodeErrorZ ok(org.ldk.structs.BlindedPayInfo o) {
-               long ret = bindings.CResult_BlindedPayInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_BlindedPayInfoDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_BlindedPayInfoDecodeErrorZ ret_hu_conv = Result_BlindedPayInfoDecodeErrorZ.constr_from_ptr(ret);
index a88a527701478bfcd0744478587eff1ef203d29d..cf61db883fe3dc09c43c46436ece8c514618a08c 100644 (file)
@@ -13,6 +13,10 @@ public class Result_BlindedTailDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_BlindedTailDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_BlindedTailDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_BlindedTailDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_BlindedTailDecodeErrorZ_is_ok(ptr)) {
                        return new Result_BlindedTailDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_BlindedTailDecodeErrorZ extends CommonBase {
         * Creates a new CResult_BlindedTailDecodeErrorZ in the success state.
         */
        public static Result_BlindedTailDecodeErrorZ ok(org.ldk.structs.BlindedTail o) {
-               long ret = bindings.CResult_BlindedTailDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_BlindedTailDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_BlindedTailDecodeErrorZ ret_hu_conv = Result_BlindedTailDecodeErrorZ.constr_from_ptr(ret);
index ab490892cbfff7c3e247dc8b55ab3b2942266671..8e58721d0fb111316d90be95f8745f78390cfa75 100644 (file)
@@ -13,6 +13,10 @@ public class Result_Bolt11InvoiceBolt11SemanticErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_Bolt11InvoiceBolt11SemanticErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_Bolt11InvoiceBolt11SemanticErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_Bolt11InvoiceBolt11SemanticErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_Bolt11InvoiceBolt11SemanticErrorZ_is_ok(ptr)) {
                        return new Result_Bolt11InvoiceBolt11SemanticErrorZ_OK(null, ptr);
@@ -43,7 +47,7 @@ public class Result_Bolt11InvoiceBolt11SemanticErrorZ extends CommonBase {
         * Creates a new CResult_Bolt11InvoiceBolt11SemanticErrorZ in the success state.
         */
        public static Result_Bolt11InvoiceBolt11SemanticErrorZ ok(org.ldk.structs.Bolt11Invoice o) {
-               long ret = bindings.CResult_Bolt11InvoiceBolt11SemanticErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_Bolt11InvoiceBolt11SemanticErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_Bolt11InvoiceBolt11SemanticErrorZ ret_hu_conv = Result_Bolt11InvoiceBolt11SemanticErrorZ.constr_from_ptr(ret);
index c323da94cfba144049dde14f17e5f3b68643612c..a6641c36198addceeca654d0477a42ee88bb72fd 100644 (file)
@@ -13,6 +13,10 @@ public class Result_Bolt11InvoiceFeaturesDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_Bolt11InvoiceFeaturesDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_Bolt11InvoiceFeaturesDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_Bolt11InvoiceFeaturesDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_Bolt11InvoiceFeaturesDecodeErrorZ_is_ok(ptr)) {
                        return new Result_Bolt11InvoiceFeaturesDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_Bolt11InvoiceFeaturesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_Bolt11InvoiceFeaturesDecodeErrorZ in the success state.
         */
        public static Result_Bolt11InvoiceFeaturesDecodeErrorZ ok(org.ldk.structs.Bolt11InvoiceFeatures o) {
-               long ret = bindings.CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_Bolt11InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_Bolt11InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret);
index fa81ba36bf6881fffb6372c1c56d8cc4a8f21e65..14b185e74e6326c801790c6470967677511c6ba7 100644 (file)
@@ -13,6 +13,10 @@ public class Result_Bolt11InvoiceParseOrSemanticErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_Bolt11InvoiceParseOrSemanticErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_Bolt11InvoiceParseOrSemanticErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_Bolt11InvoiceParseOrSemanticErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_Bolt11InvoiceParseOrSemanticErrorZ_is_ok(ptr)) {
                        return new Result_Bolt11InvoiceParseOrSemanticErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_Bolt11InvoiceParseOrSemanticErrorZ extends CommonBase {
         * Creates a new CResult_Bolt11InvoiceParseOrSemanticErrorZ in the success state.
         */
        public static Result_Bolt11InvoiceParseOrSemanticErrorZ ok(org.ldk.structs.Bolt11Invoice o) {
-               long ret = bindings.CResult_Bolt11InvoiceParseOrSemanticErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_Bolt11InvoiceParseOrSemanticErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_Bolt11InvoiceParseOrSemanticErrorZ ret_hu_conv = Result_Bolt11InvoiceParseOrSemanticErrorZ.constr_from_ptr(ret);
index 61dc6572b79705945eef55d18446ce32ce4c10fd..46677b313001ab0c63f14922d29b91771045a0cf 100644 (file)
@@ -13,6 +13,10 @@ public class Result_Bolt11InvoiceSignOrCreationErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_Bolt11InvoiceSignOrCreationErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_Bolt11InvoiceSignOrCreationErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_Bolt11InvoiceSignOrCreationErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_Bolt11InvoiceSignOrCreationErrorZ_is_ok(ptr)) {
                        return new Result_Bolt11InvoiceSignOrCreationErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_Bolt11InvoiceSignOrCreationErrorZ extends CommonBase {
         * Creates a new CResult_Bolt11InvoiceSignOrCreationErrorZ in the success state.
         */
        public static Result_Bolt11InvoiceSignOrCreationErrorZ ok(org.ldk.structs.Bolt11Invoice o) {
-               long ret = bindings.CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_Bolt11InvoiceSignOrCreationErrorZ ret_hu_conv = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
diff --git a/src/main/java/org/ldk/structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_Bolt12InvoiceBolt12SemanticErrorZ.java
new file mode 100644 (file)
index 0000000..3797f9f
--- /dev/null
@@ -0,0 +1,96 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_Bolt12InvoiceBolt12SemanticErrorZ extends CommonBase {
+       private Result_Bolt12InvoiceBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_Bolt12InvoiceBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(ptr)) {
+                       return new Result_Bolt12InvoiceBolt12SemanticErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_Bolt12InvoiceBolt12SemanticErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_Bolt12InvoiceBolt12SemanticErrorZ_OK extends Result_Bolt12InvoiceBolt12SemanticErrorZ {
+               public final Bolt12Invoice res;
+               private Result_Bolt12InvoiceBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(ptr);
+                       org.ldk.structs.Bolt12Invoice res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.Bolt12Invoice(null, res); }
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_Bolt12InvoiceBolt12SemanticErrorZ_Err extends Result_Bolt12InvoiceBolt12SemanticErrorZ {
+               public final Bolt12SemanticError err;
+               private Result_Bolt12InvoiceBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.err = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(ptr);
+               }
+       }
+
+       /**
+        * Creates a new CResult_Bolt12InvoiceBolt12SemanticErrorZ in the success state.
+        */
+       public static Result_Bolt12InvoiceBolt12SemanticErrorZ ok(org.ldk.structs.Bolt12Invoice o) {
+               long ret = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_Bolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_Bolt12InvoiceBolt12SemanticErrorZ in the error state.
+        */
+       public static Result_Bolt12InvoiceBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+               long ret = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(e);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_Bolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_Bolt12InvoiceBolt12SemanticErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_Bolt12InvoiceBolt12SemanticErrorZ clone() {
+               long ret = bindings.CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_Bolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_Bolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
index 9e57f95f10389a38e1ad5babaa5907febc540be6..2eb37a3a65118872301a5d57d711d48c4a60d729 100644 (file)
@@ -13,6 +13,10 @@ public class Result_Bolt12InvoiceFeaturesDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_Bolt12InvoiceFeaturesDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_Bolt12InvoiceFeaturesDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_Bolt12InvoiceFeaturesDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_Bolt12InvoiceFeaturesDecodeErrorZ_is_ok(ptr)) {
                        return new Result_Bolt12InvoiceFeaturesDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_Bolt12InvoiceFeaturesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_Bolt12InvoiceFeaturesDecodeErrorZ in the success state.
         */
        public static Result_Bolt12InvoiceFeaturesDecodeErrorZ ok(org.ldk.structs.Bolt12InvoiceFeatures o) {
-               long ret = bindings.CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_Bolt12InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_Bolt12InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret);
diff --git a/src/main/java/org/ldk/structs/Result_Bolt12OfferContextDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_Bolt12OfferContextDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..2534878
--- /dev/null
@@ -0,0 +1,100 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_Bolt12OfferContextDecodeErrorZ extends CommonBase {
+       private Result_Bolt12OfferContextDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_Bolt12OfferContextDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_Bolt12OfferContextDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_Bolt12OfferContextDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_Bolt12OfferContextDecodeErrorZ_is_ok(ptr)) {
+                       return new Result_Bolt12OfferContextDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_Bolt12OfferContextDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_Bolt12OfferContextDecodeErrorZ_OK extends Result_Bolt12OfferContextDecodeErrorZ {
+               public final Bolt12OfferContext res;
+               private Result_Bolt12OfferContextDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_Bolt12OfferContextDecodeErrorZ_get_ok(ptr);
+                       org.ldk.structs.Bolt12OfferContext res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.Bolt12OfferContext(null, res); }
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_Bolt12OfferContextDecodeErrorZ_Err extends Result_Bolt12OfferContextDecodeErrorZ {
+               public final DecodeError err;
+               private Result_Bolt12OfferContextDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.CResult_Bolt12OfferContextDecodeErrorZ_get_err(ptr);
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+                       if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+                       this.err = err_hu_conv;
+               }
+       }
+
+       /**
+        * Creates a new CResult_Bolt12OfferContextDecodeErrorZ in the success state.
+        */
+       public static Result_Bolt12OfferContextDecodeErrorZ ok(org.ldk.structs.Bolt12OfferContext o) {
+               long ret = bindings.CResult_Bolt12OfferContextDecodeErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_Bolt12OfferContextDecodeErrorZ ret_hu_conv = Result_Bolt12OfferContextDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_Bolt12OfferContextDecodeErrorZ in the error state.
+        */
+       public static Result_Bolt12OfferContextDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+               long ret = bindings.CResult_Bolt12OfferContextDecodeErrorZ_err(e.ptr);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_Bolt12OfferContextDecodeErrorZ ret_hu_conv = Result_Bolt12OfferContextDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_Bolt12OfferContextDecodeErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_Bolt12OfferContextDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_Bolt12OfferContextDecodeErrorZ clone() {
+               long ret = bindings.CResult_Bolt12OfferContextDecodeErrorZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_Bolt12OfferContextDecodeErrorZ ret_hu_conv = Result_Bolt12OfferContextDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/Result_Bolt12RefundContextDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_Bolt12RefundContextDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..55cbc6b
--- /dev/null
@@ -0,0 +1,100 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_Bolt12RefundContextDecodeErrorZ extends CommonBase {
+       private Result_Bolt12RefundContextDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_Bolt12RefundContextDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_Bolt12RefundContextDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_Bolt12RefundContextDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_Bolt12RefundContextDecodeErrorZ_is_ok(ptr)) {
+                       return new Result_Bolt12RefundContextDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_Bolt12RefundContextDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_Bolt12RefundContextDecodeErrorZ_OK extends Result_Bolt12RefundContextDecodeErrorZ {
+               public final Bolt12RefundContext res;
+               private Result_Bolt12RefundContextDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_Bolt12RefundContextDecodeErrorZ_get_ok(ptr);
+                       org.ldk.structs.Bolt12RefundContext res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.Bolt12RefundContext(null, res); }
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_Bolt12RefundContextDecodeErrorZ_Err extends Result_Bolt12RefundContextDecodeErrorZ {
+               public final DecodeError err;
+               private Result_Bolt12RefundContextDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.CResult_Bolt12RefundContextDecodeErrorZ_get_err(ptr);
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+                       if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+                       this.err = err_hu_conv;
+               }
+       }
+
+       /**
+        * Creates a new CResult_Bolt12RefundContextDecodeErrorZ in the success state.
+        */
+       public static Result_Bolt12RefundContextDecodeErrorZ ok(org.ldk.structs.Bolt12RefundContext o) {
+               long ret = bindings.CResult_Bolt12RefundContextDecodeErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_Bolt12RefundContextDecodeErrorZ ret_hu_conv = Result_Bolt12RefundContextDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_Bolt12RefundContextDecodeErrorZ in the error state.
+        */
+       public static Result_Bolt12RefundContextDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+               long ret = bindings.CResult_Bolt12RefundContextDecodeErrorZ_err(e.ptr);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_Bolt12RefundContextDecodeErrorZ ret_hu_conv = Result_Bolt12RefundContextDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_Bolt12RefundContextDecodeErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_Bolt12RefundContextDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_Bolt12RefundContextDecodeErrorZ clone() {
+               long ret = bindings.CResult_Bolt12RefundContextDecodeErrorZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_Bolt12RefundContextDecodeErrorZ ret_hu_conv = Result_Bolt12RefundContextDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
index 950d36eac27f12d4f67a02e3a477267d1a2824fc..82cc784081542f5f2dde0f2b2afdcafbd1e2b8c2 100644 (file)
@@ -13,6 +13,10 @@ public class Result_BuiltCommitmentTransactionDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_BuiltCommitmentTransactionDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(ptr)) {
                        return new Result_BuiltCommitmentTransactionDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_BuiltCommitmentTransactionDecodeErrorZ extends CommonBase {
         * Creates a new CResult_BuiltCommitmentTransactionDecodeErrorZ in the success state.
         */
        public static Result_BuiltCommitmentTransactionDecodeErrorZ ok(org.ldk.structs.BuiltCommitmentTransaction o) {
-               long ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
diff --git a/src/main/java/org/ldk/structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..a0cdbcc
--- /dev/null
@@ -0,0 +1,81 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ extends CommonBase {
+       private Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(ptr)) {
+                       return new Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_OK extends Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ {
+               public final TwoTuple_BestBlockOutputSweeperZ res;
+               private Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(ptr);
+                       TwoTuple_BestBlockOutputSweeperZ res_hu_conv = new TwoTuple_BestBlockOutputSweeperZ(null, res);
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_Err extends Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ {
+               public final DecodeError err;
+               private Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(ptr);
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+                       if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+                       this.err = err_hu_conv;
+               }
+       }
+
+       /**
+        * Creates a new CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ in the success state.
+        */
+       public static Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ ok(org.ldk.structs.TwoTuple_BestBlockOutputSweeperZ o) {
+               long ret = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ in the error state.
+        */
+       public static Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+               long ret = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(e.ptr);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+}
index 9b355c0fbac7f52c1f61ed46b30bcd610e5f137d..dbd9cadbdd020ea7fd228400d517236d7f871c9a 100644 (file)
@@ -13,6 +13,10 @@ public class Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_is_ok(ptr)) {
                        return new Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_OK(null, ptr);
@@ -41,7 +45,7 @@ public class Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ extends CommonBase {
         * Creates a new CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ in the success state.
         */
        public static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ ok(org.ldk.structs.TwoTuple_BlindedPayInfoBlindedPathZ o) {
-               long ret = bindings.CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_ok(o != null ? o.ptr : 0);
+               long ret = bindings.CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ ret_hu_conv = Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.constr_from_ptr(ret);
index cf046b2ed67dbe53bc7e92bf0d1c79f18ebd6625..b801ab6991ceb80876be6eff3c4dbdd501c2fd1e 100644 (file)
@@ -13,6 +13,10 @@ public class Result_C2Tuple_CVec_u8Zu64ZNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_C2Tuple_CVec_u8Zu64ZNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_C2Tuple_CVec_u8Zu64ZNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_C2Tuple_CVec_u8Zu64ZNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_C2Tuple_CVec_u8Zu64ZNoneZ_is_ok(ptr)) {
                        return new Result_C2Tuple_CVec_u8Zu64ZNoneZ_OK(null, ptr);
@@ -41,7 +45,7 @@ public class Result_C2Tuple_CVec_u8Zu64ZNoneZ extends CommonBase {
         * Creates a new CResult_C2Tuple_CVec_u8Zu64ZNoneZ in the success state.
         */
        public static Result_C2Tuple_CVec_u8Zu64ZNoneZ ok(org.ldk.structs.TwoTuple_CVec_u8Zu64Z o) {
-               long ret = bindings.CResult_C2Tuple_CVec_u8Zu64ZNoneZ_ok(o != null ? o.ptr : 0);
+               long ret = bindings.CResult_C2Tuple_CVec_u8Zu64ZNoneZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_C2Tuple_CVec_u8Zu64ZNoneZ ret_hu_conv = Result_C2Tuple_CVec_u8Zu64ZNoneZ.constr_from_ptr(ret);
index 250d9eb41f7e344dabffaa335b8627b3e49ed921..aeda5411600153ffbb47b70ca66a2d874b921070 100644 (file)
@@ -13,6 +13,10 @@ public class Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ extends Com
                if (ptr != 0) { bindings.CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_is_ok(ptr)) {
                        return new Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_OK(null, ptr);
@@ -41,7 +45,7 @@ public class Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ extends Com
         * Creates a new CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ in the success state.
         */
        public static Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ ok(org.ldk.structs.TwoTuple_ECDSASignatureCVec_ECDSASignatureZZ o) {
-               long ret = bindings.CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_ok(o != null ? o.ptr : 0);
+               long ret = bindings.CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ ret_hu_conv = Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.constr_from_ptr(ret);
index ac6e16dda7d4ea0c6a21e2bd80771be82941ca3c..16cbce6c674a05e829a57789326b2bed99ce6d67 100644 (file)
@@ -13,6 +13,10 @@ public class Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ extends Co
                if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_is_ok(ptr)) {
                        return new Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ extends Co
         * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ in the success state.
         */
        public static Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ ok(org.ldk.structs.TwoTuple_ThirtyTwoBytesChannelManagerZ o) {
-               long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_ok(o != null ? o.ptr : 0);
+               long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
index 7b90888f024101bd9c464f5d2db992582023479f..c5e191c9eb2d5a58c77a79057bf9e75559dc7345 100644 (file)
@@ -13,6 +13,10 @@ public class Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ extends Co
                if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_is_ok(ptr)) {
                        return new Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ extends Co
         * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ in the success state.
         */
        public static Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ ok(org.ldk.structs.TwoTuple_ThirtyTwoBytesChannelMonitorZ o) {
-               long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_ok(o != null ? o.ptr : 0);
+               long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.constr_from_ptr(ret);
index 4b3c5979eb286a55fade902c229f23d84dc8939f..90be3b5445adb047c55b71ab8e09617d33f1ed66 100644 (file)
@@ -13,6 +13,10 @@ public class Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ extends Common
                if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_is_ok(ptr)) {
                        return new Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_OK(null, ptr);
@@ -43,7 +47,7 @@ public class Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ extends Common
         * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ in the success state.
         */
        public static Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ ok(org.ldk.structs.TwoTuple_ThirtyTwoBytesChannelMonitorZ o) {
-               long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_ok(o != null ? o.ptr : 0);
+               long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.constr_from_ptr(ret);
index 907955e2d7594e947534900a2aa2e3ea575f83e1..ce082d718a44462a95b7f02584e6c6f5a7b0709b 100644 (file)
@@ -13,6 +13,10 @@ public class Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ extends CommonBas
                if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_is_ok(ptr)) {
                        return new Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_OK(null, ptr);
@@ -41,7 +45,7 @@ public class Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ extends CommonBas
         * Creates a new CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ in the success state.
         */
        public static Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ ok(org.ldk.structs.TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ o) {
-               long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(o != null ? o.ptr : 0);
+               long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.constr_from_ptr(ret);
index 9ab468bfedc96069dc7200b8f971f9e435f4c7b3..c3cd1ccb64163238855a6e58e696a164aa1ff7c6 100644 (file)
@@ -13,6 +13,10 @@ public class Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ ext
                if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_free(ptr); ptr = 0; }
+       }
+
        static Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ constr_from_ptr(long ptr) {
                if (bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_is_ok(ptr)) {
                        return new Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ ext
         * Creates a new CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ in the success state.
         */
        public static Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ ok(org.ldk.structs.TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ o) {
-               long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_ok(o != null ? o.ptr : 0);
+               long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.constr_from_ptr(ret);
index 73f0e2ea6c8f654891a84c018ee93118b7bb1bb3..8e31a770848a5ea0aadba60b8f2f7b19703b118c 100644 (file)
@@ -13,6 +13,10 @@ public class Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSe
                if (ptr != 0) { bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_is_ok(ptr)) {
                        return new Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSe
         * Creates a new CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ in the success state.
         */
        public static Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ ok(org.ldk.structs.ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ o) {
-               long ret = bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_ok(o != null ? o.ptr : 0);
+               long ret = bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ ret_hu_conv = Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.constr_from_ptr(ret);
@@ -74,4 +78,22 @@ public class Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSe
                return ret;
        }
 
+       long clone_ptr() {
+               long ret = bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ clone() {
+               long ret = bindings.CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ ret_hu_conv = Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 2d0ca841f248f1f22db1893c63c3a9d5a71fb941..724c48f90cab09c79eb14730e763385b7a7fb655 100644 (file)
@@ -13,6 +13,10 @@ public class Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNo
                if (ptr != 0) { bindings.CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(ptr)) {
                        return new Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_OK(null, ptr);
@@ -41,7 +45,7 @@ public class Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNo
         * Creates a new CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ in the success state.
         */
        public static Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ ok(org.ldk.structs.ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ o) {
-               long ret = bindings.CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(o != null ? o.ptr : 0);
+               long ret = bindings.CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ ret_hu_conv = Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.constr_from_ptr(ret);
index d549e50708283c9e89b6a74c654f4f3e7ab0f3d8..01947c947ea5ea5efc51a7ec92e012d7e9fa4b96 100644 (file)
@@ -13,6 +13,10 @@ public class Result_COption_APIErrorZDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_COption_APIErrorZDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_COption_APIErrorZDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_COption_APIErrorZDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_COption_APIErrorZDecodeErrorZ_is_ok(ptr)) {
                        return new Result_COption_APIErrorZDecodeErrorZ_OK(null, ptr);
index 01e399da42a52af80edb404f3e03a7b96b8431ea..ac6831ec2a7a7e4f7d89e0fd02816090a0fe758d 100644 (file)
@@ -13,6 +13,10 @@ public class Result_COption_ClosureReasonZDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_COption_ClosureReasonZDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_COption_ClosureReasonZDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_COption_ClosureReasonZDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(ptr)) {
                        return new Result_COption_ClosureReasonZDecodeErrorZ_OK(null, ptr);
index 97941634b2b9c17872250709e9d3bb20ca82c240..11de42816d49c59bb8aa84a4ca1919256b3ee998 100644 (file)
@@ -13,6 +13,10 @@ public class Result_COption_EventZDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_COption_EventZDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_COption_EventZDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_COption_EventZDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_COption_EventZDecodeErrorZ_is_ok(ptr)) {
                        return new Result_COption_EventZDecodeErrorZ_OK(null, ptr);
index e147f1f0cc41a6c6c990578e5bfc689622e8b551..a9f4097c650e2f26a8dde6817e19660a9e846d66 100644 (file)
@@ -13,6 +13,10 @@ public class Result_COption_HTLCDestinationZDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_COption_HTLCDestinationZDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_COption_HTLCDestinationZDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_COption_HTLCDestinationZDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_COption_HTLCDestinationZDecodeErrorZ_is_ok(ptr)) {
                        return new Result_COption_HTLCDestinationZDecodeErrorZ_OK(null, ptr);
index 427e9faeb76b7409d9dd4ae2e4804df7de379161..52dd23c1614d31f870112e8f7730a8644b3f118e 100644 (file)
@@ -13,6 +13,10 @@ public class Result_COption_MonitorEventZDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_COption_MonitorEventZDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_COption_MonitorEventZDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_COption_MonitorEventZDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_COption_MonitorEventZDecodeErrorZ_is_ok(ptr)) {
                        return new Result_COption_MonitorEventZDecodeErrorZ_OK(null, ptr);
index b8e241e1d339551a9c6857cce2571981ff806316..329513e160417a3b9e8376789e2d396cc8beac12 100644 (file)
@@ -13,6 +13,10 @@ public class Result_COption_NetworkUpdateZDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_COption_NetworkUpdateZDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_COption_NetworkUpdateZDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_COption_NetworkUpdateZDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_COption_NetworkUpdateZDecodeErrorZ_is_ok(ptr)) {
                        return new Result_COption_NetworkUpdateZDecodeErrorZ_OK(null, ptr);
index 434926167e3b30a224c3917c2c85dae734b85662..d48fb1fe168d166649effb4418aaa3f42a2a1beb 100644 (file)
@@ -13,6 +13,10 @@ public class Result_COption_OnionMessageContentsZDecodeErrorZ extends CommonBase
                if (ptr != 0) { bindings.CResult_COption_OnionMessageContentsZDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_COption_OnionMessageContentsZDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_COption_OnionMessageContentsZDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_COption_OnionMessageContentsZDecodeErrorZ_is_ok(ptr)) {
                        return new Result_COption_OnionMessageContentsZDecodeErrorZ_OK(null, ptr);
index 3c4d8f2e9b08c1dc67fc84d86a28b6a22aaa3d25..4fc0943264dff9208fb951344557513f2b0050fd 100644 (file)
@@ -13,6 +13,10 @@ public class Result_COption_PathFailureZDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_COption_PathFailureZDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_COption_PathFailureZDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_COption_PathFailureZDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_COption_PathFailureZDecodeErrorZ_is_ok(ptr)) {
                        return new Result_COption_PathFailureZDecodeErrorZ_OK(null, ptr);
index 210a7ef26c7b1e1f9ac96d0c6a2d49bdf6e442df..7f6903db07c4ca6cb44165d296ec636302d4f0ae 100644 (file)
@@ -13,6 +13,10 @@ public class Result_COption_TypeZDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_COption_TypeZDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_COption_TypeZDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_COption_TypeZDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_COption_TypeZDecodeErrorZ_is_ok(ptr)) {
                        return new Result_COption_TypeZDecodeErrorZ_OK(null, ptr);
index e539c7e026bde2dbc29b3cc0fa0eca3e516c76b1..d6a8765c5b04496a994f7edb64b9949b24d43891 100644 (file)
@@ -13,6 +13,10 @@ public class Result_CVec_BlindedPathZNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_CVec_BlindedPathZNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_CVec_BlindedPathZNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_CVec_BlindedPathZNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_CVec_BlindedPathZNoneZ_is_ok(ptr)) {
                        return new Result_CVec_BlindedPathZNoneZ_OK(null, ptr);
@@ -47,7 +51,7 @@ public class Result_CVec_BlindedPathZNoneZ extends CommonBase {
         * Creates a new CResult_CVec_BlindedPathZNoneZ in the success state.
         */
        public static Result_CVec_BlindedPathZNoneZ ok(BlindedPath[] o) {
-               long ret = bindings.CResult_CVec_BlindedPathZNoneZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_13 -> o_conv_13 == null ? 0 : o_conv_13.ptr).toArray() : null);
+               long ret = bindings.CResult_CVec_BlindedPathZNoneZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_13 -> o_conv_13.ptr).toArray() : null);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_CVec_BlindedPathZNoneZ ret_hu_conv = Result_CVec_BlindedPathZNoneZ.constr_from_ptr(ret);
index 242ff0636c3317cf77b5c8b4d7a0c85643480857..665ca4804146b285068326d88dabb1d6e6847c69 100644 (file)
@@ -13,6 +13,10 @@ public class Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ extends Common
                if (ptr != 0) { bindings.CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_is_ok(ptr)) {
                        return new Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_OK(null, ptr);
@@ -47,7 +51,7 @@ public class Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ extends Common
         * Creates a new CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ in the success state.
         */
        public static Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ ok(TwoTuple_BlindedPayInfoBlindedPathZ[] o) {
-               long ret = bindings.CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_37 -> o_conv_37 != null ? o_conv_37.ptr : 0).toArray() : null);
+               long ret = bindings.CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_37 -> o_conv_37.ptr).toArray() : null);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ ret_hu_conv = Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.constr_from_ptr(ret);
index 8416d019eb28e9bfe5aca638c145619b24dcfaf3..e9066752bf6162d80471f1892fd9c5692cece101 100644 (file)
@@ -13,6 +13,10 @@ public class Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ extends
                if (ptr != 0) { bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_is_ok(ptr)) {
                        return new Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_OK(null, ptr);
@@ -49,7 +53,7 @@ public class Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ extends
         * Creates a new CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ in the success state.
         */
        public static Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ ok(TwoTuple_ThirtyTwoBytesChannelMonitorZ[] o) {
-               long ret = bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_40 -> o_conv_40 != null ? o_conv_40.ptr : 0).toArray() : null);
+               long ret = bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_40 -> o_conv_40.ptr).toArray() : null);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ ret_hu_conv = Result_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.constr_from_ptr(ret);
index e32bc767d4fd08626b3ee27513c193c6db808b19..a762cddcc7c861ec50591162a87fe5306a13a0e7 100644 (file)
@@ -13,6 +13,10 @@ public class Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ
                if (ptr != 0) { bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_free(ptr); ptr = 0; }
+       }
+
        static Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ constr_from_ptr(long ptr) {
                if (bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_is_ok(ptr)) {
                        return new Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_OK(null, ptr);
@@ -52,7 +56,7 @@ public class Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ
         * Creates a new CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ in the success state.
         */
        public static Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ ok(TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ[] o) {
-               long ret = bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_40 -> o_conv_40 != null ? o_conv_40.ptr : 0).toArray() : null);
+               long ret = bindings.CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_40 -> o_conv_40.ptr).toArray() : null);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ ret_hu_conv = Result_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.constr_from_ptr(ret);
index 1c6f0d3b683a82d1cb8b8243cc67cb4d4f921c19..a386770553d8ba98284cad05aff885529f62ce79 100644 (file)
@@ -13,6 +13,10 @@ public class Result_CVec_ECDSASignatureZNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_CVec_ECDSASignatureZNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_CVec_ECDSASignatureZNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_CVec_ECDSASignatureZNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_CVec_ECDSASignatureZNoneZ_is_ok(ptr)) {
                        return new Result_CVec_ECDSASignatureZNoneZ_OK(null, ptr);
index cc4ac52130c820df1c137ff829b6ca6c40aa8b63..fe436db2d3df319b0453a313779a512b2aa40158 100644 (file)
@@ -13,6 +13,10 @@ public class Result_CVec_StrZIOErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_CVec_StrZIOErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_CVec_StrZIOErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_CVec_StrZIOErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_CVec_StrZIOErrorZ_is_ok(ptr)) {
                        return new Result_CVec_StrZIOErrorZ_OK(null, ptr);
index 74a8ef417ef0ae1e8f774e40a38653ea3f5311f4..5d655e536b48b01722d7c4583a245efebf9656d9 100644 (file)
@@ -13,6 +13,10 @@ public class Result_CVec_UtxoZNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_CVec_UtxoZNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_CVec_UtxoZNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_CVec_UtxoZNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_CVec_UtxoZNoneZ_is_ok(ptr)) {
                        return new Result_CVec_UtxoZNoneZ_OK(null, ptr);
@@ -47,7 +51,7 @@ public class Result_CVec_UtxoZNoneZ extends CommonBase {
         * Creates a new CResult_CVec_UtxoZNoneZ in the success state.
         */
        public static Result_CVec_UtxoZNoneZ ok(Utxo[] o) {
-               long ret = bindings.CResult_CVec_UtxoZNoneZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_6 -> o_conv_6 == null ? 0 : o_conv_6.ptr).toArray() : null);
+               long ret = bindings.CResult_CVec_UtxoZNoneZ_ok(o != null ? Arrays.stream(o).mapToLong(o_conv_6 -> o_conv_6.ptr).toArray() : null);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_CVec_UtxoZNoneZ ret_hu_conv = Result_CVec_UtxoZNoneZ.constr_from_ptr(ret);
index 047148d5867b3357363c17f21a7525d954f153bd..1e4888e5b41f437ba620a67cd4d5a4657d386f05 100644 (file)
@@ -13,6 +13,10 @@ public class Result_CVec_u8ZIOErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_CVec_u8ZIOErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_CVec_u8ZIOErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_CVec_u8ZIOErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_CVec_u8ZIOErrorZ_is_ok(ptr)) {
                        return new Result_CVec_u8ZIOErrorZ_OK(null, ptr);
index a0d450f67913aaa561f8023ac706695b30f7d850..a6021e9e823537a9dc6fd98835ee05c0225d6525 100644 (file)
@@ -13,6 +13,10 @@ public class Result_CVec_u8ZNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_CVec_u8ZNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_CVec_u8ZNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_CVec_u8ZNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_CVec_u8ZNoneZ_is_ok(ptr)) {
                        return new Result_CVec_u8ZNoneZ_OK(null, ptr);
index 8b2b9ce7f51187f5e0dcf1e0c7a06319d8451564..d1bbc791db8f606fc03fb68e43b63b603441f3e0 100644 (file)
@@ -13,6 +13,10 @@ public class Result_CVec_u8ZPeerHandleErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_CVec_u8ZPeerHandleErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_CVec_u8ZPeerHandleErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_CVec_u8ZPeerHandleErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_CVec_u8ZPeerHandleErrorZ_is_ok(ptr)) {
                        return new Result_CVec_u8ZPeerHandleErrorZ_OK(null, ptr);
@@ -54,7 +58,7 @@ public class Result_CVec_u8ZPeerHandleErrorZ extends CommonBase {
         * Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the error state.
         */
        public static Result_CVec_u8ZPeerHandleErrorZ err(org.ldk.structs.PeerHandleError e) {
-               long ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_CVec_u8ZPeerHandleErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_CVec_u8ZPeerHandleErrorZ ret_hu_conv = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret);
index 0a658ef47ec3062177082d8dd75dbb7306847553..61313ceb873e8f65a7e165e9baa07dce8cfd2605 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ChannelAnnouncementDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ChannelAnnouncementDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ChannelAnnouncementDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ChannelAnnouncementDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ChannelAnnouncementDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ChannelAnnouncementDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ChannelAnnouncementDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the success state.
         */
        public static Result_ChannelAnnouncementDecodeErrorZ ok(org.ldk.structs.ChannelAnnouncement o) {
-               long ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ChannelAnnouncementDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
index f11c6a4673f652e8655cf52fbf00271aaa19c942..ad213054bdd0a7c3bcf0d88b4b34285ff5cef627 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ChannelConfigDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ChannelConfigDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ChannelConfigDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ChannelConfigDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ChannelConfigDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ChannelConfigDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ChannelConfigDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelConfigDecodeErrorZ in the success state.
         */
        public static Result_ChannelConfigDecodeErrorZ ok(org.ldk.structs.ChannelConfig o) {
-               long ret = bindings.CResult_ChannelConfigDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ChannelConfigDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret);
index be39ca206ea4e09ce98bee85e27426884a9917a7..974986ca399fa7e99e46f608f217d1a5fc7e2591 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ChannelCounterpartyDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ChannelCounterpartyDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ChannelCounterpartyDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ChannelCounterpartyDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ChannelCounterpartyDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ChannelCounterpartyDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ChannelCounterpartyDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelCounterpartyDecodeErrorZ in the success state.
         */
        public static Result_ChannelCounterpartyDecodeErrorZ ok(org.ldk.structs.ChannelCounterparty o) {
-               long ret = bindings.CResult_ChannelCounterpartyDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ChannelCounterpartyDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelCounterpartyDecodeErrorZ ret_hu_conv = Result_ChannelCounterpartyDecodeErrorZ.constr_from_ptr(ret);
index 7da2e629125c57108119a170faa22f407ce475ab..a43619aa8bf04646325d8dedf535357be8b4eac6 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ChannelDerivationParametersDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ChannelDerivationParametersDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ChannelDerivationParametersDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ChannelDerivationParametersDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ChannelDerivationParametersDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ChannelDerivationParametersDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ChannelDerivationParametersDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelDerivationParametersDecodeErrorZ in the success state.
         */
        public static Result_ChannelDerivationParametersDecodeErrorZ ok(org.ldk.structs.ChannelDerivationParameters o) {
-               long ret = bindings.CResult_ChannelDerivationParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ChannelDerivationParametersDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelDerivationParametersDecodeErrorZ ret_hu_conv = Result_ChannelDerivationParametersDecodeErrorZ.constr_from_ptr(ret);
index 0ed7390d124dc0b1e49579b494c61d56ea788d6a..d552e3706b0daf988c83ad613dd32a8a1bc348db 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ChannelDetailsDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ChannelDetailsDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ChannelDetailsDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ChannelDetailsDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ChannelDetailsDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ChannelDetailsDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ChannelDetailsDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelDetailsDecodeErrorZ in the success state.
         */
        public static Result_ChannelDetailsDecodeErrorZ ok(org.ldk.structs.ChannelDetails o) {
-               long ret = bindings.CResult_ChannelDetailsDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ChannelDetailsDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelDetailsDecodeErrorZ ret_hu_conv = Result_ChannelDetailsDecodeErrorZ.constr_from_ptr(ret);
index dbe8174327a686319900945da544c34e102f8309..5f89bd7485a0c86bc67c04c4e4e7fff49a5380f0 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ChannelFeaturesDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ChannelFeaturesDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ChannelFeaturesDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ChannelFeaturesDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ChannelFeaturesDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ChannelFeaturesDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ChannelFeaturesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelFeaturesDecodeErrorZ in the success state.
         */
        public static Result_ChannelFeaturesDecodeErrorZ ok(org.ldk.structs.ChannelFeatures o) {
-               long ret = bindings.CResult_ChannelFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ChannelFeaturesDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret);
diff --git a/src/main/java/org/ldk/structs/Result_ChannelIdAPIErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelIdAPIErrorZ.java
new file mode 100644 (file)
index 0000000..f07bda6
--- /dev/null
@@ -0,0 +1,100 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_ChannelIdAPIErrorZ extends CommonBase {
+       private Result_ChannelIdAPIErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_ChannelIdAPIErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ChannelIdAPIErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_ChannelIdAPIErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_ChannelIdAPIErrorZ_is_ok(ptr)) {
+                       return new Result_ChannelIdAPIErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_ChannelIdAPIErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_ChannelIdAPIErrorZ_OK extends Result_ChannelIdAPIErrorZ {
+               public final ChannelId res;
+               private Result_ChannelIdAPIErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_ChannelIdAPIErrorZ_get_ok(ptr);
+                       org.ldk.structs.ChannelId res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.ChannelId(null, res); }
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_ChannelIdAPIErrorZ_Err extends Result_ChannelIdAPIErrorZ {
+               public final APIError err;
+               private Result_ChannelIdAPIErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.CResult_ChannelIdAPIErrorZ_get_err(ptr);
+                       org.ldk.structs.APIError err_hu_conv = org.ldk.structs.APIError.constr_from_ptr(err);
+                       if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+                       this.err = err_hu_conv;
+               }
+       }
+
+       /**
+        * Creates a new CResult_ChannelIdAPIErrorZ in the success state.
+        */
+       public static Result_ChannelIdAPIErrorZ ok(org.ldk.structs.ChannelId o) {
+               long ret = bindings.CResult_ChannelIdAPIErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_ChannelIdAPIErrorZ ret_hu_conv = Result_ChannelIdAPIErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_ChannelIdAPIErrorZ in the error state.
+        */
+       public static Result_ChannelIdAPIErrorZ err(org.ldk.structs.APIError e) {
+               long ret = bindings.CResult_ChannelIdAPIErrorZ_err(e.ptr);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_ChannelIdAPIErrorZ ret_hu_conv = Result_ChannelIdAPIErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_ChannelIdAPIErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CResult_ChannelIdAPIErrorZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_ChannelIdAPIErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_ChannelIdAPIErrorZ clone() {
+               long ret = bindings.CResult_ChannelIdAPIErrorZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_ChannelIdAPIErrorZ ret_hu_conv = Result_ChannelIdAPIErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/Result_ChannelIdDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelIdDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..2859b76
--- /dev/null
@@ -0,0 +1,100 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_ChannelIdDecodeErrorZ extends CommonBase {
+       private Result_ChannelIdDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_ChannelIdDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ChannelIdDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_ChannelIdDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_ChannelIdDecodeErrorZ_is_ok(ptr)) {
+                       return new Result_ChannelIdDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_ChannelIdDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_ChannelIdDecodeErrorZ_OK extends Result_ChannelIdDecodeErrorZ {
+               public final ChannelId res;
+               private Result_ChannelIdDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_ChannelIdDecodeErrorZ_get_ok(ptr);
+                       org.ldk.structs.ChannelId res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.ChannelId(null, res); }
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_ChannelIdDecodeErrorZ_Err extends Result_ChannelIdDecodeErrorZ {
+               public final DecodeError err;
+               private Result_ChannelIdDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.CResult_ChannelIdDecodeErrorZ_get_err(ptr);
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+                       if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+                       this.err = err_hu_conv;
+               }
+       }
+
+       /**
+        * Creates a new CResult_ChannelIdDecodeErrorZ in the success state.
+        */
+       public static Result_ChannelIdDecodeErrorZ ok(org.ldk.structs.ChannelId o) {
+               long ret = bindings.CResult_ChannelIdDecodeErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_ChannelIdDecodeErrorZ ret_hu_conv = Result_ChannelIdDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_ChannelIdDecodeErrorZ in the error state.
+        */
+       public static Result_ChannelIdDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+               long ret = bindings.CResult_ChannelIdDecodeErrorZ_err(e.ptr);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_ChannelIdDecodeErrorZ ret_hu_conv = Result_ChannelIdDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_ChannelIdDecodeErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CResult_ChannelIdDecodeErrorZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_ChannelIdDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_ChannelIdDecodeErrorZ clone() {
+               long ret = bindings.CResult_ChannelIdDecodeErrorZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_ChannelIdDecodeErrorZ ret_hu_conv = Result_ChannelIdDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
index 38da077ba039736b621b162bd0d6a935f97615a4..8ac44525e7f4e6971599b33324195b2fa4ce185f 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ChannelInfoDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ChannelInfoDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ChannelInfoDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ChannelInfoDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ChannelInfoDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ChannelInfoDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ChannelInfoDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelInfoDecodeErrorZ in the success state.
         */
        public static Result_ChannelInfoDecodeErrorZ ok(org.ldk.structs.ChannelInfo o) {
-               long ret = bindings.CResult_ChannelInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ChannelInfoDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
index cfd46659fa3e20eda376359c6bebb32be2e67504..0837426136c7608ce23d29f811bc2a6ab236df42 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ChannelMonitorUpdateDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ChannelMonitorUpdateDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ChannelMonitorUpdateDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ChannelMonitorUpdateDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the success state.
         */
        public static Result_ChannelMonitorUpdateDecodeErrorZ ok(org.ldk.structs.ChannelMonitorUpdate o) {
-               long ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelMonitorUpdateDecodeErrorZ ret_hu_conv = Result_ChannelMonitorUpdateDecodeErrorZ.constr_from_ptr(ret);
index e1f81471b63000c5353fa315d15a7b88a0502b2b..1e587967dffea84004aef77d4ee41c3435e826d6 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ChannelMonitorUpdateStatusNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ChannelMonitorUpdateStatusNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ChannelMonitorUpdateStatusNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ChannelMonitorUpdateStatusNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ChannelMonitorUpdateStatusNoneZ_is_ok(ptr)) {
                        return new Result_ChannelMonitorUpdateStatusNoneZ_OK(null, ptr);
index 66e82f042ad239f1cdaeff5c6415b347bc194369..cad6c6d1131e29b2852b9daa848a56e26a8afe92 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ChannelPublicKeysDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ChannelPublicKeysDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ChannelPublicKeysDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ChannelPublicKeysDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ChannelPublicKeysDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ChannelPublicKeysDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ChannelPublicKeysDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelPublicKeysDecodeErrorZ in the success state.
         */
        public static Result_ChannelPublicKeysDecodeErrorZ ok(org.ldk.structs.ChannelPublicKeys o) {
-               long ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ChannelPublicKeysDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);
index c1e395f3b773278a42820b5b9c56f4bcd9823187..6924ba76c1533fb18f40e9e3e899c0f1f41d6b48 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ChannelReadyDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ChannelReadyDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ChannelReadyDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ChannelReadyDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ChannelReadyDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ChannelReadyDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ChannelReadyDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelReadyDecodeErrorZ in the success state.
         */
        public static Result_ChannelReadyDecodeErrorZ ok(org.ldk.structs.ChannelReady o) {
-               long ret = bindings.CResult_ChannelReadyDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ChannelReadyDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelReadyDecodeErrorZ ret_hu_conv = Result_ChannelReadyDecodeErrorZ.constr_from_ptr(ret);
index 0855b8001bb5f6b27398f7961beb40342d3220f6..19a55604e989e40c5d7816ed109c51e3a8ca9fc7 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ChannelReestablishDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ChannelReestablishDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ChannelReestablishDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ChannelReestablishDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ChannelReestablishDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ChannelReestablishDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ChannelReestablishDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelReestablishDecodeErrorZ in the success state.
         */
        public static Result_ChannelReestablishDecodeErrorZ ok(org.ldk.structs.ChannelReestablish o) {
-               long ret = bindings.CResult_ChannelReestablishDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ChannelReestablishDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelReestablishDecodeErrorZ ret_hu_conv = Result_ChannelReestablishDecodeErrorZ.constr_from_ptr(ret);
index fdd9269686bf7bd5c0d21d8429e0301418029171..a2bc6c338a535b7d49986c00786cdf7efe81e990 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ChannelShutdownStateDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ChannelShutdownStateDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ChannelShutdownStateDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ChannelShutdownStateDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ChannelShutdownStateDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ChannelShutdownStateDecodeErrorZ_OK(null, ptr);
index 6a293d18cf9f707e64e1b22fb90c45fdcf9b908d..8e1b0a5f289c855402dc55efcc6cb2d2211a5cf2 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ChannelTransactionParametersDecodeErrorZ extends CommonBase
                if (ptr != 0) { bindings.CResult_ChannelTransactionParametersDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ChannelTransactionParametersDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ChannelTransactionParametersDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ChannelTransactionParametersDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ChannelTransactionParametersDecodeErrorZ extends CommonBase
         * Creates a new CResult_ChannelTransactionParametersDecodeErrorZ in the success state.
         */
        public static Result_ChannelTransactionParametersDecodeErrorZ ok(org.ldk.structs.ChannelTransactionParameters o) {
-               long ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
index d72b8edbc5a32ee5086cd55cd0c2d98a488b3288..e485a360e09b84713833e842d520736b7b57935c 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ChannelTypeFeaturesDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ChannelTypeFeaturesDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ChannelTypeFeaturesDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ChannelTypeFeaturesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelTypeFeaturesDecodeErrorZ in the success state.
         */
        public static Result_ChannelTypeFeaturesDecodeErrorZ ok(org.ldk.structs.ChannelTypeFeatures o) {
-               long ret = bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelTypeFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelTypeFeaturesDecodeErrorZ.constr_from_ptr(ret);
index a9849cdd81b8fe8cf28f484295435ee4ac1cb86d..ce7b2f30427e54bbcad3559df75233430899d740 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ChannelUpdateDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ChannelUpdateDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ChannelUpdateDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ChannelUpdateDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ChannelUpdateDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ChannelUpdateDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ChannelUpdateDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelUpdateDecodeErrorZ in the success state.
         */
        public static Result_ChannelUpdateDecodeErrorZ ok(org.ldk.structs.ChannelUpdate o) {
-               long ret = bindings.CResult_ChannelUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ChannelUpdateDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
index 8648d4d941423b4276da60b7f75b5487252f1451..f80e32ba7698ccedf7c634f2563e0f029442e106 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ChannelUpdateInfoDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ChannelUpdateInfoDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ChannelUpdateInfoDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ChannelUpdateInfoDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ChannelUpdateInfoDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ChannelUpdateInfoDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ChannelUpdateInfoDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ChannelUpdateInfoDecodeErrorZ in the success state.
         */
        public static Result_ChannelUpdateInfoDecodeErrorZ ok(org.ldk.structs.ChannelUpdateInfo o) {
-               long ret = bindings.CResult_ChannelUpdateInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ChannelUpdateInfoDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ChannelUpdateInfoDecodeErrorZ ret_hu_conv = Result_ChannelUpdateInfoDecodeErrorZ.constr_from_ptr(ret);
index 842ceb74e2834c4f35371d62a12ff170eb149905..b565a2c5bea13d6ab048626458c0104e56695f1a 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ClaimedHTLCDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ClaimedHTLCDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ClaimedHTLCDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ClaimedHTLCDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ClaimedHTLCDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ClaimedHTLCDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ClaimedHTLCDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ClaimedHTLCDecodeErrorZ in the success state.
         */
        public static Result_ClaimedHTLCDecodeErrorZ ok(org.ldk.structs.ClaimedHTLC o) {
-               long ret = bindings.CResult_ClaimedHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ClaimedHTLCDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ClaimedHTLCDecodeErrorZ ret_hu_conv = Result_ClaimedHTLCDecodeErrorZ.constr_from_ptr(ret);
index e1e3d21735cd268ac37f761cfbae646dd0c7c1f3..9bcfa2df5e8de1ba197eb3e60692c5504ad9d87b 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ClosingSignedDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ClosingSignedDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ClosingSignedDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ClosingSignedDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ClosingSignedDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ClosingSignedDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ClosingSignedDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ClosingSignedDecodeErrorZ in the success state.
         */
        public static Result_ClosingSignedDecodeErrorZ ok(org.ldk.structs.ClosingSigned o) {
-               long ret = bindings.CResult_ClosingSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ClosingSignedDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret);
index b3f37dbec9126f5f40f7c21936de6105200f6d63..9f8bfbef33b397870ce6bd7c67b93a6574d28d42 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ClosingSignedFeeRangeDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ClosingSignedFeeRangeDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ClosingSignedFeeRangeDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ClosingSignedFeeRangeDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ClosingSignedFeeRangeDecodeErrorZ in the success state.
         */
        public static Result_ClosingSignedFeeRangeDecodeErrorZ ok(org.ldk.structs.ClosingSignedFeeRange o) {
-               long ret = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ClosingSignedFeeRangeDecodeErrorZ ret_hu_conv = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret);
index 4e01174cddef9e257c1b2b85314bd5a62b263cf0..d8d6ca93858d0203fa2fa7d19ca818d5be213f8d 100644 (file)
@@ -13,6 +13,10 @@ public class Result_CoinSelectionNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_CoinSelectionNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_CoinSelectionNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_CoinSelectionNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_CoinSelectionNoneZ_is_ok(ptr)) {
                        return new Result_CoinSelectionNoneZ_OK(null, ptr);
@@ -41,7 +45,7 @@ public class Result_CoinSelectionNoneZ extends CommonBase {
         * Creates a new CResult_CoinSelectionNoneZ in the success state.
         */
        public static Result_CoinSelectionNoneZ ok(org.ldk.structs.CoinSelection o) {
-               long ret = bindings.CResult_CoinSelectionNoneZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_CoinSelectionNoneZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_CoinSelectionNoneZ ret_hu_conv = Result_CoinSelectionNoneZ.constr_from_ptr(ret);
index c1ba1c822c5144155309a475a0df0bbbecb11c66..081b57c8ca377ca914f14b495d7fbf61a39c4b5e 100644 (file)
@@ -13,6 +13,10 @@ public class Result_CommitmentSignedDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_CommitmentSignedDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_CommitmentSignedDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_CommitmentSignedDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_CommitmentSignedDecodeErrorZ_is_ok(ptr)) {
                        return new Result_CommitmentSignedDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_CommitmentSignedDecodeErrorZ extends CommonBase {
         * Creates a new CResult_CommitmentSignedDecodeErrorZ in the success state.
         */
        public static Result_CommitmentSignedDecodeErrorZ ok(org.ldk.structs.CommitmentSigned o) {
-               long ret = bindings.CResult_CommitmentSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_CommitmentSignedDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
index 76678e81ad02ab5bbf13088519af875520efbbcb..2f2a2627e0f06b3b85f73ff4fe6f587f9ec080cd 100644 (file)
@@ -13,6 +13,10 @@ public class Result_CommitmentTransactionDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_CommitmentTransactionDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_CommitmentTransactionDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_CommitmentTransactionDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_CommitmentTransactionDecodeErrorZ_is_ok(ptr)) {
                        return new Result_CommitmentTransactionDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_CommitmentTransactionDecodeErrorZ extends CommonBase {
         * Creates a new CResult_CommitmentTransactionDecodeErrorZ in the success state.
         */
        public static Result_CommitmentTransactionDecodeErrorZ ok(org.ldk.structs.CommitmentTransaction o) {
-               long ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_CommitmentTransactionDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
index e9a67e08cf96bf9aa253f9792841b4a7a6a1a7a8..2dbd8abfe45854ff6eaffa9118f5d95e0b8f9732 100644 (file)
@@ -13,6 +13,10 @@ public class Result_CounterpartyChannelTransactionParametersDecodeErrorZ extends
                if (ptr != 0) { bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(ptr)) {
                        return new Result_CounterpartyChannelTransactionParametersDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_CounterpartyChannelTransactionParametersDecodeErrorZ extends
         * Creates a new CResult_CounterpartyChannelTransactionParametersDecodeErrorZ in the success state.
         */
        public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ ok(org.ldk.structs.CounterpartyChannelTransactionParameters o) {
-               long ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
index b4c513d33141ea2822353306be260753e6ced59d..e5d22b143bc2ef599e0e4b095c880b3ae40026bb 100644 (file)
@@ -13,6 +13,10 @@ public class Result_CounterpartyCommitmentSecretsDecodeErrorZ extends CommonBase
                if (ptr != 0) { bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_CounterpartyCommitmentSecretsDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_is_ok(ptr)) {
                        return new Result_CounterpartyCommitmentSecretsDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_CounterpartyCommitmentSecretsDecodeErrorZ extends CommonBase
         * Creates a new CResult_CounterpartyCommitmentSecretsDecodeErrorZ in the success state.
         */
        public static Result_CounterpartyCommitmentSecretsDecodeErrorZ ok(org.ldk.structs.CounterpartyCommitmentSecrets o) {
-               long ret = bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_CounterpartyCommitmentSecretsDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_CounterpartyCommitmentSecretsDecodeErrorZ ret_hu_conv = Result_CounterpartyCommitmentSecretsDecodeErrorZ.constr_from_ptr(ret);
index bb415a5e0322a0d35f21abe3f5ab1f1a17c5c1cf..fc5f8f593de167986aff25da9a6679fcab612218 100644 (file)
@@ -13,6 +13,10 @@ public class Result_CounterpartyForwardingInfoDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_CounterpartyForwardingInfoDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_is_ok(ptr)) {
                        return new Result_CounterpartyForwardingInfoDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_CounterpartyForwardingInfoDecodeErrorZ extends CommonBase {
         * Creates a new CResult_CounterpartyForwardingInfoDecodeErrorZ in the success state.
         */
        public static Result_CounterpartyForwardingInfoDecodeErrorZ ok(org.ldk.structs.CounterpartyForwardingInfo o) {
-               long ret = bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_CounterpartyForwardingInfoDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_CounterpartyForwardingInfoDecodeErrorZ ret_hu_conv = Result_CounterpartyForwardingInfoDecodeErrorZ.constr_from_ptr(ret);
index 671f391c7576acad40657cf355aba328c52dfd49..860921c354125cd4255ace5337ca16c086ae9fbf 100644 (file)
@@ -13,6 +13,10 @@ public class Result_DelayedPaymentBasepointDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_DelayedPaymentBasepointDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_DelayedPaymentBasepointDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_DelayedPaymentBasepointDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_DelayedPaymentBasepointDecodeErrorZ_is_ok(ptr)) {
                        return new Result_DelayedPaymentBasepointDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_DelayedPaymentBasepointDecodeErrorZ extends CommonBase {
         * Creates a new CResult_DelayedPaymentBasepointDecodeErrorZ in the success state.
         */
        public static Result_DelayedPaymentBasepointDecodeErrorZ ok(org.ldk.structs.DelayedPaymentBasepoint o) {
-               long ret = bindings.CResult_DelayedPaymentBasepointDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_DelayedPaymentBasepointDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_DelayedPaymentBasepointDecodeErrorZ ret_hu_conv = Result_DelayedPaymentBasepointDecodeErrorZ.constr_from_ptr(ret);
index fcbc55b9dbf43c52c6442c3d2fdb5797cc2d6f3f..ba4a15480f8ec77a952f538cd7f9dad12ddae654 100644 (file)
@@ -13,6 +13,10 @@ public class Result_DelayedPaymentKeyDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_DelayedPaymentKeyDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_DelayedPaymentKeyDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_DelayedPaymentKeyDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_DelayedPaymentKeyDecodeErrorZ_is_ok(ptr)) {
                        return new Result_DelayedPaymentKeyDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_DelayedPaymentKeyDecodeErrorZ extends CommonBase {
         * Creates a new CResult_DelayedPaymentKeyDecodeErrorZ in the success state.
         */
        public static Result_DelayedPaymentKeyDecodeErrorZ ok(org.ldk.structs.DelayedPaymentKey o) {
-               long ret = bindings.CResult_DelayedPaymentKeyDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_DelayedPaymentKeyDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_DelayedPaymentKeyDecodeErrorZ ret_hu_conv = Result_DelayedPaymentKeyDecodeErrorZ.constr_from_ptr(ret);
index 81f5d24f932865e56e6b08c3de95bb66cd09077a..a5dbe2de82b5a8fbc6d741a6d18473d96c49eea4 100644 (file)
@@ -13,6 +13,10 @@ public class Result_DelayedPaymentOutputDescriptorDecodeErrorZ extends CommonBas
                if (ptr != 0) { bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_DelayedPaymentOutputDescriptorDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(ptr)) {
                        return new Result_DelayedPaymentOutputDescriptorDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_DelayedPaymentOutputDescriptorDecodeErrorZ extends CommonBas
         * Creates a new CResult_DelayedPaymentOutputDescriptorDecodeErrorZ in the success state.
         */
        public static Result_DelayedPaymentOutputDescriptorDecodeErrorZ ok(org.ldk.structs.DelayedPaymentOutputDescriptor o) {
-               long ret = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_DelayedPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_DelayedPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
index f141a1632d8f1831939fda5691b1929ebe9a6a8a..86aaf524790a33ae9fef1628566d19525522fbcb 100644 (file)
@@ -13,6 +13,10 @@ public class Result_DescriptionCreationErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_DescriptionCreationErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_DescriptionCreationErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_DescriptionCreationErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_DescriptionCreationErrorZ_is_ok(ptr)) {
                        return new Result_DescriptionCreationErrorZ_OK(null, ptr);
@@ -43,7 +47,7 @@ public class Result_DescriptionCreationErrorZ extends CommonBase {
         * Creates a new CResult_DescriptionCreationErrorZ in the success state.
         */
        public static Result_DescriptionCreationErrorZ ok(org.ldk.structs.Description o) {
-               long ret = bindings.CResult_DescriptionCreationErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_DescriptionCreationErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_DescriptionCreationErrorZ ret_hu_conv = Result_DescriptionCreationErrorZ.constr_from_ptr(ret);
index 7e32f8e437bf650e7f67698d39ee4260b07d4656..78f03cc1ebd63a95b8d50e4647d538a17b81e981 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ECDSASignatureNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ECDSASignatureNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ECDSASignatureNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ECDSASignatureNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ECDSASignatureNoneZ_is_ok(ptr)) {
                        return new Result_ECDSASignatureNoneZ_OK(null, ptr);
index 53bc8baf44a08ea3db774731e4812965c7396d36..ff8ca532b2b2964a8c4b79fcb1050f0f51b98672 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ErrorMessageDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ErrorMessageDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ErrorMessageDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ErrorMessageDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ErrorMessageDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ErrorMessageDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ErrorMessageDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ErrorMessageDecodeErrorZ in the success state.
         */
        public static Result_ErrorMessageDecodeErrorZ ok(org.ldk.structs.ErrorMessage o) {
-               long ret = bindings.CResult_ErrorMessageDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ErrorMessageDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ErrorMessageDecodeErrorZ ret_hu_conv = Result_ErrorMessageDecodeErrorZ.constr_from_ptr(ret);
index c21157f31478fc7767d4f95be6ae932b93ecad34..7933c85f528a6b72b8f7df706464086fea0e4a58 100644 (file)
@@ -13,6 +13,10 @@ public class Result_FinalOnionHopDataDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_FinalOnionHopDataDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_FinalOnionHopDataDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_FinalOnionHopDataDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_FinalOnionHopDataDecodeErrorZ_is_ok(ptr)) {
                        return new Result_FinalOnionHopDataDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_FinalOnionHopDataDecodeErrorZ extends CommonBase {
         * Creates a new CResult_FinalOnionHopDataDecodeErrorZ in the success state.
         */
        public static Result_FinalOnionHopDataDecodeErrorZ ok(org.ldk.structs.FinalOnionHopData o) {
-               long ret = bindings.CResult_FinalOnionHopDataDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_FinalOnionHopDataDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_FinalOnionHopDataDecodeErrorZ ret_hu_conv = Result_FinalOnionHopDataDecodeErrorZ.constr_from_ptr(ret);
index 24ce57de4d24f1f0e960766d34794d84f90b53ff..8b5079be73ff4bed77c1ff42d3558749c02d9d7c 100644 (file)
@@ -13,6 +13,10 @@ public class Result_FixedPenaltyScorerDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_FixedPenaltyScorerDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_FixedPenaltyScorerDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_FixedPenaltyScorerDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_FixedPenaltyScorerDecodeErrorZ_is_ok(ptr)) {
                        return new Result_FixedPenaltyScorerDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_FixedPenaltyScorerDecodeErrorZ extends CommonBase {
         * Creates a new CResult_FixedPenaltyScorerDecodeErrorZ in the success state.
         */
        public static Result_FixedPenaltyScorerDecodeErrorZ ok(org.ldk.structs.FixedPenaltyScorer o) {
-               long ret = bindings.CResult_FixedPenaltyScorerDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_FixedPenaltyScorerDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_FixedPenaltyScorerDecodeErrorZ ret_hu_conv = Result_FixedPenaltyScorerDecodeErrorZ.constr_from_ptr(ret);
index 0625eb8bcd79ec84d5f3262fd12cc1a801b9476f..bbff99a0d5f6a74fbafc7fdc4de13fcf9839d08e 100644 (file)
@@ -13,6 +13,10 @@ public class Result_FundingCreatedDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_FundingCreatedDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_FundingCreatedDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_FundingCreatedDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_FundingCreatedDecodeErrorZ_is_ok(ptr)) {
                        return new Result_FundingCreatedDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_FundingCreatedDecodeErrorZ extends CommonBase {
         * Creates a new CResult_FundingCreatedDecodeErrorZ in the success state.
         */
        public static Result_FundingCreatedDecodeErrorZ ok(org.ldk.structs.FundingCreated o) {
-               long ret = bindings.CResult_FundingCreatedDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_FundingCreatedDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
index 8037ac371f3d0845b184aad6fcd01f746b9c1d85..b7dd6681b5f4eade63fa48383671c5237627fdc0 100644 (file)
@@ -13,6 +13,10 @@ public class Result_FundingSignedDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_FundingSignedDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_FundingSignedDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_FundingSignedDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_FundingSignedDecodeErrorZ_is_ok(ptr)) {
                        return new Result_FundingSignedDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_FundingSignedDecodeErrorZ extends CommonBase {
         * Creates a new CResult_FundingSignedDecodeErrorZ in the success state.
         */
        public static Result_FundingSignedDecodeErrorZ ok(org.ldk.structs.FundingSigned o) {
-               long ret = bindings.CResult_FundingSignedDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_FundingSignedDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret);
index aa5bed903a44a231c5a3b58e7aa9796b6e529571..803eadefc4a0a699812a374aa7bba8a5d6f77a32 100644 (file)
@@ -13,6 +13,10 @@ public class Result_GossipTimestampFilterDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_GossipTimestampFilterDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_GossipTimestampFilterDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_GossipTimestampFilterDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_GossipTimestampFilterDecodeErrorZ_is_ok(ptr)) {
                        return new Result_GossipTimestampFilterDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_GossipTimestampFilterDecodeErrorZ extends CommonBase {
         * Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the success state.
         */
        public static Result_GossipTimestampFilterDecodeErrorZ ok(org.ldk.structs.GossipTimestampFilter o) {
-               long ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_GossipTimestampFilterDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
index 644bf9988510a6e66da115195738308979622226..2086027ae98f442f3047333b6a68b474be6b7e5b 100644 (file)
@@ -13,6 +13,10 @@ public class Result_HTLCDescriptorDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_HTLCDescriptorDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_HTLCDescriptorDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_HTLCDescriptorDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_HTLCDescriptorDecodeErrorZ_is_ok(ptr)) {
                        return new Result_HTLCDescriptorDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_HTLCDescriptorDecodeErrorZ extends CommonBase {
         * Creates a new CResult_HTLCDescriptorDecodeErrorZ in the success state.
         */
        public static Result_HTLCDescriptorDecodeErrorZ ok(org.ldk.structs.HTLCDescriptor o) {
-               long ret = bindings.CResult_HTLCDescriptorDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_HTLCDescriptorDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_HTLCDescriptorDecodeErrorZ ret_hu_conv = Result_HTLCDescriptorDecodeErrorZ.constr_from_ptr(ret);
index bd76d5579cfd26accade4649573b5a06a51f98e9..2b4b5f9d6feac06c8cadb70c95324a16ff1ea086 100644 (file)
@@ -13,6 +13,10 @@ public class Result_HTLCOutputInCommitmentDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_HTLCOutputInCommitmentDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(ptr)) {
                        return new Result_HTLCOutputInCommitmentDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_HTLCOutputInCommitmentDecodeErrorZ extends CommonBase {
         * Creates a new CResult_HTLCOutputInCommitmentDecodeErrorZ in the success state.
         */
        public static Result_HTLCOutputInCommitmentDecodeErrorZ ok(org.ldk.structs.HTLCOutputInCommitment o) {
-               long ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
index b63eae8c8a83cb2b80bc735cfbac1deed93be2e2..40514adb6384ba2bc0d97ceb6258b44a069a2b9d 100644 (file)
@@ -13,6 +13,10 @@ public class Result_HTLCUpdateDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_HTLCUpdateDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_HTLCUpdateDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_HTLCUpdateDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_HTLCUpdateDecodeErrorZ_is_ok(ptr)) {
                        return new Result_HTLCUpdateDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_HTLCUpdateDecodeErrorZ extends CommonBase {
         * Creates a new CResult_HTLCUpdateDecodeErrorZ in the success state.
         */
        public static Result_HTLCUpdateDecodeErrorZ ok(org.ldk.structs.HTLCUpdate o) {
-               long ret = bindings.CResult_HTLCUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_HTLCUpdateDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
index a91cae286cb91c027ee8d332676cd392e2ad5977..f5402c874f163f6a59483fafff6b9f25fe797809 100644 (file)
@@ -13,6 +13,10 @@ public class Result_HolderCommitmentTransactionDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_HolderCommitmentTransactionDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(ptr)) {
                        return new Result_HolderCommitmentTransactionDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_HolderCommitmentTransactionDecodeErrorZ extends CommonBase {
         * Creates a new CResult_HolderCommitmentTransactionDecodeErrorZ in the success state.
         */
        public static Result_HolderCommitmentTransactionDecodeErrorZ ok(org.ldk.structs.HolderCommitmentTransaction o) {
-               long ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
index fc3831a1d6c5165af494fe19a06dfaddb047f49e..e970bab37f790196f1d06ff12b8c78485b235339 100644 (file)
@@ -13,6 +13,10 @@ public class Result_HostnameDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_HostnameDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_HostnameDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_HostnameDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_HostnameDecodeErrorZ_is_ok(ptr)) {
                        return new Result_HostnameDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_HostnameDecodeErrorZ extends CommonBase {
         * Creates a new CResult_HostnameDecodeErrorZ in the success state.
         */
        public static Result_HostnameDecodeErrorZ ok(org.ldk.structs.Hostname o) {
-               long ret = bindings.CResult_HostnameDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_HostnameDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_HostnameDecodeErrorZ ret_hu_conv = Result_HostnameDecodeErrorZ.constr_from_ptr(ret);
index 2183302a52f1027ec548ce2169030c168869deb0..b0e92b03144e8017dff1cb5d2347858d7ec10c3e 100644 (file)
@@ -13,6 +13,10 @@ public class Result_HtlcBasepointDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_HtlcBasepointDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_HtlcBasepointDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_HtlcBasepointDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_HtlcBasepointDecodeErrorZ_is_ok(ptr)) {
                        return new Result_HtlcBasepointDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_HtlcBasepointDecodeErrorZ extends CommonBase {
         * Creates a new CResult_HtlcBasepointDecodeErrorZ in the success state.
         */
        public static Result_HtlcBasepointDecodeErrorZ ok(org.ldk.structs.HtlcBasepoint o) {
-               long ret = bindings.CResult_HtlcBasepointDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_HtlcBasepointDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_HtlcBasepointDecodeErrorZ ret_hu_conv = Result_HtlcBasepointDecodeErrorZ.constr_from_ptr(ret);
index 0a4b7678f920b96c7d5a5b2c1eba95786d82fdf6..171cdb145fb10e6030038dfb8f1b728c976f9e04 100644 (file)
@@ -13,6 +13,10 @@ public class Result_HtlcKeyDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_HtlcKeyDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_HtlcKeyDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_HtlcKeyDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_HtlcKeyDecodeErrorZ_is_ok(ptr)) {
                        return new Result_HtlcKeyDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_HtlcKeyDecodeErrorZ extends CommonBase {
         * Creates a new CResult_HtlcKeyDecodeErrorZ in the success state.
         */
        public static Result_HtlcKeyDecodeErrorZ ok(org.ldk.structs.HtlcKey o) {
-               long ret = bindings.CResult_HtlcKeyDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_HtlcKeyDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_HtlcKeyDecodeErrorZ ret_hu_conv = Result_HtlcKeyDecodeErrorZ.constr_from_ptr(ret);
index 024cc29f21af06dc822c9e9d1338d43dea80e56a..ef6b85cb949b6db582332837fc4bfa7323b808aa 100644 (file)
@@ -13,6 +13,10 @@ public class Result_InFlightHtlcsDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_InFlightHtlcsDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_InFlightHtlcsDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_InFlightHtlcsDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_InFlightHtlcsDecodeErrorZ_is_ok(ptr)) {
                        return new Result_InFlightHtlcsDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_InFlightHtlcsDecodeErrorZ extends CommonBase {
         * Creates a new CResult_InFlightHtlcsDecodeErrorZ in the success state.
         */
        public static Result_InFlightHtlcsDecodeErrorZ ok(org.ldk.structs.InFlightHtlcs o) {
-               long ret = bindings.CResult_InFlightHtlcsDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_InFlightHtlcsDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_InFlightHtlcsDecodeErrorZ ret_hu_conv = Result_InFlightHtlcsDecodeErrorZ.constr_from_ptr(ret);
index 8dff685815f2873deae42223efd94628e7f8edd6..8b17bc023f5315b685d38c278a5e36592ad8b8e8 100644 (file)
@@ -13,6 +13,10 @@ public class Result_InMemorySignerDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_InMemorySignerDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_InMemorySignerDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_InMemorySignerDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_InMemorySignerDecodeErrorZ_is_ok(ptr)) {
                        return new Result_InMemorySignerDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_InMemorySignerDecodeErrorZ extends CommonBase {
         * Creates a new CResult_InMemorySignerDecodeErrorZ in the success state.
         */
        public static Result_InMemorySignerDecodeErrorZ ok(org.ldk.structs.InMemorySigner o) {
-               long ret = bindings.CResult_InMemorySignerDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_InMemorySignerDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret);
index 35ddbb3633b4dba0e4332614c47851f04d57f540..6dea0a023667d0acdb6030ff74003c9a74084f47 100644 (file)
@@ -13,6 +13,10 @@ public class Result_InitDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_InitDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_InitDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_InitDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_InitDecodeErrorZ_is_ok(ptr)) {
                        return new Result_InitDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_InitDecodeErrorZ extends CommonBase {
         * Creates a new CResult_InitDecodeErrorZ in the success state.
         */
        public static Result_InitDecodeErrorZ ok(org.ldk.structs.Init o) {
-               long ret = bindings.CResult_InitDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_InitDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret);
index b191a5db70e81c7c818ae890891c3d78e6c66df0..a9f7bbd53039148abd2c6bc98f23f47d515076f0 100644 (file)
@@ -13,6 +13,10 @@ public class Result_InitFeaturesDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_InitFeaturesDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_InitFeaturesDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_InitFeaturesDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_InitFeaturesDecodeErrorZ_is_ok(ptr)) {
                        return new Result_InitFeaturesDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_InitFeaturesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_InitFeaturesDecodeErrorZ in the success state.
         */
        public static Result_InitFeaturesDecodeErrorZ ok(org.ldk.structs.InitFeatures o) {
-               long ret = bindings.CResult_InitFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_InitFeaturesDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret);
index 6d1dd181787c526b6bb21d67a041593c1a71fb5f..b8cf9d2933ec11e7de0bff949fb7d5b767b123f9 100644 (file)
@@ -13,6 +13,10 @@ public class Result_InvoiceErrorDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_InvoiceErrorDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_InvoiceErrorDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_InvoiceErrorDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_InvoiceErrorDecodeErrorZ_is_ok(ptr)) {
                        return new Result_InvoiceErrorDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_InvoiceErrorDecodeErrorZ extends CommonBase {
         * Creates a new CResult_InvoiceErrorDecodeErrorZ in the success state.
         */
        public static Result_InvoiceErrorDecodeErrorZ ok(org.ldk.structs.InvoiceError o) {
-               long ret = bindings.CResult_InvoiceErrorDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_InvoiceErrorDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_InvoiceErrorDecodeErrorZ ret_hu_conv = Result_InvoiceErrorDecodeErrorZ.constr_from_ptr(ret);
diff --git a/src/main/java/org/ldk/structs/Result_InvoiceRequestBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_InvoiceRequestBolt12SemanticErrorZ.java
new file mode 100644 (file)
index 0000000..8d2ebb5
--- /dev/null
@@ -0,0 +1,96 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_InvoiceRequestBolt12SemanticErrorZ extends CommonBase {
+       private Result_InvoiceRequestBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_InvoiceRequestBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(ptr)) {
+                       return new Result_InvoiceRequestBolt12SemanticErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_InvoiceRequestBolt12SemanticErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_InvoiceRequestBolt12SemanticErrorZ_OK extends Result_InvoiceRequestBolt12SemanticErrorZ {
+               public final InvoiceRequest res;
+               private Result_InvoiceRequestBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(ptr);
+                       org.ldk.structs.InvoiceRequest res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceRequest(null, res); }
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_InvoiceRequestBolt12SemanticErrorZ_Err extends Result_InvoiceRequestBolt12SemanticErrorZ {
+               public final Bolt12SemanticError err;
+               private Result_InvoiceRequestBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.err = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(ptr);
+               }
+       }
+
+       /**
+        * Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ in the success state.
+        */
+       public static Result_InvoiceRequestBolt12SemanticErrorZ ok(org.ldk.structs.InvoiceRequest o) {
+               long ret = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ in the error state.
+        */
+       public static Result_InvoiceRequestBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+               long ret = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_err(e);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_InvoiceRequestBolt12SemanticErrorZ clone() {
+               long ret = bindings.CResult_InvoiceRequestBolt12SemanticErrorZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/Result_InvoiceRequestFieldsDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_InvoiceRequestFieldsDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..246e990
--- /dev/null
@@ -0,0 +1,100 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_InvoiceRequestFieldsDecodeErrorZ extends CommonBase {
+       private Result_InvoiceRequestFieldsDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_InvoiceRequestFieldsDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(ptr)) {
+                       return new Result_InvoiceRequestFieldsDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_InvoiceRequestFieldsDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_InvoiceRequestFieldsDecodeErrorZ_OK extends Result_InvoiceRequestFieldsDecodeErrorZ {
+               public final InvoiceRequestFields res;
+               private Result_InvoiceRequestFieldsDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(ptr);
+                       org.ldk.structs.InvoiceRequestFields res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceRequestFields(null, res); }
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_InvoiceRequestFieldsDecodeErrorZ_Err extends Result_InvoiceRequestFieldsDecodeErrorZ {
+               public final DecodeError err;
+               private Result_InvoiceRequestFieldsDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(ptr);
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+                       if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+                       this.err = err_hu_conv;
+               }
+       }
+
+       /**
+        * Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ in the success state.
+        */
+       public static Result_InvoiceRequestFieldsDecodeErrorZ ok(org.ldk.structs.InvoiceRequestFields o) {
+               long ret = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceRequestFieldsDecodeErrorZ ret_hu_conv = Result_InvoiceRequestFieldsDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ in the error state.
+        */
+       public static Result_InvoiceRequestFieldsDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+               long ret = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_err(e.ptr);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceRequestFieldsDecodeErrorZ ret_hu_conv = Result_InvoiceRequestFieldsDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_InvoiceRequestFieldsDecodeErrorZ clone() {
+               long ret = bindings.CResult_InvoiceRequestFieldsDecodeErrorZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceRequestFieldsDecodeErrorZ ret_hu_conv = Result_InvoiceRequestFieldsDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.java
new file mode 100644 (file)
index 0000000..e25fd5f
--- /dev/null
@@ -0,0 +1,86 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ extends CommonBase {
+       private Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(ptr)) {
+                       return new Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_OK extends Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ {
+               public final InvoiceRequestWithDerivedPayerIdBuilder res;
+               private Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(ptr);
+                       org.ldk.structs.InvoiceRequestWithDerivedPayerIdBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceRequestWithDerivedPayerIdBuilder(null, res); }
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_Err extends Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ {
+               public final Bolt12SemanticError err;
+               private Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.err = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(ptr);
+               }
+       }
+
+       /**
+        * Creates a new CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ in the success state.
+        */
+       public static Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ ok(org.ldk.structs.InvoiceRequestWithDerivedPayerIdBuilder o) {
+               long ret = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after ret_hu_conv call, o is reset to null and is now a dummy object.
+               o.ptr = 0;;
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ in the error state.
+        */
+       public static Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+               long ret = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(e);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.java
new file mode 100644 (file)
index 0000000..9e7a22b
--- /dev/null
@@ -0,0 +1,86 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ extends CommonBase {
+       private Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(ptr)) {
+                       return new Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_OK extends Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ {
+               public final InvoiceRequestWithExplicitPayerIdBuilder res;
+               private Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(ptr);
+                       org.ldk.structs.InvoiceRequestWithExplicitPayerIdBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceRequestWithExplicitPayerIdBuilder(null, res); }
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_Err extends Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ {
+               public final Bolt12SemanticError err;
+               private Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.err = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(ptr);
+               }
+       }
+
+       /**
+        * Creates a new CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ in the success state.
+        */
+       public static Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ ok(org.ldk.structs.InvoiceRequestWithExplicitPayerIdBuilder o) {
+               long ret = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after ret_hu_conv call, o is reset to null and is now a dummy object.
+               o.ptr = 0;;
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ in the error state.
+        */
+       public static Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+               long ret = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(e);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.java
new file mode 100644 (file)
index 0000000..7129be3
--- /dev/null
@@ -0,0 +1,86 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ extends CommonBase {
+       private Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(ptr)) {
+                       return new Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_OK extends Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ {
+               public final InvoiceWithDerivedSigningPubkeyBuilder res;
+               private Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(ptr);
+                       org.ldk.structs.InvoiceWithDerivedSigningPubkeyBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceWithDerivedSigningPubkeyBuilder(null, res); }
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_Err extends Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ {
+               public final Bolt12SemanticError err;
+               private Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.err = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(ptr);
+               }
+       }
+
+       /**
+        * Creates a new CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ in the success state.
+        */
+       public static Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ ok(org.ldk.structs.InvoiceWithDerivedSigningPubkeyBuilder o) {
+               long ret = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after ret_hu_conv call, o is reset to null and is now a dummy object.
+               o.ptr = 0;;
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ in the error state.
+        */
+       public static Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+               long ret = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(e);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.java
new file mode 100644 (file)
index 0000000..de2c103
--- /dev/null
@@ -0,0 +1,86 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ extends CommonBase {
+       private Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(ptr)) {
+                       return new Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_OK extends Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ {
+               public final InvoiceWithExplicitSigningPubkeyBuilder res;
+               private Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(ptr);
+                       org.ldk.structs.InvoiceWithExplicitSigningPubkeyBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceWithExplicitSigningPubkeyBuilder(null, res); }
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_Err extends Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ {
+               public final Bolt12SemanticError err;
+               private Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.err = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(ptr);
+               }
+       }
+
+       /**
+        * Creates a new CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ in the success state.
+        */
+       public static Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ok(org.ldk.structs.InvoiceWithExplicitSigningPubkeyBuilder o) {
+               long ret = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after ret_hu_conv call, o is reset to null and is now a dummy object.
+               o.ptr = 0;;
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ in the error state.
+        */
+       public static Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+               long ret = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(e);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+}
index 47332e4c26a4433b3c7e731540b16a7378ca0fa3..8a2b4937d732c7fa2bc841c344721b3054e50453 100644 (file)
@@ -13,6 +13,10 @@ public class Result_LockedChannelMonitorNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_LockedChannelMonitorNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_LockedChannelMonitorNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_LockedChannelMonitorNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_LockedChannelMonitorNoneZ_is_ok(ptr)) {
                        return new Result_LockedChannelMonitorNoneZ_OK(null, ptr);
@@ -41,7 +45,7 @@ public class Result_LockedChannelMonitorNoneZ extends CommonBase {
         * Creates a new CResult_LockedChannelMonitorNoneZ in the success state.
         */
        public static Result_LockedChannelMonitorNoneZ ok(org.ldk.structs.LockedChannelMonitor o) {
-               long ret = bindings.CResult_LockedChannelMonitorNoneZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_LockedChannelMonitorNoneZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_LockedChannelMonitorNoneZ ret_hu_conv = Result_LockedChannelMonitorNoneZ.constr_from_ptr(ret);
index 084aed889fac156a94272238807795b147321f99..6bcb58ff688f91783b9a2d03d9c1287bd5220a7c 100644 (file)
@@ -13,6 +13,10 @@ public class Result_MaxDustHTLCExposureDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_MaxDustHTLCExposureDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_MaxDustHTLCExposureDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_MaxDustHTLCExposureDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_MaxDustHTLCExposureDecodeErrorZ_is_ok(ptr)) {
                        return new Result_MaxDustHTLCExposureDecodeErrorZ_OK(null, ptr);
index b285d0c957a6445441889e327dd3c350a9510af9..6cac05e0e97f91470dad14089248ee2639f66851 100644 (file)
@@ -13,6 +13,10 @@ public class Result_NetworkGraphDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_NetworkGraphDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_NetworkGraphDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_NetworkGraphDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_NetworkGraphDecodeErrorZ_is_ok(ptr)) {
                        return new Result_NetworkGraphDecodeErrorZ_OK(null, ptr);
index d4a481e7ff526036a021f9ab89452290630b704e..8c39b8c49db977a3c1ec850bc400c078a4814706 100644 (file)
@@ -13,6 +13,10 @@ public class Result_NodeAliasDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_NodeAliasDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_NodeAliasDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_NodeAliasDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_NodeAliasDecodeErrorZ_is_ok(ptr)) {
                        return new Result_NodeAliasDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_NodeAliasDecodeErrorZ extends CommonBase {
         * Creates a new CResult_NodeAliasDecodeErrorZ in the success state.
         */
        public static Result_NodeAliasDecodeErrorZ ok(org.ldk.structs.NodeAlias o) {
-               long ret = bindings.CResult_NodeAliasDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_NodeAliasDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NodeAliasDecodeErrorZ ret_hu_conv = Result_NodeAliasDecodeErrorZ.constr_from_ptr(ret);
index 1288434d30e3428ac40792057c5e55d348f8283f..b016b264670eb4dfebf8db6d4a5d576b6e335ff9 100644 (file)
@@ -13,6 +13,10 @@ public class Result_NodeAnnouncementDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_NodeAnnouncementDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_NodeAnnouncementDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_NodeAnnouncementDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_NodeAnnouncementDecodeErrorZ_is_ok(ptr)) {
                        return new Result_NodeAnnouncementDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_NodeAnnouncementDecodeErrorZ extends CommonBase {
         * Creates a new CResult_NodeAnnouncementDecodeErrorZ in the success state.
         */
        public static Result_NodeAnnouncementDecodeErrorZ ok(org.ldk.structs.NodeAnnouncement o) {
-               long ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_NodeAnnouncementDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
index 12c1309a66ebb7244b2c89de3b5ab4e0911baaf3..414412b830de258ab3c87dc8100d5716f500b6c2 100644 (file)
@@ -13,6 +13,10 @@ public class Result_NodeAnnouncementInfoDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_NodeAnnouncementInfoDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_is_ok(ptr)) {
                        return new Result_NodeAnnouncementInfoDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_NodeAnnouncementInfoDecodeErrorZ extends CommonBase {
         * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ in the success state.
         */
        public static Result_NodeAnnouncementInfoDecodeErrorZ ok(org.ldk.structs.NodeAnnouncementInfo o) {
-               long ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NodeAnnouncementInfoDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementInfoDecodeErrorZ.constr_from_ptr(ret);
index 71ce2926a4c764ae6f98723a2c533c169736521d..4de5c15de180868212cd3eb253a09aa90565bdfa 100644 (file)
@@ -13,6 +13,10 @@ public class Result_NodeFeaturesDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_NodeFeaturesDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_NodeFeaturesDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_NodeFeaturesDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_NodeFeaturesDecodeErrorZ_is_ok(ptr)) {
                        return new Result_NodeFeaturesDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_NodeFeaturesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_NodeFeaturesDecodeErrorZ in the success state.
         */
        public static Result_NodeFeaturesDecodeErrorZ ok(org.ldk.structs.NodeFeatures o) {
-               long ret = bindings.CResult_NodeFeaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_NodeFeaturesDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NodeFeaturesDecodeErrorZ ret_hu_conv = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret);
index 2701159b62a2894a115ee8cafc32e67ee2f1d95d..30f71e9fab92947cf2ae01ff4a3333f1bb6dd760 100644 (file)
@@ -13,6 +13,10 @@ public class Result_NodeIdDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_NodeIdDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_NodeIdDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_NodeIdDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_NodeIdDecodeErrorZ_is_ok(ptr)) {
                        return new Result_NodeIdDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_NodeIdDecodeErrorZ extends CommonBase {
         * Creates a new CResult_NodeIdDecodeErrorZ in the success state.
         */
        public static Result_NodeIdDecodeErrorZ ok(org.ldk.structs.NodeId o) {
-               long ret = bindings.CResult_NodeIdDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_NodeIdDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NodeIdDecodeErrorZ ret_hu_conv = Result_NodeIdDecodeErrorZ.constr_from_ptr(ret);
index da911db95154bfe6329e2246eb28d080ec1c4446..d5acc85a7cf5bf1190e21a546fae27b778fd7684 100644 (file)
@@ -13,6 +13,10 @@ public class Result_NodeInfoDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_NodeInfoDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_NodeInfoDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_NodeInfoDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_NodeInfoDecodeErrorZ_is_ok(ptr)) {
                        return new Result_NodeInfoDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_NodeInfoDecodeErrorZ extends CommonBase {
         * Creates a new CResult_NodeInfoDecodeErrorZ in the success state.
         */
        public static Result_NodeInfoDecodeErrorZ ok(org.ldk.structs.NodeInfo o) {
-               long ret = bindings.CResult_NodeInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_NodeInfoDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NodeInfoDecodeErrorZ ret_hu_conv = Result_NodeInfoDecodeErrorZ.constr_from_ptr(ret);
index 17b3a56e167cd0189beedb44fa37cf768ece4251..9fa3dc42bc234368ed647498807e96f3da5109c9 100644 (file)
@@ -13,6 +13,10 @@ public class Result_NoneAPIErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_NoneAPIErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_NoneAPIErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_NoneAPIErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_NoneAPIErrorZ_is_ok(ptr)) {
                        return new Result_NoneAPIErrorZ_OK(null, ptr);
index cef0dddcb1edcf2228e9f0d1e5692c1775c67362..bf1c165ec4ce086b910b40a5ac7a4ea88cedad63 100644 (file)
@@ -13,6 +13,10 @@ public class Result_NoneBolt11SemanticErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_NoneBolt11SemanticErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_NoneBolt11SemanticErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_NoneBolt11SemanticErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_NoneBolt11SemanticErrorZ_is_ok(ptr)) {
                        return new Result_NoneBolt11SemanticErrorZ_OK(null, ptr);
index 7e7965872412317073a7bd69f0a0bb34610e3bf5..15dedcf34798aa2ac56dfc72d68ee70af0be2531 100644 (file)
@@ -13,6 +13,10 @@ public class Result_NoneBolt12SemanticErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_NoneBolt12SemanticErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_NoneBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_NoneBolt12SemanticErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_NoneBolt12SemanticErrorZ_is_ok(ptr)) {
                        return new Result_NoneBolt12SemanticErrorZ_OK(null, ptr);
index 38c7ae65f042cc78220d3b766462501266a40338..5ba4b5d9efe6ed56af69d4358b041fe6996e0fe7 100644 (file)
@@ -13,6 +13,10 @@ public class Result_NoneIOErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_NoneIOErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_NoneIOErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_NoneIOErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_NoneIOErrorZ_is_ok(ptr)) {
                        return new Result_NoneIOErrorZ_OK(null, ptr);
index 823a07e356b5b14d52a464e5d0442de06806eb9e..ee0d03f41063a431a815e1687165ce86bad3846e 100644 (file)
@@ -13,6 +13,10 @@ public class Result_NoneLightningErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_NoneLightningErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_NoneLightningErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_NoneLightningErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_NoneLightningErrorZ_is_ok(ptr)) {
                        return new Result_NoneLightningErrorZ_OK(null, ptr);
@@ -51,7 +55,7 @@ public class Result_NoneLightningErrorZ extends CommonBase {
         * Creates a new CResult_NoneLightningErrorZ in the error state.
         */
        public static Result_NoneLightningErrorZ err(org.ldk.structs.LightningError e) {
-               long ret = bindings.CResult_NoneLightningErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_NoneLightningErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
index 937001df258dd8148d37e742f546be7edcb66c25..fec49f5382d0dfe6daa84f1d7599e68ddca875cc 100644 (file)
@@ -13,6 +13,10 @@ public class Result_NoneNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_NoneNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_NoneNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_NoneNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_NoneNoneZ_is_ok(ptr)) {
                        return new Result_NoneNoneZ_OK(null, ptr);
index 865b587d074148690790b80ac6ba7f444d5260eb..7a07c131d7cfe73fd63644f197cf2b3efdd09688 100644 (file)
@@ -13,6 +13,10 @@ public class Result_NonePaymentSendFailureZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_NonePaymentSendFailureZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_NonePaymentSendFailureZ_free(ptr); ptr = 0; }
+       }
+
        static Result_NonePaymentSendFailureZ constr_from_ptr(long ptr) {
                if (bindings.CResult_NonePaymentSendFailureZ_is_ok(ptr)) {
                        return new Result_NonePaymentSendFailureZ_OK(null, ptr);
index 58114ca69bcd9f99fb8d9678222face3b62b043d..309875136740066d96123472f69c1985c0390ae0 100644 (file)
@@ -13,6 +13,10 @@ public class Result_NonePeerHandleErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_NonePeerHandleErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_NonePeerHandleErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_NonePeerHandleErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_NonePeerHandleErrorZ_is_ok(ptr)) {
                        return new Result_NonePeerHandleErrorZ_OK(null, ptr);
@@ -51,7 +55,7 @@ public class Result_NonePeerHandleErrorZ extends CommonBase {
         * Creates a new CResult_NonePeerHandleErrorZ in the error state.
         */
        public static Result_NonePeerHandleErrorZ err(org.ldk.structs.PeerHandleError e) {
-               long ret = bindings.CResult_NonePeerHandleErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_NonePeerHandleErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NonePeerHandleErrorZ ret_hu_conv = Result_NonePeerHandleErrorZ.constr_from_ptr(ret);
index 4022f7b854f87a1a8be69fc7d2509833975fc1f7..10d7fd0ac689b3e159ca21bb28d258a1b85451cf 100644 (file)
@@ -13,6 +13,10 @@ public class Result_NoneRetryableSendFailureZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_NoneRetryableSendFailureZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_NoneRetryableSendFailureZ_free(ptr); ptr = 0; }
+       }
+
        static Result_NoneRetryableSendFailureZ constr_from_ptr(long ptr) {
                if (bindings.CResult_NoneRetryableSendFailureZ_is_ok(ptr)) {
                        return new Result_NoneRetryableSendFailureZ_OK(null, ptr);
index e1e91ded92ed769f9289a0b8b9826649c38c37bd..1727c94fb1a8715151e0c4a06b5fbc1e2cf3e34f 100644 (file)
@@ -13,6 +13,10 @@ public class Result_OfferBolt12ParseErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_OfferBolt12ParseErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_OfferBolt12ParseErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_OfferBolt12ParseErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_OfferBolt12ParseErrorZ_is_ok(ptr)) {
                        return new Result_OfferBolt12ParseErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_OfferBolt12ParseErrorZ extends CommonBase {
         * Creates a new CResult_OfferBolt12ParseErrorZ in the success state.
         */
        public static Result_OfferBolt12ParseErrorZ ok(org.ldk.structs.Offer o) {
-               long ret = bindings.CResult_OfferBolt12ParseErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_OfferBolt12ParseErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_OfferBolt12ParseErrorZ ret_hu_conv = Result_OfferBolt12ParseErrorZ.constr_from_ptr(ret);
@@ -58,7 +62,7 @@ public class Result_OfferBolt12ParseErrorZ extends CommonBase {
         * Creates a new CResult_OfferBolt12ParseErrorZ in the error state.
         */
        public static Result_OfferBolt12ParseErrorZ err(org.ldk.structs.Bolt12ParseError e) {
-               long ret = bindings.CResult_OfferBolt12ParseErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_OfferBolt12ParseErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_OfferBolt12ParseErrorZ ret_hu_conv = Result_OfferBolt12ParseErrorZ.constr_from_ptr(ret);
diff --git a/src/main/java/org/ldk/structs/Result_OfferBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_OfferBolt12SemanticErrorZ.java
new file mode 100644 (file)
index 0000000..a4d2860
--- /dev/null
@@ -0,0 +1,96 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_OfferBolt12SemanticErrorZ extends CommonBase {
+       private Result_OfferBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_OfferBolt12SemanticErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_OfferBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_OfferBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_OfferBolt12SemanticErrorZ_is_ok(ptr)) {
+                       return new Result_OfferBolt12SemanticErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_OfferBolt12SemanticErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_OfferBolt12SemanticErrorZ_OK extends Result_OfferBolt12SemanticErrorZ {
+               public final Offer res;
+               private Result_OfferBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_OfferBolt12SemanticErrorZ_get_ok(ptr);
+                       org.ldk.structs.Offer res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.Offer(null, res); }
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_OfferBolt12SemanticErrorZ_Err extends Result_OfferBolt12SemanticErrorZ {
+               public final Bolt12SemanticError err;
+               private Result_OfferBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.err = bindings.CResult_OfferBolt12SemanticErrorZ_get_err(ptr);
+               }
+       }
+
+       /**
+        * Creates a new CResult_OfferBolt12SemanticErrorZ in the success state.
+        */
+       public static Result_OfferBolt12SemanticErrorZ ok(org.ldk.structs.Offer o) {
+               long ret = bindings.CResult_OfferBolt12SemanticErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_OfferBolt12SemanticErrorZ ret_hu_conv = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_OfferBolt12SemanticErrorZ in the error state.
+        */
+       public static Result_OfferBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+               long ret = bindings.CResult_OfferBolt12SemanticErrorZ_err(e);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_OfferBolt12SemanticErrorZ ret_hu_conv = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_OfferBolt12SemanticErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CResult_OfferBolt12SemanticErrorZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_OfferBolt12SemanticErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_OfferBolt12SemanticErrorZ clone() {
+               long ret = bindings.CResult_OfferBolt12SemanticErrorZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_OfferBolt12SemanticErrorZ ret_hu_conv = Result_OfferBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/Result_OfferIdDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_OfferIdDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..863fa6d
--- /dev/null
@@ -0,0 +1,100 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_OfferIdDecodeErrorZ extends CommonBase {
+       private Result_OfferIdDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_OfferIdDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_OfferIdDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_OfferIdDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_OfferIdDecodeErrorZ_is_ok(ptr)) {
+                       return new Result_OfferIdDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_OfferIdDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_OfferIdDecodeErrorZ_OK extends Result_OfferIdDecodeErrorZ {
+               public final OfferId res;
+               private Result_OfferIdDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_OfferIdDecodeErrorZ_get_ok(ptr);
+                       org.ldk.structs.OfferId res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.OfferId(null, res); }
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_OfferIdDecodeErrorZ_Err extends Result_OfferIdDecodeErrorZ {
+               public final DecodeError err;
+               private Result_OfferIdDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.CResult_OfferIdDecodeErrorZ_get_err(ptr);
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+                       if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+                       this.err = err_hu_conv;
+               }
+       }
+
+       /**
+        * Creates a new CResult_OfferIdDecodeErrorZ in the success state.
+        */
+       public static Result_OfferIdDecodeErrorZ ok(org.ldk.structs.OfferId o) {
+               long ret = bindings.CResult_OfferIdDecodeErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_OfferIdDecodeErrorZ ret_hu_conv = Result_OfferIdDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_OfferIdDecodeErrorZ in the error state.
+        */
+       public static Result_OfferIdDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+               long ret = bindings.CResult_OfferIdDecodeErrorZ_err(e.ptr);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_OfferIdDecodeErrorZ ret_hu_conv = Result_OfferIdDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_OfferIdDecodeErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CResult_OfferIdDecodeErrorZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_OfferIdDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_OfferIdDecodeErrorZ clone() {
+               long ret = bindings.CResult_OfferIdDecodeErrorZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_OfferIdDecodeErrorZ ret_hu_conv = Result_OfferIdDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.java
new file mode 100644 (file)
index 0000000..714a9d5
--- /dev/null
@@ -0,0 +1,96 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ extends CommonBase {
+       private Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(ptr)) {
+                       return new Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK extends Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ {
+               public final OfferWithDerivedMetadataBuilder res;
+               private Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(ptr);
+                       org.ldk.structs.OfferWithDerivedMetadataBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.OfferWithDerivedMetadataBuilder(null, res); }
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err extends Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ {
+               public final Bolt12SemanticError err;
+               private Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.err = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(ptr);
+               }
+       }
+
+       /**
+        * Creates a new CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ in the success state.
+        */
+       public static Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ok(org.ldk.structs.OfferWithDerivedMetadataBuilder o) {
+               long ret = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ in the error state.
+        */
+       public static Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+               long ret = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ clone() {
+               long ret = bindings.CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
index aa6933d915043eb6e229f9979f66c3c695434c72..498447ad84437198fdffce8351eee787d040d5b2 100644 (file)
@@ -13,6 +13,10 @@ public class Result_OffersMessageDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_OffersMessageDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_OffersMessageDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_OffersMessageDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_OffersMessageDecodeErrorZ_is_ok(ptr)) {
                        return new Result_OffersMessageDecodeErrorZ_OK(null, ptr);
index c2279de0d5db3a883d78be596625ae16dd7b4c80..597160e88f4c0eaea03eca8f0d7a1ccf711ad034 100644 (file)
@@ -13,6 +13,10 @@ public class Result_OnionMessageDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_OnionMessageDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_OnionMessageDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_OnionMessageDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_OnionMessageDecodeErrorZ_is_ok(ptr)) {
                        return new Result_OnionMessageDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_OnionMessageDecodeErrorZ extends CommonBase {
         * Creates a new CResult_OnionMessageDecodeErrorZ in the success state.
         */
        public static Result_OnionMessageDecodeErrorZ ok(org.ldk.structs.OnionMessage o) {
-               long ret = bindings.CResult_OnionMessageDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_OnionMessageDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_OnionMessageDecodeErrorZ ret_hu_conv = Result_OnionMessageDecodeErrorZ.constr_from_ptr(ret);
index d8838ee12c92844893312061f91b15efb5e1be55..3e5d72fd39d3c60fcaf972f73f1b2f902cdec9c5 100644 (file)
@@ -13,6 +13,10 @@ public class Result_OnionMessagePathNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_OnionMessagePathNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_OnionMessagePathNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_OnionMessagePathNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_OnionMessagePathNoneZ_is_ok(ptr)) {
                        return new Result_OnionMessagePathNoneZ_OK(null, ptr);
@@ -41,7 +45,7 @@ public class Result_OnionMessagePathNoneZ extends CommonBase {
         * Creates a new CResult_OnionMessagePathNoneZ in the success state.
         */
        public static Result_OnionMessagePathNoneZ ok(org.ldk.structs.OnionMessagePath o) {
-               long ret = bindings.CResult_OnionMessagePathNoneZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_OnionMessagePathNoneZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_OnionMessagePathNoneZ ret_hu_conv = Result_OnionMessagePathNoneZ.constr_from_ptr(ret);
index cf5d4349078614448750a44cc20e4aad4c174048..c352b0b54be1855a282de5605c9037bed8ede527 100644 (file)
@@ -13,6 +13,10 @@ public class Result_OnionPacketDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_OnionPacketDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_OnionPacketDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_OnionPacketDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_OnionPacketDecodeErrorZ_is_ok(ptr)) {
                        return new Result_OnionPacketDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_OnionPacketDecodeErrorZ extends CommonBase {
         * Creates a new CResult_OnionPacketDecodeErrorZ in the success state.
         */
        public static Result_OnionPacketDecodeErrorZ ok(org.ldk.structs.OnionPacket o) {
-               long ret = bindings.CResult_OnionPacketDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_OnionPacketDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_OnionPacketDecodeErrorZ ret_hu_conv = Result_OnionPacketDecodeErrorZ.constr_from_ptr(ret);
index bb32c17f074614b73d2e7c177d6df9bdf65e4006..78ffd06a1f54c9afc7c8c628fa01cb5208994b34 100644 (file)
@@ -13,6 +13,10 @@ public class Result_OpenChannelDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_OpenChannelDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_OpenChannelDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_OpenChannelDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_OpenChannelDecodeErrorZ_is_ok(ptr)) {
                        return new Result_OpenChannelDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_OpenChannelDecodeErrorZ extends CommonBase {
         * Creates a new CResult_OpenChannelDecodeErrorZ in the success state.
         */
        public static Result_OpenChannelDecodeErrorZ ok(org.ldk.structs.OpenChannel o) {
-               long ret = bindings.CResult_OpenChannelDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_OpenChannelDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret);
index 43bdc18397e2229fbc51978bca1a8ae388dcc178..44b428d5d6748f2d5e2f9f4330a59cc89e8febd2 100644 (file)
@@ -13,6 +13,10 @@ public class Result_OpenChannelV2DecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_OpenChannelV2DecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_OpenChannelV2DecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_OpenChannelV2DecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_OpenChannelV2DecodeErrorZ_is_ok(ptr)) {
                        return new Result_OpenChannelV2DecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_OpenChannelV2DecodeErrorZ extends CommonBase {
         * Creates a new CResult_OpenChannelV2DecodeErrorZ in the success state.
         */
        public static Result_OpenChannelV2DecodeErrorZ ok(org.ldk.structs.OpenChannelV2 o) {
-               long ret = bindings.CResult_OpenChannelV2DecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_OpenChannelV2DecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_OpenChannelV2DecodeErrorZ ret_hu_conv = Result_OpenChannelV2DecodeErrorZ.constr_from_ptr(ret);
index 23eb904f5e90db72f5ffb8e405c4690149c7cacc..ec68f22c66e480bd09d797cae1f5175959707b75 100644 (file)
@@ -13,6 +13,10 @@ public class Result_OutPointDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_OutPointDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_OutPointDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_OutPointDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_OutPointDecodeErrorZ_is_ok(ptr)) {
                        return new Result_OutPointDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_OutPointDecodeErrorZ extends CommonBase {
         * Creates a new CResult_OutPointDecodeErrorZ in the success state.
         */
        public static Result_OutPointDecodeErrorZ ok(org.ldk.structs.OutPoint o) {
-               long ret = bindings.CResult_OutPointDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_OutPointDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
diff --git a/src/main/java/org/ldk/structs/Result_OutputSpendStatusDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_OutputSpendStatusDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..8a1f197
--- /dev/null
@@ -0,0 +1,100 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_OutputSpendStatusDecodeErrorZ extends CommonBase {
+       private Result_OutputSpendStatusDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_OutputSpendStatusDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_OutputSpendStatusDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_OutputSpendStatusDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_OutputSpendStatusDecodeErrorZ_is_ok(ptr)) {
+                       return new Result_OutputSpendStatusDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_OutputSpendStatusDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_OutputSpendStatusDecodeErrorZ_OK extends Result_OutputSpendStatusDecodeErrorZ {
+               public final OutputSpendStatus res;
+               private Result_OutputSpendStatusDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_OutputSpendStatusDecodeErrorZ_get_ok(ptr);
+                       org.ldk.structs.OutputSpendStatus res_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(res);
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_OutputSpendStatusDecodeErrorZ_Err extends Result_OutputSpendStatusDecodeErrorZ {
+               public final DecodeError err;
+               private Result_OutputSpendStatusDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.CResult_OutputSpendStatusDecodeErrorZ_get_err(ptr);
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+                       if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+                       this.err = err_hu_conv;
+               }
+       }
+
+       /**
+        * Creates a new CResult_OutputSpendStatusDecodeErrorZ in the success state.
+        */
+       public static Result_OutputSpendStatusDecodeErrorZ ok(org.ldk.structs.OutputSpendStatus o) {
+               long ret = bindings.CResult_OutputSpendStatusDecodeErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_OutputSpendStatusDecodeErrorZ ret_hu_conv = Result_OutputSpendStatusDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_OutputSpendStatusDecodeErrorZ in the error state.
+        */
+       public static Result_OutputSpendStatusDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+               long ret = bindings.CResult_OutputSpendStatusDecodeErrorZ_err(e.ptr);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_OutputSpendStatusDecodeErrorZ ret_hu_conv = Result_OutputSpendStatusDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_OutputSpendStatusDecodeErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_OutputSpendStatusDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_OutputSpendStatusDecodeErrorZ clone() {
+               long ret = bindings.CResult_OutputSpendStatusDecodeErrorZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_OutputSpendStatusDecodeErrorZ ret_hu_conv = Result_OutputSpendStatusDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/Result_OutputSweeperDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_OutputSweeperDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..a1ebaa4
--- /dev/null
@@ -0,0 +1,96 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_OutputSweeperDecodeErrorZ extends CommonBase {
+       private Result_OutputSweeperDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_OutputSweeperDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_OutputSweeperDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_OutputSweeperDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_OutputSweeperDecodeErrorZ_is_ok(ptr)) {
+                       return new Result_OutputSweeperDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_OutputSweeperDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_OutputSweeperDecodeErrorZ_OK extends Result_OutputSweeperDecodeErrorZ {
+               public final OutputSweeper res;
+               private Result_OutputSweeperDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_OutputSweeperDecodeErrorZ_get_ok(ptr);
+                       org.ldk.structs.OutputSweeper res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.OutputSweeper(null, res); }
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_OutputSweeperDecodeErrorZ_Err extends Result_OutputSweeperDecodeErrorZ {
+               public final DecodeError err;
+               private Result_OutputSweeperDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.CResult_OutputSweeperDecodeErrorZ_get_err(ptr);
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+                       if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+                       this.err = err_hu_conv;
+               }
+       }
+
+       /**
+        * Creates a new CResult_OutputSweeperDecodeErrorZ in the success state.
+        */
+       public static Result_OutputSweeperDecodeErrorZ ok(BestBlock o_best_block, BroadcasterInterface o_broadcaster, FeeEstimator o_fee_estimator, Option_FilterZ o_chain_data_source, OutputSpender o_output_spender, ChangeDestinationSource o_change_destination_source, KVStore o_kv_store, Logger o_logger) {
+               long ret = bindings.CResult_OutputSweeperDecodeErrorZ_ok(bindings.OutputSweeper_new(o_best_block.ptr, o_broadcaster.ptr, o_fee_estimator.ptr, o_chain_data_source.ptr, o_output_spender.ptr, o_change_destination_source.ptr, o_kv_store.ptr, o_logger.ptr));
+               Reference.reachabilityFence(o_best_block);
+               Reference.reachabilityFence(o_broadcaster);
+               Reference.reachabilityFence(o_fee_estimator);
+               Reference.reachabilityFence(o_chain_data_source);
+               Reference.reachabilityFence(o_output_spender);
+               Reference.reachabilityFence(o_change_destination_source);
+               Reference.reachabilityFence(o_kv_store);
+               Reference.reachabilityFence(o_logger);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_OutputSweeperDecodeErrorZ ret_hu_conv = Result_OutputSweeperDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_best_block); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_broadcaster); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_fee_estimator); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_chain_data_source); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_output_spender); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_change_destination_source); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_kv_store); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_logger); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_OutputSweeperDecodeErrorZ in the error state.
+        */
+       public static Result_OutputSweeperDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+               long ret = bindings.CResult_OutputSweeperDecodeErrorZ_err(e.ptr);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_OutputSweeperDecodeErrorZ ret_hu_conv = Result_OutputSweeperDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_OutputSweeperDecodeErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+}
index 298eae93abd6e8a4f3a76984b2a4d6c6eef0e690..ab4f5434b388e372695a02688a691cc01ff939be 100644 (file)
@@ -13,6 +13,10 @@ public class Result_PayeePubKeySecp256k1ErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_PayeePubKeySecp256k1ErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_PayeePubKeySecp256k1ErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_PayeePubKeySecp256k1ErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_PayeePubKeySecp256k1ErrorZ_is_ok(ptr)) {
                        return new Result_PayeePubKeySecp256k1ErrorZ_OK(null, ptr);
@@ -43,7 +47,7 @@ public class Result_PayeePubKeySecp256k1ErrorZ extends CommonBase {
         * Creates a new CResult_PayeePubKeySecp256k1ErrorZ in the success state.
         */
        public static Result_PayeePubKeySecp256k1ErrorZ ok(org.ldk.structs.PayeePubKey o) {
-               long ret = bindings.CResult_PayeePubKeySecp256k1ErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_PayeePubKeySecp256k1ErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PayeePubKeySecp256k1ErrorZ ret_hu_conv = Result_PayeePubKeySecp256k1ErrorZ.constr_from_ptr(ret);
index 996aa1b6304b5fca000435bfacec8fceb722a4b0..b7558b769489af81908291bd58be1f64abb88735 100644 (file)
@@ -13,6 +13,10 @@ public class Result_PaymentConstraintsDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_PaymentConstraintsDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_PaymentConstraintsDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_PaymentConstraintsDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_PaymentConstraintsDecodeErrorZ_is_ok(ptr)) {
                        return new Result_PaymentConstraintsDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_PaymentConstraintsDecodeErrorZ extends CommonBase {
         * Creates a new CResult_PaymentConstraintsDecodeErrorZ in the success state.
         */
        public static Result_PaymentConstraintsDecodeErrorZ ok(org.ldk.structs.PaymentConstraints o) {
-               long ret = bindings.CResult_PaymentConstraintsDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_PaymentConstraintsDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PaymentConstraintsDecodeErrorZ ret_hu_conv = Result_PaymentConstraintsDecodeErrorZ.constr_from_ptr(ret);
diff --git a/src/main/java/org/ldk/structs/Result_PaymentContextDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_PaymentContextDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..6d52c31
--- /dev/null
@@ -0,0 +1,100 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_PaymentContextDecodeErrorZ extends CommonBase {
+       private Result_PaymentContextDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_PaymentContextDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_PaymentContextDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_PaymentContextDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_PaymentContextDecodeErrorZ_is_ok(ptr)) {
+                       return new Result_PaymentContextDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_PaymentContextDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_PaymentContextDecodeErrorZ_OK extends Result_PaymentContextDecodeErrorZ {
+               public final PaymentContext res;
+               private Result_PaymentContextDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_PaymentContextDecodeErrorZ_get_ok(ptr);
+                       org.ldk.structs.PaymentContext res_hu_conv = org.ldk.structs.PaymentContext.constr_from_ptr(res);
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_PaymentContextDecodeErrorZ_Err extends Result_PaymentContextDecodeErrorZ {
+               public final DecodeError err;
+               private Result_PaymentContextDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.CResult_PaymentContextDecodeErrorZ_get_err(ptr);
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+                       if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+                       this.err = err_hu_conv;
+               }
+       }
+
+       /**
+        * Creates a new CResult_PaymentContextDecodeErrorZ in the success state.
+        */
+       public static Result_PaymentContextDecodeErrorZ ok(org.ldk.structs.PaymentContext o) {
+               long ret = bindings.CResult_PaymentContextDecodeErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_PaymentContextDecodeErrorZ ret_hu_conv = Result_PaymentContextDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_PaymentContextDecodeErrorZ in the error state.
+        */
+       public static Result_PaymentContextDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+               long ret = bindings.CResult_PaymentContextDecodeErrorZ_err(e.ptr);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_PaymentContextDecodeErrorZ ret_hu_conv = Result_PaymentContextDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_PaymentContextDecodeErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CResult_PaymentContextDecodeErrorZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_PaymentContextDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_PaymentContextDecodeErrorZ clone() {
+               long ret = bindings.CResult_PaymentContextDecodeErrorZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_PaymentContextDecodeErrorZ ret_hu_conv = Result_PaymentContextDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
index e650482983193574a147060bb8e4eaa8d8bfea2b..e46a155b5fe8052e4c533d9139140adcd1faa9f5 100644 (file)
@@ -13,6 +13,10 @@ public class Result_PaymentFailureReasonDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_PaymentFailureReasonDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_PaymentFailureReasonDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_PaymentFailureReasonDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_PaymentFailureReasonDecodeErrorZ_is_ok(ptr)) {
                        return new Result_PaymentFailureReasonDecodeErrorZ_OK(null, ptr);
index 83308530023367708c3a12186bd373a26babf40f..014eb04684552b5a57abd4670c1e879f019df47e 100644 (file)
@@ -13,6 +13,10 @@ public class Result_PaymentParametersDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_PaymentParametersDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_PaymentParametersDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_PaymentParametersDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_PaymentParametersDecodeErrorZ_is_ok(ptr)) {
                        return new Result_PaymentParametersDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_PaymentParametersDecodeErrorZ extends CommonBase {
         * Creates a new CResult_PaymentParametersDecodeErrorZ in the success state.
         */
        public static Result_PaymentParametersDecodeErrorZ ok(org.ldk.structs.PaymentParameters o) {
-               long ret = bindings.CResult_PaymentParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_PaymentParametersDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PaymentParametersDecodeErrorZ ret_hu_conv = Result_PaymentParametersDecodeErrorZ.constr_from_ptr(ret);
index 1507c25828b76302f14215702642c309548ef28b..36905ddf2d407c3a26c2587bc45f315edb32bac5 100644 (file)
@@ -13,6 +13,10 @@ public class Result_PaymentPurposeDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_PaymentPurposeDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_PaymentPurposeDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_PaymentPurposeDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_PaymentPurposeDecodeErrorZ_is_ok(ptr)) {
                        return new Result_PaymentPurposeDecodeErrorZ_OK(null, ptr);
index 1da104e1119ea8597547980d3ececd693e8b70cd..482c209cdaa3dbba3e8cb26d63be878df451eab1 100644 (file)
@@ -13,6 +13,10 @@ public class Result_PaymentRelayDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_PaymentRelayDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_PaymentRelayDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_PaymentRelayDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_PaymentRelayDecodeErrorZ_is_ok(ptr)) {
                        return new Result_PaymentRelayDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_PaymentRelayDecodeErrorZ extends CommonBase {
         * Creates a new CResult_PaymentRelayDecodeErrorZ in the success state.
         */
        public static Result_PaymentRelayDecodeErrorZ ok(org.ldk.structs.PaymentRelay o) {
-               long ret = bindings.CResult_PaymentRelayDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_PaymentRelayDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PaymentRelayDecodeErrorZ ret_hu_conv = Result_PaymentRelayDecodeErrorZ.constr_from_ptr(ret);
index cb22bcee40e977a8895be4ace0156e1bea835e89..9b7508ec41e22bdc5b5724efb7fec74e4db8e26d 100644 (file)
@@ -13,6 +13,10 @@ public class Result_PeeledOnionNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_PeeledOnionNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_PeeledOnionNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_PeeledOnionNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_PeeledOnionNoneZ_is_ok(ptr)) {
                        return new Result_PeeledOnionNoneZ_OK(null, ptr);
@@ -68,4 +72,22 @@ public class Result_PeeledOnionNoneZ extends CommonBase {
                return ret;
        }
 
+       long clone_ptr() {
+               long ret = bindings.CResult_PeeledOnionNoneZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_PeeledOnionNoneZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_PeeledOnionNoneZ clone() {
+               long ret = bindings.CResult_PeeledOnionNoneZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_PeeledOnionNoneZ ret_hu_conv = Result_PeeledOnionNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index df6ed4c5a25b6f8726911bc8d5adaf19d01652da..6e1003927e4d6d1b048f31600282c738e7a4a962 100644 (file)
@@ -13,6 +13,10 @@ public class Result_PendingHTLCInfoDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_PendingHTLCInfoDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_PendingHTLCInfoDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_PendingHTLCInfoDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_PendingHTLCInfoDecodeErrorZ_is_ok(ptr)) {
                        return new Result_PendingHTLCInfoDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_PendingHTLCInfoDecodeErrorZ extends CommonBase {
         * Creates a new CResult_PendingHTLCInfoDecodeErrorZ in the success state.
         */
        public static Result_PendingHTLCInfoDecodeErrorZ ok(org.ldk.structs.PendingHTLCInfo o) {
-               long ret = bindings.CResult_PendingHTLCInfoDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_PendingHTLCInfoDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PendingHTLCInfoDecodeErrorZ ret_hu_conv = Result_PendingHTLCInfoDecodeErrorZ.constr_from_ptr(ret);
index ea9cc8aadd781becbfaae0f53abb3b54b828ba0d..77402cb3484ec9b301cfff593bd666f0f6721287 100644 (file)
@@ -13,6 +13,10 @@ public class Result_PendingHTLCInfoInboundHTLCErrZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_free(ptr); ptr = 0; }
+       }
+
        static Result_PendingHTLCInfoInboundHTLCErrZ constr_from_ptr(long ptr) {
                if (bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_is_ok(ptr)) {
                        return new Result_PendingHTLCInfoInboundHTLCErrZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_PendingHTLCInfoInboundHTLCErrZ extends CommonBase {
         * Creates a new CResult_PendingHTLCInfoInboundHTLCErrZ in the success state.
         */
        public static Result_PendingHTLCInfoInboundHTLCErrZ ok(org.ldk.structs.PendingHTLCInfo o) {
-               long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PendingHTLCInfoInboundHTLCErrZ ret_hu_conv = Result_PendingHTLCInfoInboundHTLCErrZ.constr_from_ptr(ret);
@@ -57,13 +61,12 @@ public class Result_PendingHTLCInfoInboundHTLCErrZ extends CommonBase {
        /**
         * Creates a new CResult_PendingHTLCInfoInboundHTLCErrZ in the error state.
         */
-       public static Result_PendingHTLCInfoInboundHTLCErrZ err(short e_err_code_arg, byte[] e_err_data_arg, String e_msg_arg) {
-               long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_err(bindings.InboundHTLCErr_new(e_err_code_arg, e_err_data_arg, e_msg_arg));
-               Reference.reachabilityFence(e_err_code_arg);
-               Reference.reachabilityFence(e_err_data_arg);
-               Reference.reachabilityFence(e_msg_arg);
+       public static Result_PendingHTLCInfoInboundHTLCErrZ err(org.ldk.structs.InboundHTLCErr e) {
+               long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_err(e.ptr);
+               Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PendingHTLCInfoInboundHTLCErrZ ret_hu_conv = Result_PendingHTLCInfoInboundHTLCErrZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
                return ret_hu_conv;
        }
 
@@ -76,4 +79,22 @@ public class Result_PendingHTLCInfoInboundHTLCErrZ extends CommonBase {
                return ret;
        }
 
+       long clone_ptr() {
+               long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_PendingHTLCInfoInboundHTLCErrZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_PendingHTLCInfoInboundHTLCErrZ clone() {
+               long ret = bindings.CResult_PendingHTLCInfoInboundHTLCErrZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_PendingHTLCInfoInboundHTLCErrZ ret_hu_conv = Result_PendingHTLCInfoInboundHTLCErrZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index fda7351d45b609fe7de5d0b083f5d1f8eea96dee..fab6078796dff2fe059b658a40667270089405cb 100644 (file)
@@ -13,6 +13,10 @@ public class Result_PendingHTLCRoutingDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_PendingHTLCRoutingDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_PendingHTLCRoutingDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_PendingHTLCRoutingDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_PendingHTLCRoutingDecodeErrorZ_is_ok(ptr)) {
                        return new Result_PendingHTLCRoutingDecodeErrorZ_OK(null, ptr);
index c4c3df71a48e84bf08157fc7ef392c6ee350df07..6f3910e659c4f9c51d9f0453fd38cce50bcf0864 100644 (file)
@@ -13,6 +13,10 @@ public class Result_PhantomRouteHintsDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_PhantomRouteHintsDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_PhantomRouteHintsDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_PhantomRouteHintsDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_PhantomRouteHintsDecodeErrorZ_is_ok(ptr)) {
                        return new Result_PhantomRouteHintsDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_PhantomRouteHintsDecodeErrorZ extends CommonBase {
         * Creates a new CResult_PhantomRouteHintsDecodeErrorZ in the success state.
         */
        public static Result_PhantomRouteHintsDecodeErrorZ ok(org.ldk.structs.PhantomRouteHints o) {
-               long ret = bindings.CResult_PhantomRouteHintsDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_PhantomRouteHintsDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PhantomRouteHintsDecodeErrorZ ret_hu_conv = Result_PhantomRouteHintsDecodeErrorZ.constr_from_ptr(ret);
index bdda2c54f022847037c8ee7fdfe5de49dfc985fb..f175e02059dbbff02e86e3abf5965025fd7e4006 100644 (file)
@@ -13,6 +13,10 @@ public class Result_PingDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_PingDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_PingDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_PingDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_PingDecodeErrorZ_is_ok(ptr)) {
                        return new Result_PingDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_PingDecodeErrorZ extends CommonBase {
         * Creates a new CResult_PingDecodeErrorZ in the success state.
         */
        public static Result_PingDecodeErrorZ ok(org.ldk.structs.Ping o) {
-               long ret = bindings.CResult_PingDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_PingDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PingDecodeErrorZ ret_hu_conv = Result_PingDecodeErrorZ.constr_from_ptr(ret);
index c9c5e096c22a20e4f0e91395b30b39d084ba1f27..a25d856078b77f2f559c7ea39c65b6b8875b8ab0 100644 (file)
@@ -13,6 +13,10 @@ public class Result_PongDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_PongDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_PongDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_PongDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_PongDecodeErrorZ_is_ok(ptr)) {
                        return new Result_PongDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_PongDecodeErrorZ extends CommonBase {
         * Creates a new CResult_PongDecodeErrorZ in the success state.
         */
        public static Result_PongDecodeErrorZ ok(org.ldk.structs.Pong o) {
-               long ret = bindings.CResult_PongDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_PongDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);
index 62c3ba5efce7155cc7e773886eb4f47de9b1747b..d52ed2039b8ba129f2dcd40065d91ca4266e1655 100644 (file)
@@ -13,6 +13,10 @@ public class Result_PositiveTimestampCreationErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_PositiveTimestampCreationErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_PositiveTimestampCreationErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_PositiveTimestampCreationErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_PositiveTimestampCreationErrorZ_is_ok(ptr)) {
                        return new Result_PositiveTimestampCreationErrorZ_OK(null, ptr);
@@ -43,7 +47,7 @@ public class Result_PositiveTimestampCreationErrorZ extends CommonBase {
         * Creates a new CResult_PositiveTimestampCreationErrorZ in the success state.
         */
        public static Result_PositiveTimestampCreationErrorZ ok(org.ldk.structs.PositiveTimestamp o) {
-               long ret = bindings.CResult_PositiveTimestampCreationErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_PositiveTimestampCreationErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PositiveTimestampCreationErrorZ ret_hu_conv = Result_PositiveTimestampCreationErrorZ.constr_from_ptr(ret);
index 25213ffa0c06e8f3070209efbc23d9b70955c145..40d19ab1ae991d0980e18ab0195a5bc348b452e8 100644 (file)
@@ -13,6 +13,10 @@ public class Result_PrivateRouteCreationErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_PrivateRouteCreationErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_PrivateRouteCreationErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_PrivateRouteCreationErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_PrivateRouteCreationErrorZ_is_ok(ptr)) {
                        return new Result_PrivateRouteCreationErrorZ_OK(null, ptr);
@@ -43,7 +47,7 @@ public class Result_PrivateRouteCreationErrorZ extends CommonBase {
         * Creates a new CResult_PrivateRouteCreationErrorZ in the success state.
         */
        public static Result_PrivateRouteCreationErrorZ ok(org.ldk.structs.PrivateRoute o) {
-               long ret = bindings.CResult_PrivateRouteCreationErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_PrivateRouteCreationErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PrivateRouteCreationErrorZ ret_hu_conv = Result_PrivateRouteCreationErrorZ.constr_from_ptr(ret);
index a8d7302bcb4fec7f5b873454127deb5e67f62a40..8ec63d2465b6b6729cdb01da6feac5fbdad59df9 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ProbabilisticScorerDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ProbabilisticScorerDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ProbabilisticScorerDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ProbabilisticScorerDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ProbabilisticScorerDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ProbabilisticScorerDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ProbabilisticScorerDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ProbabilisticScorerDecodeErrorZ in the success state.
         */
        public static Result_ProbabilisticScorerDecodeErrorZ ok(ProbabilisticScoringDecayParameters o_decay_params, NetworkGraph o_network_graph, Logger o_logger) {
-               long ret = bindings.CResult_ProbabilisticScorerDecodeErrorZ_ok(bindings.ProbabilisticScorer_new(o_decay_params == null ? 0 : o_decay_params.ptr, o_network_graph == null ? 0 : o_network_graph.ptr, o_logger.ptr));
+               long ret = bindings.CResult_ProbabilisticScorerDecodeErrorZ_ok(bindings.ProbabilisticScorer_new(o_decay_params.ptr, o_network_graph.ptr, o_logger.ptr));
                Reference.reachabilityFence(o_decay_params);
                Reference.reachabilityFence(o_network_graph);
                Reference.reachabilityFence(o_logger);
index 3629c96e786d9f30815bd82f7bca0eef0c9e5661..d2a6f20641f91d74560498b7272741e8d2715cd7 100644 (file)
@@ -13,6 +13,10 @@ public class Result_PublicKeyNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_PublicKeyNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_PublicKeyNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_PublicKeyNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_PublicKeyNoneZ_is_ok(ptr)) {
                        return new Result_PublicKeyNoneZ_OK(null, ptr);
index a3025352f3d8f5f9b868d3106ee6a189cdc19584..ff3b47742e16460d97c322a7ce1baf892260824f 100644 (file)
@@ -13,6 +13,10 @@ public class Result_PublicKeySecp256k1ErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_PublicKeySecp256k1ErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_PublicKeySecp256k1ErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_PublicKeySecp256k1ErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_PublicKeySecp256k1ErrorZ_is_ok(ptr)) {
                        return new Result_PublicKeySecp256k1ErrorZ_OK(null, ptr);
index 2c3b1f8bcde0b61ddc93d33232be0fac32b796ab..e2032c156e8257473ca7da5b88bb62c700af0341 100644 (file)
@@ -13,6 +13,10 @@ public class Result_QueryChannelRangeDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_QueryChannelRangeDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_QueryChannelRangeDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_QueryChannelRangeDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_QueryChannelRangeDecodeErrorZ_is_ok(ptr)) {
                        return new Result_QueryChannelRangeDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_QueryChannelRangeDecodeErrorZ extends CommonBase {
         * Creates a new CResult_QueryChannelRangeDecodeErrorZ in the success state.
         */
        public static Result_QueryChannelRangeDecodeErrorZ ok(org.ldk.structs.QueryChannelRange o) {
-               long ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
index 2d0ad1cabad4950c2c6b1525960aabdf00a1efbd..6096c4796c882ebaa22c67051af159684da89002 100644 (file)
@@ -13,6 +13,10 @@ public class Result_QueryShortChannelIdsDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_QueryShortChannelIdsDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_QueryShortChannelIdsDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_QueryShortChannelIdsDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(ptr)) {
                        return new Result_QueryShortChannelIdsDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_QueryShortChannelIdsDecodeErrorZ extends CommonBase {
         * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the success state.
         */
        public static Result_QueryShortChannelIdsDecodeErrorZ ok(org.ldk.structs.QueryShortChannelIds o) {
-               long ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
index d7124dcfe1dd1211bb43260774f4c68c9041980f..078ef6d525e1e20ac73725976ec1469431505623 100644 (file)
@@ -13,6 +13,10 @@ public class Result_RecipientOnionFieldsDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_RecipientOnionFieldsDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_RecipientOnionFieldsDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_RecipientOnionFieldsDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_RecipientOnionFieldsDecodeErrorZ_is_ok(ptr)) {
                        return new Result_RecipientOnionFieldsDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_RecipientOnionFieldsDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RecipientOnionFieldsDecodeErrorZ in the success state.
         */
        public static Result_RecipientOnionFieldsDecodeErrorZ ok(org.ldk.structs.RecipientOnionFields o) {
-               long ret = bindings.CResult_RecipientOnionFieldsDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_RecipientOnionFieldsDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RecipientOnionFieldsDecodeErrorZ ret_hu_conv = Result_RecipientOnionFieldsDecodeErrorZ.constr_from_ptr(ret);
index 506e3d7418ea9415a2abc3f811909db710a76d9e..9320d6a036a419210a17a893730d92e3cdc1ca14 100644 (file)
@@ -13,6 +13,10 @@ public class Result_RecipientOnionFieldsNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_RecipientOnionFieldsNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_RecipientOnionFieldsNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_RecipientOnionFieldsNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_RecipientOnionFieldsNoneZ_is_ok(ptr)) {
                        return new Result_RecipientOnionFieldsNoneZ_OK(null, ptr);
@@ -41,7 +45,7 @@ public class Result_RecipientOnionFieldsNoneZ extends CommonBase {
         * Creates a new CResult_RecipientOnionFieldsNoneZ in the success state.
         */
        public static Result_RecipientOnionFieldsNoneZ ok(org.ldk.structs.RecipientOnionFields o) {
-               long ret = bindings.CResult_RecipientOnionFieldsNoneZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_RecipientOnionFieldsNoneZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RecipientOnionFieldsNoneZ ret_hu_conv = Result_RecipientOnionFieldsNoneZ.constr_from_ptr(ret);
index e2b0a08e8f713b7c7713aa6a6b6fec3752a1f6ec..8fc25c3df9fe2dc6497f1c926ca19c60a2d283b4 100644 (file)
@@ -13,6 +13,10 @@ public class Result_RecoverableSignatureNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_RecoverableSignatureNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_RecoverableSignatureNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_RecoverableSignatureNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_RecoverableSignatureNoneZ_is_ok(ptr)) {
                        return new Result_RecoverableSignatureNoneZ_OK(null, ptr);
index 2cabbdd4bbe41bba6a3388318c1ad5820320930f..5f63d0246830a489956f262acacab29754e02182 100644 (file)
@@ -13,6 +13,10 @@ public class Result_RefundBolt12ParseErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_RefundBolt12ParseErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_RefundBolt12ParseErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_RefundBolt12ParseErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_RefundBolt12ParseErrorZ_is_ok(ptr)) {
                        return new Result_RefundBolt12ParseErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_RefundBolt12ParseErrorZ extends CommonBase {
         * Creates a new CResult_RefundBolt12ParseErrorZ in the success state.
         */
        public static Result_RefundBolt12ParseErrorZ ok(org.ldk.structs.Refund o) {
-               long ret = bindings.CResult_RefundBolt12ParseErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_RefundBolt12ParseErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RefundBolt12ParseErrorZ ret_hu_conv = Result_RefundBolt12ParseErrorZ.constr_from_ptr(ret);
@@ -58,7 +62,7 @@ public class Result_RefundBolt12ParseErrorZ extends CommonBase {
         * Creates a new CResult_RefundBolt12ParseErrorZ in the error state.
         */
        public static Result_RefundBolt12ParseErrorZ err(org.ldk.structs.Bolt12ParseError e) {
-               long ret = bindings.CResult_RefundBolt12ParseErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_RefundBolt12ParseErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RefundBolt12ParseErrorZ ret_hu_conv = Result_RefundBolt12ParseErrorZ.constr_from_ptr(ret);
diff --git a/src/main/java/org/ldk/structs/Result_RefundBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_RefundBolt12SemanticErrorZ.java
new file mode 100644 (file)
index 0000000..731608d
--- /dev/null
@@ -0,0 +1,96 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_RefundBolt12SemanticErrorZ extends CommonBase {
+       private Result_RefundBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_RefundBolt12SemanticErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_RefundBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_RefundBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_RefundBolt12SemanticErrorZ_is_ok(ptr)) {
+                       return new Result_RefundBolt12SemanticErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_RefundBolt12SemanticErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_RefundBolt12SemanticErrorZ_OK extends Result_RefundBolt12SemanticErrorZ {
+               public final Refund res;
+               private Result_RefundBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_RefundBolt12SemanticErrorZ_get_ok(ptr);
+                       org.ldk.structs.Refund res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.Refund(null, res); }
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_RefundBolt12SemanticErrorZ_Err extends Result_RefundBolt12SemanticErrorZ {
+               public final Bolt12SemanticError err;
+               private Result_RefundBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.err = bindings.CResult_RefundBolt12SemanticErrorZ_get_err(ptr);
+               }
+       }
+
+       /**
+        * Creates a new CResult_RefundBolt12SemanticErrorZ in the success state.
+        */
+       public static Result_RefundBolt12SemanticErrorZ ok(org.ldk.structs.Refund o) {
+               long ret = bindings.CResult_RefundBolt12SemanticErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_RefundBolt12SemanticErrorZ ret_hu_conv = Result_RefundBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_RefundBolt12SemanticErrorZ in the error state.
+        */
+       public static Result_RefundBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+               long ret = bindings.CResult_RefundBolt12SemanticErrorZ_err(e);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_RefundBolt12SemanticErrorZ ret_hu_conv = Result_RefundBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_RefundBolt12SemanticErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CResult_RefundBolt12SemanticErrorZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_RefundBolt12SemanticErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_RefundBolt12SemanticErrorZ clone() {
+               long ret = bindings.CResult_RefundBolt12SemanticErrorZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_RefundBolt12SemanticErrorZ ret_hu_conv = Result_RefundBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.java
new file mode 100644 (file)
index 0000000..21cb768
--- /dev/null
@@ -0,0 +1,96 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ extends CommonBase {
+       private Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(ptr)) {
+                       return new Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK extends Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ {
+               public final RefundMaybeWithDerivedMetadataBuilder res;
+               private Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(ptr);
+                       org.ldk.structs.RefundMaybeWithDerivedMetadataBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.RefundMaybeWithDerivedMetadataBuilder(null, res); }
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err extends Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ {
+               public final Bolt12SemanticError err;
+               private Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.err = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(ptr);
+               }
+       }
+
+       /**
+        * Creates a new CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ in the success state.
+        */
+       public static Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ok(org.ldk.structs.RefundMaybeWithDerivedMetadataBuilder o) {
+               long ret = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ in the error state.
+        */
+       public static Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+               long ret = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ clone() {
+               long ret = bindings.CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
index 54ce27715797dacaed99703c8287a7a68621f9bd..cd3309cc5632fb36e14bb91741fb87e44ef1201a 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ReplyChannelRangeDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ReplyChannelRangeDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ReplyChannelRangeDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ReplyChannelRangeDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ReplyChannelRangeDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ReplyChannelRangeDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ReplyChannelRangeDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the success state.
         */
        public static Result_ReplyChannelRangeDecodeErrorZ ok(org.ldk.structs.ReplyChannelRange o) {
-               long ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ReplyChannelRangeDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret);
index 62cb3e03320ec3a47a6e2ce640f5449f38fa32e1..9fb1474eb560b3326094668c09c12b282f95ff11 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ReplyShortChannelIdsEndDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ReplyShortChannelIdsEndDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ReplyShortChannelIdsEndDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ReplyShortChannelIdsEndDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the success state.
         */
        public static Result_ReplyShortChannelIdsEndDecodeErrorZ ok(org.ldk.structs.ReplyShortChannelIdsEnd o) {
-               long ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
index 787890b92b895edb2033d0252edb532dd5769497..e1d233bc192198a7d1b40ce94354c7f02c629158 100644 (file)
@@ -13,6 +13,10 @@ public class Result_RetryDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_RetryDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_RetryDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_RetryDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_RetryDecodeErrorZ_is_ok(ptr)) {
                        return new Result_RetryDecodeErrorZ_OK(null, ptr);
index 94702bb89c0b431561462e2d09874cff930b814e..6ec454a97143f6b074bb5d1d3ec68764def5803b 100644 (file)
@@ -13,6 +13,10 @@ public class Result_RevocationBasepointDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_RevocationBasepointDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_RevocationBasepointDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_RevocationBasepointDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_RevocationBasepointDecodeErrorZ_is_ok(ptr)) {
                        return new Result_RevocationBasepointDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_RevocationBasepointDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RevocationBasepointDecodeErrorZ in the success state.
         */
        public static Result_RevocationBasepointDecodeErrorZ ok(org.ldk.structs.RevocationBasepoint o) {
-               long ret = bindings.CResult_RevocationBasepointDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_RevocationBasepointDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RevocationBasepointDecodeErrorZ ret_hu_conv = Result_RevocationBasepointDecodeErrorZ.constr_from_ptr(ret);
index 1b67095b21429b1dc6505cee9e521ff994f14e96..6bcda0226ee25d4bb90a75f950696d00dfc23600 100644 (file)
@@ -13,6 +13,10 @@ public class Result_RevocationKeyDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_RevocationKeyDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_RevocationKeyDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_RevocationKeyDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_RevocationKeyDecodeErrorZ_is_ok(ptr)) {
                        return new Result_RevocationKeyDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_RevocationKeyDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RevocationKeyDecodeErrorZ in the success state.
         */
        public static Result_RevocationKeyDecodeErrorZ ok(org.ldk.structs.RevocationKey o) {
-               long ret = bindings.CResult_RevocationKeyDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_RevocationKeyDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RevocationKeyDecodeErrorZ ret_hu_conv = Result_RevocationKeyDecodeErrorZ.constr_from_ptr(ret);
index 0db1a0af7fbb1f68c04e7e9fd801fbe77839e00c..c4beddd7d37e9a9c48ca17281713306d60913e1e 100644 (file)
@@ -13,6 +13,10 @@ public class Result_RevokeAndACKDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_RevokeAndACKDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_RevokeAndACKDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_RevokeAndACKDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_RevokeAndACKDecodeErrorZ_is_ok(ptr)) {
                        return new Result_RevokeAndACKDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_RevokeAndACKDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RevokeAndACKDecodeErrorZ in the success state.
         */
        public static Result_RevokeAndACKDecodeErrorZ ok(org.ldk.structs.RevokeAndACK o) {
-               long ret = bindings.CResult_RevokeAndACKDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_RevokeAndACKDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret);
index 604f13f7ead01f94ebdb70cb78cb372e24b93ac0..fdf4b95d95d6e4f8851b4d74f886122b0923c395 100644 (file)
@@ -13,6 +13,10 @@ public class Result_RouteDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_RouteDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_RouteDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_RouteDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_RouteDecodeErrorZ_is_ok(ptr)) {
                        return new Result_RouteDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_RouteDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RouteDecodeErrorZ in the success state.
         */
        public static Result_RouteDecodeErrorZ ok(org.ldk.structs.Route o) {
-               long ret = bindings.CResult_RouteDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_RouteDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RouteDecodeErrorZ ret_hu_conv = Result_RouteDecodeErrorZ.constr_from_ptr(ret);
index c98b7367f3e22507f3f6a4c5869885625ba6d525..8791ca3534ec9436091ffae41741b34c3c899f70 100644 (file)
@@ -13,6 +13,10 @@ public class Result_RouteHintDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_RouteHintDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_RouteHintDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_RouteHintDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_RouteHintDecodeErrorZ_is_ok(ptr)) {
                        return new Result_RouteHintDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_RouteHintDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RouteHintDecodeErrorZ in the success state.
         */
        public static Result_RouteHintDecodeErrorZ ok(org.ldk.structs.RouteHint o) {
-               long ret = bindings.CResult_RouteHintDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_RouteHintDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RouteHintDecodeErrorZ ret_hu_conv = Result_RouteHintDecodeErrorZ.constr_from_ptr(ret);
index ed89d430bedb79d50c7bc0e957222ec9e15353f2..26a07c943486cecb05d3a83289bfae3a25c1e611 100644 (file)
@@ -13,6 +13,10 @@ public class Result_RouteHintHopDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_RouteHintHopDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_RouteHintHopDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_RouteHintHopDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_RouteHintHopDecodeErrorZ_is_ok(ptr)) {
                        return new Result_RouteHintHopDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_RouteHintHopDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RouteHintHopDecodeErrorZ in the success state.
         */
        public static Result_RouteHintHopDecodeErrorZ ok(org.ldk.structs.RouteHintHop o) {
-               long ret = bindings.CResult_RouteHintHopDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_RouteHintHopDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RouteHintHopDecodeErrorZ ret_hu_conv = Result_RouteHintHopDecodeErrorZ.constr_from_ptr(ret);
index 67b0dccae8907e02aedfcfc89fc62df44e956b78..83bca000722fad772adc21d05cee92ee9c61de9d 100644 (file)
@@ -13,6 +13,10 @@ public class Result_RouteHopDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_RouteHopDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_RouteHopDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_RouteHopDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_RouteHopDecodeErrorZ_is_ok(ptr)) {
                        return new Result_RouteHopDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_RouteHopDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RouteHopDecodeErrorZ in the success state.
         */
        public static Result_RouteHopDecodeErrorZ ok(org.ldk.structs.RouteHop o) {
-               long ret = bindings.CResult_RouteHopDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_RouteHopDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RouteHopDecodeErrorZ ret_hu_conv = Result_RouteHopDecodeErrorZ.constr_from_ptr(ret);
index 83b7b8b1e00bce514f95f1e2f8a62332b8754533..8d0baba4b2a3a16260b66570b617cf0a239a22ba 100644 (file)
@@ -13,6 +13,10 @@ public class Result_RouteLightningErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_RouteLightningErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_RouteLightningErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_RouteLightningErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_RouteLightningErrorZ_is_ok(ptr)) {
                        return new Result_RouteLightningErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_RouteLightningErrorZ extends CommonBase {
         * Creates a new CResult_RouteLightningErrorZ in the success state.
         */
        public static Result_RouteLightningErrorZ ok(org.ldk.structs.Route o) {
-               long ret = bindings.CResult_RouteLightningErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_RouteLightningErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
@@ -58,7 +62,7 @@ public class Result_RouteLightningErrorZ extends CommonBase {
         * Creates a new CResult_RouteLightningErrorZ in the error state.
         */
        public static Result_RouteLightningErrorZ err(org.ldk.structs.LightningError e) {
-               long ret = bindings.CResult_RouteLightningErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_RouteLightningErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RouteLightningErrorZ ret_hu_conv = Result_RouteLightningErrorZ.constr_from_ptr(ret);
index 460fbc4d8bfbfa9af95dc190ac3c4755ebb88a0c..11c5fae11d7ebf99f1447b2ff28af44e3e895a33 100644 (file)
@@ -13,6 +13,10 @@ public class Result_RouteParametersDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_RouteParametersDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_RouteParametersDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_RouteParametersDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_RouteParametersDecodeErrorZ_is_ok(ptr)) {
                        return new Result_RouteParametersDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_RouteParametersDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RouteParametersDecodeErrorZ in the success state.
         */
        public static Result_RouteParametersDecodeErrorZ ok(org.ldk.structs.RouteParameters o) {
-               long ret = bindings.CResult_RouteParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_RouteParametersDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RouteParametersDecodeErrorZ ret_hu_conv = Result_RouteParametersDecodeErrorZ.constr_from_ptr(ret);
index 5e34a8abce22516f31be2ae4f558840dd0f258f0..5b7e94ee7740dfb5f969a2d95e338d4d3b46f1fa 100644 (file)
@@ -13,6 +13,10 @@ public class Result_RoutingFeesDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_RoutingFeesDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_RoutingFeesDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_RoutingFeesDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_RoutingFeesDecodeErrorZ_is_ok(ptr)) {
                        return new Result_RoutingFeesDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_RoutingFeesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_RoutingFeesDecodeErrorZ in the success state.
         */
        public static Result_RoutingFeesDecodeErrorZ ok(org.ldk.structs.RoutingFees o) {
-               long ret = bindings.CResult_RoutingFeesDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_RoutingFeesDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);
index ddb18a0bc13ec750aa1e73d4864b260e2ff0c1fd..c3e5784a9fbec0a7fd6805c0bc092972ec24bcda 100644 (file)
@@ -13,6 +13,10 @@ public class Result_SchnorrSignatureNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_SchnorrSignatureNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_SchnorrSignatureNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_SchnorrSignatureNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_SchnorrSignatureNoneZ_is_ok(ptr)) {
                        return new Result_SchnorrSignatureNoneZ_OK(null, ptr);
index fcb729e16e7f514202de282b2ffcbcd0f2258f75..cd7260d57be13ba3dc7c03fa93761c8b2167c11e 100644 (file)
@@ -13,6 +13,10 @@ public class Result_SendSuccessSendErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_SendSuccessSendErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_SendSuccessSendErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_SendSuccessSendErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_SendSuccessSendErrorZ_is_ok(ptr)) {
                        return new Result_SendSuccessSendErrorZ_OK(null, ptr);
@@ -75,4 +79,22 @@ public class Result_SendSuccessSendErrorZ extends CommonBase {
                return ret;
        }
 
+       long clone_ptr() {
+               long ret = bindings.CResult_SendSuccessSendErrorZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_SendSuccessSendErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_SendSuccessSendErrorZ clone() {
+               long ret = bindings.CResult_SendSuccessSendErrorZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_SendSuccessSendErrorZ ret_hu_conv = Result_SendSuccessSendErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 9772f3c76a1ee5d12c2e1fdbfe1ed1b772a95672..403a2002bb926460ac765f060906b003095e36b6 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ShutdownDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ShutdownDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ShutdownDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ShutdownDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ShutdownDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ShutdownDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ShutdownDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ShutdownDecodeErrorZ in the success state.
         */
        public static Result_ShutdownDecodeErrorZ ok(org.ldk.structs.Shutdown o) {
-               long ret = bindings.CResult_ShutdownDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ShutdownDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret);
index 8d366a97d1bd14162a1c215c4627da0e0ac909ed..45ca00593593ba0d97ab7d1e5a5f8ad95a18121f 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ShutdownScriptDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ShutdownScriptDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ShutdownScriptDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ShutdownScriptDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ShutdownScriptDecodeErrorZ_is_ok(ptr)) {
                        return new Result_ShutdownScriptDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ShutdownScriptDecodeErrorZ extends CommonBase {
         * Creates a new CResult_ShutdownScriptDecodeErrorZ in the success state.
         */
        public static Result_ShutdownScriptDecodeErrorZ ok(org.ldk.structs.ShutdownScript o) {
-               long ret = bindings.CResult_ShutdownScriptDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ShutdownScriptDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ShutdownScriptDecodeErrorZ ret_hu_conv = Result_ShutdownScriptDecodeErrorZ.constr_from_ptr(ret);
index af239094b80056c486699e80fa9e9903625a41c5..dbaa23b48def618e617a4384a7ab812cff1adec7 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ShutdownScriptInvalidShutdownScriptZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ShutdownScriptInvalidShutdownScriptZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(ptr)) {
                        return new Result_ShutdownScriptInvalidShutdownScriptZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_ShutdownScriptInvalidShutdownScriptZ extends CommonBase {
         * Creates a new CResult_ShutdownScriptInvalidShutdownScriptZ in the success state.
         */
        public static Result_ShutdownScriptInvalidShutdownScriptZ ok(org.ldk.structs.ShutdownScript o) {
-               long ret = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ShutdownScriptInvalidShutdownScriptZ ret_hu_conv = Result_ShutdownScriptInvalidShutdownScriptZ.constr_from_ptr(ret);
@@ -58,7 +62,7 @@ public class Result_ShutdownScriptInvalidShutdownScriptZ extends CommonBase {
         * Creates a new CResult_ShutdownScriptInvalidShutdownScriptZ in the error state.
         */
        public static Result_ShutdownScriptInvalidShutdownScriptZ err(org.ldk.structs.InvalidShutdownScript e) {
-               long ret = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_ShutdownScriptInvalidShutdownScriptZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ShutdownScriptInvalidShutdownScriptZ ret_hu_conv = Result_ShutdownScriptInvalidShutdownScriptZ.constr_from_ptr(ret);
index 62e48ee35908857e51760e6c57456661b4115281..6db73945f9585ad4c35fdb64427742d473c3fc6b 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ShutdownScriptNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ShutdownScriptNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ShutdownScriptNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ShutdownScriptNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ShutdownScriptNoneZ_is_ok(ptr)) {
                        return new Result_ShutdownScriptNoneZ_OK(null, ptr);
@@ -41,7 +45,7 @@ public class Result_ShutdownScriptNoneZ extends CommonBase {
         * Creates a new CResult_ShutdownScriptNoneZ in the success state.
         */
        public static Result_ShutdownScriptNoneZ ok(org.ldk.structs.ShutdownScript o) {
-               long ret = bindings.CResult_ShutdownScriptNoneZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_ShutdownScriptNoneZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_ShutdownScriptNoneZ ret_hu_conv = Result_ShutdownScriptNoneZ.constr_from_ptr(ret);
index 8d5e1fbe4863216da4aa06c7654b42795ffd9fe4..3aea9dc942c1b2facb8e8feb06021e1f45520304 100644 (file)
@@ -13,6 +13,10 @@ public class Result_SiPrefixBolt11ParseErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_SiPrefixBolt11ParseErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_SiPrefixBolt11ParseErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_SiPrefixBolt11ParseErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_SiPrefixBolt11ParseErrorZ_is_ok(ptr)) {
                        return new Result_SiPrefixBolt11ParseErrorZ_OK(null, ptr);
index f556572530b7b6636f8d609bba307501ffbafef2..4adaa1af2cf1115d04c82635e70e99ae6f2de493 100644 (file)
@@ -13,6 +13,10 @@ public class Result_SignedRawBolt11InvoiceBolt11ParseErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_SignedRawBolt11InvoiceBolt11ParseErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_is_ok(ptr)) {
                        return new Result_SignedRawBolt11InvoiceBolt11ParseErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_SignedRawBolt11InvoiceBolt11ParseErrorZ extends CommonBase {
         * Creates a new CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ in the success state.
         */
        public static Result_SignedRawBolt11InvoiceBolt11ParseErrorZ ok(org.ldk.structs.SignedRawBolt11Invoice o) {
-               long ret = bindings.CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_SignedRawBolt11InvoiceBolt11ParseErrorZ ret_hu_conv = Result_SignedRawBolt11InvoiceBolt11ParseErrorZ.constr_from_ptr(ret);
index c2367c5de57c709fcde16e27c5b279b4cd90be14..271d4608dc524dc7324bd7178d1b1ba3f12dc081 100644 (file)
@@ -13,6 +13,10 @@ public class Result_SocketAddressDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_SocketAddressDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_SocketAddressDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_SocketAddressDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_SocketAddressDecodeErrorZ_is_ok(ptr)) {
                        return new Result_SocketAddressDecodeErrorZ_OK(null, ptr);
index d50e39e65679dba5cf88eb996293ff5ac4c3a92a..99138640583540e48a2ce25d589bcecacce0d07e 100644 (file)
@@ -13,6 +13,10 @@ public class Result_SocketAddressSocketAddressParseErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_SocketAddressSocketAddressParseErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_SocketAddressSocketAddressParseErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_SocketAddressSocketAddressParseErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_SocketAddressSocketAddressParseErrorZ_is_ok(ptr)) {
                        return new Result_SocketAddressSocketAddressParseErrorZ_OK(null, ptr);
index 63db237100adda892a89efa96dd2e289e2fe5c22..b352ab51739296961f4afcddd50a9ebbf1ef7e8b 100644 (file)
@@ -13,6 +13,10 @@ public class Result_SpendableOutputDescriptorDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_SpendableOutputDescriptorDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(ptr)) {
                        return new Result_SpendableOutputDescriptorDecodeErrorZ_OK(null, ptr);
index bc410b1417658d7487ad50fdb29d771378b9fcc6..6ed42cc16e9af6c7f4f58977d3341ed0d4a3cf8c 100644 (file)
@@ -13,6 +13,10 @@ public class Result_SpliceAckDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_SpliceAckDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_SpliceAckDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_SpliceAckDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_SpliceAckDecodeErrorZ_is_ok(ptr)) {
                        return new Result_SpliceAckDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_SpliceAckDecodeErrorZ extends CommonBase {
         * Creates a new CResult_SpliceAckDecodeErrorZ in the success state.
         */
        public static Result_SpliceAckDecodeErrorZ ok(org.ldk.structs.SpliceAck o) {
-               long ret = bindings.CResult_SpliceAckDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_SpliceAckDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_SpliceAckDecodeErrorZ ret_hu_conv = Result_SpliceAckDecodeErrorZ.constr_from_ptr(ret);
index ca4e9357a9502de124e5cf0b5c9e759f967adae8..19bd24018d7ae02853245a89e71a00b082c7befc 100644 (file)
@@ -13,6 +13,10 @@ public class Result_SpliceDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_SpliceDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_SpliceDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_SpliceDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_SpliceDecodeErrorZ_is_ok(ptr)) {
                        return new Result_SpliceDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_SpliceDecodeErrorZ extends CommonBase {
         * Creates a new CResult_SpliceDecodeErrorZ in the success state.
         */
        public static Result_SpliceDecodeErrorZ ok(org.ldk.structs.Splice o) {
-               long ret = bindings.CResult_SpliceDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_SpliceDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_SpliceDecodeErrorZ ret_hu_conv = Result_SpliceDecodeErrorZ.constr_from_ptr(ret);
index 7797504c159fbca3e60318246962b243edfdd467..312c424141e5dd1684571e6a11a3e99308137ec1 100644 (file)
@@ -13,6 +13,10 @@ public class Result_SpliceLockedDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_SpliceLockedDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_SpliceLockedDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_SpliceLockedDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_SpliceLockedDecodeErrorZ_is_ok(ptr)) {
                        return new Result_SpliceLockedDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_SpliceLockedDecodeErrorZ extends CommonBase {
         * Creates a new CResult_SpliceLockedDecodeErrorZ in the success state.
         */
        public static Result_SpliceLockedDecodeErrorZ ok(org.ldk.structs.SpliceLocked o) {
-               long ret = bindings.CResult_SpliceLockedDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_SpliceLockedDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_SpliceLockedDecodeErrorZ ret_hu_conv = Result_SpliceLockedDecodeErrorZ.constr_from_ptr(ret);
index e91d80ee6203be8a131b1e326b020c9e20577eaf..656c4a9ab0898a61d59547a5bb9da00956d5236f 100644 (file)
@@ -13,6 +13,10 @@ public class Result_StaticPaymentOutputDescriptorDecodeErrorZ extends CommonBase
                if (ptr != 0) { bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_StaticPaymentOutputDescriptorDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(ptr)) {
                        return new Result_StaticPaymentOutputDescriptorDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_StaticPaymentOutputDescriptorDecodeErrorZ extends CommonBase
         * Creates a new CResult_StaticPaymentOutputDescriptorDecodeErrorZ in the success state.
         */
        public static Result_StaticPaymentOutputDescriptorDecodeErrorZ ok(org.ldk.structs.StaticPaymentOutputDescriptor o) {
-               long ret = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_StaticPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_StaticPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
index 22ff12f71e8dd749105ceb65b02c699740caedd7..2fb2f029f703dd60cc06551627cfea8d54b4b99d 100644 (file)
@@ -13,6 +13,10 @@ public class Result_StfuDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_StfuDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_StfuDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_StfuDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_StfuDecodeErrorZ_is_ok(ptr)) {
                        return new Result_StfuDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_StfuDecodeErrorZ extends CommonBase {
         * Creates a new CResult_StfuDecodeErrorZ in the success state.
         */
        public static Result_StfuDecodeErrorZ ok(org.ldk.structs.Stfu o) {
-               long ret = bindings.CResult_StfuDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_StfuDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_StfuDecodeErrorZ ret_hu_conv = Result_StfuDecodeErrorZ.constr_from_ptr(ret);
index 69bc0f5b39a1a7ce08eee435138877adc3a8c8e5..2e61bb8f0da6af82070d00ba387028757c57dcbd 100644 (file)
@@ -13,6 +13,10 @@ public class Result_StrSecp256k1ErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_StrSecp256k1ErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_StrSecp256k1ErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_StrSecp256k1ErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_StrSecp256k1ErrorZ_is_ok(ptr)) {
                        return new Result_StrSecp256k1ErrorZ_OK(null, ptr);
index 04ae4c5e223ca0daf1a5f23ff592acdd36381664..09425d630c26fcbfb431f28471ac6ad19661eb2c 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ThirtyTwoBytesAPIErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ThirtyTwoBytesAPIErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ThirtyTwoBytesAPIErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ThirtyTwoBytesAPIErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ThirtyTwoBytesAPIErrorZ_is_ok(ptr)) {
                        return new Result_ThirtyTwoBytesAPIErrorZ_OK(null, ptr);
index d184261e0018968c00ecb80c459793d80e9ce3e1..96b828885efaca03f7ce07b794e3e05311122934 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ThirtyTwoBytesNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ThirtyTwoBytesNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ThirtyTwoBytesNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ThirtyTwoBytesNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ThirtyTwoBytesNoneZ_is_ok(ptr)) {
                        return new Result_ThirtyTwoBytesNoneZ_OK(null, ptr);
index 71ee269526762ec1b8bf872c0ba6c4b708d28a37..034f62a32e5e1327dd5f09b0580a03aada7b6548 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ThirtyTwoBytesPaymentSendFailureZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ThirtyTwoBytesPaymentSendFailureZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ThirtyTwoBytesPaymentSendFailureZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ThirtyTwoBytesPaymentSendFailureZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ThirtyTwoBytesPaymentSendFailureZ_is_ok(ptr)) {
                        return new Result_ThirtyTwoBytesPaymentSendFailureZ_OK(null, ptr);
index 45e73e070c3a97891be42feee774fa2b80962546..c267e15f7eaed8057d815af46de6171e9a49baf6 100644 (file)
@@ -13,6 +13,10 @@ public class Result_ThirtyTwoBytesRetryableSendFailureZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_ThirtyTwoBytesRetryableSendFailureZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_ThirtyTwoBytesRetryableSendFailureZ_free(ptr); ptr = 0; }
+       }
+
        static Result_ThirtyTwoBytesRetryableSendFailureZ constr_from_ptr(long ptr) {
                if (bindings.CResult_ThirtyTwoBytesRetryableSendFailureZ_is_ok(ptr)) {
                        return new Result_ThirtyTwoBytesRetryableSendFailureZ_OK(null, ptr);
diff --git a/src/main/java/org/ldk/structs/Result_TrackedSpendableOutputDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_TrackedSpendableOutputDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..e430f2b
--- /dev/null
@@ -0,0 +1,100 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_TrackedSpendableOutputDecodeErrorZ extends CommonBase {
+       private Result_TrackedSpendableOutputDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_TrackedSpendableOutputDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_TrackedSpendableOutputDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_TrackedSpendableOutputDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(ptr)) {
+                       return new Result_TrackedSpendableOutputDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_TrackedSpendableOutputDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_TrackedSpendableOutputDecodeErrorZ_OK extends Result_TrackedSpendableOutputDecodeErrorZ {
+               public final TrackedSpendableOutput res;
+               private Result_TrackedSpendableOutputDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(ptr);
+                       org.ldk.structs.TrackedSpendableOutput res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.TrackedSpendableOutput(null, res); }
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_TrackedSpendableOutputDecodeErrorZ_Err extends Result_TrackedSpendableOutputDecodeErrorZ {
+               public final DecodeError err;
+               private Result_TrackedSpendableOutputDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_get_err(ptr);
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+                       if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+                       this.err = err_hu_conv;
+               }
+       }
+
+       /**
+        * Creates a new CResult_TrackedSpendableOutputDecodeErrorZ in the success state.
+        */
+       public static Result_TrackedSpendableOutputDecodeErrorZ ok(org.ldk.structs.TrackedSpendableOutput o) {
+               long ret = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_TrackedSpendableOutputDecodeErrorZ ret_hu_conv = Result_TrackedSpendableOutputDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_TrackedSpendableOutputDecodeErrorZ in the error state.
+        */
+       public static Result_TrackedSpendableOutputDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+               long ret = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_err(e.ptr);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_TrackedSpendableOutputDecodeErrorZ ret_hu_conv = Result_TrackedSpendableOutputDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_TrackedSpendableOutputDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_TrackedSpendableOutputDecodeErrorZ clone() {
+               long ret = bindings.CResult_TrackedSpendableOutputDecodeErrorZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_TrackedSpendableOutputDecodeErrorZ ret_hu_conv = Result_TrackedSpendableOutputDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
index 9ed0fb6e814772b93e87f72d62bafacc1f45ffd9..ea942230760f248af697b6613e17890666dd4848 100644 (file)
@@ -13,6 +13,10 @@ public class Result_TransactionNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_TransactionNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_TransactionNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_TransactionNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_TransactionNoneZ_is_ok(ptr)) {
                        return new Result_TransactionNoneZ_OK(null, ptr);
index a3887e23eb8e313f066b1eda7105614cd6a67eab..538e7b7ece71c03f98f6728150c7f9ebead3c690 100644 (file)
@@ -13,6 +13,10 @@ public class Result_TransactionU16LenLimitedDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_TransactionU16LenLimitedDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_TransactionU16LenLimitedDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_TransactionU16LenLimitedDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_TransactionU16LenLimitedDecodeErrorZ_is_ok(ptr)) {
                        return new Result_TransactionU16LenLimitedDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_TransactionU16LenLimitedDecodeErrorZ extends CommonBase {
         * Creates a new CResult_TransactionU16LenLimitedDecodeErrorZ in the success state.
         */
        public static Result_TransactionU16LenLimitedDecodeErrorZ ok(org.ldk.structs.TransactionU16LenLimited o) {
-               long ret = bindings.CResult_TransactionU16LenLimitedDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_TransactionU16LenLimitedDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_TransactionU16LenLimitedDecodeErrorZ ret_hu_conv = Result_TransactionU16LenLimitedDecodeErrorZ.constr_from_ptr(ret);
index fc8c01b6fbad91846a3d5fafa131c1bd8b319db8..39e9f8e36f278a519b1ddb17f1acc5f76b017789 100644 (file)
@@ -13,6 +13,10 @@ public class Result_TransactionU16LenLimitedNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_TransactionU16LenLimitedNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_TransactionU16LenLimitedNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_TransactionU16LenLimitedNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_TransactionU16LenLimitedNoneZ_is_ok(ptr)) {
                        return new Result_TransactionU16LenLimitedNoneZ_OK(null, ptr);
@@ -41,7 +45,7 @@ public class Result_TransactionU16LenLimitedNoneZ extends CommonBase {
         * Creates a new CResult_TransactionU16LenLimitedNoneZ in the success state.
         */
        public static Result_TransactionU16LenLimitedNoneZ ok(org.ldk.structs.TransactionU16LenLimited o) {
-               long ret = bindings.CResult_TransactionU16LenLimitedNoneZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_TransactionU16LenLimitedNoneZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_TransactionU16LenLimitedNoneZ ret_hu_conv = Result_TransactionU16LenLimitedNoneZ.constr_from_ptr(ret);
index 618a55d8e35b8a73fcc32086d623a7c0744ee2fc..e97e8c759dbb3ccbaa7d56268d930513dca745af 100644 (file)
@@ -13,6 +13,10 @@ public class Result_TrustedClosingTransactionNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_TrustedClosingTransactionNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_TrustedClosingTransactionNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_TrustedClosingTransactionNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_TrustedClosingTransactionNoneZ_is_ok(ptr)) {
                        return new Result_TrustedClosingTransactionNoneZ_OK(null, ptr);
@@ -41,7 +45,7 @@ public class Result_TrustedClosingTransactionNoneZ extends CommonBase {
         * Creates a new CResult_TrustedClosingTransactionNoneZ in the success state.
         */
        public static Result_TrustedClosingTransactionNoneZ ok(org.ldk.structs.TrustedClosingTransaction o) {
-               long ret = bindings.CResult_TrustedClosingTransactionNoneZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_TrustedClosingTransactionNoneZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_TrustedClosingTransactionNoneZ ret_hu_conv = Result_TrustedClosingTransactionNoneZ.constr_from_ptr(ret);
index 20b98f071014c900436efa830157da3219ad7992..10ff54b32662e33f41b1f66d81e3abcf90e2d139 100644 (file)
@@ -13,6 +13,10 @@ public class Result_TrustedCommitmentTransactionNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_TrustedCommitmentTransactionNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_TrustedCommitmentTransactionNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_TrustedCommitmentTransactionNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_TrustedCommitmentTransactionNoneZ_is_ok(ptr)) {
                        return new Result_TrustedCommitmentTransactionNoneZ_OK(null, ptr);
@@ -41,7 +45,7 @@ public class Result_TrustedCommitmentTransactionNoneZ extends CommonBase {
         * Creates a new CResult_TrustedCommitmentTransactionNoneZ in the success state.
         */
        public static Result_TrustedCommitmentTransactionNoneZ ok(org.ldk.structs.TrustedCommitmentTransaction o) {
-               long ret = bindings.CResult_TrustedCommitmentTransactionNoneZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_TrustedCommitmentTransactionNoneZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_TrustedCommitmentTransactionNoneZ ret_hu_conv = Result_TrustedCommitmentTransactionNoneZ.constr_from_ptr(ret);
index 0f37d60ea2114f051a512d2c6cb8a502a4aec3d5..333892d22bf87d1ec3c5736a100e6541e91e0b47 100644 (file)
@@ -13,6 +13,10 @@ public class Result_TxAbortDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_TxAbortDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_TxAbortDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_TxAbortDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_TxAbortDecodeErrorZ_is_ok(ptr)) {
                        return new Result_TxAbortDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_TxAbortDecodeErrorZ extends CommonBase {
         * Creates a new CResult_TxAbortDecodeErrorZ in the success state.
         */
        public static Result_TxAbortDecodeErrorZ ok(org.ldk.structs.TxAbort o) {
-               long ret = bindings.CResult_TxAbortDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_TxAbortDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_TxAbortDecodeErrorZ ret_hu_conv = Result_TxAbortDecodeErrorZ.constr_from_ptr(ret);
index a95ddc84097bae5904bb14afbf262353d84d377b..32f4a363aedf422278fb7f4756a445e1e092a6bb 100644 (file)
@@ -13,6 +13,10 @@ public class Result_TxAckRbfDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_TxAckRbfDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_TxAckRbfDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_TxAckRbfDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_TxAckRbfDecodeErrorZ_is_ok(ptr)) {
                        return new Result_TxAckRbfDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_TxAckRbfDecodeErrorZ extends CommonBase {
         * Creates a new CResult_TxAckRbfDecodeErrorZ in the success state.
         */
        public static Result_TxAckRbfDecodeErrorZ ok(org.ldk.structs.TxAckRbf o) {
-               long ret = bindings.CResult_TxAckRbfDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_TxAckRbfDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_TxAckRbfDecodeErrorZ ret_hu_conv = Result_TxAckRbfDecodeErrorZ.constr_from_ptr(ret);
index f0fb9a6a86a1c909422a6d62ed248a866df35964..c77173b6dc911f74a05a5905885196c7a70e5d50 100644 (file)
@@ -13,6 +13,10 @@ public class Result_TxAddInputDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_TxAddInputDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_TxAddInputDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_TxAddInputDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_TxAddInputDecodeErrorZ_is_ok(ptr)) {
                        return new Result_TxAddInputDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_TxAddInputDecodeErrorZ extends CommonBase {
         * Creates a new CResult_TxAddInputDecodeErrorZ in the success state.
         */
        public static Result_TxAddInputDecodeErrorZ ok(org.ldk.structs.TxAddInput o) {
-               long ret = bindings.CResult_TxAddInputDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_TxAddInputDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_TxAddInputDecodeErrorZ ret_hu_conv = Result_TxAddInputDecodeErrorZ.constr_from_ptr(ret);
index a0df5276e18c25b842c6f99e91e05c8ffc3292c5..1f2df8a3554b38333dfa6b76abd4dd8d35bc30a4 100644 (file)
@@ -13,6 +13,10 @@ public class Result_TxAddOutputDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_TxAddOutputDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_TxAddOutputDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_TxAddOutputDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_TxAddOutputDecodeErrorZ_is_ok(ptr)) {
                        return new Result_TxAddOutputDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_TxAddOutputDecodeErrorZ extends CommonBase {
         * Creates a new CResult_TxAddOutputDecodeErrorZ in the success state.
         */
        public static Result_TxAddOutputDecodeErrorZ ok(org.ldk.structs.TxAddOutput o) {
-               long ret = bindings.CResult_TxAddOutputDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_TxAddOutputDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_TxAddOutputDecodeErrorZ ret_hu_conv = Result_TxAddOutputDecodeErrorZ.constr_from_ptr(ret);
index ec0f10f25d14ae21c45a791ff0b7ec80de70945d..c4ab911472d1092cb623b2dfe8614b5a43da54bd 100644 (file)
@@ -13,6 +13,10 @@ public class Result_TxCompleteDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_TxCompleteDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_TxCompleteDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_TxCompleteDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_TxCompleteDecodeErrorZ_is_ok(ptr)) {
                        return new Result_TxCompleteDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_TxCompleteDecodeErrorZ extends CommonBase {
         * Creates a new CResult_TxCompleteDecodeErrorZ in the success state.
         */
        public static Result_TxCompleteDecodeErrorZ ok(org.ldk.structs.TxComplete o) {
-               long ret = bindings.CResult_TxCompleteDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_TxCompleteDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_TxCompleteDecodeErrorZ ret_hu_conv = Result_TxCompleteDecodeErrorZ.constr_from_ptr(ret);
index 9c2c18db439382ff937a4705fa1160222ea0569e..925c8e6ebadb722a9296b1439341f6ac206d8bac 100644 (file)
@@ -13,6 +13,10 @@ public class Result_TxCreationKeysDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_TxCreationKeysDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_TxCreationKeysDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_TxCreationKeysDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_TxCreationKeysDecodeErrorZ_is_ok(ptr)) {
                        return new Result_TxCreationKeysDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_TxCreationKeysDecodeErrorZ extends CommonBase {
         * Creates a new CResult_TxCreationKeysDecodeErrorZ in the success state.
         */
        public static Result_TxCreationKeysDecodeErrorZ ok(org.ldk.structs.TxCreationKeys o) {
-               long ret = bindings.CResult_TxCreationKeysDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_TxCreationKeysDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
index 69c17d966ee1f518b23f744d0bd8bf38bc7f3de6..7884c6260ab4c4d4b01b5abfe8fc41ee2de8cb74 100644 (file)
@@ -13,6 +13,10 @@ public class Result_TxInitRbfDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_TxInitRbfDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_TxInitRbfDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_TxInitRbfDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_TxInitRbfDecodeErrorZ_is_ok(ptr)) {
                        return new Result_TxInitRbfDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_TxInitRbfDecodeErrorZ extends CommonBase {
         * Creates a new CResult_TxInitRbfDecodeErrorZ in the success state.
         */
        public static Result_TxInitRbfDecodeErrorZ ok(org.ldk.structs.TxInitRbf o) {
-               long ret = bindings.CResult_TxInitRbfDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_TxInitRbfDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_TxInitRbfDecodeErrorZ ret_hu_conv = Result_TxInitRbfDecodeErrorZ.constr_from_ptr(ret);
index bf2b49f9ffc86fb0324991d7469a655472856c42..0afbc53e7e5feca1848e40f7685aeaf8d639b981 100644 (file)
@@ -13,6 +13,10 @@ public class Result_TxOutUtxoLookupErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_TxOutUtxoLookupErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_TxOutUtxoLookupErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_TxOutUtxoLookupErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_TxOutUtxoLookupErrorZ_is_ok(ptr)) {
                        return new Result_TxOutUtxoLookupErrorZ_OK(null, ptr);
index bb4d7e9f20a8eee3031e14fb47d01ce6346ae48c..198929cfeac7ed6128e7925fe888c1720fbaa96a 100644 (file)
@@ -13,6 +13,10 @@ public class Result_TxRemoveInputDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_TxRemoveInputDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_TxRemoveInputDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_TxRemoveInputDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_TxRemoveInputDecodeErrorZ_is_ok(ptr)) {
                        return new Result_TxRemoveInputDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_TxRemoveInputDecodeErrorZ extends CommonBase {
         * Creates a new CResult_TxRemoveInputDecodeErrorZ in the success state.
         */
        public static Result_TxRemoveInputDecodeErrorZ ok(org.ldk.structs.TxRemoveInput o) {
-               long ret = bindings.CResult_TxRemoveInputDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_TxRemoveInputDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_TxRemoveInputDecodeErrorZ ret_hu_conv = Result_TxRemoveInputDecodeErrorZ.constr_from_ptr(ret);
index fc58a24e58f1f1b87f492cfbd7c7955ece2ad7ad..fc63045e38612ece927d073e0f510dcab48490d0 100644 (file)
@@ -13,6 +13,10 @@ public class Result_TxRemoveOutputDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_TxRemoveOutputDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_TxRemoveOutputDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_TxRemoveOutputDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_TxRemoveOutputDecodeErrorZ_is_ok(ptr)) {
                        return new Result_TxRemoveOutputDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_TxRemoveOutputDecodeErrorZ extends CommonBase {
         * Creates a new CResult_TxRemoveOutputDecodeErrorZ in the success state.
         */
        public static Result_TxRemoveOutputDecodeErrorZ ok(org.ldk.structs.TxRemoveOutput o) {
-               long ret = bindings.CResult_TxRemoveOutputDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_TxRemoveOutputDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_TxRemoveOutputDecodeErrorZ ret_hu_conv = Result_TxRemoveOutputDecodeErrorZ.constr_from_ptr(ret);
index b76313b88db77e42df0beb15e96ce89e78dfb4a3..012c0e5109635bf307809351fa13b589bfc12587 100644 (file)
@@ -13,6 +13,10 @@ public class Result_TxSignaturesDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_TxSignaturesDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_TxSignaturesDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_TxSignaturesDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_TxSignaturesDecodeErrorZ_is_ok(ptr)) {
                        return new Result_TxSignaturesDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_TxSignaturesDecodeErrorZ extends CommonBase {
         * Creates a new CResult_TxSignaturesDecodeErrorZ in the success state.
         */
        public static Result_TxSignaturesDecodeErrorZ ok(org.ldk.structs.TxSignatures o) {
-               long ret = bindings.CResult_TxSignaturesDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_TxSignaturesDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_TxSignaturesDecodeErrorZ ret_hu_conv = Result_TxSignaturesDecodeErrorZ.constr_from_ptr(ret);
diff --git a/src/main/java/org/ldk/structs/Result_UnknownPaymentContextDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UnknownPaymentContextDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..4355bce
--- /dev/null
@@ -0,0 +1,100 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_UnknownPaymentContextDecodeErrorZ extends CommonBase {
+       private Result_UnknownPaymentContextDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_UnknownPaymentContextDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_UnknownPaymentContextDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_UnknownPaymentContextDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_UnknownPaymentContextDecodeErrorZ_is_ok(ptr)) {
+                       return new Result_UnknownPaymentContextDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_UnknownPaymentContextDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_UnknownPaymentContextDecodeErrorZ_OK extends Result_UnknownPaymentContextDecodeErrorZ {
+               public final UnknownPaymentContext res;
+               private Result_UnknownPaymentContextDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_UnknownPaymentContextDecodeErrorZ_get_ok(ptr);
+                       org.ldk.structs.UnknownPaymentContext res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.UnknownPaymentContext(null, res); }
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_UnknownPaymentContextDecodeErrorZ_Err extends Result_UnknownPaymentContextDecodeErrorZ {
+               public final DecodeError err;
+               private Result_UnknownPaymentContextDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.CResult_UnknownPaymentContextDecodeErrorZ_get_err(ptr);
+                       org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
+                       if (err_hu_conv != null) { err_hu_conv.ptrs_to.add(this); };
+                       this.err = err_hu_conv;
+               }
+       }
+
+       /**
+        * Creates a new CResult_UnknownPaymentContextDecodeErrorZ in the success state.
+        */
+       public static Result_UnknownPaymentContextDecodeErrorZ ok(org.ldk.structs.UnknownPaymentContext o) {
+               long ret = bindings.CResult_UnknownPaymentContextDecodeErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_UnknownPaymentContextDecodeErrorZ ret_hu_conv = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_UnknownPaymentContextDecodeErrorZ in the error state.
+        */
+       public static Result_UnknownPaymentContextDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+               long ret = bindings.CResult_UnknownPaymentContextDecodeErrorZ_err(e.ptr);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_UnknownPaymentContextDecodeErrorZ ret_hu_conv = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(e); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_UnknownPaymentContextDecodeErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_UnknownPaymentContextDecodeErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_UnknownPaymentContextDecodeErrorZ clone() {
+               long ret = bindings.CResult_UnknownPaymentContextDecodeErrorZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_UnknownPaymentContextDecodeErrorZ ret_hu_conv = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.java
new file mode 100644 (file)
index 0000000..7bdf559
--- /dev/null
@@ -0,0 +1,96 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ extends CommonBase {
+       private Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(ptr)) {
+                       return new Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_OK extends Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ {
+               public final UnsignedBolt12Invoice res;
+               private Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(ptr);
+                       org.ldk.structs.UnsignedBolt12Invoice res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.UnsignedBolt12Invoice(null, res); }
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_Err extends Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ {
+               public final Bolt12SemanticError err;
+               private Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.err = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(ptr);
+               }
+       }
+
+       /**
+        * Creates a new CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ in the success state.
+        */
+       public static Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ ok(org.ldk.structs.UnsignedBolt12Invoice o) {
+               long ret = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ in the error state.
+        */
+       public static Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+               long ret = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(e);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ clone() {
+               long ret = bindings.CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
index d8f29a70b88b99427e1d70753b90cf3361a3a3d6..0120317034bc1a322f074806e8ab395de399d01c 100644 (file)
@@ -13,6 +13,10 @@ public class Result_UnsignedChannelAnnouncementDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_UnsignedChannelAnnouncementDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(ptr)) {
                        return new Result_UnsignedChannelAnnouncementDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_UnsignedChannelAnnouncementDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the success state.
         */
        public static Result_UnsignedChannelAnnouncementDecodeErrorZ ok(org.ldk.structs.UnsignedChannelAnnouncement o) {
-               long ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
index 1bfcff676843424c94908261cd78f839aa3104d2..d8dba7b97167968a00e2bb360a061705421a8e2a 100644 (file)
@@ -13,6 +13,10 @@ public class Result_UnsignedChannelUpdateDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_UnsignedChannelUpdateDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(ptr)) {
                        return new Result_UnsignedChannelUpdateDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_UnsignedChannelUpdateDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the success state.
         */
        public static Result_UnsignedChannelUpdateDecodeErrorZ ok(org.ldk.structs.UnsignedChannelUpdate o) {
-               long ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_UnsignedChannelUpdateDecodeErrorZ ret_hu_conv = Result_UnsignedChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
diff --git a/src/main/java/org/ldk/structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.java b/src/main/java/org/ldk/structs/Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.java
new file mode 100644 (file)
index 0000000..4054d93
--- /dev/null
@@ -0,0 +1,96 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_UnsignedInvoiceRequestBolt12SemanticErrorZ extends CommonBase {
+       private Result_UnsignedInvoiceRequestBolt12SemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_UnsignedInvoiceRequestBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(ptr)) {
+                       return new Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_OK extends Result_UnsignedInvoiceRequestBolt12SemanticErrorZ {
+               public final UnsignedInvoiceRequest res;
+               private Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(ptr);
+                       org.ldk.structs.UnsignedInvoiceRequest res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.UnsignedInvoiceRequest(null, res); }
+                       if (res_hu_conv != null) { res_hu_conv.ptrs_to.add(this); };
+                       this.res = res_hu_conv;
+               }
+       }
+
+       public static final class Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_Err extends Result_UnsignedInvoiceRequestBolt12SemanticErrorZ {
+               public final Bolt12SemanticError err;
+               private Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.err = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(ptr);
+               }
+       }
+
+       /**
+        * Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ in the success state.
+        */
+       public static Result_UnsignedInvoiceRequestBolt12SemanticErrorZ ok(org.ldk.structs.UnsignedInvoiceRequest o) {
+               long ret = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(o.ptr);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_UnsignedInvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ in the error state.
+        */
+       public static Result_UnsignedInvoiceRequestBolt12SemanticErrorZ err(org.ldk.enums.Bolt12SemanticError e) {
+               long ret = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(e);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_UnsignedInvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public Result_UnsignedInvoiceRequestBolt12SemanticErrorZ clone() {
+               long ret = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_UnsignedInvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
index d87fde9b716200f9cb987b770cb487cbcb3ee91e..5578fbc1ec479b4c6fda2bac77abf8f5de57b2db 100644 (file)
@@ -13,6 +13,10 @@ public class Result_UnsignedNodeAnnouncementDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_UnsignedNodeAnnouncementDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(ptr)) {
                        return new Result_UnsignedNodeAnnouncementDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_UnsignedNodeAnnouncementDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the success state.
         */
        public static Result_UnsignedNodeAnnouncementDecodeErrorZ ok(org.ldk.structs.UnsignedNodeAnnouncement o) {
-               long ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
index 77b94c0f52974cbfe09189cfdf2fc3cda3f6f05b..c55f0eda19483ae2ecc460ddd3bcccc73f3d5202 100644 (file)
@@ -13,6 +13,10 @@ public class Result_UntrustedStringDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_UntrustedStringDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_UntrustedStringDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_UntrustedStringDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_UntrustedStringDecodeErrorZ_is_ok(ptr)) {
                        return new Result_UntrustedStringDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_UntrustedStringDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UntrustedStringDecodeErrorZ in the success state.
         */
        public static Result_UntrustedStringDecodeErrorZ ok(org.ldk.structs.UntrustedString o) {
-               long ret = bindings.CResult_UntrustedStringDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_UntrustedStringDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_UntrustedStringDecodeErrorZ ret_hu_conv = Result_UntrustedStringDecodeErrorZ.constr_from_ptr(ret);
index 3f56fa5047d514994020ab1d2fe0d4f4903a6da4..57541e916f8c8a3a8557377016d2011315607d69 100644 (file)
@@ -13,6 +13,10 @@ public class Result_UpdateAddHTLCDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_UpdateAddHTLCDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_UpdateAddHTLCDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_UpdateAddHTLCDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_UpdateAddHTLCDecodeErrorZ_is_ok(ptr)) {
                        return new Result_UpdateAddHTLCDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_UpdateAddHTLCDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the success state.
         */
        public static Result_UpdateAddHTLCDecodeErrorZ ok(org.ldk.structs.UpdateAddHTLC o) {
-               long ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_UpdateAddHTLCDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
index c3b12b97d83930ff9afc2d749161c65a2280d540..720d482a1ff2f2044254041cefbc478904906ac2 100644 (file)
@@ -13,6 +13,10 @@ public class Result_UpdateFailHTLCDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_UpdateFailHTLCDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_UpdateFailHTLCDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_UpdateFailHTLCDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_UpdateFailHTLCDecodeErrorZ_is_ok(ptr)) {
                        return new Result_UpdateFailHTLCDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_UpdateFailHTLCDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the success state.
         */
        public static Result_UpdateFailHTLCDecodeErrorZ ok(org.ldk.structs.UpdateFailHTLC o) {
-               long ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_UpdateFailHTLCDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
index 424b251400b5f83d8a559ce6e24b56bd23fe04d0..0047423daa0db118e3f919feb663a27c853ffd9f 100644 (file)
@@ -13,6 +13,10 @@ public class Result_UpdateFailMalformedHTLCDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_UpdateFailMalformedHTLCDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(ptr)) {
                        return new Result_UpdateFailMalformedHTLCDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_UpdateFailMalformedHTLCDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the success state.
         */
        public static Result_UpdateFailMalformedHTLCDecodeErrorZ ok(org.ldk.structs.UpdateFailMalformedHTLC o) {
-               long ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);
index da32f084575a338c647b2b3c8a431e7dc35a2d0c..73b2f9ebc1c978c40b7e751e8c3a1ef4c570b294 100644 (file)
@@ -13,6 +13,10 @@ public class Result_UpdateFeeDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_UpdateFeeDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_UpdateFeeDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_UpdateFeeDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_UpdateFeeDecodeErrorZ_is_ok(ptr)) {
                        return new Result_UpdateFeeDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_UpdateFeeDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UpdateFeeDecodeErrorZ in the success state.
         */
        public static Result_UpdateFeeDecodeErrorZ ok(org.ldk.structs.UpdateFee o) {
-               long ret = bindings.CResult_UpdateFeeDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_UpdateFeeDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
index 7879891dc6f9338dd3e38238a883ea24a8a521d2..14d410a97afcadd31f49f273721d7f0ab9630499 100644 (file)
@@ -13,6 +13,10 @@ public class Result_UpdateFulfillHTLCDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_UpdateFulfillHTLCDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(ptr)) {
                        return new Result_UpdateFulfillHTLCDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_UpdateFulfillHTLCDecodeErrorZ extends CommonBase {
         * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the success state.
         */
        public static Result_UpdateFulfillHTLCDecodeErrorZ ok(org.ldk.structs.UpdateFulfillHTLC o) {
-               long ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
index d6bd2d12ce5f59ebd633df7b614c27c6a3db3b4c..dd0c91dc3592322e1ac6e185cf6d95eab3371d08 100644 (file)
@@ -13,6 +13,10 @@ public class Result_VerifiedInvoiceRequestNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_VerifiedInvoiceRequestNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_VerifiedInvoiceRequestNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_VerifiedInvoiceRequestNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_VerifiedInvoiceRequestNoneZ_is_ok(ptr)) {
                        return new Result_VerifiedInvoiceRequestNoneZ_OK(null, ptr);
@@ -41,7 +45,7 @@ public class Result_VerifiedInvoiceRequestNoneZ extends CommonBase {
         * Creates a new CResult_VerifiedInvoiceRequestNoneZ in the success state.
         */
        public static Result_VerifiedInvoiceRequestNoneZ ok(org.ldk.structs.VerifiedInvoiceRequest o) {
-               long ret = bindings.CResult_VerifiedInvoiceRequestNoneZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_VerifiedInvoiceRequestNoneZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_VerifiedInvoiceRequestNoneZ ret_hu_conv = Result_VerifiedInvoiceRequestNoneZ.constr_from_ptr(ret);
index d04f910ad1ab70732fc8faaae2bb7582f8c64f9a..b8520f01252c2c705a392dbcee845915f9fff8aa 100644 (file)
@@ -13,6 +13,10 @@ public class Result_WarningMessageDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_WarningMessageDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_WarningMessageDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_WarningMessageDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_WarningMessageDecodeErrorZ_is_ok(ptr)) {
                        return new Result_WarningMessageDecodeErrorZ_OK(null, ptr);
@@ -46,7 +50,7 @@ public class Result_WarningMessageDecodeErrorZ extends CommonBase {
         * Creates a new CResult_WarningMessageDecodeErrorZ in the success state.
         */
        public static Result_WarningMessageDecodeErrorZ ok(org.ldk.structs.WarningMessage o) {
-               long ret = bindings.CResult_WarningMessageDecodeErrorZ_ok(o == null ? 0 : o.ptr);
+               long ret = bindings.CResult_WarningMessageDecodeErrorZ_ok(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_WarningMessageDecodeErrorZ ret_hu_conv = Result_WarningMessageDecodeErrorZ.constr_from_ptr(ret);
index ea9f7883e225f7b6e0cf061ce0a772a6056bcd1a..edd24f2f4fc1bb8368420b787e506c9ec3b9f7cd 100644 (file)
@@ -13,6 +13,10 @@ public class Result_WitnessNoneZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_WitnessNoneZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_WitnessNoneZ_free(ptr); ptr = 0; }
+       }
+
        static Result_WitnessNoneZ constr_from_ptr(long ptr) {
                if (bindings.CResult_WitnessNoneZ_is_ok(ptr)) {
                        return new Result_WitnessNoneZ_OK(null, ptr);
index bad96df5735d3c3db43fe75b77ade52792bf532c..b877b344375f1d821823df8b35e6d301776520c5 100644 (file)
@@ -13,6 +13,10 @@ public class Result_WriteableEcdsaChannelSignerDecodeErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_WriteableEcdsaChannelSignerDecodeErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_WriteableEcdsaChannelSignerDecodeErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_WriteableEcdsaChannelSignerDecodeErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_WriteableEcdsaChannelSignerDecodeErrorZ_is_ok(ptr)) {
                        return new Result_WriteableEcdsaChannelSignerDecodeErrorZ_OK(null, ptr);
index 48488d826abc22230035ad1ead96c98fdc626d4f..f57d7c5fca35b53929b67b5e0634448c4f429488 100644 (file)
@@ -13,6 +13,10 @@ public class Result_boolLightningErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_boolLightningErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_boolLightningErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_boolLightningErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_boolLightningErrorZ_is_ok(ptr)) {
                        return new Result_boolLightningErrorZ_OK(null, ptr);
@@ -54,7 +58,7 @@ public class Result_boolLightningErrorZ extends CommonBase {
         * Creates a new CResult_boolLightningErrorZ in the error state.
         */
        public static Result_boolLightningErrorZ err(org.ldk.structs.LightningError e) {
-               long ret = bindings.CResult_boolLightningErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_boolLightningErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret);
index 43880448435b5fd2a51653589b6165b25411bf5a..8d6e37b24facc82fa5163b8dc715d68d7038cac0 100644 (file)
@@ -13,6 +13,10 @@ public class Result_boolPeerHandleErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_boolPeerHandleErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_boolPeerHandleErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_boolPeerHandleErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_boolPeerHandleErrorZ_is_ok(ptr)) {
                        return new Result_boolPeerHandleErrorZ_OK(null, ptr);
@@ -54,7 +58,7 @@ public class Result_boolPeerHandleErrorZ extends CommonBase {
         * Creates a new CResult_boolPeerHandleErrorZ in the error state.
         */
        public static Result_boolPeerHandleErrorZ err(org.ldk.structs.PeerHandleError e) {
-               long ret = bindings.CResult_boolPeerHandleErrorZ_err(e == null ? 0 : e.ptr);
+               long ret = bindings.CResult_boolPeerHandleErrorZ_err(e.ptr);
                Reference.reachabilityFence(e);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_boolPeerHandleErrorZ ret_hu_conv = Result_boolPeerHandleErrorZ.constr_from_ptr(ret);
index 07d5b5d58404f547d4f3425f8f9f663722bcb93f..ae52bee88875bea174e1391692e3fdef8b58a332 100644 (file)
@@ -13,6 +13,10 @@ public class Result_u32GraphSyncErrorZ extends CommonBase {
                if (ptr != 0) { bindings.CResult_u32GraphSyncErrorZ_free(ptr); } super.finalize();
        }
 
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_u32GraphSyncErrorZ_free(ptr); ptr = 0; }
+       }
+
        static Result_u32GraphSyncErrorZ constr_from_ptr(long ptr) {
                if (bindings.CResult_u32GraphSyncErrorZ_is_ok(ptr)) {
                        return new Result_u32GraphSyncErrorZ_OK(null, ptr);
diff --git a/src/main/java/org/ldk/structs/Result_u64ShortChannelIdErrorZ.java b/src/main/java/org/ldk/structs/Result_u64ShortChannelIdErrorZ.java
new file mode 100644 (file)
index 0000000..2dd88b2
--- /dev/null
@@ -0,0 +1,74 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+public class Result_u64ShortChannelIdErrorZ extends CommonBase {
+       private Result_u64ShortChannelIdErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_u64ShortChannelIdErrorZ_free(ptr); } super.finalize();
+       }
+
+       protected void force_free() {
+               if (ptr != 0) { bindings.CResult_u64ShortChannelIdErrorZ_free(ptr); ptr = 0; }
+       }
+
+       static Result_u64ShortChannelIdErrorZ constr_from_ptr(long ptr) {
+               if (bindings.CResult_u64ShortChannelIdErrorZ_is_ok(ptr)) {
+                       return new Result_u64ShortChannelIdErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_u64ShortChannelIdErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_u64ShortChannelIdErrorZ_OK extends Result_u64ShortChannelIdErrorZ {
+               public final long res;
+               private Result_u64ShortChannelIdErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.res = bindings.CResult_u64ShortChannelIdErrorZ_get_ok(ptr);
+               }
+       }
+
+       public static final class Result_u64ShortChannelIdErrorZ_Err extends Result_u64ShortChannelIdErrorZ {
+               public final ShortChannelIdError err;
+               private Result_u64ShortChannelIdErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.err = bindings.CResult_u64ShortChannelIdErrorZ_get_err(ptr);
+               }
+       }
+
+       /**
+        * Creates a new CResult_u64ShortChannelIdErrorZ in the success state.
+        */
+       public static Result_u64ShortChannelIdErrorZ ok(long o) {
+               long ret = bindings.CResult_u64ShortChannelIdErrorZ_ok(o);
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_u64ShortChannelIdErrorZ ret_hu_conv = Result_u64ShortChannelIdErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new CResult_u64ShortChannelIdErrorZ in the error state.
+        */
+       public static Result_u64ShortChannelIdErrorZ err(org.ldk.enums.ShortChannelIdError e) {
+               long ret = bindings.CResult_u64ShortChannelIdErrorZ_err(e);
+               Reference.reachabilityFence(e);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_u64ShortChannelIdErrorZ ret_hu_conv = Result_u64ShortChannelIdErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if the given object is currently in the success state
+        */
+       public boolean is_ok() {
+               boolean ret = bindings.CResult_u64ShortChannelIdErrorZ_is_ok(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+}
index c1bbe96cb88f32cdbf2b5db755379dea186c3abc..3ca33a69cbdad5b4cfd6fb2618cffe357ab78df5 100644 (file)
@@ -104,7 +104,7 @@ public class Retry extends CommonBase {
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.Retry b) {
-               boolean ret = bindings.Retry_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Retry_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
index 954df43c79cacd938234c036ee3910a265d122cd..bb532a7ad45850b202c98a9cc5d987d09f7cb6a5 100644 (file)
@@ -51,7 +51,7 @@ public class RevocationBasepoint extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.RevocationBasepoint b) {
-               boolean ret = bindings.RevocationBasepoint_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.RevocationBasepoint_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index f52d4ae9af61c6c20f8d8f3e4f41fd2ae7e85f6c..a749e1c0137685f680ffc667d2c2e05ebee030a5 100644 (file)
@@ -57,7 +57,7 @@ public class RevocationKey extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.RevocationKey b) {
-               boolean ret = bindings.RevocationKey_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.RevocationKey_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -110,7 +110,7 @@ public class RevocationKey extends CommonBase {
         * [`chan_utils::derive_private_revocation_key`]: crate::ln::chan_utils::derive_private_revocation_key
         */
        public static RevocationKey from_basepoint(org.ldk.structs.RevocationBasepoint countersignatory_basepoint, byte[] per_commitment_point) {
-               long ret = bindings.RevocationKey_from_basepoint(countersignatory_basepoint == null ? 0 : countersignatory_basepoint.ptr, InternalUtils.check_arr_len(per_commitment_point, 33));
+               long ret = bindings.RevocationKey_from_basepoint(countersignatory_basepoint.ptr, InternalUtils.check_arr_len(per_commitment_point, 33));
                Reference.reachabilityFence(countersignatory_basepoint);
                Reference.reachabilityFence(per_commitment_point);
                if (ret >= 0 && ret <= 4096) { return null; }
index fb6f7ea9a4a113995c05cf52dae7082171f77ba5..102afadd527c57dc2bcd75810933fc570174cca4 100644 (file)
@@ -25,19 +25,23 @@ public class RevokeAndACK extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.RevokeAndACK_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.RevokeAndACK_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.RevokeAndACK_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.RevokeAndACK_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -79,14 +83,15 @@ public class RevokeAndACK extends CommonBase {
        /**
         * Constructs a new RevokeAndACK given each field
         */
-       public static RevokeAndACK of(byte[] channel_id_arg, byte[] per_commitment_secret_arg, byte[] next_per_commitment_point_arg) {
-               long ret = bindings.RevokeAndACK_new(InternalUtils.check_arr_len(channel_id_arg, 32), InternalUtils.check_arr_len(per_commitment_secret_arg, 32), InternalUtils.check_arr_len(next_per_commitment_point_arg, 33));
+       public static RevokeAndACK of(org.ldk.structs.ChannelId channel_id_arg, byte[] per_commitment_secret_arg, byte[] next_per_commitment_point_arg) {
+               long ret = bindings.RevokeAndACK_new(channel_id_arg.ptr, InternalUtils.check_arr_len(per_commitment_secret_arg, 32), InternalUtils.check_arr_len(next_per_commitment_point_arg, 33));
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(per_commitment_secret_arg);
                Reference.reachabilityFence(next_per_commitment_point_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.RevokeAndACK ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RevokeAndACK(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                return ret_hu_conv;
        }
 
@@ -126,7 +131,7 @@ public class RevokeAndACK extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.RevokeAndACK b) {
-               boolean ret = bindings.RevokeAndACK_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.RevokeAndACK_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 03b591178b930589c8217bba237d39e73070798b..707763276296cdf8d7664a022e29a6a8b8bb8fb4 100644 (file)
@@ -46,7 +46,7 @@ public class Route extends CommonBase {
         * the same.
         */
        public void set_paths(Path[] val) {
-               bindings.Route_set_paths(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_6 -> val_conv_6 == null ? 0 : val_conv_6.ptr).toArray() : null);
+               bindings.Route_set_paths(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_6 -> val_conv_6.ptr).toArray() : null);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                for (Path val_conv_6: val) { if (this != null) { this.ptrs_to.add(val_conv_6); }; };
@@ -93,7 +93,7 @@ public class Route extends CommonBase {
         * Note that route_params_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public static Route of(Path[] paths_arg, @Nullable org.ldk.structs.RouteParameters route_params_arg) {
-               long ret = bindings.Route_new(paths_arg != null ? Arrays.stream(paths_arg).mapToLong(paths_arg_conv_6 -> paths_arg_conv_6 == null ? 0 : paths_arg_conv_6.ptr).toArray() : null, route_params_arg == null ? 0 : route_params_arg.ptr);
+               long ret = bindings.Route_new(paths_arg != null ? Arrays.stream(paths_arg).mapToLong(paths_arg_conv_6 -> paths_arg_conv_6.ptr).toArray() : null, route_params_arg == null ? 0 : route_params_arg.ptr);
                Reference.reachabilityFence(paths_arg);
                Reference.reachabilityFence(route_params_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -140,7 +140,7 @@ public class Route extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.Route b) {
-               boolean ret = bindings.Route_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Route_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 7a4215bcc07b31adebf37672ed901012edd6b324..a966ea7b0ce87b88ea316398520d8f85a0aec205 100644 (file)
@@ -35,7 +35,7 @@ public class RouteHint extends CommonBase {
        }
 
        public void set_a(RouteHintHop[] val) {
-               bindings.RouteHint_set_a(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_14 -> val_conv_14 == null ? 0 : val_conv_14.ptr).toArray() : null);
+               bindings.RouteHint_set_a(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_14 -> val_conv_14.ptr).toArray() : null);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                for (RouteHintHop val_conv_14: val) { if (this != null) { this.ptrs_to.add(val_conv_14); }; };
@@ -45,7 +45,7 @@ public class RouteHint extends CommonBase {
         * Constructs a new RouteHint given each field
         */
        public static RouteHint of(RouteHintHop[] a_arg) {
-               long ret = bindings.RouteHint_new(a_arg != null ? Arrays.stream(a_arg).mapToLong(a_arg_conv_14 -> a_arg_conv_14 == null ? 0 : a_arg_conv_14.ptr).toArray() : null);
+               long ret = bindings.RouteHint_new(a_arg != null ? Arrays.stream(a_arg).mapToLong(a_arg_conv_14 -> a_arg_conv_14.ptr).toArray() : null);
                Reference.reachabilityFence(a_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.RouteHint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RouteHint(null, ret); }
@@ -90,7 +90,7 @@ public class RouteHint extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.RouteHint b) {
-               boolean ret = bindings.RouteHint_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.RouteHint_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index cc7e19c58c1e1d975f38344aa4ecb55a31fbf099..4177a85812ac85dc6d42f849aef46b11884bfb98 100644 (file)
@@ -76,7 +76,7 @@ public class RouteHintHop extends CommonBase {
         * The fees which must be paid to use this channel
         */
        public void set_fees(org.ldk.structs.RoutingFees val) {
-               bindings.RouteHintHop_set_fees(this.ptr, val == null ? 0 : val.ptr);
+               bindings.RouteHintHop_set_fees(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -148,7 +148,7 @@ public class RouteHintHop extends CommonBase {
         * Constructs a new RouteHintHop given each field
         */
        public static RouteHintHop of(byte[] src_node_id_arg, long short_channel_id_arg, org.ldk.structs.RoutingFees fees_arg, short cltv_expiry_delta_arg, org.ldk.structs.Option_u64Z htlc_minimum_msat_arg, org.ldk.structs.Option_u64Z htlc_maximum_msat_arg) {
-               long ret = bindings.RouteHintHop_new(InternalUtils.check_arr_len(src_node_id_arg, 33), short_channel_id_arg, fees_arg == null ? 0 : fees_arg.ptr, cltv_expiry_delta_arg, htlc_minimum_msat_arg.ptr, htlc_maximum_msat_arg.ptr);
+               long ret = bindings.RouteHintHop_new(InternalUtils.check_arr_len(src_node_id_arg, 33), short_channel_id_arg, fees_arg.ptr, cltv_expiry_delta_arg, htlc_minimum_msat_arg.ptr, htlc_maximum_msat_arg.ptr);
                Reference.reachabilityFence(src_node_id_arg);
                Reference.reachabilityFence(short_channel_id_arg);
                Reference.reachabilityFence(fees_arg);
@@ -200,7 +200,7 @@ public class RouteHintHop extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.RouteHintHop b) {
-               boolean ret = bindings.RouteHintHop_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.RouteHintHop_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 37b97bc91e525fe5f026023cfee53c0664c08436..4b9efdb5457c6bfea4cc39a70ed57a1c55a44aef 100644 (file)
@@ -57,7 +57,7 @@ public class RouteHop extends CommonBase {
         * amended to match the features present in the invoice this node generated.
         */
        public void set_node_features(org.ldk.structs.NodeFeatures val) {
-               bindings.RouteHop_set_node_features(this.ptr, val == null ? 0 : val.ptr);
+               bindings.RouteHop_set_node_features(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -99,7 +99,7 @@ public class RouteHop extends CommonBase {
         * to reach this node.
         */
        public void set_channel_features(org.ldk.structs.ChannelFeatures val) {
-               bindings.RouteHop_set_channel_features(this.ptr, val == null ? 0 : val.ptr);
+               bindings.RouteHop_set_channel_features(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -197,7 +197,7 @@ public class RouteHop extends CommonBase {
         * Constructs a new RouteHop given each field
         */
        public static RouteHop of(byte[] pubkey_arg, org.ldk.structs.NodeFeatures node_features_arg, long short_channel_id_arg, org.ldk.structs.ChannelFeatures channel_features_arg, long fee_msat_arg, int cltv_expiry_delta_arg, boolean maybe_announced_channel_arg) {
-               long ret = bindings.RouteHop_new(InternalUtils.check_arr_len(pubkey_arg, 33), node_features_arg == null ? 0 : node_features_arg.ptr, short_channel_id_arg, channel_features_arg == null ? 0 : channel_features_arg.ptr, fee_msat_arg, cltv_expiry_delta_arg, maybe_announced_channel_arg);
+               long ret = bindings.RouteHop_new(InternalUtils.check_arr_len(pubkey_arg, 33), node_features_arg.ptr, short_channel_id_arg, channel_features_arg.ptr, fee_msat_arg, cltv_expiry_delta_arg, maybe_announced_channel_arg);
                Reference.reachabilityFence(pubkey_arg);
                Reference.reachabilityFence(node_features_arg);
                Reference.reachabilityFence(short_channel_id_arg);
@@ -249,7 +249,7 @@ public class RouteHop extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.RouteHop b) {
-               boolean ret = bindings.RouteHop_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.RouteHop_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 469a5bcb37feee194a107d595a17ecd3d2599c5f..f81e9b7be4d9dc986e0d0a846671b4ba74c5d433 100644 (file)
@@ -38,7 +38,7 @@ public class RouteParameters extends CommonBase {
         * The parameters of the failed payment path.
         */
        public void set_payment_params(org.ldk.structs.PaymentParameters val) {
-               bindings.RouteParameters_set_payment_params(this.ptr, val == null ? 0 : val.ptr);
+               bindings.RouteParameters_set_payment_params(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -98,7 +98,7 @@ public class RouteParameters extends CommonBase {
         * Constructs a new RouteParameters given each field
         */
        public static RouteParameters of(org.ldk.structs.PaymentParameters payment_params_arg, long final_value_msat_arg, org.ldk.structs.Option_u64Z max_total_routing_fee_msat_arg) {
-               long ret = bindings.RouteParameters_new(payment_params_arg == null ? 0 : payment_params_arg.ptr, final_value_msat_arg, max_total_routing_fee_msat_arg.ptr);
+               long ret = bindings.RouteParameters_new(payment_params_arg.ptr, final_value_msat_arg, max_total_routing_fee_msat_arg.ptr);
                Reference.reachabilityFence(payment_params_arg);
                Reference.reachabilityFence(final_value_msat_arg);
                Reference.reachabilityFence(max_total_routing_fee_msat_arg);
@@ -146,7 +146,7 @@ public class RouteParameters extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.RouteParameters b) {
-               boolean ret = bindings.RouteParameters_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.RouteParameters_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -163,7 +163,7 @@ public class RouteParameters extends CommonBase {
         * [`Self::max_total_routing_fee_msat`] defaults to 1% of the payment amount + 50 sats
         */
        public static RouteParameters from_payment_params_and_value(org.ldk.structs.PaymentParameters payment_params, long final_value_msat) {
-               long ret = bindings.RouteParameters_from_payment_params_and_value(payment_params == null ? 0 : payment_params.ptr, final_value_msat);
+               long ret = bindings.RouteParameters_from_payment_params_and_value(payment_params.ptr, final_value_msat);
                Reference.reachabilityFence(payment_params);
                Reference.reachabilityFence(final_value_msat);
                if (ret >= 0 && ret <= 4096) { return null; }
index c7608adf3a37bfc9c8e3c79cf38acc359574127c..ca667d23a7a02d99339ca081cb2f34115d4d0279 100644 (file)
@@ -86,7 +86,7 @@ public class Router extends CommonBase {
                                if (inflight_htlcs_hu_conv != null) { inflight_htlcs_hu_conv.ptrs_to.add(this); };
                                Result_RouteLightningErrorZ ret = arg.find_route(payer, route_params_hu_conv, first_hops_conv_16_arr, inflight_htlcs_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long find_route_with_id(byte[] payer, long route_params, long[] first_hops, long inflight_htlcs, byte[] _payment_hash, byte[] _payment_id) {
@@ -105,7 +105,7 @@ public class Router extends CommonBase {
                                if (inflight_htlcs_hu_conv != null) { inflight_htlcs_hu_conv.ptrs_to.add(this); };
                                Result_RouteLightningErrorZ ret = arg.find_route_with_id(payer, route_params_hu_conv, first_hops_conv_16_arr, inflight_htlcs_hu_conv, _payment_hash, _payment_id);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long create_blinded_payment_paths(byte[] recipient, long[] first_hops, long tlvs, long amount_msats) {
@@ -121,7 +121,7 @@ public class Router extends CommonBase {
                                if (tlvs_hu_conv != null) { tlvs_hu_conv.ptrs_to.add(this); };
                                Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ ret = arg.create_blinded_payment_paths(recipient, first_hops_conv_16_arr, tlvs_hu_conv, amount_msats);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                }, MessageRouter.new_impl(MessageRouter_impl).bindings_instance);
@@ -146,7 +146,7 @@ public class Router extends CommonBase {
         * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public Result_RouteLightningErrorZ find_route(byte[] payer, org.ldk.structs.RouteParameters route_params, @Nullable ChannelDetails[] first_hops, org.ldk.structs.InFlightHtlcs inflight_htlcs) {
-               long ret = bindings.Router_find_route(this.ptr, InternalUtils.check_arr_len(payer, 33), route_params == null ? 0 : route_params.ptr, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr).toArray() : null, inflight_htlcs == null ? 0 : inflight_htlcs.ptr);
+               long ret = bindings.Router_find_route(this.ptr, InternalUtils.check_arr_len(payer, 33), route_params.ptr, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16.ptr).toArray() : null, inflight_htlcs.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(payer);
                Reference.reachabilityFence(route_params);
@@ -172,7 +172,7 @@ public class Router extends CommonBase {
         * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public Result_RouteLightningErrorZ find_route_with_id(byte[] payer, org.ldk.structs.RouteParameters route_params, @Nullable ChannelDetails[] first_hops, org.ldk.structs.InFlightHtlcs inflight_htlcs, byte[] _payment_hash, byte[] _payment_id) {
-               long ret = bindings.Router_find_route_with_id(this.ptr, InternalUtils.check_arr_len(payer, 33), route_params == null ? 0 : route_params.ptr, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr).toArray() : null, inflight_htlcs == null ? 0 : inflight_htlcs.ptr, InternalUtils.check_arr_len(_payment_hash, 32), InternalUtils.check_arr_len(_payment_id, 32));
+               long ret = bindings.Router_find_route_with_id(this.ptr, InternalUtils.check_arr_len(payer, 33), route_params.ptr, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16.ptr).toArray() : null, inflight_htlcs.ptr, InternalUtils.check_arr_len(_payment_hash, 32), InternalUtils.check_arr_len(_payment_id, 32));
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(payer);
                Reference.reachabilityFence(route_params);
@@ -194,7 +194,7 @@ public class Router extends CommonBase {
         * given in `tlvs`.
         */
        public Result_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ create_blinded_payment_paths(byte[] recipient, ChannelDetails[] first_hops, org.ldk.structs.ReceiveTlvs tlvs, long amount_msats) {
-               long ret = bindings.Router_create_blinded_payment_paths(this.ptr, InternalUtils.check_arr_len(recipient, 33), first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr).toArray() : null, tlvs == null ? 0 : tlvs.ptr, amount_msats);
+               long ret = bindings.Router_create_blinded_payment_paths(this.ptr, InternalUtils.check_arr_len(recipient, 33), first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16.ptr).toArray() : null, tlvs.ptr, amount_msats);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(recipient);
                Reference.reachabilityFence(first_hops);
index 0abd5a3dd257b7b3ed46e5afa73779dda5124eb1..bbb610f78d0515459d22d2c2c4fb453970939558 100644 (file)
@@ -77,7 +77,7 @@ public class RoutingFees extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.RoutingFees b) {
-               boolean ret = bindings.RoutingFees_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.RoutingFees_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 64988f24d58bda9f3f2a0a6e51c7a037dcaf6bd3..9c5ac5af3a127fc2a4cadfe2013339e61e9b7143 100644 (file)
@@ -138,27 +138,27 @@ public class RoutingMessageHandler extends CommonBase {
                                org.ldk.structs.NodeAnnouncement msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.NodeAnnouncement(null, msg); }
                                Result_boolLightningErrorZ ret = arg.handle_node_announcement(msg_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long handle_channel_announcement(long msg) {
                                org.ldk.structs.ChannelAnnouncement msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelAnnouncement(null, msg); }
                                Result_boolLightningErrorZ ret = arg.handle_channel_announcement(msg_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long handle_channel_update(long msg) {
                                org.ldk.structs.ChannelUpdate msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ChannelUpdate(null, msg); }
                                Result_boolLightningErrorZ ret = arg.handle_channel_update(msg_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long get_next_channel_announcement(long starting_point) {
                                Option_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret = arg.get_next_channel_announcement(starting_point);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                if (impl_holder.held != null) { impl_holder.held.ptrs_to.add(ret); };
                                return result;
                        }
@@ -174,7 +174,7 @@ public class RoutingMessageHandler extends CommonBase {
                                org.ldk.structs.Init init_hu_conv = null; if (init < 0 || init > 4096) { init_hu_conv = new org.ldk.structs.Init(null, init); }
                                Result_NoneNoneZ ret = arg.peer_connected(their_node_id, init_hu_conv, inbound);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long handle_reply_channel_range(byte[] their_node_id, long msg) {
@@ -182,7 +182,7 @@ public class RoutingMessageHandler extends CommonBase {
                                if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.add(this); };
                                Result_NoneLightningErrorZ ret = arg.handle_reply_channel_range(their_node_id, msg_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long handle_reply_short_channel_ids_end(byte[] their_node_id, long msg) {
@@ -190,7 +190,7 @@ public class RoutingMessageHandler extends CommonBase {
                                if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.add(this); };
                                Result_NoneLightningErrorZ ret = arg.handle_reply_short_channel_ids_end(their_node_id, msg_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long handle_query_channel_range(byte[] their_node_id, long msg) {
@@ -198,7 +198,7 @@ public class RoutingMessageHandler extends CommonBase {
                                if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.add(this); };
                                Result_NoneLightningErrorZ ret = arg.handle_query_channel_range(their_node_id, msg_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long handle_query_short_channel_ids(byte[] their_node_id, long msg) {
@@ -206,7 +206,7 @@ public class RoutingMessageHandler extends CommonBase {
                                if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.add(this); };
                                Result_NoneLightningErrorZ ret = arg.handle_query_short_channel_ids(their_node_id, msg_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public boolean processing_queue_high() {
@@ -217,13 +217,13 @@ public class RoutingMessageHandler extends CommonBase {
                        @Override public long provided_node_features() {
                                NodeFeatures ret = arg.provided_node_features();
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long provided_init_features(byte[] their_node_id) {
                                InitFeatures ret = arg.provided_init_features(their_node_id);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                }, MessageSendEventsProvider.new_impl(MessageSendEventsProvider_impl).bindings_instance);
@@ -244,7 +244,7 @@ public class RoutingMessageHandler extends CommonBase {
         * `false` or returning an `Err` otherwise.
         */
        public Result_boolLightningErrorZ handle_node_announcement(org.ldk.structs.NodeAnnouncement msg) {
-               long ret = bindings.RoutingMessageHandler_handle_node_announcement(this.ptr, msg == null ? 0 : msg.ptr);
+               long ret = bindings.RoutingMessageHandler_handle_node_announcement(this.ptr, msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -258,7 +258,7 @@ public class RoutingMessageHandler extends CommonBase {
         * or returning an `Err` otherwise.
         */
        public Result_boolLightningErrorZ handle_channel_announcement(org.ldk.structs.ChannelAnnouncement msg) {
-               long ret = bindings.RoutingMessageHandler_handle_channel_announcement(this.ptr, msg == null ? 0 : msg.ptr);
+               long ret = bindings.RoutingMessageHandler_handle_channel_announcement(this.ptr, msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -272,7 +272,7 @@ public class RoutingMessageHandler extends CommonBase {
         * `false` or returning an `Err` otherwise.
         */
        public Result_boolLightningErrorZ handle_channel_update(org.ldk.structs.ChannelUpdate msg) {
-               long ret = bindings.RoutingMessageHandler_handle_channel_update(this.ptr, msg == null ? 0 : msg.ptr);
+               long ret = bindings.RoutingMessageHandler_handle_channel_update(this.ptr, msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -327,7 +327,7 @@ public class RoutingMessageHandler extends CommonBase {
         * message handlers may still wish to communicate with this peer.
         */
        public Result_NoneNoneZ peer_connected(byte[] their_node_id, org.ldk.structs.Init init, boolean inbound) {
-               long ret = bindings.RoutingMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), init == null ? 0 : init.ptr, inbound);
+               long ret = bindings.RoutingMessageHandler_peer_connected(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), init.ptr, inbound);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(init);
@@ -344,7 +344,7 @@ public class RoutingMessageHandler extends CommonBase {
         * replies to a single query.
         */
        public Result_NoneLightningErrorZ handle_reply_channel_range(byte[] their_node_id, org.ldk.structs.ReplyChannelRange msg) {
-               long ret = bindings.RoutingMessageHandler_handle_reply_channel_range(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.RoutingMessageHandler_handle_reply_channel_range(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -361,7 +361,7 @@ public class RoutingMessageHandler extends CommonBase {
         * gossip messages.
         */
        public Result_NoneLightningErrorZ handle_reply_short_channel_ids_end(byte[] their_node_id, org.ldk.structs.ReplyShortChannelIdsEnd msg) {
-               long ret = bindings.RoutingMessageHandler_handle_reply_short_channel_ids_end(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.RoutingMessageHandler_handle_reply_short_channel_ids_end(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -376,7 +376,7 @@ public class RoutingMessageHandler extends CommonBase {
         * for the requested range of blocks.
         */
        public Result_NoneLightningErrorZ handle_query_channel_range(byte[] their_node_id, org.ldk.structs.QueryChannelRange msg) {
-               long ret = bindings.RoutingMessageHandler_handle_query_channel_range(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.RoutingMessageHandler_handle_query_channel_range(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
@@ -391,7 +391,7 @@ public class RoutingMessageHandler extends CommonBase {
         * list of `short_channel_id`s.
         */
        public Result_NoneLightningErrorZ handle_query_short_channel_ids(byte[] their_node_id, org.ldk.structs.QueryShortChannelIds msg) {
-               long ret = bindings.RoutingMessageHandler_handle_query_short_channel_ids(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg == null ? 0 : msg.ptr);
+               long ret = bindings.RoutingMessageHandler_handle_query_short_channel_ids(this.ptr, InternalUtils.check_arr_len(their_node_id, 33), msg.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(their_node_id);
                Reference.reachabilityFence(msg);
index 022b74ec593466978c7fe9745904066364246d18..961f554b2b57633e4339856ae7584dca4957c393 100644 (file)
@@ -80,7 +80,7 @@ public class ScoreLookUp extends CommonBase {
         * Thus, implementations should be overflow-safe.
         */
        public long channel_penalty_msat(org.ldk.structs.CandidateRouteHop candidate, org.ldk.structs.ChannelUsage usage, org.ldk.structs.ProbabilisticScoringFeeParameters score_params) {
-               long ret = bindings.ScoreLookUp_channel_penalty_msat(this.ptr, candidate == null ? 0 : candidate.ptr, usage == null ? 0 : usage.ptr, score_params == null ? 0 : score_params.ptr);
+               long ret = bindings.ScoreLookUp_channel_penalty_msat(this.ptr, candidate.ptr, usage.ptr, score_params.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(candidate);
                Reference.reachabilityFence(usage);
index bdc24320ec34a2a67e0e3463e45cdb563f134963..495a1023fb69de5e4fbbe3ce1013d0322b6892e8 100644 (file)
@@ -96,7 +96,7 @@ public class ScoreUpdate extends CommonBase {
         * Handles updating channel penalties after failing to route through a channel.
         */
        public void payment_path_failed(org.ldk.structs.Path path, long short_channel_id, long duration_since_epoch) {
-               bindings.ScoreUpdate_payment_path_failed(this.ptr, path == null ? 0 : path.ptr, short_channel_id, duration_since_epoch);
+               bindings.ScoreUpdate_payment_path_failed(this.ptr, path.ptr, short_channel_id, duration_since_epoch);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(path);
                Reference.reachabilityFence(short_channel_id);
@@ -108,7 +108,7 @@ public class ScoreUpdate extends CommonBase {
         * Handles updating channel penalties after successfully routing along a path.
         */
        public void payment_path_successful(org.ldk.structs.Path path, long duration_since_epoch) {
-               bindings.ScoreUpdate_payment_path_successful(this.ptr, path == null ? 0 : path.ptr, duration_since_epoch);
+               bindings.ScoreUpdate_payment_path_successful(this.ptr, path.ptr, duration_since_epoch);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(path);
                Reference.reachabilityFence(duration_since_epoch);
@@ -119,7 +119,7 @@ public class ScoreUpdate extends CommonBase {
         * Handles updating channel penalties after a probe over the given path failed.
         */
        public void probe_failed(org.ldk.structs.Path path, long short_channel_id, long duration_since_epoch) {
-               bindings.ScoreUpdate_probe_failed(this.ptr, path == null ? 0 : path.ptr, short_channel_id, duration_since_epoch);
+               bindings.ScoreUpdate_probe_failed(this.ptr, path.ptr, short_channel_id, duration_since_epoch);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(path);
                Reference.reachabilityFence(short_channel_id);
@@ -131,7 +131,7 @@ public class ScoreUpdate extends CommonBase {
         * Handles updating channel penalties after a probe over the given path succeeded.
         */
        public void probe_successful(org.ldk.structs.Path path, long duration_since_epoch) {
-               bindings.ScoreUpdate_probe_successful(this.ptr, path == null ? 0 : path.ptr, duration_since_epoch);
+               bindings.ScoreUpdate_probe_successful(this.ptr, path.ptr, duration_since_epoch);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(path);
                Reference.reachabilityFence(duration_since_epoch);
index b6b8ad2f57a9414d9511fc8039bb26ecf7c21eac..51944170f5fb4c5995e57890cc8f60de4cdcce1e 100644 (file)
@@ -29,7 +29,7 @@ public class ScorerAccountingForInFlightHtlcs extends CommonBase {
         * Initialize a new `ScorerAccountingForInFlightHtlcs`.
         */
        public static ScorerAccountingForInFlightHtlcs of(org.ldk.structs.ScoreLookUp scorer, org.ldk.structs.InFlightHtlcs inflight_htlcs) {
-               long ret = bindings.ScorerAccountingForInFlightHtlcs_new(scorer.ptr, inflight_htlcs == null ? 0 : inflight_htlcs.ptr);
+               long ret = bindings.ScorerAccountingForInFlightHtlcs_new(scorer.ptr, inflight_htlcs.ptr);
                Reference.reachabilityFence(scorer);
                Reference.reachabilityFence(inflight_htlcs);
                if (ret >= 0 && ret <= 4096) { return null; }
index a6be0b7fc909755946e357263ab85fbcc7de41e2..295b29cb49409a6cab7e5f4430d1ab7ee6ba99b4 100644 (file)
@@ -47,6 +47,9 @@ public class SendError extends CommonBase {
                if (raw_val.getClass() == bindings.LDKSendError.GetNodeIdFailed.class) {
                        return new GetNodeIdFailed(ptr, (bindings.LDKSendError.GetNodeIdFailed)raw_val);
                }
+               if (raw_val.getClass() == bindings.LDKSendError.UnresolvedIntroductionNode.class) {
+                       return new UnresolvedIntroductionNode(ptr, (bindings.LDKSendError.UnresolvedIntroductionNode)raw_val);
+               }
                if (raw_val.getClass() == bindings.LDKSendError.BlindedPathAdvanceFailed.class) {
                        return new BlindedPathAdvanceFailed(ptr, (bindings.LDKSendError.BlindedPathAdvanceFailed)raw_val);
                }
@@ -125,6 +128,16 @@ public class SendError extends CommonBase {
                        super(null, ptr);
                }
        }
+       /**
+        * The provided [`Destination`] has a blinded path with an unresolved introduction node. An
+        * attempt to resolve it in the [`MessageRouter`] when finding an [`OnionMessagePath`] likely
+        * failed.
+        */
+       public final static class UnresolvedIntroductionNode extends SendError {
+               private UnresolvedIntroductionNode(long ptr, bindings.LDKSendError.UnresolvedIntroductionNode obj) {
+                       super(null, ptr);
+               }
+       }
        /**
         * We attempted to send to a blinded path where we are the introduction node, and failed to
         * advance the blinded path to make the second hop the new introduction node. Either
@@ -244,6 +257,17 @@ public class SendError extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new UnresolvedIntroductionNode-variant SendError
+        */
+       public static SendError unresolved_introduction_node() {
+               long ret = bindings.SendError_unresolved_introduction_node();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.SendError ret_hu_conv = org.ldk.structs.SendError.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
        /**
         * Utility method to constructs a new BlindedPathAdvanceFailed-variant SendError
         */
@@ -255,12 +279,24 @@ public class SendError extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Generates a non-cryptographic 64-bit hash of the SendError.
+        */
+       public long hash() {
+               long ret = bindings.SendError_hash(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       @Override public int hashCode() {
+               return (int)this.hash();
+       }
        /**
         * Checks if two SendErrors contain equal inner contents.
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.SendError b) {
-               boolean ret = bindings.SendError_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.SendError_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
index 949685f46d1f58b32fb3afccb0b675c1aebaa969..1a11e9f14ab0316a0d12942890aadddf1ce3373f 100644 (file)
@@ -93,12 +93,24 @@ public class SendSuccess extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Generates a non-cryptographic 64-bit hash of the SendSuccess.
+        */
+       public long hash() {
+               long ret = bindings.SendSuccess_hash(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       @Override public int hashCode() {
+               return (int)this.hash();
+       }
        /**
         * Checks if two SendSuccesss contain equal inner contents.
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.SendSuccess b) {
-               boolean ret = bindings.SendSuccess_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.SendSuccess_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
index 8f380798c9fbd05c98ae34a8f91c6119ed1b97aa..074f7bb956ff85469a5dffe75089b8d6e7dd48e5 100644 (file)
@@ -56,7 +56,7 @@ public class Sha256 extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.Sha256 b) {
-               boolean ret = bindings.Sha256_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Sha256_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 56f8712a40b781ed7db11932c64dc81d073d0314..08b4aada0a296ff090f9c5f8e45eeeb813dbd41e 100644 (file)
@@ -25,19 +25,23 @@ public class Shutdown extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.Shutdown_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.Shutdown_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.Shutdown_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.Shutdown_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -65,13 +69,14 @@ public class Shutdown extends CommonBase {
        /**
         * Constructs a new Shutdown given each field
         */
-       public static Shutdown of(byte[] channel_id_arg, byte[] scriptpubkey_arg) {
-               long ret = bindings.Shutdown_new(InternalUtils.check_arr_len(channel_id_arg, 32), scriptpubkey_arg);
+       public static Shutdown of(org.ldk.structs.ChannelId channel_id_arg, byte[] scriptpubkey_arg) {
+               long ret = bindings.Shutdown_new(channel_id_arg.ptr, scriptpubkey_arg);
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(scriptpubkey_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Shutdown ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Shutdown(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                return ret_hu_conv;
        }
 
@@ -111,7 +116,7 @@ public class Shutdown extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.Shutdown b) {
-               boolean ret = bindings.Shutdown_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Shutdown_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 4a422d0619e0f9e3c7fe382587d853a9a00773a6..3dbbde51a19557de87d97ca4be9361f62fbcdbcb 100644 (file)
@@ -46,7 +46,7 @@ public class ShutdownScript extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.ShutdownScript b) {
-               boolean ret = bindings.ShutdownScript_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.ShutdownScript_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -147,7 +147,7 @@ public class ShutdownScript extends CommonBase {
         * Specifically, checks for compliance with feature `option_shutdown_anysegwit`.
         */
        public boolean is_compatible(org.ldk.structs.InitFeatures features) {
-               boolean ret = bindings.ShutdownScript_is_compatible(this.ptr, features == null ? 0 : features.ptr);
+               boolean ret = bindings.ShutdownScript_is_compatible(this.ptr, features.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(features);
                if (this != null) { this.ptrs_to.add(features); };
diff --git a/src/main/java/org/ldk/structs/SignBolt12InvoiceFn.java b/src/main/java/org/ldk/structs/SignBolt12InvoiceFn.java
new file mode 100644 (file)
index 0000000..40e6365
--- /dev/null
@@ -0,0 +1,72 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+/**
+ * A function for signing an [`UnsignedBolt12Invoice`].
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class SignBolt12InvoiceFn extends CommonBase {
+       final bindings.LDKSignBolt12InvoiceFn bindings_instance;
+       SignBolt12InvoiceFn(Object _dummy, long ptr) { super(ptr); bindings_instance = null; }
+       private SignBolt12InvoiceFn(bindings.LDKSignBolt12InvoiceFn arg) {
+               super(bindings.LDKSignBolt12InvoiceFn_new(arg));
+               this.ptrs_to.add(arg);
+               this.bindings_instance = arg;
+       }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.SignBolt12InvoiceFn_free(ptr); } super.finalize();
+       }
+       /**
+        * Destroys the object, freeing associated resources. After this call, any access
+        * to this object may result in a SEGFAULT or worse.
+        *
+        * You should generally NEVER call this method. You should let the garbage collector
+        * do this for you when it finalizes objects. However, it may be useful for types
+        * which represent locks and should be closed immediately to avoid holding locks
+        * until the GC runs.
+        */
+       public void destroy() {
+               if (ptr != 0) { bindings.SignBolt12InvoiceFn_free(ptr); }
+               ptr = 0;
+       }
+       public static interface SignBolt12InvoiceFnInterface {
+               /**
+                * Signs a [`TaggedHash`] computed over the merkle root of `message`'s TLV stream.
+                */
+               Result_SchnorrSignatureNoneZ sign_invoice(UnsignedBolt12Invoice message);
+       }
+       private static class LDKSignBolt12InvoiceFnHolder { SignBolt12InvoiceFn held; }
+       public static SignBolt12InvoiceFn new_impl(SignBolt12InvoiceFnInterface arg) {
+               final LDKSignBolt12InvoiceFnHolder impl_holder = new LDKSignBolt12InvoiceFnHolder();
+               impl_holder.held = new SignBolt12InvoiceFn(new bindings.LDKSignBolt12InvoiceFn() {
+                       @Override public long sign_invoice(long message) {
+                               org.ldk.structs.UnsignedBolt12Invoice message_hu_conv = null; if (message < 0 || message > 4096) { message_hu_conv = new org.ldk.structs.UnsignedBolt12Invoice(null, message); }
+                               Result_SchnorrSignatureNoneZ ret = arg.sign_invoice(message_hu_conv);
+                               Reference.reachabilityFence(arg);
+                               long result = ret.clone_ptr();
+                               return result;
+                       }
+               });
+               return impl_holder.held;
+       }
+       /**
+        * Signs a [`TaggedHash`] computed over the merkle root of `message`'s TLV stream.
+        */
+       public Result_SchnorrSignatureNoneZ sign_invoice(org.ldk.structs.UnsignedBolt12Invoice message) {
+               long ret = bindings.SignBolt12InvoiceFn_sign_invoice(this.ptr, message.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(message);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_SchnorrSignatureNoneZ ret_hu_conv = Result_SchnorrSignatureNoneZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(message); };
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/SignError.java b/src/main/java/org/ldk/structs/SignError.java
new file mode 100644 (file)
index 0000000..c54c4ea
--- /dev/null
@@ -0,0 +1,92 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * Error when signing messages.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class SignError extends CommonBase {
+       private SignError(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.SignError_free(ptr); }
+       }
+       static SignError constr_from_ptr(long ptr) {
+               bindings.LDKSignError raw_val = bindings.LDKSignError_ref_from_ptr(ptr);
+               if (raw_val.getClass() == bindings.LDKSignError.Signing.class) {
+                       return new Signing(ptr, (bindings.LDKSignError.Signing)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKSignError.Verification.class) {
+                       return new Verification(ptr, (bindings.LDKSignError.Verification)raw_val);
+               }
+               assert false; return null; // Unreachable without extending the (internal) bindings interface
+       }
+
+       /**
+        * User-defined error when signing the message.
+        */
+       public final static class Signing extends SignError {
+               private Signing(long ptr, bindings.LDKSignError.Signing obj) {
+                       super(null, ptr);
+               }
+       }
+       /**
+        * Error when verifying the produced signature using the given pubkey.
+        */
+       public final static class Verification extends SignError {
+               public final org.ldk.enums.Secp256k1Error verification;
+               private Verification(long ptr, bindings.LDKSignError.Verification obj) {
+                       super(null, ptr);
+                       this.verification = obj.verification;
+               }
+       }
+       long clone_ptr() {
+               long ret = bindings.SignError_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the SignError
+        */
+       public SignError clone() {
+               long ret = bindings.SignError_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.SignError ret_hu_conv = org.ldk.structs.SignError.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new Signing-variant SignError
+        */
+       public static SignError signing() {
+               long ret = bindings.SignError_signing();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.SignError ret_hu_conv = org.ldk.structs.SignError.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new Verification-variant SignError
+        */
+       public static SignError verification(org.ldk.enums.Secp256k1Error a) {
+               long ret = bindings.SignError_verification(a);
+               Reference.reachabilityFence(a);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.SignError ret_hu_conv = org.ldk.structs.SignError.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/SignInvoiceRequestFn.java b/src/main/java/org/ldk/structs/SignInvoiceRequestFn.java
new file mode 100644 (file)
index 0000000..9425856
--- /dev/null
@@ -0,0 +1,72 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+/**
+ * A function for signing an [`UnsignedInvoiceRequest`].
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class SignInvoiceRequestFn extends CommonBase {
+       final bindings.LDKSignInvoiceRequestFn bindings_instance;
+       SignInvoiceRequestFn(Object _dummy, long ptr) { super(ptr); bindings_instance = null; }
+       private SignInvoiceRequestFn(bindings.LDKSignInvoiceRequestFn arg) {
+               super(bindings.LDKSignInvoiceRequestFn_new(arg));
+               this.ptrs_to.add(arg);
+               this.bindings_instance = arg;
+       }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.SignInvoiceRequestFn_free(ptr); } super.finalize();
+       }
+       /**
+        * Destroys the object, freeing associated resources. After this call, any access
+        * to this object may result in a SEGFAULT or worse.
+        *
+        * You should generally NEVER call this method. You should let the garbage collector
+        * do this for you when it finalizes objects. However, it may be useful for types
+        * which represent locks and should be closed immediately to avoid holding locks
+        * until the GC runs.
+        */
+       public void destroy() {
+               if (ptr != 0) { bindings.SignInvoiceRequestFn_free(ptr); }
+               ptr = 0;
+       }
+       public static interface SignInvoiceRequestFnInterface {
+               /**
+                * Signs a [`TaggedHash`] computed over the merkle root of `message`'s TLV stream.
+                */
+               Result_SchnorrSignatureNoneZ sign_invoice_request(UnsignedInvoiceRequest message);
+       }
+       private static class LDKSignInvoiceRequestFnHolder { SignInvoiceRequestFn held; }
+       public static SignInvoiceRequestFn new_impl(SignInvoiceRequestFnInterface arg) {
+               final LDKSignInvoiceRequestFnHolder impl_holder = new LDKSignInvoiceRequestFnHolder();
+               impl_holder.held = new SignInvoiceRequestFn(new bindings.LDKSignInvoiceRequestFn() {
+                       @Override public long sign_invoice_request(long message) {
+                               org.ldk.structs.UnsignedInvoiceRequest message_hu_conv = null; if (message < 0 || message > 4096) { message_hu_conv = new org.ldk.structs.UnsignedInvoiceRequest(null, message); }
+                               Result_SchnorrSignatureNoneZ ret = arg.sign_invoice_request(message_hu_conv);
+                               Reference.reachabilityFence(arg);
+                               long result = ret.clone_ptr();
+                               return result;
+                       }
+               });
+               return impl_holder.held;
+       }
+       /**
+        * Signs a [`TaggedHash`] computed over the merkle root of `message`'s TLV stream.
+        */
+       public Result_SchnorrSignatureNoneZ sign_invoice_request(org.ldk.structs.UnsignedInvoiceRequest message) {
+               long ret = bindings.SignInvoiceRequestFn_sign_invoice_request(this.ptr, message.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(message);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_SchnorrSignatureNoneZ ret_hu_conv = Result_SchnorrSignatureNoneZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(message); };
+               return ret_hu_conv;
+       }
+
+}
index 2ef832855ee7672a470ebc96317534423e91be3b..70437b37dd3ca5ef1a1bdf28de70435805bdd40f 100644 (file)
@@ -95,7 +95,7 @@ public class SignOrCreationError extends CommonBase {
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.SignOrCreationError b) {
-               boolean ret = bindings.SignOrCreationError_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.SignOrCreationError_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
index 4859f660d4ba479c3041116475e1688c9d77a386..6bc7ce238b0363efe668e5e3e6182c8b0f0ee054 100644 (file)
@@ -30,7 +30,7 @@ public class SignedRawBolt11Invoice extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.SignedRawBolt11Invoice b) {
-               boolean ret = bindings.SignedRawBolt11Invoice_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.SignedRawBolt11Invoice_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 4de9147c3fe5854b0d548f22c3d6e698db7fa511..9a4cac9e6e271cd01d4183a55a1a07e4d0ce5398 100644 (file)
@@ -114,19 +114,19 @@ public class SignerProvider extends CommonBase {
                        @Override public long read_chan_signer(byte[] reader) {
                                Result_WriteableEcdsaChannelSignerDecodeErrorZ ret = arg.read_chan_signer(reader);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long get_destination_script(byte[] channel_keys_id) {
                                Result_CVec_u8ZNoneZ ret = arg.get_destination_script(channel_keys_id);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long get_shutdown_scriptpubkey() {
                                Result_ShutdownScriptNoneZ ret = arg.get_shutdown_scriptpubkey();
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                });
index 60bce88f5aec3cbce0e37e8ef3b73b4e98a1b1a8..189e2bb08afd6b8ca31213db7c9dc73d6c67f769 100644 (file)
@@ -25,7 +25,7 @@ public class Sleeper extends CommonBase {
         * Constructs a new sleeper from one future, allowing blocking on it.
         */
        public static Sleeper from_single_future(org.ldk.structs.Future future) {
-               long ret = bindings.Sleeper_from_single_future(future == null ? 0 : future.ptr);
+               long ret = bindings.Sleeper_from_single_future(future.ptr);
                Reference.reachabilityFence(future);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Sleeper ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Sleeper(null, ret); }
@@ -38,7 +38,7 @@ public class Sleeper extends CommonBase {
         * Constructs a new sleeper from two futures, allowing blocking on both at once.
         */
        public static Sleeper from_two_futures(org.ldk.structs.Future fut_a, org.ldk.structs.Future fut_b) {
-               long ret = bindings.Sleeper_from_two_futures(fut_a == null ? 0 : fut_a.ptr, fut_b == null ? 0 : fut_b.ptr);
+               long ret = bindings.Sleeper_from_two_futures(fut_a.ptr, fut_b.ptr);
                Reference.reachabilityFence(fut_a);
                Reference.reachabilityFence(fut_b);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -53,12 +53,20 @@ public class Sleeper extends CommonBase {
         * Constructs a new sleeper on many futures, allowing blocking on all at once.
         */
        public static Sleeper of(Future[] futures) {
-               long ret = bindings.Sleeper_new(futures != null ? Arrays.stream(futures).mapToLong(futures_conv_8 -> futures_conv_8 == null ? 0 : futures_conv_8.ptr).toArray() : null);
+               long ret = bindings.Sleeper_new(futures != null ? Arrays.stream(futures).mapToLong(futures_conv_8 -> futures_conv_8.ptr).toArray() : null);
                Reference.reachabilityFence(futures);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Sleeper ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Sleeper(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
-               for (Future futures_conv_8: futures) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(futures_conv_8); }; };
+               for (Future futures_conv_8: futures) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(futures_conv_8); };
+               // Due to rust's strict-ownership memory model, in some cases we need to "move"
+               // an object to pass exclusive ownership to the function being called.
+               // In most cases, we avoid ret_hu_conv being visible in GC'd languages by cloning the object
+               // at the FFI layer, creating a new object which Rust can claim ownership of
+               // However, in some cases (eg here), there is no way to clone an object, and thus
+               // we actually have to pass full ownership to Rust.
+               // Thus, after ret_hu_conv call, futures_conv_8 is reset to null and is now a dummy object.
+               futures_conv_8.ptr = 0;; };
                return ret_hu_conv;
        }
 
index 4b108bc33fdc90e3be7643c0629e0a1fdf25a1ce..0582f9ff8fb2529dc15d2b98572748643b9d4ef4 100644 (file)
@@ -215,7 +215,7 @@ public class SocketAddress extends CommonBase {
         * Utility method to constructs a new Hostname-variant SocketAddress
         */
        public static SocketAddress hostname(org.ldk.structs.Hostname hostname, short port) {
-               long ret = bindings.SocketAddress_hostname(hostname == null ? 0 : hostname.ptr, port);
+               long ret = bindings.SocketAddress_hostname(hostname.ptr, port);
                Reference.reachabilityFence(hostname);
                Reference.reachabilityFence(port);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -242,7 +242,7 @@ public class SocketAddress extends CommonBase {
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.SocketAddress b) {
-               boolean ret = bindings.SocketAddress_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.SocketAddress_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
index cdb05d5e9d32d772ea0ca3572c6e7ace455cd384..31f484616148c1f32d4c6395522b1363bcea51f8 100644 (file)
@@ -186,7 +186,7 @@ public class SpendableOutputDescriptor extends CommonBase {
         * Utility method to constructs a new StaticOutput-variant SpendableOutputDescriptor
         */
        public static SpendableOutputDescriptor static_output(org.ldk.structs.OutPoint outpoint, org.ldk.structs.TxOut output, byte[] channel_keys_id) {
-               long ret = bindings.SpendableOutputDescriptor_static_output(outpoint == null ? 0 : outpoint.ptr, output.ptr, InternalUtils.check_arr_len(channel_keys_id, 32));
+               long ret = bindings.SpendableOutputDescriptor_static_output(outpoint.ptr, output.ptr, InternalUtils.check_arr_len(channel_keys_id, 32));
                Reference.reachabilityFence(outpoint);
                Reference.reachabilityFence(output);
                Reference.reachabilityFence(channel_keys_id);
@@ -201,7 +201,7 @@ public class SpendableOutputDescriptor extends CommonBase {
         * Utility method to constructs a new DelayedPaymentOutput-variant SpendableOutputDescriptor
         */
        public static SpendableOutputDescriptor delayed_payment_output(org.ldk.structs.DelayedPaymentOutputDescriptor a) {
-               long ret = bindings.SpendableOutputDescriptor_delayed_payment_output(a == null ? 0 : a.ptr);
+               long ret = bindings.SpendableOutputDescriptor_delayed_payment_output(a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.SpendableOutputDescriptor ret_hu_conv = org.ldk.structs.SpendableOutputDescriptor.constr_from_ptr(ret);
@@ -214,7 +214,7 @@ public class SpendableOutputDescriptor extends CommonBase {
         * Utility method to constructs a new StaticPaymentOutput-variant SpendableOutputDescriptor
         */
        public static SpendableOutputDescriptor static_payment_output(org.ldk.structs.StaticPaymentOutputDescriptor a) {
-               long ret = bindings.SpendableOutputDescriptor_static_payment_output(a == null ? 0 : a.ptr);
+               long ret = bindings.SpendableOutputDescriptor_static_payment_output(a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.SpendableOutputDescriptor ret_hu_conv = org.ldk.structs.SpendableOutputDescriptor.constr_from_ptr(ret);
@@ -240,7 +240,7 @@ public class SpendableOutputDescriptor extends CommonBase {
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public boolean eq(org.ldk.structs.SpendableOutputDescriptor b) {
-               boolean ret = bindings.SpendableOutputDescriptor_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.SpendableOutputDescriptor_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                return ret;
diff --git a/src/main/java/org/ldk/structs/SpendingDelay.java b/src/main/java/org/ldk/structs/SpendingDelay.java
new file mode 100644 (file)
index 0000000..334beee
--- /dev/null
@@ -0,0 +1,103 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * A `enum` signalling to the [`OutputSweeper`] that it should delay spending an output until a
+ * future block height is reached.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class SpendingDelay extends CommonBase {
+       private SpendingDelay(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.SpendingDelay_free(ptr); }
+       }
+       static SpendingDelay constr_from_ptr(long ptr) {
+               bindings.LDKSpendingDelay raw_val = bindings.LDKSpendingDelay_ref_from_ptr(ptr);
+               if (raw_val.getClass() == bindings.LDKSpendingDelay.Relative.class) {
+                       return new Relative(ptr, (bindings.LDKSpendingDelay.Relative)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKSpendingDelay.Absolute.class) {
+                       return new Absolute(ptr, (bindings.LDKSpendingDelay.Absolute)raw_val);
+               }
+               assert false; return null; // Unreachable without extending the (internal) bindings interface
+       }
+
+       /**
+        * A relative delay indicating we shouldn't spend the output before `cur_height + num_blocks`
+        * is reached.
+        */
+       public final static class Relative extends SpendingDelay {
+               /**
+                * The number of blocks until we'll generate and broadcast the spending transaction.
+               */
+               public final int num_blocks;
+               private Relative(long ptr, bindings.LDKSpendingDelay.Relative obj) {
+                       super(null, ptr);
+                       this.num_blocks = obj.num_blocks;
+               }
+       }
+       /**
+        * An absolute delay indicating we shouldn't spend the output before `height` is reached.
+        */
+       public final static class Absolute extends SpendingDelay {
+               /**
+                * The height at which we'll generate and broadcast the spending transaction.
+               */
+               public final int height;
+               private Absolute(long ptr, bindings.LDKSpendingDelay.Absolute obj) {
+                       super(null, ptr);
+                       this.height = obj.height;
+               }
+       }
+       long clone_ptr() {
+               long ret = bindings.SpendingDelay_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the SpendingDelay
+        */
+       public SpendingDelay clone() {
+               long ret = bindings.SpendingDelay_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.SpendingDelay ret_hu_conv = org.ldk.structs.SpendingDelay.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new Relative-variant SpendingDelay
+        */
+       public static SpendingDelay relative(int num_blocks) {
+               long ret = bindings.SpendingDelay_relative(num_blocks);
+               Reference.reachabilityFence(num_blocks);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.SpendingDelay ret_hu_conv = org.ldk.structs.SpendingDelay.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Utility method to constructs a new Absolute-variant SpendingDelay
+        */
+       public static SpendingDelay absolute(int height) {
+               long ret = bindings.SpendingDelay_absolute(height);
+               Reference.reachabilityFence(height);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.SpendingDelay ret_hu_conv = org.ldk.structs.SpendingDelay.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+}
index 0f4e26a864a25045b240b3e16c921b22953b63fb..5dae71a78d5c37c485816361e14183ea407cc23c 100644 (file)
@@ -23,19 +23,23 @@ public class Splice extends CommonBase {
        /**
         * The channel ID where splicing is intended
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.Splice_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.Splice_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID where splicing is intended
         */
-       public void set_channel_id(byte[] val) {
-               bindings.Splice_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.Splice_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -133,8 +137,8 @@ public class Splice extends CommonBase {
        /**
         * Constructs a new Splice given each field
         */
-       public static Splice of(byte[] channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, int funding_feerate_perkw_arg, int locktime_arg, byte[] funding_pubkey_arg) {
-               long ret = bindings.Splice_new(InternalUtils.check_arr_len(channel_id_arg, 32), InternalUtils.check_arr_len(chain_hash_arg, 32), relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33));
+       public static Splice of(org.ldk.structs.ChannelId channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, int funding_feerate_perkw_arg, int locktime_arg, byte[] funding_pubkey_arg) {
+               long ret = bindings.Splice_new(channel_id_arg.ptr, InternalUtils.check_arr_len(chain_hash_arg, 32), relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33));
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(chain_hash_arg);
                Reference.reachabilityFence(relative_satoshis_arg);
@@ -144,6 +148,7 @@ public class Splice extends CommonBase {
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Splice ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Splice(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                return ret_hu_conv;
        }
 
@@ -171,7 +176,7 @@ public class Splice extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.Splice b) {
-               boolean ret = bindings.Splice_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Splice_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index c0519f6b48352bde689fb4196a32fda401d12d33..5de9488e340fd2912feefc356c5001b607877037 100644 (file)
@@ -23,19 +23,23 @@ public class SpliceAck extends CommonBase {
        /**
         * The channel ID where splicing is intended
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.SpliceAck_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.SpliceAck_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID where splicing is intended
         */
-       public void set_channel_id(byte[] val) {
-               bindings.SpliceAck_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.SpliceAck_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -97,8 +101,8 @@ public class SpliceAck extends CommonBase {
        /**
         * Constructs a new SpliceAck given each field
         */
-       public static SpliceAck of(byte[] channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, byte[] funding_pubkey_arg) {
-               long ret = bindings.SpliceAck_new(InternalUtils.check_arr_len(channel_id_arg, 32), InternalUtils.check_arr_len(chain_hash_arg, 32), relative_satoshis_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33));
+       public static SpliceAck of(org.ldk.structs.ChannelId channel_id_arg, byte[] chain_hash_arg, long relative_satoshis_arg, byte[] funding_pubkey_arg) {
+               long ret = bindings.SpliceAck_new(channel_id_arg.ptr, InternalUtils.check_arr_len(chain_hash_arg, 32), relative_satoshis_arg, InternalUtils.check_arr_len(funding_pubkey_arg, 33));
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(chain_hash_arg);
                Reference.reachabilityFence(relative_satoshis_arg);
@@ -106,6 +110,7 @@ public class SpliceAck extends CommonBase {
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.SpliceAck ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.SpliceAck(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                return ret_hu_conv;
        }
 
@@ -133,7 +138,7 @@ public class SpliceAck extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.SpliceAck b) {
-               boolean ret = bindings.SpliceAck_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.SpliceAck_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index c36c7291e33f8ca4e640baebb589d9f630432854..84233bc518f0c1c8d0387e4e82c8194f9ecfacec 100644 (file)
@@ -23,30 +23,35 @@ public class SpliceLocked extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.SpliceLocked_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.SpliceLocked_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.SpliceLocked_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.SpliceLocked_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
         * Constructs a new SpliceLocked given each field
         */
-       public static SpliceLocked of(byte[] channel_id_arg) {
-               long ret = bindings.SpliceLocked_new(InternalUtils.check_arr_len(channel_id_arg, 32));
+       public static SpliceLocked of(org.ldk.structs.ChannelId channel_id_arg) {
+               long ret = bindings.SpliceLocked_new(channel_id_arg.ptr);
                Reference.reachabilityFence(channel_id_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.SpliceLocked ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.SpliceLocked(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                return ret_hu_conv;
        }
 
@@ -74,7 +79,7 @@ public class SpliceLocked extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.SpliceLocked b) {
-               boolean ret = bindings.SpliceLocked_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.SpliceLocked_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 356bc04534a1a6febe140026056d6bebf7a4d272..4a82daa94adbb7c3f0c7a885f2ca9ac2653ef96e 100644 (file)
@@ -38,7 +38,7 @@ public class StaticPaymentOutputDescriptor extends CommonBase {
         * The outpoint which is spendable.
         */
        public void set_outpoint(org.ldk.structs.OutPoint val) {
-               bindings.StaticPaymentOutputDescriptor_set_outpoint(this.ptr, val == null ? 0 : val.ptr);
+               bindings.StaticPaymentOutputDescriptor_set_outpoint(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -141,7 +141,7 @@ public class StaticPaymentOutputDescriptor extends CommonBase {
         * Note that channel_transaction_parameters_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public static StaticPaymentOutputDescriptor of(org.ldk.structs.OutPoint outpoint_arg, org.ldk.structs.TxOut output_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg, @Nullable org.ldk.structs.ChannelTransactionParameters channel_transaction_parameters_arg) {
-               long ret = bindings.StaticPaymentOutputDescriptor_new(outpoint_arg == null ? 0 : outpoint_arg.ptr, output_arg.ptr, InternalUtils.check_arr_len(channel_keys_id_arg, 32), channel_value_satoshis_arg, channel_transaction_parameters_arg == null ? 0 : channel_transaction_parameters_arg.ptr);
+               long ret = bindings.StaticPaymentOutputDescriptor_new(outpoint_arg.ptr, output_arg.ptr, InternalUtils.check_arr_len(channel_keys_id_arg, 32), channel_value_satoshis_arg, channel_transaction_parameters_arg == null ? 0 : channel_transaction_parameters_arg.ptr);
                Reference.reachabilityFence(outpoint_arg);
                Reference.reachabilityFence(output_arg);
                Reference.reachabilityFence(channel_keys_id_arg);
@@ -191,7 +191,7 @@ public class StaticPaymentOutputDescriptor extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.StaticPaymentOutputDescriptor b) {
-               boolean ret = bindings.StaticPaymentOutputDescriptor_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.StaticPaymentOutputDescriptor_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index be437225b41c633a3b6cf187dfde6beecb271b2d..2fd33917aab64181f17eeb01fe03deb33a0bc01f 100644 (file)
@@ -23,19 +23,23 @@ public class Stfu extends CommonBase {
        /**
         * The channel ID where quiescence is intended
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.Stfu_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.Stfu_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID where quiescence is intended
         */
-       public void set_channel_id(byte[] val) {
-               bindings.Stfu_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.Stfu_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -59,13 +63,14 @@ public class Stfu extends CommonBase {
        /**
         * Constructs a new Stfu given each field
         */
-       public static Stfu of(byte[] channel_id_arg, byte initiator_arg) {
-               long ret = bindings.Stfu_new(InternalUtils.check_arr_len(channel_id_arg, 32), initiator_arg);
+       public static Stfu of(org.ldk.structs.ChannelId channel_id_arg, byte initiator_arg) {
+               long ret = bindings.Stfu_new(channel_id_arg.ptr, initiator_arg);
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(initiator_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Stfu ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Stfu(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                return ret_hu_conv;
        }
 
@@ -93,7 +98,7 @@ public class Stfu extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.Stfu b) {
-               boolean ret = bindings.Stfu_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Stfu_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 84ee50f9af30a2ca08ff5d0a0bd7c55e1e37e7fe..1af008aa46e411e1592d82f1ae6c77597fa48f55 100644 (file)
@@ -79,7 +79,7 @@ public class ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ extends C
         * Creates a new C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ from the contained elements.
         */
        public static ThreeTuple_ChannelAnnouncementChannelUpdateChannelUpdateZ of(org.ldk.structs.ChannelAnnouncement a, org.ldk.structs.ChannelUpdate b, org.ldk.structs.ChannelUpdate c) {
-               long ret = bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a == null ? 0 : a.ptr, b == null ? 0 : b.ptr, c == null ? 0 : c.ptr);
+               long ret = bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a.ptr, b.ptr, c.ptr);
                Reference.reachabilityFence(a);
                Reference.reachabilityFence(b);
                Reference.reachabilityFence(c);
index 65ae23c5de5d57ac566f31f516b38ae5dd704a02..5249a09c30a327f5cd6ed8620968ce4c837a894a 100644 (file)
@@ -79,7 +79,7 @@ public class ThreeTuple_OffersMessageDestinationBlindedPathZ extends CommonBase
         * Creates a new C3Tuple_OffersMessageDestinationBlindedPathZ from the contained elements.
         */
        public static ThreeTuple_OffersMessageDestinationBlindedPathZ of(org.ldk.structs.OffersMessage a, org.ldk.structs.Destination b, org.ldk.structs.BlindedPath c) {
-               long ret = bindings.C3Tuple_OffersMessageDestinationBlindedPathZ_new(a.ptr, b.ptr, c == null ? 0 : c.ptr);
+               long ret = bindings.C3Tuple_OffersMessageDestinationBlindedPathZ_new(a.ptr, b.ptr, c.ptr);
                Reference.reachabilityFence(a);
                Reference.reachabilityFence(b);
                Reference.reachabilityFence(c);
index f9c41bf68c916252d5c8e96655615532ea38b5d0..fb0341ec4d6efa0f18466cc05162fd1d61585b49 100644 (file)
@@ -79,7 +79,7 @@ public class ThreeTuple_OnionMessageContentsDestinationBlindedPathZ extends Comm
         * Creates a new C3Tuple_OnionMessageContentsDestinationBlindedPathZ from the contained elements.
         */
        public static ThreeTuple_OnionMessageContentsDestinationBlindedPathZ of(org.ldk.structs.OnionMessageContents a, org.ldk.structs.Destination b, org.ldk.structs.BlindedPath c) {
-               long ret = bindings.C3Tuple_OnionMessageContentsDestinationBlindedPathZ_new(a.ptr, b.ptr, c == null ? 0 : c.ptr);
+               long ret = bindings.C3Tuple_OnionMessageContentsDestinationBlindedPathZ_new(a.ptr, b.ptr, c.ptr);
                Reference.reachabilityFence(a);
                Reference.reachabilityFence(b);
                Reference.reachabilityFence(c);
diff --git a/src/main/java/org/ldk/structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.java b/src/main/java/org/ldk/structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.java
deleted file mode 100644 (file)
index 0b7ac8c..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-package org.ldk.structs;
-
-import org.ldk.impl.bindings;
-import org.ldk.enums.*;
-import org.ldk.util.*;
-import java.util.Arrays;
-import java.lang.ref.Reference;
-import javax.annotation.Nullable;
-
-
-/**
- * A Tuple
- */
-@SuppressWarnings("unchecked") // We correctly assign various generic arrays
-public class ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ extends CommonBase {
-       ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(Object _dummy, long ptr) { super(ptr); }
-       @Override @SuppressWarnings("deprecation")
-       protected void finalize() throws Throwable {
-               super.finalize();
-               if (ptr != 0) { bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(ptr); }
-       }
-
-       /**
-        * 
-        */
-       public OutPoint get_a() {
-               long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(this.ptr);
-               Reference.reachabilityFence(this);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutPoint(null, ret); }
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
-               return ret_hu_conv;
-       }
-
-       /**
-        * 
-        */
-       public MonitorEvent[] get_b() {
-               long[] ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(this.ptr);
-               Reference.reachabilityFence(this);
-               int ret_conv_14_len = ret.length;
-               MonitorEvent[] ret_conv_14_arr = new MonitorEvent[ret_conv_14_len];
-               for (int o = 0; o < ret_conv_14_len; o++) {
-                       long ret_conv_14 = ret[o];
-                       org.ldk.structs.MonitorEvent ret_conv_14_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret_conv_14);
-                       if (ret_conv_14_hu_conv != null) { ret_conv_14_hu_conv.ptrs_to.add(this); };
-                       ret_conv_14_arr[o] = ret_conv_14_hu_conv;
-               }
-               return ret_conv_14_arr;
-       }
-
-       /**
-        * 
-        */
-       public byte[] get_c() {
-               byte[] ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       long clone_ptr() {
-               long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * Creates a new tuple which has the same data as `orig`
-        * but with all dynamically-allocated buffers duplicated in new buffers.
-        */
-       public ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ clone() {
-               long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(this.ptr);
-               Reference.reachabilityFence(this);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ ret_hu_conv = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(null, ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
-               return ret_hu_conv;
-       }
-
-       /**
-        * Creates a new C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ from the contained elements.
-        */
-       public static ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ of(org.ldk.structs.OutPoint a, MonitorEvent[] b, byte[] c) {
-               long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(a == null ? 0 : a.ptr, b != null ? Arrays.stream(b).mapToLong(b_conv_14 -> b_conv_14.ptr).toArray() : null, InternalUtils.check_arr_len(c, 33));
-               Reference.reachabilityFence(a);
-               Reference.reachabilityFence(b);
-               Reference.reachabilityFence(c);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ ret_hu_conv = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(null, ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); };
-               for (MonitorEvent b_conv_14: b) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_conv_14); }; };
-               return ret_hu_conv;
-       }
-
-}
index da6d5a6f27272c1e5fbf9dd5a94c41864c110f52..16877fcc795d28dba0864b846dc7f0fbdec5344d 100644 (file)
@@ -76,7 +76,7 @@ public class ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ exten
         * Creates a new C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ from the contained elements.
         */
        public static ThreeTuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ of(byte[] a, org.ldk.structs.OnionMessage b, org.ldk.structs.Option_CVec_SocketAddressZZ c) {
-               long ret = bindings.C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_new(InternalUtils.check_arr_len(a, 33), b == null ? 0 : b.ptr, c.ptr);
+               long ret = bindings.C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_new(InternalUtils.check_arr_len(a, 33), b.ptr, c.ptr);
                Reference.reachabilityFence(a);
                Reference.reachabilityFence(b);
                Reference.reachabilityFence(c);
index 87d63450306155505acd8bc28f15e8e9ce758daf..b90d91e18ed4bed84abc1a778585510ef486d25c 100644 (file)
@@ -76,7 +76,7 @@ public class ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ extends Com
         * Creates a new C3Tuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ from the contained elements.
         */
        public static ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ of(org.ldk.structs.RawBolt11Invoice a, byte[] b, org.ldk.structs.Bolt11InvoiceSignature c) {
-               long ret = bindings.C3Tuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ_new(a == null ? 0 : a.ptr, InternalUtils.check_arr_len(b, 32), c == null ? 0 : c.ptr);
+               long ret = bindings.C3Tuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ_new(a.ptr, InternalUtils.check_arr_len(b, 32), c.ptr);
                Reference.reachabilityFence(a);
                Reference.reachabilityFence(b);
                Reference.reachabilityFence(c);
index 127a868cfb99f3167455836cd4572f4a82c8923d..936d75ae24301faac9e89028c2edb945fdca1b12 100644 (file)
@@ -76,7 +76,7 @@ public class ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ exten
         * Creates a new C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ from the contained elements.
         */
        public static ThreeTuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ of(byte[] a, org.ldk.structs.RecipientOnionFields b, org.ldk.structs.RouteParameters c) {
-               long ret = bindings.C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(InternalUtils.check_arr_len(a, 32), b == null ? 0 : b.ptr, c == null ? 0 : c.ptr);
+               long ret = bindings.C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(InternalUtils.check_arr_len(a, 32), b.ptr, c.ptr);
                Reference.reachabilityFence(a);
                Reference.reachabilityFence(b);
                Reference.reachabilityFence(c);
diff --git a/src/main/java/org/ldk/structs/TrackedSpendableOutput.java b/src/main/java/org/ldk/structs/TrackedSpendableOutput.java
new file mode 100644 (file)
index 0000000..5cd542a
--- /dev/null
@@ -0,0 +1,182 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * The state of a spendable output currently tracked by an [`OutputSweeper`].
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TrackedSpendableOutput extends CommonBase {
+       TrackedSpendableOutput(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.TrackedSpendableOutput_free(ptr); }
+       }
+
+       /**
+        * The tracked output descriptor.
+        */
+       public SpendableOutputDescriptor get_descriptor() {
+               long ret = bindings.TrackedSpendableOutput_get_descriptor(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.SpendableOutputDescriptor ret_hu_conv = org.ldk.structs.SpendableOutputDescriptor.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * The tracked output descriptor.
+        */
+       public void set_descriptor(org.ldk.structs.SpendableOutputDescriptor val) {
+               bindings.TrackedSpendableOutput_set_descriptor(this.ptr, val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
+       }
+
+       /**
+        * The channel this output belongs to.
+        * 
+        * Will be `None` if no `channel_id` was given to [`OutputSweeper::track_spendable_outputs`]
+        * 
+        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       @Nullable
+       public ChannelId get_channel_id() {
+               long ret = bindings.TrackedSpendableOutput_get_channel_id(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * The channel this output belongs to.
+        * 
+        * Will be `None` if no `channel_id` was given to [`OutputSweeper::track_spendable_outputs`]
+        * 
+        * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       public void set_channel_id(@Nullable org.ldk.structs.ChannelId val) {
+               bindings.TrackedSpendableOutput_set_channel_id(this.ptr, val == null ? 0 : val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
+       }
+
+       /**
+        * The current status of the output spend.
+        */
+       public OutputSpendStatus get_status() {
+               long ret = bindings.TrackedSpendableOutput_get_status(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.OutputSpendStatus ret_hu_conv = org.ldk.structs.OutputSpendStatus.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * The current status of the output spend.
+        */
+       public void set_status(org.ldk.structs.OutputSpendStatus val) {
+               bindings.TrackedSpendableOutput_set_status(this.ptr, val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
+       }
+
+       /**
+        * Constructs a new TrackedSpendableOutput given each field
+        * 
+        * Note that channel_id_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       public static TrackedSpendableOutput of(org.ldk.structs.SpendableOutputDescriptor descriptor_arg, @Nullable org.ldk.structs.ChannelId channel_id_arg, org.ldk.structs.OutputSpendStatus status_arg) {
+               long ret = bindings.TrackedSpendableOutput_new(descriptor_arg.ptr, channel_id_arg == null ? 0 : channel_id_arg.ptr, status_arg.ptr);
+               Reference.reachabilityFence(descriptor_arg);
+               Reference.reachabilityFence(channel_id_arg);
+               Reference.reachabilityFence(status_arg);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.TrackedSpendableOutput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TrackedSpendableOutput(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(descriptor_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(status_arg); };
+               return ret_hu_conv;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.TrackedSpendableOutput_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the TrackedSpendableOutput
+        */
+       public TrackedSpendableOutput clone() {
+               long ret = bindings.TrackedSpendableOutput_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.TrackedSpendableOutput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TrackedSpendableOutput(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if two TrackedSpendableOutputs 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.
+        */
+       public boolean eq(org.ldk.structs.TrackedSpendableOutput b) {
+               boolean ret = bindings.TrackedSpendableOutput_eq(this.ptr, b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof TrackedSpendableOutput)) return false;
+               return this.eq((TrackedSpendableOutput)o);
+       }
+       /**
+        * Returns whether the output is spent in the given transaction.
+        */
+       public boolean is_spent_in(byte[] tx) {
+               boolean ret = bindings.TrackedSpendableOutput_is_spent_in(this.ptr, tx);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(tx);
+               return ret;
+       }
+
+       /**
+        * Serialize the TrackedSpendableOutput object into a byte array which can be read by TrackedSpendableOutput_read
+        */
+       public byte[] write() {
+               byte[] ret = bindings.TrackedSpendableOutput_write(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Read a TrackedSpendableOutput from a byte array, created by TrackedSpendableOutput_write
+        */
+       public static Result_TrackedSpendableOutputDecodeErrorZ read(byte[] ser) {
+               long ret = bindings.TrackedSpendableOutput_read(ser);
+               Reference.reachabilityFence(ser);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_TrackedSpendableOutputDecodeErrorZ ret_hu_conv = Result_TrackedSpendableOutputDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/TrampolineOnionPacket.java b/src/main/java/org/ldk/structs/TrampolineOnionPacket.java
new file mode 100644 (file)
index 0000000..8cb46b5
--- /dev/null
@@ -0,0 +1,168 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * BOLT 4 onion packet including hop data for the next peer.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TrampolineOnionPacket extends CommonBase {
+       TrampolineOnionPacket(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.TrampolineOnionPacket_free(ptr); }
+       }
+
+       /**
+        * Bolt 04 version number
+        */
+       public byte get_version() {
+               byte ret = bindings.TrampolineOnionPacket_get_version(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Bolt 04 version number
+        */
+       public void set_version(byte val) {
+               bindings.TrampolineOnionPacket_set_version(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * A random sepc256k1 point, used to build the ECDH shared secret to decrypt hop_data
+        */
+       public byte[] get_public_key() {
+               byte[] ret = bindings.TrampolineOnionPacket_get_public_key(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * A random sepc256k1 point, used to build the ECDH shared secret to decrypt hop_data
+        */
+       public void set_public_key(byte[] val) {
+               bindings.TrampolineOnionPacket_set_public_key(this.ptr, InternalUtils.check_arr_len(val, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * Encrypted payload for the next hop
+        * 
+        * Returns a copy of the field.
+        */
+       public byte[] get_hop_data() {
+               byte[] ret = bindings.TrampolineOnionPacket_get_hop_data(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Encrypted payload for the next hop
+        */
+       public void set_hop_data(byte[] val) {
+               bindings.TrampolineOnionPacket_set_hop_data(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * HMAC to verify the integrity of hop_data
+        */
+       public byte[] get_hmac() {
+               byte[] ret = bindings.TrampolineOnionPacket_get_hmac(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * HMAC to verify the integrity of hop_data
+        */
+       public void set_hmac(byte[] val) {
+               bindings.TrampolineOnionPacket_set_hmac(this.ptr, InternalUtils.check_arr_len(val, 32));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * Constructs a new TrampolineOnionPacket given each field
+        */
+       public static TrampolineOnionPacket of(byte version_arg, byte[] public_key_arg, byte[] hop_data_arg, byte[] hmac_arg) {
+               long ret = bindings.TrampolineOnionPacket_new(version_arg, InternalUtils.check_arr_len(public_key_arg, 33), hop_data_arg, InternalUtils.check_arr_len(hmac_arg, 32));
+               Reference.reachabilityFence(version_arg);
+               Reference.reachabilityFence(public_key_arg);
+               Reference.reachabilityFence(hop_data_arg);
+               Reference.reachabilityFence(hmac_arg);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.TrampolineOnionPacket ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TrampolineOnionPacket(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.TrampolineOnionPacket_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the TrampolineOnionPacket
+        */
+       public TrampolineOnionPacket clone() {
+               long ret = bindings.TrampolineOnionPacket_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.TrampolineOnionPacket ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TrampolineOnionPacket(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Generates a non-cryptographic 64-bit hash of the TrampolineOnionPacket.
+        */
+       public long hash() {
+               long ret = bindings.TrampolineOnionPacket_hash(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       @Override public int hashCode() {
+               return (int)this.hash();
+       }
+       /**
+        * Checks if two TrampolineOnionPackets 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.
+        */
+       public boolean eq(org.ldk.structs.TrampolineOnionPacket b) {
+               boolean ret = bindings.TrampolineOnionPacket_eq(this.ptr, b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof TrampolineOnionPacket)) return false;
+               return this.eq((TrampolineOnionPacket)o);
+       }
+       /**
+        * Serialize the TrampolineOnionPacket object into a byte array which can be read by TrampolineOnionPacket_read
+        */
+       public byte[] write() {
+               byte[] ret = bindings.TrampolineOnionPacket_write(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+}
index ae82f09fcd5a32a26c6f5dd243df1bbf829cb86b..67fac554db955f9434d396c183112eaca5015429 100644 (file)
@@ -59,7 +59,7 @@ public class TransactionU16LenLimited extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.TransactionU16LenLimited b) {
-               boolean ret = bindings.TransactionU16LenLimited_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.TransactionU16LenLimited_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -92,6 +92,15 @@ public class TransactionU16LenLimited extends CommonBase {
                return ret;
        }
 
+       /**
+        * Returns a reference to the contained `Transaction`
+        */
+       public byte[] as_transaction() {
+               byte[] ret = bindings.TransactionU16LenLimited_as_transaction(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
        /**
         * Serialize the TransactionU16LenLimited object into a byte array which can be read by TransactionU16LenLimited_read
         */
index 9e7aa762aa85e60bb79c7e0c7093f9feedcd5e0c..7dbc8369496c4dd9526f3d4b5483a390ee57d927 100644 (file)
@@ -79,7 +79,7 @@ public class TrustedCommitmentTransaction extends CommonBase {
         * This function is only valid in the holder commitment context, it always uses EcdsaSighashType::All.
         */
        public Result_CVec_ECDSASignatureZNoneZ get_htlc_sigs(byte[] htlc_base_key, org.ldk.structs.DirectedChannelTransactionParameters channel_parameters, org.ldk.structs.EntropySource entropy_source) {
-               long ret = bindings.TrustedCommitmentTransaction_get_htlc_sigs(this.ptr, InternalUtils.check_arr_len(htlc_base_key, 32), channel_parameters == null ? 0 : channel_parameters.ptr, entropy_source.ptr);
+               long ret = bindings.TrustedCommitmentTransaction_get_htlc_sigs(this.ptr, InternalUtils.check_arr_len(htlc_base_key, 32), channel_parameters.ptr, entropy_source.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(htlc_base_key);
                Reference.reachabilityFence(channel_parameters);
diff --git a/src/main/java/org/ldk/structs/TwoTuple_BestBlockOutputSweeperZ.java b/src/main/java/org/ldk/structs/TwoTuple_BestBlockOutputSweeperZ.java
new file mode 100644 (file)
index 0000000..d145884
--- /dev/null
@@ -0,0 +1,76 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_BestBlockOutputSweeperZ extends CommonBase {
+       TwoTuple_BestBlockOutputSweeperZ(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.C2Tuple_BestBlockOutputSweeperZ_free(ptr); }
+       }
+
+       /**
+        * 
+        */
+       public BestBlock get_a() {
+               long ret = bindings.C2Tuple_BestBlockOutputSweeperZ_get_a(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.BestBlock ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BestBlock(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * 
+        */
+       public OutputSweeper get_b() {
+               long ret = bindings.C2Tuple_BestBlockOutputSweeperZ_get_b(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.OutputSweeper ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutputSweeper(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new C2Tuple_BestBlockOutputSweeperZ from the contained elements.
+        */
+       public static TwoTuple_BestBlockOutputSweeperZ of(org.ldk.structs.BestBlock a, BestBlock b_best_block, BroadcasterInterface b_broadcaster, FeeEstimator b_fee_estimator, Option_FilterZ b_chain_data_source, OutputSpender b_output_spender, ChangeDestinationSource b_change_destination_source, KVStore b_kv_store, Logger b_logger) {
+               long ret = bindings.C2Tuple_BestBlockOutputSweeperZ_new(a.ptr, bindings.OutputSweeper_new(b_best_block.ptr, b_broadcaster.ptr, b_fee_estimator.ptr, b_chain_data_source.ptr, b_output_spender.ptr, b_change_destination_source.ptr, b_kv_store.ptr, b_logger.ptr));
+               Reference.reachabilityFence(a);
+               Reference.reachabilityFence(b_best_block);
+               Reference.reachabilityFence(b_broadcaster);
+               Reference.reachabilityFence(b_fee_estimator);
+               Reference.reachabilityFence(b_chain_data_source);
+               Reference.reachabilityFence(b_output_spender);
+               Reference.reachabilityFence(b_change_destination_source);
+               Reference.reachabilityFence(b_kv_store);
+               Reference.reachabilityFence(b_logger);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               TwoTuple_BestBlockOutputSweeperZ ret_hu_conv = new TwoTuple_BestBlockOutputSweeperZ(null, ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_best_block); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_broadcaster); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_fee_estimator); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_chain_data_source); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_output_spender); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_change_destination_source); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_kv_store); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b_logger); };
+               return ret_hu_conv;
+       }
+
+}
index 4ae374996b726a6239b73ff4ed2d05e0e7214300..ff721e1a32d06e7172197be1317b611cbe123dee 100644 (file)
@@ -67,7 +67,7 @@ public class TwoTuple_BlindedPayInfoBlindedPathZ extends CommonBase {
         * Creates a new C2Tuple_BlindedPayInfoBlindedPathZ from the contained elements.
         */
        public static TwoTuple_BlindedPayInfoBlindedPathZ of(org.ldk.structs.BlindedPayInfo a, org.ldk.structs.BlindedPath b) {
-               long ret = bindings.C2Tuple_BlindedPayInfoBlindedPathZ_new(a == null ? 0 : a.ptr, b == null ? 0 : b.ptr);
+               long ret = bindings.C2Tuple_BlindedPayInfoBlindedPathZ_new(a.ptr, b.ptr);
                Reference.reachabilityFence(a);
                Reference.reachabilityFence(b);
                if (ret >= 0 && ret <= 4096) { return null; }
diff --git a/src/main/java/org/ldk/structs/TwoTuple_ChannelIdPublicKeyZ.java b/src/main/java/org/ldk/structs/TwoTuple_ChannelIdPublicKeyZ.java
new file mode 100644 (file)
index 0000000..c65fa92
--- /dev/null
@@ -0,0 +1,77 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_ChannelIdPublicKeyZ extends CommonBase {
+       TwoTuple_ChannelIdPublicKeyZ(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.C2Tuple_ChannelIdPublicKeyZ_free(ptr); }
+       }
+
+       /**
+        * 
+        */
+       public ChannelId get_a() {
+               long ret = bindings.C2Tuple_ChannelIdPublicKeyZ_get_a(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * 
+        */
+       public byte[] get_b() {
+               byte[] ret = bindings.C2Tuple_ChannelIdPublicKeyZ_get_b(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.C2Tuple_ChannelIdPublicKeyZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new tuple which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public TwoTuple_ChannelIdPublicKeyZ clone() {
+               long ret = bindings.C2Tuple_ChannelIdPublicKeyZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               TwoTuple_ChannelIdPublicKeyZ ret_hu_conv = new TwoTuple_ChannelIdPublicKeyZ(null, ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new C2Tuple_ChannelIdPublicKeyZ from the contained elements.
+        */
+       public static TwoTuple_ChannelIdPublicKeyZ of(org.ldk.structs.ChannelId a, byte[] b) {
+               long ret = bindings.C2Tuple_ChannelIdPublicKeyZ_new(a.ptr, InternalUtils.check_arr_len(b, 33));
+               Reference.reachabilityFence(a);
+               Reference.reachabilityFence(b);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               TwoTuple_ChannelIdPublicKeyZ ret_hu_conv = new TwoTuple_ChannelIdPublicKeyZ(null, ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); };
+               return ret_hu_conv;
+       }
+
+}
index 6fe50d48e631c45a385e812be48760058b2f4e58..4dffe5240c435fa1e250bc519a7a5ba5a78010f5 100644 (file)
@@ -72,7 +72,7 @@ public class TwoTuple_OutPointCVec_MonitorUpdateIdZZ extends CommonBase {
         * Creates a new C2Tuple_OutPointCVec_MonitorUpdateIdZZ from the contained elements.
         */
        public static TwoTuple_OutPointCVec_MonitorUpdateIdZZ of(org.ldk.structs.OutPoint a, MonitorUpdateId[] b) {
-               long ret = bindings.C2Tuple_OutPointCVec_MonitorUpdateIdZZ_new(a == null ? 0 : a.ptr, b != null ? Arrays.stream(b).mapToLong(b_conv_17 -> b_conv_17 == null ? 0 : b_conv_17.ptr).toArray() : null);
+               long ret = bindings.C2Tuple_OutPointCVec_MonitorUpdateIdZZ_new(a.ptr, b != null ? Arrays.stream(b).mapToLong(b_conv_17 -> b_conv_17.ptr).toArray() : null);
                Reference.reachabilityFence(a);
                Reference.reachabilityFence(b);
                if (ret >= 0 && ret <= 4096) { return null; }
index e8024d5e93ccf14cc1b6e2653f86a15e161dc577..ed0db076d96eb44e92add33b03741736e7973efc 100644 (file)
@@ -64,7 +64,7 @@ public class TwoTuple_OutPointCVec_u8ZZ extends CommonBase {
         * Creates a new C2Tuple_OutPointCVec_u8ZZ from the contained elements.
         */
        public static TwoTuple_OutPointCVec_u8ZZ of(org.ldk.structs.OutPoint a, byte[] b) {
-               long ret = bindings.C2Tuple_OutPointCVec_u8ZZ_new(a == null ? 0 : a.ptr, b);
+               long ret = bindings.C2Tuple_OutPointCVec_u8ZZ_new(a.ptr, b);
                Reference.reachabilityFence(a);
                Reference.reachabilityFence(b);
                if (ret >= 0 && ret <= 4096) { return null; }
diff --git a/src/main/java/org/ldk/structs/TwoTuple_OutPointChannelIdZ.java b/src/main/java/org/ldk/structs/TwoTuple_OutPointChannelIdZ.java
new file mode 100644 (file)
index 0000000..04e38fc
--- /dev/null
@@ -0,0 +1,81 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * A Tuple
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class TwoTuple_OutPointChannelIdZ extends CommonBase {
+       TwoTuple_OutPointChannelIdZ(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.C2Tuple_OutPointChannelIdZ_free(ptr); }
+       }
+
+       /**
+        * 
+        */
+       public OutPoint get_a() {
+               long ret = bindings.C2Tuple_OutPointChannelIdZ_get_a(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutPoint(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * 
+        */
+       public ChannelId get_b() {
+               long ret = bindings.C2Tuple_OutPointChannelIdZ_get_b(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       long clone_ptr() {
+               long ret = bindings.C2Tuple_OutPointChannelIdZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a new tuple which has the same data as `orig`
+        * but with all dynamically-allocated buffers duplicated in new buffers.
+        */
+       public TwoTuple_OutPointChannelIdZ clone() {
+               long ret = bindings.C2Tuple_OutPointChannelIdZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               TwoTuple_OutPointChannelIdZ ret_hu_conv = new TwoTuple_OutPointChannelIdZ(null, ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Creates a new C2Tuple_OutPointChannelIdZ from the contained elements.
+        */
+       public static TwoTuple_OutPointChannelIdZ of(org.ldk.structs.OutPoint a, org.ldk.structs.ChannelId b) {
+               long ret = bindings.C2Tuple_OutPointChannelIdZ_new(a.ptr, b.ptr);
+               Reference.reachabilityFence(a);
+               Reference.reachabilityFence(b);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               TwoTuple_OutPointChannelIdZ ret_hu_conv = new TwoTuple_OutPointChannelIdZ(null, ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b); };
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.java b/src/main/java/org/ldk/structs/TwoTuple_PublicKeyCOption_SocketAddressZZ.java
deleted file mode 100644 (file)
index 75f709a..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.ldk.structs;
-
-import org.ldk.impl.bindings;
-import org.ldk.enums.*;
-import org.ldk.util.*;
-import java.util.Arrays;
-import java.lang.ref.Reference;
-import javax.annotation.Nullable;
-
-
-/**
- * A Tuple
- */
-@SuppressWarnings("unchecked") // We correctly assign various generic arrays
-public class TwoTuple_PublicKeyCOption_SocketAddressZZ extends CommonBase {
-       TwoTuple_PublicKeyCOption_SocketAddressZZ(Object _dummy, long ptr) { super(ptr); }
-       @Override @SuppressWarnings("deprecation")
-       protected void finalize() throws Throwable {
-               super.finalize();
-               if (ptr != 0) { bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_free(ptr); }
-       }
-
-       /**
-        * 
-        */
-       public byte[] get_a() {
-               byte[] ret = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * 
-        */
-       public Option_SocketAddressZ get_b() {
-               long ret = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(this.ptr);
-               Reference.reachabilityFence(this);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Option_SocketAddressZ ret_hu_conv = org.ldk.structs.Option_SocketAddressZ.constr_from_ptr(ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
-               return ret_hu_conv;
-       }
-
-       long clone_ptr() {
-               long ret = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * Creates a new tuple which has the same data as `orig`
-        * but with all dynamically-allocated buffers duplicated in new buffers.
-        */
-       public TwoTuple_PublicKeyCOption_SocketAddressZZ clone() {
-               long ret = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(this.ptr);
-               Reference.reachabilityFence(this);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               TwoTuple_PublicKeyCOption_SocketAddressZZ ret_hu_conv = new TwoTuple_PublicKeyCOption_SocketAddressZZ(null, ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
-               return ret_hu_conv;
-       }
-
-       /**
-        * Creates a new C2Tuple_PublicKeyCOption_SocketAddressZZ from the contained elements.
-        */
-       public static TwoTuple_PublicKeyCOption_SocketAddressZZ of(byte[] a, org.ldk.structs.Option_SocketAddressZ b) {
-               long ret = bindings.C2Tuple_PublicKeyCOption_SocketAddressZZ_new(InternalUtils.check_arr_len(a, 33), b.ptr);
-               Reference.reachabilityFence(a);
-               Reference.reachabilityFence(b);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               TwoTuple_PublicKeyCOption_SocketAddressZZ ret_hu_conv = new TwoTuple_PublicKeyCOption_SocketAddressZZ(null, ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b); };
-               return ret_hu_conv;
-       }
-
-}
index 6d3dcc75391a769698d96f6d465199786993b920..6ebba4eb402492762314b51f44b0f08acfd56e39 100644 (file)
@@ -69,7 +69,7 @@ public class TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ extends CommonBa
         * Creates a new C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ from the contained elements.
         */
        public static TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ of(byte[] a, TwoTuple_u32CVec_u8ZZ[] b) {
-               long ret = bindings.C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ_new(InternalUtils.check_arr_len(a, 32), b != null ? Arrays.stream(b).mapToLong(b_conv_23 -> b_conv_23 != null ? b_conv_23.ptr : 0).toArray() : null);
+               long ret = bindings.C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ_new(InternalUtils.check_arr_len(a, 32), b != null ? Arrays.stream(b).mapToLong(b_conv_23 -> b_conv_23.ptr).toArray() : null);
                Reference.reachabilityFence(a);
                Reference.reachabilityFence(b);
                if (ret >= 0 && ret <= 4096) { return null; }
index e2e9d49956fae08c5cb917775a987089d9ba3f67..fba1e343492f023719005a7fbaf1a710aa0b8b81 100644 (file)
@@ -69,7 +69,7 @@ public class TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ extends CommonBase
         * Creates a new C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ from the contained elements.
         */
        public static TwoTuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ of(byte[] a, TwoTuple_u32TxOutZ[] b) {
-               long ret = bindings.C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_new(InternalUtils.check_arr_len(a, 32), b != null ? Arrays.stream(b).mapToLong(b_conv_20 -> b_conv_20 != null ? b_conv_20.ptr : 0).toArray() : null);
+               long ret = bindings.C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_new(InternalUtils.check_arr_len(a, 32), b != null ? Arrays.stream(b).mapToLong(b_conv_20 -> b_conv_20.ptr).toArray() : null);
                Reference.reachabilityFence(a);
                Reference.reachabilityFence(b);
                if (ret >= 0 && ret <= 4096) { return null; }
index c13a92fa152007275113581f54aaa6229be2eeeb..843865b2e938350fa5f52f952cd4397347e5c90a 100644 (file)
@@ -45,7 +45,7 @@ public class TwoTuple_ThirtyTwoBytesChannelManagerZ extends CommonBase {
         * Creates a new C2Tuple_ThirtyTwoBytesChannelManagerZ from the contained elements.
         */
        public static TwoTuple_ThirtyTwoBytesChannelManagerZ of(byte[] a, FeeEstimator b_fee_est, Watch b_chain_monitor, BroadcasterInterface b_tx_broadcaster, Router b_router, Logger b_logger, EntropySource b_entropy_source, NodeSigner b_node_signer, SignerProvider b_signer_provider, UserConfig b_config, ChainParameters b_params, int b_current_timestamp) {
-               long ret = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_new(InternalUtils.check_arr_len(a, 32), bindings.ChannelManager_new(b_fee_est.ptr, b_chain_monitor.ptr, b_tx_broadcaster.ptr, b_router.ptr, b_logger.ptr, b_entropy_source.ptr, b_node_signer.ptr, b_signer_provider.ptr, b_config == null ? 0 : b_config.ptr, b_params == null ? 0 : b_params.ptr, b_current_timestamp));
+               long ret = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_new(InternalUtils.check_arr_len(a, 32), bindings.ChannelManager_new(b_fee_est.ptr, b_chain_monitor.ptr, b_tx_broadcaster.ptr, b_router.ptr, b_logger.ptr, b_entropy_source.ptr, b_node_signer.ptr, b_signer_provider.ptr, b_config.ptr, b_params.ptr, b_current_timestamp));
                Reference.reachabilityFence(a);
                Reference.reachabilityFence(b_fee_est);
                Reference.reachabilityFence(b_chain_monitor);
index 87f5d6cd33132dd4590065030b2ad97236746d3a..78f73055791d6074c93b147846626630831fe2bc 100644 (file)
@@ -64,7 +64,7 @@ public class TwoTuple_ThirtyTwoBytesChannelMonitorZ extends CommonBase {
         * Creates a new C2Tuple_ThirtyTwoBytesChannelMonitorZ from the contained elements.
         */
        public static TwoTuple_ThirtyTwoBytesChannelMonitorZ of(byte[] a, org.ldk.structs.ChannelMonitor b) {
-               long ret = bindings.C2Tuple_ThirtyTwoBytesChannelMonitorZ_new(InternalUtils.check_arr_len(a, 32), b == null ? 0 : b.ptr);
+               long ret = bindings.C2Tuple_ThirtyTwoBytesChannelMonitorZ_new(InternalUtils.check_arr_len(a, 32), b.ptr);
                Reference.reachabilityFence(a);
                Reference.reachabilityFence(b);
                if (ret >= 0 && ret <= 4096) { return null; }
diff --git a/src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.java b/src/main/java/org/ldk/structs/TwoTuple_ThirtyTwoBytesPublicKeyZ.java
deleted file mode 100644 (file)
index 991d88b..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-package org.ldk.structs;
-
-import org.ldk.impl.bindings;
-import org.ldk.enums.*;
-import org.ldk.util.*;
-import java.util.Arrays;
-import java.lang.ref.Reference;
-import javax.annotation.Nullable;
-
-
-/**
- * A Tuple
- */
-@SuppressWarnings("unchecked") // We correctly assign various generic arrays
-public class TwoTuple_ThirtyTwoBytesPublicKeyZ extends CommonBase {
-       TwoTuple_ThirtyTwoBytesPublicKeyZ(Object _dummy, long ptr) { super(ptr); }
-       @Override @SuppressWarnings("deprecation")
-       protected void finalize() throws Throwable {
-               super.finalize();
-               if (ptr != 0) { bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_free(ptr); }
-       }
-
-       /**
-        * 
-        */
-       public byte[] get_a() {
-               byte[] ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * 
-        */
-       public byte[] get_b() {
-               byte[] ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       long clone_ptr() {
-               long ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(this.ptr);
-               Reference.reachabilityFence(this);
-               return ret;
-       }
-
-       /**
-        * Creates a new tuple which has the same data as `orig`
-        * but with all dynamically-allocated buffers duplicated in new buffers.
-        */
-       public TwoTuple_ThirtyTwoBytesPublicKeyZ clone() {
-               long ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(this.ptr);
-               Reference.reachabilityFence(this);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               TwoTuple_ThirtyTwoBytesPublicKeyZ ret_hu_conv = new TwoTuple_ThirtyTwoBytesPublicKeyZ(null, ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
-               return ret_hu_conv;
-       }
-
-       /**
-        * Creates a new C2Tuple_ThirtyTwoBytesPublicKeyZ from the contained elements.
-        */
-       public static TwoTuple_ThirtyTwoBytesPublicKeyZ of(byte[] a, byte[] b) {
-               long ret = bindings.C2Tuple_ThirtyTwoBytesPublicKeyZ_new(InternalUtils.check_arr_len(a, 32), InternalUtils.check_arr_len(b, 33));
-               Reference.reachabilityFence(a);
-               Reference.reachabilityFence(b);
-               if (ret >= 0 && ret <= 4096) { return null; }
-               TwoTuple_ThirtyTwoBytesPublicKeyZ ret_hu_conv = new TwoTuple_ThirtyTwoBytesPublicKeyZ(null, ret);
-               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
-               return ret_hu_conv;
-       }
-
-}
index 27fb31b3031bb8b3ec2f577278cf42578e0dc36f..db50da5c5fcb886d9dde6ef18e83eaa6900cbf11 100644 (file)
@@ -23,19 +23,23 @@ public class TxAbort extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.TxAbort_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.TxAbort_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.TxAbort_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.TxAbort_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -61,13 +65,14 @@ public class TxAbort extends CommonBase {
        /**
         * Constructs a new TxAbort given each field
         */
-       public static TxAbort of(byte[] channel_id_arg, byte[] data_arg) {
-               long ret = bindings.TxAbort_new(InternalUtils.check_arr_len(channel_id_arg, 32), data_arg);
+       public static TxAbort of(org.ldk.structs.ChannelId channel_id_arg, byte[] data_arg) {
+               long ret = bindings.TxAbort_new(channel_id_arg.ptr, data_arg);
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(data_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.TxAbort ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxAbort(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                return ret_hu_conv;
        }
 
@@ -107,7 +112,7 @@ public class TxAbort extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.TxAbort b) {
-               boolean ret = bindings.TxAbort_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.TxAbort_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 46ddf6b77c43d0853a5885b5998edd5675408d2a..2f70fbf3fac867b06c034af7c60c433a188796d8 100644 (file)
@@ -24,19 +24,23 @@ public class TxAckRbf extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.TxAckRbf_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.TxAckRbf_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.TxAckRbf_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.TxAckRbf_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -66,13 +70,14 @@ public class TxAckRbf extends CommonBase {
        /**
         * Constructs a new TxAckRbf given each field
         */
-       public static TxAckRbf of(byte[] channel_id_arg, org.ldk.structs.Option_i64Z funding_output_contribution_arg) {
-               long ret = bindings.TxAckRbf_new(InternalUtils.check_arr_len(channel_id_arg, 32), funding_output_contribution_arg.ptr);
+       public static TxAckRbf of(org.ldk.structs.ChannelId channel_id_arg, org.ldk.structs.Option_i64Z funding_output_contribution_arg) {
+               long ret = bindings.TxAckRbf_new(channel_id_arg.ptr, funding_output_contribution_arg.ptr);
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(funding_output_contribution_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.TxAckRbf ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxAckRbf(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(funding_output_contribution_arg); };
                return ret_hu_conv;
        }
@@ -113,7 +118,7 @@ public class TxAckRbf extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.TxAckRbf b) {
-               boolean ret = bindings.TxAckRbf_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.TxAckRbf_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index be009a87d3e166985e975368b0ee4d0cb9059492..dbe72f9c4360a011365085678142a9a90f073c3e 100644 (file)
@@ -23,19 +23,23 @@ public class TxAddInput extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.TxAddInput_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.TxAddInput_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.TxAddInput_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.TxAddInput_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -76,7 +80,7 @@ public class TxAddInput extends CommonBase {
         * malleable.
         */
        public void set_prevtx(org.ldk.structs.TransactionU16LenLimited val) {
-               bindings.TxAddInput_set_prevtx(this.ptr, val == null ? 0 : val.ptr);
+               bindings.TxAddInput_set_prevtx(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -121,8 +125,8 @@ public class TxAddInput extends CommonBase {
        /**
         * Constructs a new TxAddInput given each field
         */
-       public static TxAddInput of(byte[] channel_id_arg, long serial_id_arg, org.ldk.structs.TransactionU16LenLimited prevtx_arg, int prevtx_out_arg, int sequence_arg) {
-               long ret = bindings.TxAddInput_new(InternalUtils.check_arr_len(channel_id_arg, 32), serial_id_arg, prevtx_arg == null ? 0 : prevtx_arg.ptr, prevtx_out_arg, sequence_arg);
+       public static TxAddInput of(org.ldk.structs.ChannelId channel_id_arg, long serial_id_arg, org.ldk.structs.TransactionU16LenLimited prevtx_arg, int prevtx_out_arg, int sequence_arg) {
+               long ret = bindings.TxAddInput_new(channel_id_arg.ptr, serial_id_arg, prevtx_arg.ptr, prevtx_out_arg, sequence_arg);
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(serial_id_arg);
                Reference.reachabilityFence(prevtx_arg);
@@ -131,6 +135,7 @@ public class TxAddInput extends CommonBase {
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.TxAddInput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxAddInput(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(prevtx_arg); };
                return ret_hu_conv;
        }
@@ -171,7 +176,7 @@ public class TxAddInput extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.TxAddInput b) {
-               boolean ret = bindings.TxAddInput_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.TxAddInput_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 56bae5e6559572abbdf259de4c292e3f4ad3e427..2bd09e25bee9e5a63d8f68ebd8bebb0de52e4924 100644 (file)
@@ -23,19 +23,23 @@ public class TxAddOutput extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.TxAddOutput_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.TxAddOutput_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.TxAddOutput_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.TxAddOutput_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -97,8 +101,8 @@ public class TxAddOutput extends CommonBase {
        /**
         * Constructs a new TxAddOutput given each field
         */
-       public static TxAddOutput of(byte[] channel_id_arg, long serial_id_arg, long sats_arg, byte[] script_arg) {
-               long ret = bindings.TxAddOutput_new(InternalUtils.check_arr_len(channel_id_arg, 32), serial_id_arg, sats_arg, script_arg);
+       public static TxAddOutput of(org.ldk.structs.ChannelId channel_id_arg, long serial_id_arg, long sats_arg, byte[] script_arg) {
+               long ret = bindings.TxAddOutput_new(channel_id_arg.ptr, serial_id_arg, sats_arg, script_arg);
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(serial_id_arg);
                Reference.reachabilityFence(sats_arg);
@@ -106,6 +110,7 @@ public class TxAddOutput extends CommonBase {
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.TxAddOutput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxAddOutput(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                return ret_hu_conv;
        }
 
@@ -145,7 +150,7 @@ public class TxAddOutput extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.TxAddOutput b) {
-               boolean ret = bindings.TxAddOutput_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.TxAddOutput_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index bd5e7209dc4d43c87f594c469ae3a6b6e3a99d19..46cf83a0b002dac2683180e6e0177e7fa928fb60 100644 (file)
@@ -24,30 +24,35 @@ public class TxComplete extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.TxComplete_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.TxComplete_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.TxComplete_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.TxComplete_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
         * Constructs a new TxComplete given each field
         */
-       public static TxComplete of(byte[] channel_id_arg) {
-               long ret = bindings.TxComplete_new(InternalUtils.check_arr_len(channel_id_arg, 32));
+       public static TxComplete of(org.ldk.structs.ChannelId channel_id_arg) {
+               long ret = bindings.TxComplete_new(channel_id_arg.ptr);
                Reference.reachabilityFence(channel_id_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.TxComplete ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxComplete(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                return ret_hu_conv;
        }
 
@@ -87,7 +92,7 @@ public class TxComplete extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.TxComplete b) {
-               boolean ret = bindings.TxComplete_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.TxComplete_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index d65e1ba83bb72ba271ec6121a5eb9c83f10716d4..634a8eba54e916ffa1ea150a40d7500ebdc4b9d0 100644 (file)
@@ -68,7 +68,7 @@ public class TxCreationKeys extends CommonBase {
         * an old state.
         */
        public void set_revocation_key(org.ldk.structs.RevocationKey val) {
-               bindings.TxCreationKeys_set_revocation_key(this.ptr, val == null ? 0 : val.ptr);
+               bindings.TxCreationKeys_set_revocation_key(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -90,7 +90,7 @@ public class TxCreationKeys extends CommonBase {
         * Broadcaster's HTLC Key
         */
        public void set_broadcaster_htlc_key(org.ldk.structs.HtlcKey val) {
-               bindings.TxCreationKeys_set_broadcaster_htlc_key(this.ptr, val == null ? 0 : val.ptr);
+               bindings.TxCreationKeys_set_broadcaster_htlc_key(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -112,7 +112,7 @@ public class TxCreationKeys extends CommonBase {
         * Countersignatory's HTLC Key
         */
        public void set_countersignatory_htlc_key(org.ldk.structs.HtlcKey val) {
-               bindings.TxCreationKeys_set_countersignatory_htlc_key(this.ptr, val == null ? 0 : val.ptr);
+               bindings.TxCreationKeys_set_countersignatory_htlc_key(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -134,7 +134,7 @@ public class TxCreationKeys extends CommonBase {
         * Broadcaster's Payment Key (which isn't allowed to be spent from for some delay)
         */
        public void set_broadcaster_delayed_payment_key(org.ldk.structs.DelayedPaymentKey val) {
-               bindings.TxCreationKeys_set_broadcaster_delayed_payment_key(this.ptr, val == null ? 0 : val.ptr);
+               bindings.TxCreationKeys_set_broadcaster_delayed_payment_key(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -144,7 +144,7 @@ public class TxCreationKeys extends CommonBase {
         * Constructs a new TxCreationKeys given each field
         */
        public static TxCreationKeys of(byte[] per_commitment_point_arg, org.ldk.structs.RevocationKey revocation_key_arg, org.ldk.structs.HtlcKey broadcaster_htlc_key_arg, org.ldk.structs.HtlcKey countersignatory_htlc_key_arg, org.ldk.structs.DelayedPaymentKey broadcaster_delayed_payment_key_arg) {
-               long ret = bindings.TxCreationKeys_new(InternalUtils.check_arr_len(per_commitment_point_arg, 33), revocation_key_arg == null ? 0 : revocation_key_arg.ptr, broadcaster_htlc_key_arg == null ? 0 : broadcaster_htlc_key_arg.ptr, countersignatory_htlc_key_arg == null ? 0 : countersignatory_htlc_key_arg.ptr, broadcaster_delayed_payment_key_arg == null ? 0 : broadcaster_delayed_payment_key_arg.ptr);
+               long ret = bindings.TxCreationKeys_new(InternalUtils.check_arr_len(per_commitment_point_arg, 33), revocation_key_arg.ptr, broadcaster_htlc_key_arg.ptr, countersignatory_htlc_key_arg.ptr, broadcaster_delayed_payment_key_arg.ptr);
                Reference.reachabilityFence(per_commitment_point_arg);
                Reference.reachabilityFence(revocation_key_arg);
                Reference.reachabilityFence(broadcaster_htlc_key_arg);
@@ -166,7 +166,7 @@ public class TxCreationKeys extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.TxCreationKeys b) {
-               boolean ret = bindings.TxCreationKeys_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.TxCreationKeys_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -220,7 +220,7 @@ public class TxCreationKeys extends CommonBase {
         * Key set is asymmetric and can't be used as part of counter-signatory set of transactions.
         */
        public static TxCreationKeys derive_new(byte[] per_commitment_point, org.ldk.structs.DelayedPaymentBasepoint broadcaster_delayed_payment_base, org.ldk.structs.HtlcBasepoint broadcaster_htlc_base, org.ldk.structs.RevocationBasepoint countersignatory_revocation_base, org.ldk.structs.HtlcBasepoint countersignatory_htlc_base) {
-               long ret = bindings.TxCreationKeys_derive_new(InternalUtils.check_arr_len(per_commitment_point, 33), broadcaster_delayed_payment_base == null ? 0 : broadcaster_delayed_payment_base.ptr, broadcaster_htlc_base == null ? 0 : broadcaster_htlc_base.ptr, countersignatory_revocation_base == null ? 0 : countersignatory_revocation_base.ptr, countersignatory_htlc_base == null ? 0 : countersignatory_htlc_base.ptr);
+               long ret = bindings.TxCreationKeys_derive_new(InternalUtils.check_arr_len(per_commitment_point, 33), broadcaster_delayed_payment_base.ptr, broadcaster_htlc_base.ptr, countersignatory_revocation_base.ptr, countersignatory_htlc_base.ptr);
                Reference.reachabilityFence(per_commitment_point);
                Reference.reachabilityFence(broadcaster_delayed_payment_base);
                Reference.reachabilityFence(broadcaster_htlc_base);
@@ -241,7 +241,7 @@ public class TxCreationKeys extends CommonBase {
         * Key set is asymmetric and can't be used as part of counter-signatory set of transactions.
         */
        public static TxCreationKeys from_channel_static_keys(byte[] per_commitment_point, org.ldk.structs.ChannelPublicKeys broadcaster_keys, org.ldk.structs.ChannelPublicKeys countersignatory_keys) {
-               long ret = bindings.TxCreationKeys_from_channel_static_keys(InternalUtils.check_arr_len(per_commitment_point, 33), broadcaster_keys == null ? 0 : broadcaster_keys.ptr, countersignatory_keys == null ? 0 : countersignatory_keys.ptr);
+               long ret = bindings.TxCreationKeys_from_channel_static_keys(InternalUtils.check_arr_len(per_commitment_point, 33), broadcaster_keys.ptr, countersignatory_keys.ptr);
                Reference.reachabilityFence(per_commitment_point);
                Reference.reachabilityFence(broadcaster_keys);
                Reference.reachabilityFence(countersignatory_keys);
index ea1e7b01983b65996975a8cdec52761546928328..59f956d6a1fc9905f29cdecb71d3619d452e1b1f 100644 (file)
@@ -24,19 +24,23 @@ public class TxInitRbf extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.TxInitRbf_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.TxInitRbf_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.TxInitRbf_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.TxInitRbf_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -102,8 +106,8 @@ public class TxInitRbf extends CommonBase {
        /**
         * Constructs a new TxInitRbf given each field
         */
-       public static TxInitRbf of(byte[] channel_id_arg, int locktime_arg, int feerate_sat_per_1000_weight_arg, org.ldk.structs.Option_i64Z funding_output_contribution_arg) {
-               long ret = bindings.TxInitRbf_new(InternalUtils.check_arr_len(channel_id_arg, 32), locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg.ptr);
+       public static TxInitRbf of(org.ldk.structs.ChannelId channel_id_arg, int locktime_arg, int feerate_sat_per_1000_weight_arg, org.ldk.structs.Option_i64Z funding_output_contribution_arg) {
+               long ret = bindings.TxInitRbf_new(channel_id_arg.ptr, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg.ptr);
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(locktime_arg);
                Reference.reachabilityFence(feerate_sat_per_1000_weight_arg);
@@ -111,6 +115,7 @@ public class TxInitRbf extends CommonBase {
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.TxInitRbf ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxInitRbf(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(funding_output_contribution_arg); };
                return ret_hu_conv;
        }
@@ -151,7 +156,7 @@ public class TxInitRbf extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.TxInitRbf b) {
-               boolean ret = bindings.TxInitRbf_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.TxInitRbf_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index da528a50c410de1d2b60da50adec1b077329b944..f2abf19ccb87188fa24c8fd12b8f99d1fd3368a3 100644 (file)
@@ -23,19 +23,23 @@ public class TxRemoveInput extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.TxRemoveInput_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.TxRemoveInput_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.TxRemoveInput_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.TxRemoveInput_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -59,13 +63,14 @@ public class TxRemoveInput extends CommonBase {
        /**
         * Constructs a new TxRemoveInput given each field
         */
-       public static TxRemoveInput of(byte[] channel_id_arg, long serial_id_arg) {
-               long ret = bindings.TxRemoveInput_new(InternalUtils.check_arr_len(channel_id_arg, 32), serial_id_arg);
+       public static TxRemoveInput of(org.ldk.structs.ChannelId channel_id_arg, long serial_id_arg) {
+               long ret = bindings.TxRemoveInput_new(channel_id_arg.ptr, serial_id_arg);
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(serial_id_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.TxRemoveInput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxRemoveInput(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                return ret_hu_conv;
        }
 
@@ -105,7 +110,7 @@ public class TxRemoveInput extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.TxRemoveInput b) {
-               boolean ret = bindings.TxRemoveInput_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.TxRemoveInput_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 70e9648f0e6b561874d74454578c95ac1f07042e..fd6e00da029234e66a255c25b2d917ffd27a150f 100644 (file)
@@ -23,19 +23,23 @@ public class TxRemoveOutput extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.TxRemoveOutput_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.TxRemoveOutput_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.TxRemoveOutput_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.TxRemoveOutput_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -59,13 +63,14 @@ public class TxRemoveOutput extends CommonBase {
        /**
         * Constructs a new TxRemoveOutput given each field
         */
-       public static TxRemoveOutput of(byte[] channel_id_arg, long serial_id_arg) {
-               long ret = bindings.TxRemoveOutput_new(InternalUtils.check_arr_len(channel_id_arg, 32), serial_id_arg);
+       public static TxRemoveOutput of(org.ldk.structs.ChannelId channel_id_arg, long serial_id_arg) {
+               long ret = bindings.TxRemoveOutput_new(channel_id_arg.ptr, serial_id_arg);
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(serial_id_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.TxRemoveOutput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxRemoveOutput(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                return ret_hu_conv;
        }
 
@@ -105,7 +110,7 @@ public class TxRemoveOutput extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.TxRemoveOutput b) {
-               boolean ret = bindings.TxRemoveOutput_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.TxRemoveOutput_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 1d7185f907a8f98e0a3333b61ebae1c88ff265c7..dd1eb95be73c49ec49d5a9128468b8257dde8e33 100644 (file)
@@ -24,19 +24,23 @@ public class TxSignatures extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.TxSignatures_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.TxSignatures_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.TxSignatures_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.TxSignatures_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -77,17 +81,42 @@ public class TxSignatures extends CommonBase {
                Reference.reachabilityFence(val);
        }
 
+       /**
+        * Optional signature for the shared input -- the previous funding outpoint -- signed by both peers
+        */
+       public Option_ECDSASignatureZ get_funding_outpoint_sig() {
+               long ret = bindings.TxSignatures_get_funding_outpoint_sig(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.Option_ECDSASignatureZ ret_hu_conv = org.ldk.structs.Option_ECDSASignatureZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Optional signature for the shared input -- the previous funding outpoint -- signed by both peers
+        */
+       public void set_funding_outpoint_sig(org.ldk.structs.Option_ECDSASignatureZ val) {
+               bindings.TxSignatures_set_funding_outpoint_sig(this.ptr, val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
+       }
+
        /**
         * Constructs a new TxSignatures given each field
         */
-       public static TxSignatures of(byte[] channel_id_arg, byte[] tx_hash_arg, byte[][] witnesses_arg) {
-               long ret = bindings.TxSignatures_new(InternalUtils.check_arr_len(channel_id_arg, 32), InternalUtils.check_arr_len(tx_hash_arg, 32), witnesses_arg);
+       public static TxSignatures of(org.ldk.structs.ChannelId channel_id_arg, byte[] tx_hash_arg, byte[][] witnesses_arg, org.ldk.structs.Option_ECDSASignatureZ funding_outpoint_sig_arg) {
+               long ret = bindings.TxSignatures_new(channel_id_arg.ptr, InternalUtils.check_arr_len(tx_hash_arg, 32), witnesses_arg, funding_outpoint_sig_arg.ptr);
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(tx_hash_arg);
                Reference.reachabilityFence(witnesses_arg);
+               Reference.reachabilityFence(funding_outpoint_sig_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.TxSignatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxSignatures(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(funding_outpoint_sig_arg); };
                return ret_hu_conv;
        }
 
@@ -127,7 +156,7 @@ public class TxSignatures extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.TxSignatures b) {
-               boolean ret = bindings.TxSignatures_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.TxSignatures_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
diff --git a/src/main/java/org/ldk/structs/UnknownPaymentContext.java b/src/main/java/org/ldk/structs/UnknownPaymentContext.java
new file mode 100644 (file)
index 0000000..e105292
--- /dev/null
@@ -0,0 +1,78 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
+
+
+/**
+ * An unknown payment context.
+ */
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class UnknownPaymentContext extends CommonBase {
+       UnknownPaymentContext(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.UnknownPaymentContext_free(ptr); }
+       }
+
+       long clone_ptr() {
+               long ret = bindings.UnknownPaymentContext_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the UnknownPaymentContext
+        */
+       public UnknownPaymentContext clone() {
+               long ret = bindings.UnknownPaymentContext_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.UnknownPaymentContext ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UnknownPaymentContext(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * Checks if two UnknownPaymentContexts 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.
+        */
+       public boolean eq(org.ldk.structs.UnknownPaymentContext b) {
+               boolean ret = bindings.UnknownPaymentContext_eq(this.ptr, b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof UnknownPaymentContext)) return false;
+               return this.eq((UnknownPaymentContext)o);
+       }
+       /**
+        * Serialize the UnknownPaymentContext object into a byte array which can be read by UnknownPaymentContext_read
+        */
+       public byte[] write() {
+               byte[] ret = bindings.UnknownPaymentContext_write(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Read a UnknownPaymentContext from a byte array, created by UnknownPaymentContext_write
+        */
+       public static Result_UnknownPaymentContextDecodeErrorZ read(byte[] ser) {
+               long ret = bindings.UnknownPaymentContext_read(ser);
+               Reference.reachabilityFence(ser);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_UnknownPaymentContextDecodeErrorZ ret_hu_conv = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
index c9e476580434e026f6433f3b9284036f73a7b5e1..0fcbbe03edcf3a95363d147ee25bafd6900b5281 100644 (file)
@@ -25,6 +25,24 @@ public class UnsignedBolt12Invoice extends CommonBase {
                if (ptr != 0) { bindings.UnsignedBolt12Invoice_free(ptr); }
        }
 
+       long clone_ptr() {
+               long ret = bindings.UnsignedBolt12Invoice_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the UnsignedBolt12Invoice
+        */
+       public UnsignedBolt12Invoice clone() {
+               long ret = bindings.UnsignedBolt12Invoice_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.UnsignedBolt12Invoice ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UnsignedBolt12Invoice(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
        /**
         * Returns the [`TaggedHash`] of the invoice to sign.
         */
@@ -94,15 +112,12 @@ public class UnsignedBolt12Invoice extends CommonBase {
         * 
         * [`Offer`]: crate::offers::offer::Offer
         * [`Offer::amount`]: crate::offers::offer::Offer::amount
-        * 
-        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       @Nullable
-       public Amount amount() {
+       public Option_AmountZ amount() {
                long ret = bindings.UnsignedBolt12Invoice_amount(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); }
+               org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
@@ -134,7 +149,10 @@ public class UnsignedBolt12Invoice extends CommonBase {
         * 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
         */
+       @Nullable
        public PrintableString description() {
                long ret = bindings.UnsignedBolt12Invoice_description(this.ptr);
                Reference.reachabilityFence(this);
@@ -207,15 +225,12 @@ public class UnsignedBolt12Invoice extends CommonBase {
         * [`Refund`].
         * 
         * [`Offer::supported_quantity`]: crate::offers::offer::Offer::supported_quantity
-        * 
-        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       @Nullable
-       public Quantity supported_quantity() {
+       public Option_QuantityZ supported_quantity() {
                long ret = bindings.UnsignedBolt12Invoice_supported_quantity(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); }
+               org.ldk.structs.Option_QuantityZ ret_hu_conv = org.ldk.structs.Option_QuantityZ.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
index 9d6bd1a4a28558e55baf0f4ff3f16c1b9a56e081..ebf3bc6e8fd216fe60309e5a2845eb20530895b6 100644 (file)
@@ -38,7 +38,7 @@ public class UnsignedChannelAnnouncement extends CommonBase {
         * The advertised channel features
         */
        public void set_features(org.ldk.structs.ChannelFeatures val) {
-               bindings.UnsignedChannelAnnouncement_set_features(this.ptr, val == null ? 0 : val.ptr);
+               bindings.UnsignedChannelAnnouncement_set_features(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -96,7 +96,7 @@ public class UnsignedChannelAnnouncement extends CommonBase {
         * One of the two `node_id`s which are endpoints of this channel
         */
        public void set_node_id_1(org.ldk.structs.NodeId val) {
-               bindings.UnsignedChannelAnnouncement_set_node_id_1(this.ptr, val == null ? 0 : val.ptr);
+               bindings.UnsignedChannelAnnouncement_set_node_id_1(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -118,7 +118,7 @@ public class UnsignedChannelAnnouncement extends CommonBase {
         * The other of the two `node_id`s which are endpoints of this channel
         */
        public void set_node_id_2(org.ldk.structs.NodeId val) {
-               bindings.UnsignedChannelAnnouncement_set_node_id_2(this.ptr, val == null ? 0 : val.ptr);
+               bindings.UnsignedChannelAnnouncement_set_node_id_2(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -140,7 +140,7 @@ public class UnsignedChannelAnnouncement extends CommonBase {
         * The funding key for the first node
         */
        public void set_bitcoin_key_1(org.ldk.structs.NodeId val) {
-               bindings.UnsignedChannelAnnouncement_set_bitcoin_key_1(this.ptr, val == null ? 0 : val.ptr);
+               bindings.UnsignedChannelAnnouncement_set_bitcoin_key_1(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -162,7 +162,7 @@ public class UnsignedChannelAnnouncement extends CommonBase {
         * The funding key for the second node
         */
        public void set_bitcoin_key_2(org.ldk.structs.NodeId val) {
-               bindings.UnsignedChannelAnnouncement_set_bitcoin_key_2(this.ptr, val == null ? 0 : val.ptr);
+               bindings.UnsignedChannelAnnouncement_set_bitcoin_key_2(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -198,7 +198,7 @@ public class UnsignedChannelAnnouncement extends CommonBase {
         * Constructs a new UnsignedChannelAnnouncement given each field
         */
        public static UnsignedChannelAnnouncement of(org.ldk.structs.ChannelFeatures features_arg, byte[] chain_hash_arg, long short_channel_id_arg, org.ldk.structs.NodeId node_id_1_arg, org.ldk.structs.NodeId node_id_2_arg, org.ldk.structs.NodeId bitcoin_key_1_arg, org.ldk.structs.NodeId bitcoin_key_2_arg, byte[] excess_data_arg) {
-               long ret = bindings.UnsignedChannelAnnouncement_new(features_arg == null ? 0 : features_arg.ptr, InternalUtils.check_arr_len(chain_hash_arg, 32), short_channel_id_arg, node_id_1_arg == null ? 0 : node_id_1_arg.ptr, node_id_2_arg == null ? 0 : node_id_2_arg.ptr, bitcoin_key_1_arg == null ? 0 : bitcoin_key_1_arg.ptr, bitcoin_key_2_arg == null ? 0 : bitcoin_key_2_arg.ptr, excess_data_arg);
+               long ret = bindings.UnsignedChannelAnnouncement_new(features_arg.ptr, InternalUtils.check_arr_len(chain_hash_arg, 32), short_channel_id_arg, node_id_1_arg.ptr, node_id_2_arg.ptr, bitcoin_key_1_arg.ptr, bitcoin_key_2_arg.ptr, excess_data_arg);
                Reference.reachabilityFence(features_arg);
                Reference.reachabilityFence(chain_hash_arg);
                Reference.reachabilityFence(short_channel_id_arg);
@@ -254,7 +254,7 @@ public class UnsignedChannelAnnouncement extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.UnsignedChannelAnnouncement b) {
-               boolean ret = bindings.UnsignedChannelAnnouncement_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.UnsignedChannelAnnouncement_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index ee0802b85be0a7c551dadc4b6617777a9ac10a8a..ba8dfd22dbd66adcc6bf37cd92d9885734ff7966 100644 (file)
@@ -285,7 +285,7 @@ public class UnsignedChannelUpdate extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.UnsignedChannelUpdate b) {
-               boolean ret = bindings.UnsignedChannelUpdate_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.UnsignedChannelUpdate_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index f895fbef3d8ed95c6dc7b01d0c86e21e46ad48fb..6789b185cbe65b8e7a40123c65d00d5236dc7e0f 100644 (file)
@@ -94,7 +94,7 @@ public class UnsignedGossipMessage extends CommonBase {
         * Utility method to constructs a new ChannelAnnouncement-variant UnsignedGossipMessage
         */
        public static UnsignedGossipMessage channel_announcement(org.ldk.structs.UnsignedChannelAnnouncement a) {
-               long ret = bindings.UnsignedGossipMessage_channel_announcement(a == null ? 0 : a.ptr);
+               long ret = bindings.UnsignedGossipMessage_channel_announcement(a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.UnsignedGossipMessage ret_hu_conv = org.ldk.structs.UnsignedGossipMessage.constr_from_ptr(ret);
@@ -107,7 +107,7 @@ public class UnsignedGossipMessage extends CommonBase {
         * Utility method to constructs a new ChannelUpdate-variant UnsignedGossipMessage
         */
        public static UnsignedGossipMessage channel_update(org.ldk.structs.UnsignedChannelUpdate a) {
-               long ret = bindings.UnsignedGossipMessage_channel_update(a == null ? 0 : a.ptr);
+               long ret = bindings.UnsignedGossipMessage_channel_update(a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.UnsignedGossipMessage ret_hu_conv = org.ldk.structs.UnsignedGossipMessage.constr_from_ptr(ret);
@@ -120,7 +120,7 @@ public class UnsignedGossipMessage extends CommonBase {
         * Utility method to constructs a new NodeAnnouncement-variant UnsignedGossipMessage
         */
        public static UnsignedGossipMessage node_announcement(org.ldk.structs.UnsignedNodeAnnouncement a) {
-               long ret = bindings.UnsignedGossipMessage_node_announcement(a == null ? 0 : a.ptr);
+               long ret = bindings.UnsignedGossipMessage_node_announcement(a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.UnsignedGossipMessage ret_hu_conv = org.ldk.structs.UnsignedGossipMessage.constr_from_ptr(ret);
index b8b19b9c96ef46fdbc49ea786a4cda91e7f76065..8034c1543b0b1cfdb6e6126997909970f922c921 100644 (file)
@@ -25,6 +25,24 @@ public class UnsignedInvoiceRequest extends CommonBase {
                if (ptr != 0) { bindings.UnsignedInvoiceRequest_free(ptr); }
        }
 
+       long clone_ptr() {
+               long ret = bindings.UnsignedInvoiceRequest_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Creates a copy of the UnsignedInvoiceRequest
+        */
+       public UnsignedInvoiceRequest clone() {
+               long ret = bindings.UnsignedInvoiceRequest_clone(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.UnsignedInvoiceRequest ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UnsignedInvoiceRequest(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
        /**
         * Returns the [`TaggedHash`] of the invoice to sign.
         */
@@ -63,15 +81,12 @@ public class UnsignedInvoiceRequest extends CommonBase {
 
        /**
         * The minimum amount required for a successful payment of a single item.
-        * 
-        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       @Nullable
-       public Amount amount() {
+       public Option_AmountZ amount() {
                long ret = bindings.UnsignedInvoiceRequest_amount(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); }
+               org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
@@ -79,7 +94,10 @@ public class UnsignedInvoiceRequest extends CommonBase {
        /**
         * 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
         */
+       @Nullable
        public PrintableString description() {
                long ret = bindings.UnsignedInvoiceRequest_description(this.ptr);
                Reference.reachabilityFence(this);
@@ -156,14 +174,17 @@ public class UnsignedInvoiceRequest extends CommonBase {
                long ret = bindings.UnsignedInvoiceRequest_supported_quantity(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); }
+               org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
        /**
         * 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
         */
+       @Nullable
        public byte[] signing_pubkey() {
                byte[] ret = bindings.UnsignedInvoiceRequest_signing_pubkey(this.ptr);
                Reference.reachabilityFence(this);
index e2503758813b0a4baecc8813178989750835eac9..99d4420dc9b924736f7f96e199f6bcc6c13d0666 100644 (file)
@@ -38,7 +38,7 @@ public class UnsignedNodeAnnouncement extends CommonBase {
         * The advertised features
         */
        public void set_features(org.ldk.structs.NodeFeatures val) {
-               bindings.UnsignedNodeAnnouncement_set_features(this.ptr, val == null ? 0 : val.ptr);
+               bindings.UnsignedNodeAnnouncement_set_features(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -80,7 +80,7 @@ public class UnsignedNodeAnnouncement extends CommonBase {
         * to this node).
         */
        public void set_node_id(org.ldk.structs.NodeId val) {
-               bindings.UnsignedNodeAnnouncement_set_node_id(this.ptr, val == null ? 0 : val.ptr);
+               bindings.UnsignedNodeAnnouncement_set_node_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -124,7 +124,7 @@ public class UnsignedNodeAnnouncement extends CommonBase {
         * This should be sanitized before use. There is no guarantee of uniqueness.
         */
        public void set_alias(org.ldk.structs.NodeAlias val) {
-               bindings.UnsignedNodeAnnouncement_set_alias(this.ptr, val == null ? 0 : val.ptr);
+               bindings.UnsignedNodeAnnouncement_set_alias(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -159,6 +159,81 @@ public class UnsignedNodeAnnouncement extends CommonBase {
                for (SocketAddress val_conv_15: val) { if (this != null) { this.ptrs_to.add(val_conv_15); }; };
        }
 
+       /**
+        * Excess address data which was signed as a part of the message which we do not (yet) understand how
+        * to decode.
+        * 
+        * This is stored to ensure forward-compatibility as new address types are added to the lightning gossip protocol.
+        * 
+        * Returns a copy of the field.
+        */
+       public byte[] get_excess_address_data() {
+               byte[] ret = bindings.UnsignedNodeAnnouncement_get_excess_address_data(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Excess address data which was signed as a part of the message which we do not (yet) understand how
+        * to decode.
+        * 
+        * This is stored to ensure forward-compatibility as new address types are added to the lightning gossip protocol.
+        */
+       public void set_excess_address_data(byte[] val) {
+               bindings.UnsignedNodeAnnouncement_set_excess_address_data(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * Excess data which was signed as a part of the message which we do not (yet) understand how
+        * to decode.
+        * 
+        * This is stored to ensure forward-compatibility as new fields are added to the lightning gossip protocol.
+        * 
+        * Returns a copy of the field.
+        */
+       public byte[] get_excess_data() {
+               byte[] ret = bindings.UnsignedNodeAnnouncement_get_excess_data(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * Excess data which was signed as a part of the message which we do not (yet) understand how
+        * to decode.
+        * 
+        * This is stored to ensure forward-compatibility as new fields are added to the lightning gossip protocol.
+        */
+       public void set_excess_data(byte[] val) {
+               bindings.UnsignedNodeAnnouncement_set_excess_data(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * Constructs a new UnsignedNodeAnnouncement given each field
+        */
+       public static UnsignedNodeAnnouncement of(org.ldk.structs.NodeFeatures features_arg, int timestamp_arg, org.ldk.structs.NodeId node_id_arg, byte[] rgb_arg, org.ldk.structs.NodeAlias alias_arg, SocketAddress[] addresses_arg, byte[] excess_address_data_arg, byte[] excess_data_arg) {
+               long ret = bindings.UnsignedNodeAnnouncement_new(features_arg.ptr, timestamp_arg, node_id_arg.ptr, InternalUtils.check_arr_len(rgb_arg, 3), alias_arg.ptr, addresses_arg != null ? Arrays.stream(addresses_arg).mapToLong(addresses_arg_conv_15 -> addresses_arg_conv_15.ptr).toArray() : null, excess_address_data_arg, excess_data_arg);
+               Reference.reachabilityFence(features_arg);
+               Reference.reachabilityFence(timestamp_arg);
+               Reference.reachabilityFence(node_id_arg);
+               Reference.reachabilityFence(rgb_arg);
+               Reference.reachabilityFence(alias_arg);
+               Reference.reachabilityFence(addresses_arg);
+               Reference.reachabilityFence(excess_address_data_arg);
+               Reference.reachabilityFence(excess_data_arg);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.UnsignedNodeAnnouncement ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UnsignedNodeAnnouncement(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(features_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_id_arg); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(alias_arg); };
+               for (SocketAddress addresses_arg_conv_15: addresses_arg) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(addresses_arg_conv_15); }; };
+               return ret_hu_conv;
+       }
+
        long clone_ptr() {
                long ret = bindings.UnsignedNodeAnnouncement_clone_ptr(this.ptr);
                Reference.reachabilityFence(this);
@@ -195,7 +270,7 @@ public class UnsignedNodeAnnouncement extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.UnsignedNodeAnnouncement b) {
-               boolean ret = bindings.UnsignedNodeAnnouncement_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.UnsignedNodeAnnouncement_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index ab654a54dee3d5d6a0fe513935aba6d8a6a483a5..0eeacfaf40e98409831ac1d548eb67ece170af90 100644 (file)
@@ -68,7 +68,7 @@ public class UntrustedString extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.UntrustedString b) {
-               boolean ret = bindings.UntrustedString_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.UntrustedString_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index ed574d30c4ddadd6fc0f5d4879437117044b7ec3..b6986b982270038b2207234e816962521360183e 100644 (file)
@@ -25,19 +25,23 @@ public class UpdateAddHTLC extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.UpdateAddHTLC_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.UpdateAddHTLC_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.UpdateAddHTLC_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.UpdateAddHTLC_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -156,7 +160,7 @@ public class UpdateAddHTLC extends CommonBase {
         * The onion routing packet with encrypted data for the next hop.
         */
        public void set_onion_routing_packet(org.ldk.structs.OnionPacket val) {
-               bindings.UpdateAddHTLC_set_onion_routing_packet(this.ptr, val == null ? 0 : val.ptr);
+               bindings.UpdateAddHTLC_set_onion_routing_packet(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -192,8 +196,8 @@ public class UpdateAddHTLC extends CommonBase {
         * 
         * Note that blinding_point_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public static UpdateAddHTLC of(byte[] channel_id_arg, long htlc_id_arg, long amount_msat_arg, byte[] payment_hash_arg, int cltv_expiry_arg, org.ldk.structs.Option_u64Z skimmed_fee_msat_arg, org.ldk.structs.OnionPacket onion_routing_packet_arg, @Nullable byte[] blinding_point_arg) {
-               long ret = bindings.UpdateAddHTLC_new(InternalUtils.check_arr_len(channel_id_arg, 32), htlc_id_arg, amount_msat_arg, InternalUtils.check_arr_len(payment_hash_arg, 32), cltv_expiry_arg, skimmed_fee_msat_arg.ptr, onion_routing_packet_arg == null ? 0 : onion_routing_packet_arg.ptr, InternalUtils.check_arr_len(blinding_point_arg, 33));
+       public static UpdateAddHTLC of(org.ldk.structs.ChannelId channel_id_arg, long htlc_id_arg, long amount_msat_arg, byte[] payment_hash_arg, int cltv_expiry_arg, org.ldk.structs.Option_u64Z skimmed_fee_msat_arg, org.ldk.structs.OnionPacket onion_routing_packet_arg, @Nullable byte[] blinding_point_arg) {
+               long ret = bindings.UpdateAddHTLC_new(channel_id_arg.ptr, htlc_id_arg, amount_msat_arg, InternalUtils.check_arr_len(payment_hash_arg, 32), cltv_expiry_arg, skimmed_fee_msat_arg.ptr, onion_routing_packet_arg.ptr, InternalUtils.check_arr_len(blinding_point_arg, 33));
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(htlc_id_arg);
                Reference.reachabilityFence(amount_msat_arg);
@@ -205,6 +209,7 @@ public class UpdateAddHTLC extends CommonBase {
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.UpdateAddHTLC ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UpdateAddHTLC(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(skimmed_fee_msat_arg); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(onion_routing_packet_arg); };
                return ret_hu_conv;
@@ -246,7 +251,7 @@ public class UpdateAddHTLC extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.UpdateAddHTLC b) {
-               boolean ret = bindings.UpdateAddHTLC_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.UpdateAddHTLC_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index e003c0d6a4713a87ef6211d95d57cd5bad04f80a..004c1a893c369f1bf309e6028ae499f09a11f568 100644 (file)
@@ -25,19 +25,23 @@ public class UpdateFailHTLC extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.UpdateFailHTLC_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.UpdateFailHTLC_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.UpdateFailHTLC_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.UpdateFailHTLC_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -94,7 +98,7 @@ public class UpdateFailHTLC extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.UpdateFailHTLC b) {
-               boolean ret = bindings.UpdateFailHTLC_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.UpdateFailHTLC_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 7bfc2ffc8364a45a5d804ecfe71f1266df7527ea..03767ddd77666dddf1c6fe7cf283641b363d90c0 100644 (file)
@@ -25,19 +25,23 @@ public class UpdateFailMalformedHTLC extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.UpdateFailMalformedHTLC_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.UpdateFailMalformedHTLC_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.UpdateFailMalformedHTLC_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.UpdateFailMalformedHTLC_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -112,7 +116,7 @@ public class UpdateFailMalformedHTLC extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.UpdateFailMalformedHTLC b) {
-               boolean ret = bindings.UpdateFailMalformedHTLC_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.UpdateFailMalformedHTLC_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 64e4c26e3bf42bc4ca89361732aaae74068a0ffb..0a8c588a05345c0ce62cd520b020e7e421676b23 100644 (file)
@@ -25,19 +25,23 @@ public class UpdateFee extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.UpdateFee_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.UpdateFee_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.UpdateFee_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.UpdateFee_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -61,13 +65,14 @@ public class UpdateFee extends CommonBase {
        /**
         * Constructs a new UpdateFee given each field
         */
-       public static UpdateFee of(byte[] channel_id_arg, int feerate_per_kw_arg) {
-               long ret = bindings.UpdateFee_new(InternalUtils.check_arr_len(channel_id_arg, 32), feerate_per_kw_arg);
+       public static UpdateFee of(org.ldk.structs.ChannelId channel_id_arg, int feerate_per_kw_arg) {
+               long ret = bindings.UpdateFee_new(channel_id_arg.ptr, feerate_per_kw_arg);
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(feerate_per_kw_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.UpdateFee ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UpdateFee(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                return ret_hu_conv;
        }
 
@@ -107,7 +112,7 @@ public class UpdateFee extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.UpdateFee b) {
-               boolean ret = bindings.UpdateFee_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.UpdateFee_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 1878e2c491c77fe064f58acbdfcedd72942bc7bd..1f9efc65c3ac97d6681659f8184a57c5afea45ad 100644 (file)
@@ -25,19 +25,23 @@ public class UpdateFulfillHTLC extends CommonBase {
        /**
         * The channel ID
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.UpdateFulfillHTLC_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.UpdateFulfillHTLC_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
         * The channel ID
         */
-       public void set_channel_id(byte[] val) {
-               bindings.UpdateFulfillHTLC_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.UpdateFulfillHTLC_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -79,14 +83,15 @@ public class UpdateFulfillHTLC extends CommonBase {
        /**
         * Constructs a new UpdateFulfillHTLC given each field
         */
-       public static UpdateFulfillHTLC of(byte[] channel_id_arg, long htlc_id_arg, byte[] payment_preimage_arg) {
-               long ret = bindings.UpdateFulfillHTLC_new(InternalUtils.check_arr_len(channel_id_arg, 32), htlc_id_arg, InternalUtils.check_arr_len(payment_preimage_arg, 32));
+       public static UpdateFulfillHTLC of(org.ldk.structs.ChannelId channel_id_arg, long htlc_id_arg, byte[] payment_preimage_arg) {
+               long ret = bindings.UpdateFulfillHTLC_new(channel_id_arg.ptr, htlc_id_arg, InternalUtils.check_arr_len(payment_preimage_arg, 32));
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(htlc_id_arg);
                Reference.reachabilityFence(payment_preimage_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.UpdateFulfillHTLC ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UpdateFulfillHTLC(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                return ret_hu_conv;
        }
 
@@ -126,7 +131,7 @@ public class UpdateFulfillHTLC extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.UpdateFulfillHTLC b) {
-               boolean ret = bindings.UpdateFulfillHTLC_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.UpdateFulfillHTLC_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 7a3a99a88aae36db71bf80b4194f8e3250dc71ca..c995f6e4daf74a50e3f576df35d0264bb8ac5161 100644 (file)
@@ -39,7 +39,7 @@ public class UserConfig extends CommonBase {
         * Channel handshake config that we propose to our counterparty.
         */
        public void set_channel_handshake_config(org.ldk.structs.ChannelHandshakeConfig val) {
-               bindings.UserConfig_set_channel_handshake_config(this.ptr, val == null ? 0 : val.ptr);
+               bindings.UserConfig_set_channel_handshake_config(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -61,7 +61,7 @@ public class UserConfig extends CommonBase {
         * Limits applied to our counterparty's proposed channel handshake config settings.
         */
        public void set_channel_handshake_limits(org.ldk.structs.ChannelHandshakeLimits val) {
-               bindings.UserConfig_set_channel_handshake_limits(this.ptr, val == null ? 0 : val.ptr);
+               bindings.UserConfig_set_channel_handshake_limits(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -83,7 +83,7 @@ public class UserConfig extends CommonBase {
         * Channel config which affects behavior during channel lifetime.
         */
        public void set_channel_config(org.ldk.structs.ChannelConfig val) {
-               bindings.UserConfig_set_channel_config(this.ptr, val == null ? 0 : val.ptr);
+               bindings.UserConfig_set_channel_config(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -275,7 +275,7 @@ public class UserConfig extends CommonBase {
         * Constructs a new UserConfig given each field
         */
        public static UserConfig of(org.ldk.structs.ChannelHandshakeConfig channel_handshake_config_arg, org.ldk.structs.ChannelHandshakeLimits channel_handshake_limits_arg, org.ldk.structs.ChannelConfig channel_config_arg, boolean accept_forwards_to_priv_channels_arg, boolean accept_inbound_channels_arg, boolean manually_accept_inbound_channels_arg, boolean accept_intercept_htlcs_arg, boolean accept_mpp_keysend_arg) {
-               long ret = bindings.UserConfig_new(channel_handshake_config_arg == null ? 0 : channel_handshake_config_arg.ptr, channel_handshake_limits_arg == null ? 0 : channel_handshake_limits_arg.ptr, channel_config_arg == null ? 0 : channel_config_arg.ptr, accept_forwards_to_priv_channels_arg, accept_inbound_channels_arg, manually_accept_inbound_channels_arg, accept_intercept_htlcs_arg, accept_mpp_keysend_arg);
+               long ret = bindings.UserConfig_new(channel_handshake_config_arg.ptr, channel_handshake_limits_arg.ptr, channel_config_arg.ptr, accept_forwards_to_priv_channels_arg, accept_inbound_channels_arg, manually_accept_inbound_channels_arg, accept_intercept_htlcs_arg, accept_mpp_keysend_arg);
                Reference.reachabilityFence(channel_handshake_config_arg);
                Reference.reachabilityFence(channel_handshake_limits_arg);
                Reference.reachabilityFence(channel_config_arg);
index 156d1e93eed3c58265b116cc2969b22b38f55ff0..72e271798ad107c46ac58bbb89b06bf7de12a885 100644 (file)
@@ -117,6 +117,72 @@ public class UtilMethods {
                return ret_hu_conv;
        }
 
+       /**
+        * Extracts the block height (most significant 3-bytes) from the `short_channel_id`
+        */
+       public static int block_from_scid(long short_channel_id) {
+               int ret = bindings.block_from_scid(short_channel_id);
+               Reference.reachabilityFence(short_channel_id);
+               return ret;
+       }
+
+       /**
+        * Extracts the tx index (bytes [2..4]) from the `short_channel_id`
+        */
+       public static int tx_index_from_scid(long short_channel_id) {
+               int ret = bindings.tx_index_from_scid(short_channel_id);
+               Reference.reachabilityFence(short_channel_id);
+               return ret;
+       }
+
+       /**
+        * Extracts the vout (bytes [0..2]) from the `short_channel_id`
+        */
+       public static short vout_from_scid(long short_channel_id) {
+               short ret = bindings.vout_from_scid(short_channel_id);
+               Reference.reachabilityFence(short_channel_id);
+               return ret;
+       }
+
+       /**
+        * Constructs a `short_channel_id` using the components pieces. Results in an error
+        * if the block height, tx index, or vout index overflow the maximum sizes.
+        */
+       public static Result_u64ShortChannelIdErrorZ scid_from_parts(long block, long tx_index, long vout_index) {
+               long ret = bindings.scid_from_parts(block, tx_index, vout_index);
+               Reference.reachabilityFence(block);
+               Reference.reachabilityFence(tx_index);
+               Reference.reachabilityFence(vout_index);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_u64ShortChannelIdErrorZ ret_hu_conv = Result_u64ShortChannelIdErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Read a C2Tuple_BestBlockOutputSweeperZ from a byte array, created by C2Tuple_BestBlockOutputSweeperZ_write
+        */
+       public static Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ C2Tuple_BestBlockOutputSweeperZ_read(byte[] ser, org.ldk.structs.BroadcasterInterface arg_a, org.ldk.structs.FeeEstimator arg_b, org.ldk.structs.Option_FilterZ arg_c, org.ldk.structs.OutputSpender arg_d, org.ldk.structs.ChangeDestinationSource arg_e, org.ldk.structs.KVStore arg_f, org.ldk.structs.Logger arg_g) {
+               long ret = bindings.C2Tuple_BestBlockOutputSweeperZ_read(ser, arg_a.ptr, arg_b.ptr, arg_c.ptr, arg_d.ptr, arg_e.ptr, arg_f.ptr, arg_g.ptr);
+               Reference.reachabilityFence(ser);
+               Reference.reachabilityFence(arg_a);
+               Reference.reachabilityFence(arg_b);
+               Reference.reachabilityFence(arg_c);
+               Reference.reachabilityFence(arg_d);
+               Reference.reachabilityFence(arg_e);
+               Reference.reachabilityFence(arg_f);
+               Reference.reachabilityFence(arg_g);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_a); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_b); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_c); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_d); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_e); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_f); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(arg_g); };
+               return ret_hu_conv;
+       }
+
        /**
         * Read a MonitorEvent from a byte array, created by MonitorEvent_write
         */
@@ -155,7 +221,7 @@ public class UtilMethods {
         * [`Event::PaymentClaimable`]: crate::events::Event::PaymentClaimable
         */
        public static Result_PendingHTLCInfoInboundHTLCErrZ peel_payment_onion(org.ldk.structs.UpdateAddHTLC msg, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, int cur_height, boolean accept_mpp_keysend, boolean allow_skimmed_fees) {
-               long ret = bindings.peel_payment_onion(msg == null ? 0 : msg.ptr, node_signer.ptr, logger.ptr, cur_height, accept_mpp_keysend, allow_skimmed_fees);
+               long ret = bindings.peel_payment_onion(msg.ptr, node_signer.ptr, logger.ptr, cur_height, accept_mpp_keysend, allow_skimmed_fees);
                Reference.reachabilityFence(msg);
                Reference.reachabilityFence(node_signer);
                Reference.reachabilityFence(logger);
@@ -175,7 +241,7 @@ public class UtilMethods {
         * [`ChannelManager`].
         */
        public static InitFeatures provided_init_features(org.ldk.structs.UserConfig config) {
-               long ret = bindings.provided_init_features(config == null ? 0 : config.ptr);
+               long ret = bindings.provided_init_features(config.ptr);
                Reference.reachabilityFence(config);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.InitFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InitFeatures(null, ret); }
@@ -188,7 +254,7 @@ public class UtilMethods {
         * Read a C2Tuple_ThirtyTwoBytesChannelManagerZ from a byte array, created by C2Tuple_ThirtyTwoBytesChannelManagerZ_write
         */
        public static Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ C2Tuple_ThirtyTwoBytesChannelManagerZ_read(byte[] ser, EntropySource arg_entropy_source, NodeSigner arg_node_signer, SignerProvider arg_signer_provider, FeeEstimator arg_fee_estimator, Watch arg_chain_monitor, BroadcasterInterface arg_tx_broadcaster, Router arg_router, Logger arg_logger, UserConfig arg_default_config, ChannelMonitor[] arg_channel_monitors) {
-               long ret = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_read(ser, bindings.ChannelManagerReadArgs_new(arg_entropy_source.ptr, arg_node_signer.ptr, arg_signer_provider.ptr, arg_fee_estimator.ptr, arg_chain_monitor.ptr, arg_tx_broadcaster.ptr, arg_router.ptr, arg_logger.ptr, arg_default_config == null ? 0 : arg_default_config.ptr, arg_channel_monitors != null ? Arrays.stream(arg_channel_monitors).mapToLong(arg_channel_monitors_conv_16 -> arg_channel_monitors_conv_16 == null ? 0 : arg_channel_monitors_conv_16.ptr).toArray() : null));
+               long ret = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_read(ser, bindings.ChannelManagerReadArgs_new(arg_entropy_source.ptr, arg_node_signer.ptr, arg_signer_provider.ptr, arg_fee_estimator.ptr, arg_chain_monitor.ptr, arg_tx_broadcaster.ptr, arg_router.ptr, arg_logger.ptr, arg_default_config.ptr, arg_channel_monitors != null ? Arrays.stream(arg_channel_monitors).mapToLong(arg_channel_monitors_conv_16 -> arg_channel_monitors_conv_16.ptr).toArray() : null));
                Reference.reachabilityFence(ser);
                Reference.reachabilityFence(arg_entropy_source);
                Reference.reachabilityFence(arg_node_signer);
@@ -215,6 +281,18 @@ public class UtilMethods {
                return ret_hu_conv;
        }
 
+       /**
+        * Adds a tweak to a public key to derive a new public key.
+        * 
+        * May panic if `tweak` is not the output of a SHA-256 hash.
+        */
+       public static byte[] add_public_key_tweak(byte[] base_point, byte[] tweak) {
+               byte[] ret = bindings.add_public_key_tweak(InternalUtils.check_arr_len(base_point, 33), InternalUtils.check_arr_len(tweak, 32));
+               Reference.reachabilityFence(base_point);
+               Reference.reachabilityFence(tweak);
+               return ret;
+       }
+
        /**
         * Equivalent to [`crate::ln::channelmanager::ChannelManager::create_inbound_payment`], but no
         * `ChannelManager` is required. Useful for generating invoices for [phantom node payments] without
@@ -233,7 +311,7 @@ public class UtilMethods {
         * [`NodeSigner::get_inbound_payment_key_material`]: crate::sign::NodeSigner::get_inbound_payment_key_material
         */
        public static Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ create(org.ldk.structs.ExpandedKey keys, org.ldk.structs.Option_u64Z min_value_msat, int invoice_expiry_delta_secs, org.ldk.structs.EntropySource entropy_source, long current_time, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) {
-               long ret = bindings.create(keys == null ? 0 : keys.ptr, min_value_msat.ptr, invoice_expiry_delta_secs, entropy_source.ptr, current_time, min_final_cltv_expiry_delta.ptr);
+               long ret = bindings.create(keys.ptr, min_value_msat.ptr, invoice_expiry_delta_secs, entropy_source.ptr, current_time, min_final_cltv_expiry_delta.ptr);
                Reference.reachabilityFence(keys);
                Reference.reachabilityFence(min_value_msat);
                Reference.reachabilityFence(invoice_expiry_delta_secs);
@@ -262,7 +340,7 @@ public class UtilMethods {
         * [phantom node payments]: crate::sign::PhantomKeysManager
         */
        public static Result_ThirtyTwoBytesNoneZ create_from_hash(org.ldk.structs.ExpandedKey keys, org.ldk.structs.Option_u64Z min_value_msat, byte[] payment_hash, int invoice_expiry_delta_secs, long current_time, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) {
-               long ret = bindings.create_from_hash(keys == null ? 0 : keys.ptr, min_value_msat.ptr, InternalUtils.check_arr_len(payment_hash, 32), invoice_expiry_delta_secs, current_time, min_final_cltv_expiry_delta.ptr);
+               long ret = bindings.create_from_hash(keys.ptr, min_value_msat.ptr, InternalUtils.check_arr_len(payment_hash, 32), invoice_expiry_delta_secs, current_time, min_final_cltv_expiry_delta.ptr);
                Reference.reachabilityFence(keys);
                Reference.reachabilityFence(min_value_msat);
                Reference.reachabilityFence(payment_hash);
@@ -295,7 +373,7 @@ public class UtilMethods {
         * Gets the weight for an HTLC-Success transaction.
         */
        public static long htlc_success_tx_weight(org.ldk.structs.ChannelTypeFeatures channel_type_features) {
-               long ret = bindings.htlc_success_tx_weight(channel_type_features == null ? 0 : channel_type_features.ptr);
+               long ret = bindings.htlc_success_tx_weight(channel_type_features.ptr);
                Reference.reachabilityFence(channel_type_features);
                return ret;
        }
@@ -304,7 +382,7 @@ public class UtilMethods {
         * Gets the weight for an HTLC-Timeout transaction.
         */
        public static long htlc_timeout_tx_weight(org.ldk.structs.ChannelTypeFeatures channel_type_features) {
-               long ret = bindings.htlc_timeout_tx_weight(channel_type_features == null ? 0 : channel_type_features.ptr);
+               long ret = bindings.htlc_timeout_tx_weight(channel_type_features.ptr);
                Reference.reachabilityFence(channel_type_features);
                return ret;
        }
@@ -335,7 +413,7 @@ public class UtilMethods {
         * Build a closing transaction
         */
        public static byte[] build_closing_transaction(long to_holder_value_sat, long to_counterparty_value_sat, byte[] to_holder_script, byte[] to_counterparty_script, org.ldk.structs.OutPoint funding_outpoint) {
-               byte[] ret = bindings.build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, to_holder_script, to_counterparty_script, funding_outpoint == null ? 0 : funding_outpoint.ptr);
+               byte[] ret = bindings.build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, to_holder_script, to_counterparty_script, funding_outpoint.ptr);
                Reference.reachabilityFence(to_holder_value_sat);
                Reference.reachabilityFence(to_counterparty_value_sat);
                Reference.reachabilityFence(to_holder_script);
@@ -376,7 +454,7 @@ public class UtilMethods {
         * Encumbering a `to_holder` output on a commitment transaction or 2nd-stage HTLC transactions.
         */
        public static byte[] get_revokeable_redeemscript(org.ldk.structs.RevocationKey revocation_key, short contest_delay, org.ldk.structs.DelayedPaymentKey broadcaster_delayed_payment_key) {
-               byte[] ret = bindings.get_revokeable_redeemscript(revocation_key == null ? 0 : revocation_key.ptr, contest_delay, broadcaster_delayed_payment_key == null ? 0 : broadcaster_delayed_payment_key.ptr);
+               byte[] ret = bindings.get_revokeable_redeemscript(revocation_key.ptr, contest_delay, broadcaster_delayed_payment_key.ptr);
                Reference.reachabilityFence(revocation_key);
                Reference.reachabilityFence(contest_delay);
                Reference.reachabilityFence(broadcaster_delayed_payment_key);
@@ -388,7 +466,7 @@ public class UtilMethods {
         * the channel type.
         */
        public static byte[] get_counterparty_payment_script(org.ldk.structs.ChannelTypeFeatures channel_type_features, byte[] payment_key) {
-               byte[] ret = bindings.get_counterparty_payment_script(channel_type_features == null ? 0 : channel_type_features.ptr, InternalUtils.check_arr_len(payment_key, 33));
+               byte[] ret = bindings.get_counterparty_payment_script(channel_type_features.ptr, InternalUtils.check_arr_len(payment_key, 33));
                Reference.reachabilityFence(channel_type_features);
                Reference.reachabilityFence(payment_key);
                return ret;
@@ -399,7 +477,7 @@ public class UtilMethods {
         * does not need to have its previous_output_index filled.
         */
        public static byte[] get_htlc_redeemscript(org.ldk.structs.HTLCOutputInCommitment htlc, org.ldk.structs.ChannelTypeFeatures channel_type_features, org.ldk.structs.TxCreationKeys keys) {
-               byte[] ret = bindings.get_htlc_redeemscript(htlc == null ? 0 : htlc.ptr, channel_type_features == null ? 0 : channel_type_features.ptr, keys == null ? 0 : keys.ptr);
+               byte[] ret = bindings.get_htlc_redeemscript(htlc.ptr, channel_type_features.ptr, keys.ptr);
                Reference.reachabilityFence(htlc);
                Reference.reachabilityFence(channel_type_features);
                Reference.reachabilityFence(keys);
@@ -427,7 +505,7 @@ public class UtilMethods {
         * commitment transaction).
         */
        public static byte[] build_htlc_transaction(byte[] commitment_txid, int feerate_per_kw, short contest_delay, org.ldk.structs.HTLCOutputInCommitment htlc, org.ldk.structs.ChannelTypeFeatures channel_type_features, org.ldk.structs.DelayedPaymentKey broadcaster_delayed_payment_key, org.ldk.structs.RevocationKey revocation_key) {
-               byte[] ret = bindings.build_htlc_transaction(InternalUtils.check_arr_len(commitment_txid, 32), feerate_per_kw, contest_delay, htlc == null ? 0 : htlc.ptr, channel_type_features == null ? 0 : channel_type_features.ptr, broadcaster_delayed_payment_key == null ? 0 : broadcaster_delayed_payment_key.ptr, revocation_key == null ? 0 : revocation_key.ptr);
+               byte[] ret = bindings.build_htlc_transaction(InternalUtils.check_arr_len(commitment_txid, 32), feerate_per_kw, contest_delay, htlc.ptr, channel_type_features.ptr, broadcaster_delayed_payment_key.ptr, revocation_key.ptr);
                Reference.reachabilityFence(commitment_txid);
                Reference.reachabilityFence(feerate_per_kw);
                Reference.reachabilityFence(contest_delay);
@@ -442,7 +520,7 @@ public class UtilMethods {
         * Returns the witness required to satisfy and spend a HTLC input.
         */
        public static byte[] build_htlc_input_witness(byte[] local_sig, byte[] remote_sig, org.ldk.structs.Option_ThirtyTwoBytesZ preimage, byte[] redeem_script, org.ldk.structs.ChannelTypeFeatures channel_type_features) {
-               byte[] ret = bindings.build_htlc_input_witness(InternalUtils.check_arr_len(local_sig, 64), InternalUtils.check_arr_len(remote_sig, 64), preimage.ptr, redeem_script, channel_type_features == null ? 0 : channel_type_features.ptr);
+               byte[] ret = bindings.build_htlc_input_witness(InternalUtils.check_arr_len(local_sig, 64), InternalUtils.check_arr_len(remote_sig, 64), preimage.ptr, redeem_script, channel_type_features.ptr);
                Reference.reachabilityFence(local_sig);
                Reference.reachabilityFence(remote_sig);
                Reference.reachabilityFence(preimage);
@@ -517,7 +595,7 @@ public class UtilMethods {
         * Returns an error if it is invalid.
         */
        public static Result_NoneLightningErrorZ verify_node_announcement(org.ldk.structs.NodeAnnouncement msg) {
-               long ret = bindings.verify_node_announcement(msg == null ? 0 : msg.ptr);
+               long ret = bindings.verify_node_announcement(msg.ptr);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
@@ -531,7 +609,7 @@ public class UtilMethods {
         * Returns an error if one of the signatures is invalid.
         */
        public static Result_NoneLightningErrorZ verify_channel_announcement(org.ldk.structs.ChannelAnnouncement msg) {
-               long ret = bindings.verify_channel_announcement(msg == null ? 0 : msg.ptr);
+               long ret = bindings.verify_channel_announcement(msg.ptr);
                Reference.reachabilityFence(msg);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NoneLightningErrorZ ret_hu_conv = Result_NoneLightningErrorZ.constr_from_ptr(ret);
@@ -569,7 +647,7 @@ public class UtilMethods {
         * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
        public static Result_RouteLightningErrorZ find_route(byte[] our_node_pubkey, org.ldk.structs.RouteParameters route_params, org.ldk.structs.NetworkGraph network_graph, @Nullable ChannelDetails[] first_hops, org.ldk.structs.Logger logger, org.ldk.structs.ScoreLookUp scorer, org.ldk.structs.ProbabilisticScoringFeeParameters score_params, byte[] random_seed_bytes) {
-               long ret = bindings.find_route(InternalUtils.check_arr_len(our_node_pubkey, 33), route_params == null ? 0 : route_params.ptr, network_graph == null ? 0 : network_graph.ptr, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16 == null ? 0 : first_hops_conv_16.ptr).toArray() : null, logger.ptr, scorer.ptr, score_params == null ? 0 : score_params.ptr, InternalUtils.check_arr_len(random_seed_bytes, 32));
+               long ret = bindings.find_route(InternalUtils.check_arr_len(our_node_pubkey, 33), route_params.ptr, network_graph.ptr, first_hops != null ? Arrays.stream(first_hops).mapToLong(first_hops_conv_16 -> first_hops_conv_16.ptr).toArray() : null, logger.ptr, scorer.ptr, score_params.ptr, InternalUtils.check_arr_len(random_seed_bytes, 32));
                Reference.reachabilityFence(our_node_pubkey);
                Reference.reachabilityFence(route_params);
                Reference.reachabilityFence(network_graph);
@@ -596,7 +674,7 @@ public class UtilMethods {
         * Re-uses logic from `find_route`, so the restrictions described there also apply here.
         */
        public static Result_RouteLightningErrorZ build_route_from_hops(byte[] our_node_pubkey, byte[][] hops, org.ldk.structs.RouteParameters route_params, org.ldk.structs.NetworkGraph network_graph, org.ldk.structs.Logger logger, byte[] random_seed_bytes) {
-               long ret = bindings.build_route_from_hops(InternalUtils.check_arr_len(our_node_pubkey, 33), hops != null ? Arrays.stream(hops).map(hops_conv_8 -> InternalUtils.check_arr_len(hops_conv_8, 33)).toArray(byte[][]::new) : null, route_params == null ? 0 : route_params.ptr, network_graph == null ? 0 : network_graph.ptr, logger.ptr, InternalUtils.check_arr_len(random_seed_bytes, 32));
+               long ret = bindings.build_route_from_hops(InternalUtils.check_arr_len(our_node_pubkey, 33), hops != null ? Arrays.stream(hops).map(hops_conv_8 -> InternalUtils.check_arr_len(hops_conv_8, 33)).toArray(byte[][]::new) : null, route_params.ptr, network_graph.ptr, logger.ptr, InternalUtils.check_arr_len(random_seed_bytes, 32));
                Reference.reachabilityFence(our_node_pubkey);
                Reference.reachabilityFence(hops);
                Reference.reachabilityFence(route_params);
@@ -643,19 +721,57 @@ public class UtilMethods {
                return ret_hu_conv;
        }
 
+       /**
+        * Creates an [`OnionMessage`] with the given `contents` for sending to the destination of
+        * `path`, first calling [`Destination::resolve`] on `path.destination` with the given
+        * [`ReadOnlyNetworkGraph`].
+        * 
+        * Returns the node id of the peer to send the message to, the message itself, and any addresses
+        * needed to connect to the first node.
+        * 
+        * Note that reply_path (or a relevant inner pointer) may be NULL or all-0s to represent None
+        */
+       public static Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message_resolving_destination(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.NodeIdLookUp node_id_lookup, org.ldk.structs.ReadOnlyNetworkGraph network_graph, org.ldk.structs.OnionMessagePath path, org.ldk.structs.OnionMessageContents contents, @Nullable org.ldk.structs.BlindedPath reply_path) {
+               long ret = bindings.create_onion_message_resolving_destination(entropy_source.ptr, node_signer.ptr, node_id_lookup.ptr, network_graph.ptr, path.ptr, contents.ptr, reply_path == null ? 0 : reply_path.ptr);
+               Reference.reachabilityFence(entropy_source);
+               Reference.reachabilityFence(node_signer);
+               Reference.reachabilityFence(node_id_lookup);
+               Reference.reachabilityFence(network_graph);
+               Reference.reachabilityFence(path);
+               Reference.reachabilityFence(contents);
+               Reference.reachabilityFence(reply_path);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ ret_hu_conv = Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(entropy_source); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_signer); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_id_lookup); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(network_graph); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(path); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(contents); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(reply_path); };
+               return ret_hu_conv;
+       }
+
        /**
         * Creates an [`OnionMessage`] with the given `contents` for sending to the destination of
         * `path`.
         * 
         * Returns the node id of the peer to send the message to, the message itself, and any addresses
-        * need to connect to the first node.
+        * needed to connect to the first node.
+        * 
+        * Returns [`SendError::UnresolvedIntroductionNode`] if:
+        * - `destination` contains a blinded path with an [`IntroductionNode::DirectedShortChannelId`],
+        * - unless it can be resolved by [`NodeIdLookUp::next_node_id`].
+        * Use [`create_onion_message_resolving_destination`] instead to resolve the introduction node
+        * first with a [`ReadOnlyNetworkGraph`].
         * 
         * Note that reply_path (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public static Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.OnionMessagePath path, org.ldk.structs.OnionMessageContents contents, @Nullable org.ldk.structs.BlindedPath reply_path) {
-               long ret = bindings.create_onion_message(entropy_source.ptr, node_signer.ptr, path == null ? 0 : path.ptr, contents.ptr, reply_path == null ? 0 : reply_path.ptr);
+       public static Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message(org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.NodeIdLookUp node_id_lookup, org.ldk.structs.OnionMessagePath path, org.ldk.structs.OnionMessageContents contents, @Nullable org.ldk.structs.BlindedPath reply_path) {
+               long ret = bindings.create_onion_message(entropy_source.ptr, node_signer.ptr, node_id_lookup.ptr, path.ptr, contents.ptr, reply_path == null ? 0 : reply_path.ptr);
                Reference.reachabilityFence(entropy_source);
                Reference.reachabilityFence(node_signer);
+               Reference.reachabilityFence(node_id_lookup);
                Reference.reachabilityFence(path);
                Reference.reachabilityFence(contents);
                Reference.reachabilityFence(reply_path);
@@ -663,6 +779,7 @@ public class UtilMethods {
                Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ ret_hu_conv = Result_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(entropy_source); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_signer); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(node_id_lookup); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(path); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(contents); };
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(reply_path); };
@@ -676,7 +793,7 @@ public class UtilMethods {
         * receiver.
         */
        public static Result_PeeledOnionNoneZ peel_onion_message(org.ldk.structs.OnionMessage msg, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.structs.CustomOnionMessageHandler custom_handler) {
-               long ret = bindings.peel_onion_message(msg == null ? 0 : msg.ptr, node_signer.ptr, logger.ptr, custom_handler.ptr);
+               long ret = bindings.peel_onion_message(msg.ptr, node_signer.ptr, logger.ptr, custom_handler.ptr);
                Reference.reachabilityFence(msg);
                Reference.reachabilityFence(node_signer);
                Reference.reachabilityFence(logger);
@@ -702,10 +819,11 @@ public class UtilMethods {
        /**
         * Create a one-hop blinded path for a payment.
         */
-       public static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_one_hop_for_payment(byte[] payee_node_id, org.ldk.structs.ReceiveTlvs payee_tlvs, org.ldk.structs.EntropySource entropy_source) {
-               long ret = bindings.BlindedPath_one_hop_for_payment(InternalUtils.check_arr_len(payee_node_id, 33), payee_tlvs == null ? 0 : payee_tlvs.ptr, entropy_source.ptr);
+       public static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_one_hop_for_payment(byte[] payee_node_id, org.ldk.structs.ReceiveTlvs payee_tlvs, short min_final_cltv_expiry_delta, org.ldk.structs.EntropySource entropy_source) {
+               long ret = bindings.BlindedPath_one_hop_for_payment(InternalUtils.check_arr_len(payee_node_id, 33), payee_tlvs.ptr, min_final_cltv_expiry_delta, entropy_source.ptr);
                Reference.reachabilityFence(payee_node_id);
                Reference.reachabilityFence(payee_tlvs);
+               Reference.reachabilityFence(min_final_cltv_expiry_delta);
                Reference.reachabilityFence(entropy_source);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ ret_hu_conv = Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.constr_from_ptr(ret);
@@ -724,12 +842,13 @@ public class UtilMethods {
         * 
         * [`ForwardTlvs`]: crate::blinded_path::payment::ForwardTlvs
         */
-       public static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_new_for_payment(ForwardNode[] intermediate_nodes, byte[] payee_node_id, org.ldk.structs.ReceiveTlvs payee_tlvs, long htlc_maximum_msat, org.ldk.structs.EntropySource entropy_source) {
-               long ret = bindings.BlindedPath_new_for_payment(intermediate_nodes != null ? Arrays.stream(intermediate_nodes).mapToLong(intermediate_nodes_conv_13 -> intermediate_nodes_conv_13 == null ? 0 : intermediate_nodes_conv_13.ptr).toArray() : null, InternalUtils.check_arr_len(payee_node_id, 33), payee_tlvs == null ? 0 : payee_tlvs.ptr, htlc_maximum_msat, entropy_source.ptr);
+       public static Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_new_for_payment(ForwardNode[] intermediate_nodes, byte[] payee_node_id, org.ldk.structs.ReceiveTlvs payee_tlvs, long htlc_maximum_msat, short min_final_cltv_expiry_delta, org.ldk.structs.EntropySource entropy_source) {
+               long ret = bindings.BlindedPath_new_for_payment(intermediate_nodes != null ? Arrays.stream(intermediate_nodes).mapToLong(intermediate_nodes_conv_13 -> intermediate_nodes_conv_13.ptr).toArray() : null, InternalUtils.check_arr_len(payee_node_id, 33), payee_tlvs.ptr, htlc_maximum_msat, min_final_cltv_expiry_delta, entropy_source.ptr);
                Reference.reachabilityFence(intermediate_nodes);
                Reference.reachabilityFence(payee_node_id);
                Reference.reachabilityFence(payee_tlvs);
                Reference.reachabilityFence(htlc_maximum_msat);
+               Reference.reachabilityFence(min_final_cltv_expiry_delta);
                Reference.reachabilityFence(entropy_source);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ ret_hu_conv = Result_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.constr_from_ptr(ret);
@@ -798,7 +917,7 @@ public class UtilMethods {
         * [`ChannelManager::send_preflight_probes`]: lightning::ln::channelmanager::ChannelManager::send_preflight_probes
         */
        public static Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ payment_parameters_from_zero_amount_invoice(org.ldk.structs.Bolt11Invoice invoice, long amount_msat) {
-               long ret = bindings.payment_parameters_from_zero_amount_invoice(invoice == null ? 0 : invoice.ptr, amount_msat);
+               long ret = bindings.payment_parameters_from_zero_amount_invoice(invoice.ptr, amount_msat);
                Reference.reachabilityFence(invoice);
                Reference.reachabilityFence(amount_msat);
                if (ret >= 0 && ret <= 4096) { return null; }
@@ -821,7 +940,7 @@ public class UtilMethods {
         * [`ChannelManager::send_preflight_probes`]: lightning::ln::channelmanager::ChannelManager::send_preflight_probes
         */
        public static Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ payment_parameters_from_invoice(org.ldk.structs.Bolt11Invoice invoice) {
-               long ret = bindings.payment_parameters_from_invoice(invoice == null ? 0 : invoice.ptr);
+               long ret = bindings.payment_parameters_from_invoice(invoice.ptr);
                Reference.reachabilityFence(invoice);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ ret_hu_conv = Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.constr_from_ptr(ret);
@@ -872,7 +991,7 @@ public class UtilMethods {
         * available and the current time is supplied by the caller.
         */
        public static Result_Bolt11InvoiceSignOrCreationErrorZ create_phantom_invoice(org.ldk.structs.Option_u64Z amt_msat, org.ldk.structs.Option_ThirtyTwoBytesZ payment_hash, java.lang.String description, int invoice_expiry_delta_secs, PhantomRouteHints[] phantom_route_hints, org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta, long duration_since_epoch) {
-               long ret = bindings.create_phantom_invoice(amt_msat.ptr, payment_hash.ptr, description, invoice_expiry_delta_secs, phantom_route_hints != null ? Arrays.stream(phantom_route_hints).mapToLong(phantom_route_hints_conv_19 -> phantom_route_hints_conv_19 == null ? 0 : phantom_route_hints_conv_19.ptr).toArray() : null, entropy_source.ptr, node_signer.ptr, logger.ptr, network, min_final_cltv_expiry_delta.ptr, duration_since_epoch);
+               long ret = bindings.create_phantom_invoice(amt_msat.ptr, payment_hash.ptr, description, invoice_expiry_delta_secs, phantom_route_hints != null ? Arrays.stream(phantom_route_hints).mapToLong(phantom_route_hints_conv_19 -> phantom_route_hints_conv_19.ptr).toArray() : null, entropy_source.ptr, node_signer.ptr, logger.ptr, network, min_final_cltv_expiry_delta.ptr, duration_since_epoch);
                Reference.reachabilityFence(amt_msat);
                Reference.reachabilityFence(payment_hash);
                Reference.reachabilityFence(description);
@@ -937,7 +1056,7 @@ public class UtilMethods {
         * available and the current time is supplied by the caller.
         */
        public static Result_Bolt11InvoiceSignOrCreationErrorZ create_phantom_invoice_with_description_hash(org.ldk.structs.Option_u64Z amt_msat, org.ldk.structs.Option_ThirtyTwoBytesZ payment_hash, int invoice_expiry_delta_secs, org.ldk.structs.Sha256 description_hash, PhantomRouteHints[] phantom_route_hints, org.ldk.structs.EntropySource entropy_source, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta, long duration_since_epoch) {
-               long ret = bindings.create_phantom_invoice_with_description_hash(amt_msat.ptr, payment_hash.ptr, invoice_expiry_delta_secs, description_hash == null ? 0 : description_hash.ptr, phantom_route_hints != null ? Arrays.stream(phantom_route_hints).mapToLong(phantom_route_hints_conv_19 -> phantom_route_hints_conv_19 == null ? 0 : phantom_route_hints_conv_19.ptr).toArray() : null, entropy_source.ptr, node_signer.ptr, logger.ptr, network, min_final_cltv_expiry_delta.ptr, duration_since_epoch);
+               long ret = bindings.create_phantom_invoice_with_description_hash(amt_msat.ptr, payment_hash.ptr, invoice_expiry_delta_secs, description_hash.ptr, phantom_route_hints != null ? Arrays.stream(phantom_route_hints).mapToLong(phantom_route_hints_conv_19 -> phantom_route_hints_conv_19.ptr).toArray() : null, entropy_source.ptr, node_signer.ptr, logger.ptr, network, min_final_cltv_expiry_delta.ptr, duration_since_epoch);
                Reference.reachabilityFence(amt_msat);
                Reference.reachabilityFence(payment_hash);
                Reference.reachabilityFence(invoice_expiry_delta_secs);
@@ -980,7 +1099,7 @@ public class UtilMethods {
         * [`MIN_FINAL_CLTV_EXPIRY_DETLA`]: lightning::ln::channelmanager::MIN_FINAL_CLTV_EXPIRY_DELTA
         */
        public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u64Z amt_msat, java.lang.String description, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) {
-               long ret = bindings.create_invoice_from_channelmanager(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
+               long ret = bindings.create_invoice_from_channelmanager(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
                Reference.reachabilityFence(channelmanager);
                Reference.reachabilityFence(node_signer);
                Reference.reachabilityFence(logger);
@@ -1018,7 +1137,7 @@ public class UtilMethods {
         * [`MIN_FINAL_CLTV_EXPIRY_DETLA`]: lightning::ln::channelmanager::MIN_FINAL_CLTV_EXPIRY_DELTA
         */
        public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u64Z amt_msat, org.ldk.structs.Sha256 description_hash, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) {
-               long ret = bindings.create_invoice_from_channelmanager_with_description_hash(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description_hash == null ? 0 : description_hash.ptr, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
+               long ret = bindings.create_invoice_from_channelmanager_with_description_hash(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description_hash.ptr, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
                Reference.reachabilityFence(channelmanager);
                Reference.reachabilityFence(node_signer);
                Reference.reachabilityFence(logger);
@@ -1044,7 +1163,7 @@ public class UtilMethods {
         * available and the current time is supplied by the caller.
         */
        public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u64Z amt_msat, org.ldk.structs.Sha256 description_hash, long duration_since_epoch, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) {
-               long ret = bindings.create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description_hash == null ? 0 : description_hash.ptr, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
+               long ret = bindings.create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description_hash.ptr, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
                Reference.reachabilityFence(channelmanager);
                Reference.reachabilityFence(node_signer);
                Reference.reachabilityFence(logger);
@@ -1071,7 +1190,7 @@ public class UtilMethods {
         * available and the current time is supplied by the caller.
         */
        public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_and_duration_since_epoch(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u64Z amt_msat, java.lang.String description, long duration_since_epoch, int invoice_expiry_delta_secs, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) {
-               long ret = bindings.create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
+               long ret = bindings.create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
                Reference.reachabilityFence(channelmanager);
                Reference.reachabilityFence(node_signer);
                Reference.reachabilityFence(logger);
@@ -1098,7 +1217,7 @@ public class UtilMethods {
         * the payment hash is also involved outside the scope of lightning.
         */
        public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.NodeSigner node_signer, org.ldk.structs.Logger logger, org.ldk.enums.Currency network, org.ldk.structs.Option_u64Z amt_msat, java.lang.String description, long duration_since_epoch, int invoice_expiry_delta_secs, byte[] payment_hash, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta) {
-               long ret = bindings.create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(channelmanager == null ? 0 : channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, duration_since_epoch, invoice_expiry_delta_secs, InternalUtils.check_arr_len(payment_hash, 32), min_final_cltv_expiry_delta.ptr);
+               long ret = bindings.create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(channelmanager.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description, duration_since_epoch, invoice_expiry_delta_secs, InternalUtils.check_arr_len(payment_hash, 32), min_final_cltv_expiry_delta.ptr);
                Reference.reachabilityFence(channelmanager);
                Reference.reachabilityFence(node_signer);
                Reference.reachabilityFence(logger);
index c9b06cb88908ccca35b5b323074a0a53f6e4b0bc..0787f3496bbdb1738d66776451f57f836cdc83a0 100644 (file)
@@ -37,7 +37,7 @@ public class Utxo extends CommonBase {
         * The unique identifier of the output.
         */
        public void set_outpoint(org.ldk.structs.OutPoint val) {
-               bindings.Utxo_set_outpoint(this.ptr, val == null ? 0 : val.ptr);
+               bindings.Utxo_set_outpoint(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -89,7 +89,7 @@ public class Utxo extends CommonBase {
         * Constructs a new Utxo given each field
         */
        public static Utxo of(org.ldk.structs.OutPoint outpoint_arg, org.ldk.structs.TxOut output_arg, long satisfaction_weight_arg) {
-               long ret = bindings.Utxo_new(outpoint_arg == null ? 0 : outpoint_arg.ptr, output_arg.ptr, satisfaction_weight_arg);
+               long ret = bindings.Utxo_new(outpoint_arg.ptr, output_arg.ptr, satisfaction_weight_arg);
                Reference.reachabilityFence(outpoint_arg);
                Reference.reachabilityFence(output_arg);
                Reference.reachabilityFence(satisfaction_weight_arg);
@@ -136,7 +136,7 @@ public class Utxo extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.Utxo b) {
-               boolean ret = bindings.Utxo_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.Utxo_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -151,7 +151,7 @@ public class Utxo extends CommonBase {
         * Returns a `Utxo` with the `satisfaction_weight` estimate for a legacy P2PKH output.
         */
        public static Utxo new_p2pkh(org.ldk.structs.OutPoint outpoint, long value, byte[] pubkey_hash) {
-               long ret = bindings.Utxo_new_p2pkh(outpoint == null ? 0 : outpoint.ptr, value, InternalUtils.check_arr_len(pubkey_hash, 20));
+               long ret = bindings.Utxo_new_p2pkh(outpoint.ptr, value, InternalUtils.check_arr_len(pubkey_hash, 20));
                Reference.reachabilityFence(outpoint);
                Reference.reachabilityFence(value);
                Reference.reachabilityFence(pubkey_hash);
index 139098a3a4df27571db984c0e50d6f97532f42e1..9db9b628eafcbbe66881a23a2de8dc8a53919b1e 100644 (file)
@@ -65,7 +65,7 @@ public class UtxoFuture extends CommonBase {
         * [`PeerManager::process_events`]: crate::ln::peer_handler::PeerManager::process_events
         */
        public void resolve_without_forwarding(org.ldk.structs.NetworkGraph graph, org.ldk.structs.Result_TxOutUtxoLookupErrorZ result) {
-               bindings.UtxoFuture_resolve_without_forwarding(this.ptr, graph == null ? 0 : graph.ptr, result != null ? result.ptr : 0);
+               bindings.UtxoFuture_resolve_without_forwarding(this.ptr, graph.ptr, result.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(graph);
                Reference.reachabilityFence(result);
@@ -86,7 +86,7 @@ public class UtxoFuture extends CommonBase {
         * [`PeerManager::process_events`]: crate::ln::peer_handler::PeerManager::process_events
         */
        public void resolve(org.ldk.structs.NetworkGraph graph, org.ldk.structs.P2PGossipSync gossip, org.ldk.structs.Result_TxOutUtxoLookupErrorZ result) {
-               bindings.UtxoFuture_resolve(this.ptr, graph == null ? 0 : graph.ptr, gossip == null ? 0 : gossip.ptr, result != null ? result.ptr : 0);
+               bindings.UtxoFuture_resolve(this.ptr, graph.ptr, gossip.ptr, result.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(graph);
                Reference.reachabilityFence(gossip);
index c9346de440751b408e078baf0de87718d849fe64..776ff806df5ab4db99342cce03f6b75f8b38b1d6 100644 (file)
@@ -53,7 +53,7 @@ public class UtxoLookup extends CommonBase {
                        @Override public long get_utxo(byte[] chain_hash, long short_channel_id) {
                                UtxoResult ret = arg.get_utxo(chain_hash, short_channel_id);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                if (impl_holder.held != null) { impl_holder.held.ptrs_to.add(ret); };
                                return result;
                        }
index 0d4d346961f10ad731a7dccec834b88057bb365a..c9abe3c3b318d56b3717537853279fdc939e9cc0 100644 (file)
@@ -86,7 +86,7 @@ public class UtxoResult extends CommonBase {
         * Utility method to constructs a new Sync-variant UtxoResult
         */
        public static UtxoResult sync(org.ldk.structs.Result_TxOutUtxoLookupErrorZ a) {
-               long ret = bindings.UtxoResult_sync(a != null ? a.ptr : 0);
+               long ret = bindings.UtxoResult_sync(a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.UtxoResult ret_hu_conv = org.ldk.structs.UtxoResult.constr_from_ptr(ret);
@@ -98,7 +98,7 @@ public class UtxoResult extends CommonBase {
         * Utility method to constructs a new Async-variant UtxoResult
         */
        public static UtxoResult async(org.ldk.structs.UtxoFuture a) {
-               long ret = bindings.UtxoResult_async(a == null ? 0 : a.ptr);
+               long ret = bindings.UtxoResult_async(a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.UtxoResult ret_hu_conv = org.ldk.structs.UtxoResult.constr_from_ptr(ret);
index 38b0d8ffc953cf1969decee4d0dd6fe74f5f19cd..902fd3b5d0dc4f41526d16aa274378b5761e3a6b 100644 (file)
@@ -21,6 +21,28 @@ public class VerifiedInvoiceRequest extends CommonBase {
                if (ptr != 0) { bindings.VerifiedInvoiceRequest_free(ptr); }
        }
 
+       /**
+        * The identifier of the [`Offer`] for which the [`InvoiceRequest`] was made.
+        */
+       public OfferId get_offer_id() {
+               long ret = bindings.VerifiedInvoiceRequest_get_offer_id(this.ptr);
+               Reference.reachabilityFence(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.OfferId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OfferId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
+       }
+
+       /**
+        * The identifier of the [`Offer`] for which the [`InvoiceRequest`] was made.
+        */
+       public void set_offer_id(org.ldk.structs.OfferId val) {
+               bindings.VerifiedInvoiceRequest_set_offer_id(this.ptr, val.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
+       }
+
        /**
         * Keys used for signing a [`Bolt12Invoice`] if they can be derived.
         * 
@@ -101,15 +123,12 @@ public class VerifiedInvoiceRequest extends CommonBase {
 
        /**
         * The minimum amount required for a successful payment of a single item.
-        * 
-        * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       @Nullable
-       public Amount amount() {
+       public Option_AmountZ amount() {
                long ret = bindings.VerifiedInvoiceRequest_amount(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); }
+               org.ldk.structs.Option_AmountZ ret_hu_conv = org.ldk.structs.Option_AmountZ.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
@@ -117,7 +136,10 @@ public class VerifiedInvoiceRequest extends CommonBase {
        /**
         * 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
         */
+       @Nullable
        public PrintableString description() {
                long ret = bindings.VerifiedInvoiceRequest_description(this.ptr);
                Reference.reachabilityFence(this);
@@ -194,14 +216,17 @@ public class VerifiedInvoiceRequest extends CommonBase {
                long ret = bindings.VerifiedInvoiceRequest_supported_quantity(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Quantity ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Quantity(null, ret); }
+               org.ldk.structs.Quantity ret_hu_conv = org.ldk.structs.Quantity.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
        /**
         * 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
         */
+       @Nullable
        public byte[] signing_pubkey() {
                byte[] ret = bindings.VerifiedInvoiceRequest_signing_pubkey(this.ptr);
                Reference.reachabilityFence(this);
@@ -293,4 +318,98 @@ public class VerifiedInvoiceRequest extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * 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
+        */
+       public Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ respond_with(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash) {
+               long ret = bindings.VerifiedInvoiceRequest_respond_with(this.ptr, payment_paths != null ? Arrays.stream(payment_paths).mapToLong(payment_paths_conv_37 -> payment_paths_conv_37.ptr).toArray() : null, InternalUtils.check_arr_len(payment_hash, 32));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(payment_paths);
+               Reference.reachabilityFence(payment_hash);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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
+        */
+       public Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ respond_with_no_std(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash, long created_at) {
+               long ret = bindings.VerifiedInvoiceRequest_respond_with_no_std(this.ptr, payment_paths != null ? Arrays.stream(payment_paths).mapToLong(payment_paths_conv_37 -> payment_paths_conv_37.ptr).toArray() : null, InternalUtils.check_arr_len(payment_hash, 32), created_at);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(payment_paths);
+               Reference.reachabilityFence(payment_hash);
+               Reference.reachabilityFence(created_at);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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
+        */
+       public Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ respond_using_derived_keys(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash) {
+               long ret = bindings.VerifiedInvoiceRequest_respond_using_derived_keys(this.ptr, payment_paths != null ? Arrays.stream(payment_paths).mapToLong(payment_paths_conv_37 -> payment_paths_conv_37.ptr).toArray() : null, InternalUtils.check_arr_len(payment_hash, 32));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(payment_paths);
+               Reference.reachabilityFence(payment_hash);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       /**
+        * 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
+        */
+       public Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ respond_using_derived_keys_no_std(TwoTuple_BlindedPayInfoBlindedPathZ[] payment_paths, byte[] payment_hash, long created_at) {
+               long ret = bindings.VerifiedInvoiceRequest_respond_using_derived_keys_no_std(this.ptr, payment_paths != null ? Arrays.stream(payment_paths).mapToLong(payment_paths_conv_37 -> payment_paths_conv_37.ptr).toArray() : null, InternalUtils.check_arr_len(payment_hash, 32), created_at);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(payment_paths);
+               Reference.reachabilityFence(payment_hash);
+               Reference.reachabilityFence(created_at);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 8975da5465d8a447f8c41f7aa6d14c73e1c74c04..de19850632e5b3f185171bd0a30aced558e68b0a 100644 (file)
@@ -64,19 +64,19 @@ public class WalletSource extends CommonBase {
                        @Override public long list_confirmed_utxos() {
                                Result_CVec_UtxoZNoneZ ret = arg.list_confirmed_utxos();
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long get_change_script() {
                                Result_CVec_u8ZNoneZ ret = arg.get_change_script();
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public long sign_psbt(byte[] psbt) {
                                Result_TransactionNoneZ ret = arg.sign_psbt(psbt);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                });
index daeeea40adf469ee97142d150d09d3707a656e10..5b5197dac8d5dc060879913c3524586f1dc36054 100644 (file)
@@ -27,10 +27,13 @@ public class WarningMessage extends CommonBase {
         * 
         * All-0s indicates a warning unrelated to a specific channel.
         */
-       public byte[] get_channel_id() {
-               byte[] ret = bindings.WarningMessage_get_channel_id(this.ptr);
+       public ChannelId get_channel_id() {
+               long ret = bindings.WarningMessage_get_channel_id(this.ptr);
                Reference.reachabilityFence(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               return ret_hu_conv;
        }
 
        /**
@@ -38,10 +41,11 @@ public class WarningMessage extends CommonBase {
         * 
         * All-0s indicates a warning unrelated to a specific channel.
         */
-       public void set_channel_id(byte[] val) {
-               bindings.WarningMessage_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
+       public void set_channel_id(org.ldk.structs.ChannelId val) {
+               bindings.WarningMessage_set_channel_id(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
+               if (this != null) { this.ptrs_to.add(val); };
        }
 
        /**
@@ -73,13 +77,14 @@ public class WarningMessage extends CommonBase {
        /**
         * Constructs a new WarningMessage given each field
         */
-       public static WarningMessage of(byte[] channel_id_arg, java.lang.String data_arg) {
-               long ret = bindings.WarningMessage_new(InternalUtils.check_arr_len(channel_id_arg, 32), data_arg);
+       public static WarningMessage of(org.ldk.structs.ChannelId channel_id_arg, java.lang.String data_arg) {
+               long ret = bindings.WarningMessage_new(channel_id_arg.ptr, data_arg);
                Reference.reachabilityFence(channel_id_arg);
                Reference.reachabilityFence(data_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.WarningMessage ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.WarningMessage(null, ret); }
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_id_arg); };
                return ret_hu_conv;
        }
 
@@ -119,7 +124,7 @@ public class WarningMessage extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.WarningMessage b) {
-               boolean ret = bindings.WarningMessage_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.WarningMessage_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 5f6ee5480642252e245fff76bc06b85bcd34b758..6cf9760cf750a7fb97d35a8f93f3aa35b5c35cdf 100644 (file)
@@ -93,7 +93,7 @@ public class Watch extends CommonBase {
                 * For details on asynchronous [`ChannelMonitor`] updating and returning
                 * [`MonitorEvent::Completed`] here, see [`ChannelMonitorUpdateStatus::InProgress`].
                 */
-               ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] release_pending_monitor_events();
+               FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[] release_pending_monitor_events();
        }
        private static class LDKWatchHolder { Watch held; }
        public static Watch new_impl(WatchInterface arg) {
@@ -106,7 +106,7 @@ public class Watch extends CommonBase {
                                if (monitor_hu_conv != null) { monitor_hu_conv.ptrs_to.add(this); };
                                Result_ChannelMonitorUpdateStatusNoneZ ret = arg.watch_channel(funding_txo_hu_conv, monitor_hu_conv);
                                Reference.reachabilityFence(arg);
-                               long result = ret == null ? 0 : ret.clone_ptr();
+                               long result = ret.clone_ptr();
                                return result;
                        }
                        @Override public ChannelMonitorUpdateStatus update_channel(long funding_txo, long update) {
@@ -118,9 +118,9 @@ public class Watch extends CommonBase {
                                return ret;
                        }
                        @Override public long[] release_pending_monitor_events() {
-                               ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] ret = arg.release_pending_monitor_events();
+                               FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[] ret = arg.release_pending_monitor_events();
                                Reference.reachabilityFence(arg);
-                               long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_49 -> ret_conv_49 == null ? 0 : ret_conv_49.clone_ptr()).toArray() : null;
+                               long[] result = ret != null ? Arrays.stream(ret).mapToLong(ret_conv_57 -> ret_conv_57.clone_ptr()).toArray() : null;
                                return result;
                        }
                });
@@ -144,7 +144,7 @@ public class Watch extends CommonBase {
         * [`block_disconnected`]: channelmonitor::ChannelMonitor::block_disconnected
         */
        public Result_ChannelMonitorUpdateStatusNoneZ watch_channel(org.ldk.structs.OutPoint funding_txo, org.ldk.structs.ChannelMonitor monitor) {
-               long ret = bindings.Watch_watch_channel(this.ptr, funding_txo == null ? 0 : funding_txo.ptr, monitor == null ? 0 : monitor.ptr);
+               long ret = bindings.Watch_watch_channel(this.ptr, funding_txo.ptr, monitor.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(funding_txo);
                Reference.reachabilityFence(monitor);
@@ -173,7 +173,7 @@ public class Watch extends CommonBase {
         * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
         */
        public ChannelMonitorUpdateStatus update_channel(org.ldk.structs.OutPoint funding_txo, org.ldk.structs.ChannelMonitorUpdate update) {
-               ChannelMonitorUpdateStatus ret = bindings.Watch_update_channel(this.ptr, funding_txo == null ? 0 : funding_txo.ptr, update == null ? 0 : update.ptr);
+               ChannelMonitorUpdateStatus ret = bindings.Watch_update_channel(this.ptr, funding_txo.ptr, update.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(funding_txo);
                Reference.reachabilityFence(update);
@@ -193,18 +193,18 @@ public class Watch extends CommonBase {
         * For details on asynchronous [`ChannelMonitor`] updating and returning
         * [`MonitorEvent::Completed`] here, see [`ChannelMonitorUpdateStatus::InProgress`].
         */
-       public ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] release_pending_monitor_events() {
+       public FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[] release_pending_monitor_events() {
                long[] ret = bindings.Watch_release_pending_monitor_events(this.ptr);
                Reference.reachabilityFence(this);
-               int ret_conv_49_len = ret.length;
-               ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] ret_conv_49_arr = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[ret_conv_49_len];
-               for (int x = 0; x < ret_conv_49_len; x++) {
-                       long ret_conv_49 = ret[x];
-                       ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ ret_conv_49_hu_conv = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(null, ret_conv_49);
-                       if (ret_conv_49_hu_conv != null) { ret_conv_49_hu_conv.ptrs_to.add(this); };
-                       ret_conv_49_arr[x] = ret_conv_49_hu_conv;
+               int ret_conv_57_len = ret.length;
+               FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[] ret_conv_57_arr = new FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ[ret_conv_57_len];
+               for (int f = 0; f < ret_conv_57_len; f++) {
+                       long ret_conv_57 = ret[f];
+                       FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_conv_57_hu_conv = new FourTuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ(null, ret_conv_57);
+                       if (ret_conv_57_hu_conv != null) { ret_conv_57_hu_conv.ptrs_to.add(this); };
+                       ret_conv_57_arr[f] = ret_conv_57_hu_conv;
                }
-               return ret_conv_49_arr;
+               return ret_conv_57_arr;
        }
 
 }
index 4319efec8d5906f22cc0dab6fbbbf01ad29a400e..0f5a607e203daa3fdec38e43ac7d17bb6ea0609d 100644 (file)
@@ -68,7 +68,7 @@ public class WatchedOutput extends CommonBase {
         * Outpoint identifying the transaction output.
         */
        public void set_outpoint(org.ldk.structs.OutPoint val) {
-               bindings.WatchedOutput_set_outpoint(this.ptr, val == null ? 0 : val.ptr);
+               bindings.WatchedOutput_set_outpoint(this.ptr, val.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(val);
                if (this != null) { this.ptrs_to.add(val); };
@@ -96,7 +96,7 @@ public class WatchedOutput extends CommonBase {
         * Constructs a new WatchedOutput given each field
         */
        public static WatchedOutput of(org.ldk.structs.Option_ThirtyTwoBytesZ block_hash_arg, org.ldk.structs.OutPoint outpoint_arg, byte[] script_pubkey_arg) {
-               long ret = bindings.WatchedOutput_new(block_hash_arg.ptr, outpoint_arg == null ? 0 : outpoint_arg.ptr, script_pubkey_arg);
+               long ret = bindings.WatchedOutput_new(block_hash_arg.ptr, outpoint_arg.ptr, script_pubkey_arg);
                Reference.reachabilityFence(block_hash_arg);
                Reference.reachabilityFence(outpoint_arg);
                Reference.reachabilityFence(script_pubkey_arg);
@@ -132,7 +132,7 @@ public class WatchedOutput extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.WatchedOutput b) {
-               boolean ret = bindings.WatchedOutput_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.WatchedOutput_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
index 7575d3683de977ca95aea74c3fdca36fd4b9452f..8509f8316e35cce0ccdb1c5ba2bffa0e5ba3eb02 100644 (file)
@@ -21,7 +21,7 @@ public class WriteableEcdsaChannelSigner extends CommonBase {
        final bindings.LDKWriteableEcdsaChannelSigner bindings_instance;
        WriteableEcdsaChannelSigner(Object _dummy, long ptr) { super(ptr); bindings_instance = null; }
        private WriteableEcdsaChannelSigner(bindings.LDKWriteableEcdsaChannelSigner arg, bindings.LDKEcdsaChannelSigner EcdsaChannelSigner, bindings.LDKChannelSigner ChannelSigner, ChannelPublicKeys pubkeys) {
-               super(bindings.LDKWriteableEcdsaChannelSigner_new(arg, EcdsaChannelSigner, ChannelSigner, pubkeys == null ? 0 : pubkeys.clone_ptr()));
+               super(bindings.LDKWriteableEcdsaChannelSigner_new(arg, EcdsaChannelSigner, ChannelSigner, pubkeys.clone_ptr()));
                this.ptrs_to.add(arg);
                this.ptrs_to.add(EcdsaChannelSigner);
                this.ptrs_to.add(ChannelSigner);
index 175a178cf14e6ad9eb5a53138d20c46c16de5a12..c7202b2723db7e968f6af9bfbb3641fb3452994d 100644 (file)
@@ -393,10 +393,11 @@ static inline LDKBolt12SemanticError LDKBolt12SemanticError_from_java(JNIEnv *en
                case 20: return LDKBolt12SemanticError_MissingPayerId;
                case 21: return LDKBolt12SemanticError_DuplicatePaymentId;
                case 22: return LDKBolt12SemanticError_MissingPaths;
-               case 23: return LDKBolt12SemanticError_InvalidPayInfo;
-               case 24: return LDKBolt12SemanticError_MissingCreationTime;
-               case 25: return LDKBolt12SemanticError_MissingPaymentHash;
-               case 26: return LDKBolt12SemanticError_MissingSignature;
+               case 23: return LDKBolt12SemanticError_UnexpectedPaths;
+               case 24: return LDKBolt12SemanticError_InvalidPayInfo;
+               case 25: return LDKBolt12SemanticError_MissingCreationTime;
+               case 26: return LDKBolt12SemanticError_MissingPaymentHash;
+               case 27: return LDKBolt12SemanticError_MissingSignature;
        }
        (*env)->FatalError(env, "A call to Bolt12SemanticError.ordinal() from rust returned an invalid value.");
        abort(); // Unreachable, but will let the compiler know we don't return here
@@ -425,6 +426,7 @@ static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingPayerMetadata
 static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingPayerId = NULL;
 static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_DuplicatePaymentId = NULL;
 static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths = NULL;
+static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths = NULL;
 static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo = NULL;
 static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingCreationTime = NULL;
 static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingPaymentHash = NULL;
@@ -478,6 +480,8 @@ JNIEXPORT void JNICALL Java_org_ldk_enums_Bolt12SemanticError_init (JNIEnv *env,
        CHECK(Bolt12SemanticError_LDKBolt12SemanticError_DuplicatePaymentId != NULL);
        Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_MissingPaths", "Lorg/ldk/enums/Bolt12SemanticError;");
        CHECK(Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths != NULL);
+       Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_UnexpectedPaths", "Lorg/ldk/enums/Bolt12SemanticError;");
+       CHECK(Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths != NULL);
        Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_InvalidPayInfo", "Lorg/ldk/enums/Bolt12SemanticError;");
        CHECK(Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo != NULL);
        Bolt12SemanticError_LDKBolt12SemanticError_MissingCreationTime = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_MissingCreationTime", "Lorg/ldk/enums/Bolt12SemanticError;");
@@ -535,6 +539,8 @@ static inline jclass LDKBolt12SemanticError_to_java(JNIEnv *env, LDKBolt12Semant
                        return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_DuplicatePaymentId);
                case LDKBolt12SemanticError_MissingPaths:
                        return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths);
+               case LDKBolt12SemanticError_UnexpectedPaths:
+                       return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths);
                case LDKBolt12SemanticError_InvalidPayInfo:
                        return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo);
                case LDKBolt12SemanticError_MissingCreationTime:
@@ -686,6 +692,7 @@ static inline LDKConfirmationTarget LDKConfirmationTarget_from_java(JNIEnv *env,
                case 3: return LDKConfirmationTarget_AnchorChannelFee;
                case 4: return LDKConfirmationTarget_NonAnchorChannelFee;
                case 5: return LDKConfirmationTarget_ChannelCloseMinimum;
+               case 6: return LDKConfirmationTarget_OutputSpendingFee;
        }
        (*env)->FatalError(env, "A call to ConfirmationTarget.ordinal() from rust returned an invalid value.");
        abort(); // Unreachable, but will let the compiler know we don't return here
@@ -697,6 +704,7 @@ static jfieldID ConfirmationTarget_LDKConfirmationTarget_MinAllowedNonAnchorChan
 static jfieldID ConfirmationTarget_LDKConfirmationTarget_AnchorChannelFee = NULL;
 static jfieldID ConfirmationTarget_LDKConfirmationTarget_NonAnchorChannelFee = NULL;
 static jfieldID ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum = NULL;
+static jfieldID ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee = NULL;
 JNIEXPORT void JNICALL Java_org_ldk_enums_ConfirmationTarget_init (JNIEnv *env, jclass clz) {
        ConfirmationTarget_class = (*env)->NewGlobalRef(env, clz);
        CHECK(ConfirmationTarget_class != NULL);
@@ -712,6 +720,8 @@ JNIEXPORT void JNICALL Java_org_ldk_enums_ConfirmationTarget_init (JNIEnv *env,
        CHECK(ConfirmationTarget_LDKConfirmationTarget_NonAnchorChannelFee != NULL);
        ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum = (*env)->GetStaticFieldID(env, ConfirmationTarget_class, "LDKConfirmationTarget_ChannelCloseMinimum", "Lorg/ldk/enums/ConfirmationTarget;");
        CHECK(ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum != NULL);
+       ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee = (*env)->GetStaticFieldID(env, ConfirmationTarget_class, "LDKConfirmationTarget_OutputSpendingFee", "Lorg/ldk/enums/ConfirmationTarget;");
+       CHECK(ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee != NULL);
 }
 static inline jclass LDKConfirmationTarget_to_java(JNIEnv *env, LDKConfirmationTarget val) {
        switch (val) {
@@ -727,6 +737,8 @@ static inline jclass LDKConfirmationTarget_to_java(JNIEnv *env, LDKConfirmationT
                        return (*env)->GetStaticObjectField(env, ConfirmationTarget_class, ConfirmationTarget_LDKConfirmationTarget_NonAnchorChannelFee);
                case LDKConfirmationTarget_ChannelCloseMinimum:
                        return (*env)->GetStaticObjectField(env, ConfirmationTarget_class, ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum);
+               case LDKConfirmationTarget_OutputSpendingFee:
+                       return (*env)->GetStaticObjectField(env, ConfirmationTarget_class, ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee);
                default: abort();
        }
 }
@@ -841,6 +853,40 @@ static inline jclass LDKCurrency_to_java(JNIEnv *env, LDKCurrency val) {
        }
 }
 
+static inline LDKDirection LDKDirection_from_java(JNIEnv *env, jclass clz) {
+       jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to Direction.ordinal() from rust threw an exception.");
+       }
+       switch (ord) {
+               case 0: return LDKDirection_NodeOne;
+               case 1: return LDKDirection_NodeTwo;
+       }
+       (*env)->FatalError(env, "A call to Direction.ordinal() from rust returned an invalid value.");
+       abort(); // Unreachable, but will let the compiler know we don't return here
+}
+static jclass Direction_class = NULL;
+static jfieldID Direction_LDKDirection_NodeOne = NULL;
+static jfieldID Direction_LDKDirection_NodeTwo = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_enums_Direction_init (JNIEnv *env, jclass clz) {
+       Direction_class = (*env)->NewGlobalRef(env, clz);
+       CHECK(Direction_class != NULL);
+       Direction_LDKDirection_NodeOne = (*env)->GetStaticFieldID(env, Direction_class, "LDKDirection_NodeOne", "Lorg/ldk/enums/Direction;");
+       CHECK(Direction_LDKDirection_NodeOne != NULL);
+       Direction_LDKDirection_NodeTwo = (*env)->GetStaticFieldID(env, Direction_class, "LDKDirection_NodeTwo", "Lorg/ldk/enums/Direction;");
+       CHECK(Direction_LDKDirection_NodeTwo != NULL);
+}
+static inline jclass LDKDirection_to_java(JNIEnv *env, LDKDirection val) {
+       switch (val) {
+               case LDKDirection_NodeOne:
+                       return (*env)->GetStaticObjectField(env, Direction_class, Direction_LDKDirection_NodeOne);
+               case LDKDirection_NodeTwo:
+                       return (*env)->GetStaticObjectField(env, Direction_class, Direction_LDKDirection_NodeTwo);
+               default: abort();
+       }
+}
+
 static inline LDKHTLCClaim LDKHTLCClaim_from_java(JNIEnv *env, jclass clz) {
        jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
@@ -1347,6 +1393,46 @@ static inline jclass LDKSecp256k1Error_to_java(JNIEnv *env, LDKSecp256k1Error va
        }
 }
 
+static inline LDKShortChannelIdError LDKShortChannelIdError_from_java(JNIEnv *env, jclass clz) {
+       jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to ShortChannelIdError.ordinal() from rust threw an exception.");
+       }
+       switch (ord) {
+               case 0: return LDKShortChannelIdError_BlockOverflow;
+               case 1: return LDKShortChannelIdError_TxIndexOverflow;
+               case 2: return LDKShortChannelIdError_VoutIndexOverflow;
+       }
+       (*env)->FatalError(env, "A call to ShortChannelIdError.ordinal() from rust returned an invalid value.");
+       abort(); // Unreachable, but will let the compiler know we don't return here
+}
+static jclass ShortChannelIdError_class = NULL;
+static jfieldID ShortChannelIdError_LDKShortChannelIdError_BlockOverflow = NULL;
+static jfieldID ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow = NULL;
+static jfieldID ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_enums_ShortChannelIdError_init (JNIEnv *env, jclass clz) {
+       ShortChannelIdError_class = (*env)->NewGlobalRef(env, clz);
+       CHECK(ShortChannelIdError_class != NULL);
+       ShortChannelIdError_LDKShortChannelIdError_BlockOverflow = (*env)->GetStaticFieldID(env, ShortChannelIdError_class, "LDKShortChannelIdError_BlockOverflow", "Lorg/ldk/enums/ShortChannelIdError;");
+       CHECK(ShortChannelIdError_LDKShortChannelIdError_BlockOverflow != NULL);
+       ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow = (*env)->GetStaticFieldID(env, ShortChannelIdError_class, "LDKShortChannelIdError_TxIndexOverflow", "Lorg/ldk/enums/ShortChannelIdError;");
+       CHECK(ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow != NULL);
+       ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow = (*env)->GetStaticFieldID(env, ShortChannelIdError_class, "LDKShortChannelIdError_VoutIndexOverflow", "Lorg/ldk/enums/ShortChannelIdError;");
+       CHECK(ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow != NULL);
+}
+static inline jclass LDKShortChannelIdError_to_java(JNIEnv *env, LDKShortChannelIdError val) {
+       switch (val) {
+               case LDKShortChannelIdError_BlockOverflow:
+                       return (*env)->GetStaticObjectField(env, ShortChannelIdError_class, ShortChannelIdError_LDKShortChannelIdError_BlockOverflow);
+               case LDKShortChannelIdError_TxIndexOverflow:
+                       return (*env)->GetStaticObjectField(env, ShortChannelIdError_class, ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow);
+               case LDKShortChannelIdError_VoutIndexOverflow:
+                       return (*env)->GetStaticObjectField(env, ShortChannelIdError_class, ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow);
+               default: abort();
+       }
+}
+
 static inline LDKSiPrefix LDKSiPrefix_from_java(JNIEnv *env, jclass clz) {
        jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
@@ -1579,6 +1665,54 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKBech32Error_1ref_1from_1
                default: abort();
        }
 }
+static inline struct LDKRefundMaybeWithDerivedMetadataBuilder CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKRefundMaybeWithDerivedMetadataBuilder ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKRefundMaybeWithDerivedMetadataBuilder ret_var = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
+static inline struct LDKRefund CResult_RefundBolt12SemanticErrorZ_get_ok(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKRefund ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_RefundBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKRefund ret_var = CResult_RefundBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_RefundBolt12SemanticErrorZ_get_err(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_RefundBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_RefundBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
 static jclass LDKCOption_u64Z_Some_class = NULL;
 static jmethodID LDKCOption_u64Z_Some_meth = NULL;
 static jclass LDKCOption_u64Z_None_class = NULL;
@@ -1687,6 +1821,8 @@ static jclass LDKDecodeError_Io_class = NULL;
 static jmethodID LDKDecodeError_Io_meth = NULL;
 static jclass LDKDecodeError_UnsupportedCompression_class = NULL;
 static jmethodID LDKDecodeError_UnsupportedCompression_meth = NULL;
+static jclass LDKDecodeError_DangerousValue_class = NULL;
+static jmethodID LDKDecodeError_DangerousValue_meth = NULL;
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKDecodeError_init (JNIEnv *env, jclass clz) {
        LDKDecodeError_UnknownVersion_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$UnknownVersion"));
@@ -1723,6 +1859,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKDecodeError_init (JNIE
        CHECK(LDKDecodeError_UnsupportedCompression_class != NULL);
        LDKDecodeError_UnsupportedCompression_meth = (*env)->GetMethodID(env, LDKDecodeError_UnsupportedCompression_class, "<init>", "()V");
        CHECK(LDKDecodeError_UnsupportedCompression_meth != NULL);
+       LDKDecodeError_DangerousValue_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$DangerousValue"));
+       CHECK(LDKDecodeError_DangerousValue_class != NULL);
+       LDKDecodeError_DangerousValue_meth = (*env)->GetMethodID(env, LDKDecodeError_DangerousValue_class, "<init>", "()V");
+       CHECK(LDKDecodeError_DangerousValue_meth != NULL);
 }
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKDecodeError_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
        LDKDecodeError *obj = (LDKDecodeError*)untag_ptr(ptr);
@@ -1749,6 +1890,9 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKDecodeError_1ref_1from_1
                case LDKDecodeError_UnsupportedCompression: {
                        return (*env)->NewObject(env, LDKDecodeError_UnsupportedCompression_class, LDKDecodeError_UnsupportedCompression_meth);
                }
+               case LDKDecodeError_DangerousValue: {
+                       return (*env)->NewObject(env, LDKDecodeError_DangerousValue_class, LDKDecodeError_DangerousValue_meth);
+               }
                default: abort();
        }
 }
@@ -2030,6 +2174,74 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RecipientOnionFieldsN
        CResult_RecipientOnionFieldsNoneZ_get_err(owner_conv);
 }
 
+static inline struct LDKUnsignedBolt12Invoice CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKUnsignedBolt12Invoice ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKUnsignedBolt12Invoice ret_var = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
+static inline struct LDKBolt12Invoice CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKBolt12Invoice ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKBolt12Invoice ret_var = CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
+static inline struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return *owner->contents.result;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_SchnorrSignatureNoneZ_get_ok(owner_conv).compact_form);
+       return ret_arr;
+}
+
+static inline void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return *owner->contents.err;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner);
+       CResult_SchnorrSignatureNoneZ_get_err(owner_conv);
+}
+
 static inline LDKCVec_ThirtyTwoBytesZ CVec_ThirtyTwoBytesZ_clone(const LDKCVec_ThirtyTwoBytesZ *orig) {
        LDKCVec_ThirtyTwoBytesZ ret = { .data = MALLOC(sizeof(LDKThirtyTwoBytes) * orig->datalen, "LDKCVec_ThirtyTwoBytesZ clone bytes"), .datalen = orig->datalen };
        for (size_t i = 0; i < ret.datalen; i++) {
@@ -2075,6 +2287,135 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1CVec_1ThirtyTwo
                default: abort();
        }
 }
+static jclass LDKAmount_Bitcoin_class = NULL;
+static jmethodID LDKAmount_Bitcoin_meth = NULL;
+static jclass LDKAmount_Currency_class = NULL;
+static jmethodID LDKAmount_Currency_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKAmount_init (JNIEnv *env, jclass clz) {
+       LDKAmount_Bitcoin_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKAmount$Bitcoin"));
+       CHECK(LDKAmount_Bitcoin_class != NULL);
+       LDKAmount_Bitcoin_meth = (*env)->GetMethodID(env, LDKAmount_Bitcoin_class, "<init>", "(J)V");
+       CHECK(LDKAmount_Bitcoin_meth != NULL);
+       LDKAmount_Currency_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKAmount$Currency"));
+       CHECK(LDKAmount_Currency_class != NULL);
+       LDKAmount_Currency_meth = (*env)->GetMethodID(env, LDKAmount_Currency_class, "<init>", "([BJ)V");
+       CHECK(LDKAmount_Currency_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKAmount_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKAmount *obj = (LDKAmount*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKAmount_Bitcoin: {
+                       int64_t amount_msats_conv = obj->bitcoin.amount_msats;
+                       return (*env)->NewObject(env, LDKAmount_Bitcoin_class, LDKAmount_Bitcoin_meth, amount_msats_conv);
+               }
+               case LDKAmount_Currency: {
+                       int8_tArray iso4217_code_arr = (*env)->NewByteArray(env, 3);
+                       (*env)->SetByteArrayRegion(env, iso4217_code_arr, 0, 3, obj->currency.iso4217_code.data);
+                       int64_t amount_conv = obj->currency.amount;
+                       return (*env)->NewObject(env, LDKAmount_Currency_class, LDKAmount_Currency_meth, iso4217_code_arr, amount_conv);
+               }
+               default: abort();
+       }
+}
+static jclass LDKCOption_AmountZ_Some_class = NULL;
+static jmethodID LDKCOption_AmountZ_Some_meth = NULL;
+static jclass LDKCOption_AmountZ_None_class = NULL;
+static jmethodID LDKCOption_AmountZ_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1AmountZ_init (JNIEnv *env, jclass clz) {
+       LDKCOption_AmountZ_Some_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_AmountZ$Some"));
+       CHECK(LDKCOption_AmountZ_Some_class != NULL);
+       LDKCOption_AmountZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_AmountZ_Some_class, "<init>", "(J)V");
+       CHECK(LDKCOption_AmountZ_Some_meth != NULL);
+       LDKCOption_AmountZ_None_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_AmountZ$None"));
+       CHECK(LDKCOption_AmountZ_None_class != NULL);
+       LDKCOption_AmountZ_None_meth = (*env)->GetMethodID(env, LDKCOption_AmountZ_None_class, "<init>", "()V");
+       CHECK(LDKCOption_AmountZ_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1AmountZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKCOption_AmountZ *obj = (LDKCOption_AmountZ*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKCOption_AmountZ_Some: {
+                       int64_t some_ref = tag_ptr(&obj->some, false);
+                       return (*env)->NewObject(env, LDKCOption_AmountZ_Some_class, LDKCOption_AmountZ_Some_meth, some_ref);
+               }
+               case LDKCOption_AmountZ_None: {
+                       return (*env)->NewObject(env, LDKCOption_AmountZ_None_class, LDKCOption_AmountZ_None_meth);
+               }
+               default: abort();
+       }
+}
+static jclass LDKQuantity_Bounded_class = NULL;
+static jmethodID LDKQuantity_Bounded_meth = NULL;
+static jclass LDKQuantity_Unbounded_class = NULL;
+static jmethodID LDKQuantity_Unbounded_meth = NULL;
+static jclass LDKQuantity_One_class = NULL;
+static jmethodID LDKQuantity_One_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKQuantity_init (JNIEnv *env, jclass clz) {
+       LDKQuantity_Bounded_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKQuantity$Bounded"));
+       CHECK(LDKQuantity_Bounded_class != NULL);
+       LDKQuantity_Bounded_meth = (*env)->GetMethodID(env, LDKQuantity_Bounded_class, "<init>", "(J)V");
+       CHECK(LDKQuantity_Bounded_meth != NULL);
+       LDKQuantity_Unbounded_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKQuantity$Unbounded"));
+       CHECK(LDKQuantity_Unbounded_class != NULL);
+       LDKQuantity_Unbounded_meth = (*env)->GetMethodID(env, LDKQuantity_Unbounded_class, "<init>", "()V");
+       CHECK(LDKQuantity_Unbounded_meth != NULL);
+       LDKQuantity_One_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKQuantity$One"));
+       CHECK(LDKQuantity_One_class != NULL);
+       LDKQuantity_One_meth = (*env)->GetMethodID(env, LDKQuantity_One_class, "<init>", "()V");
+       CHECK(LDKQuantity_One_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKQuantity_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKQuantity *obj = (LDKQuantity*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKQuantity_Bounded: {
+                       int64_t bounded_conv = obj->bounded;
+                       return (*env)->NewObject(env, LDKQuantity_Bounded_class, LDKQuantity_Bounded_meth, bounded_conv);
+               }
+               case LDKQuantity_Unbounded: {
+                       return (*env)->NewObject(env, LDKQuantity_Unbounded_class, LDKQuantity_Unbounded_meth);
+               }
+               case LDKQuantity_One: {
+                       return (*env)->NewObject(env, LDKQuantity_One_class, LDKQuantity_One_meth);
+               }
+               default: abort();
+       }
+}
+static jclass LDKCOption_QuantityZ_Some_class = NULL;
+static jmethodID LDKCOption_QuantityZ_Some_meth = NULL;
+static jclass LDKCOption_QuantityZ_None_class = NULL;
+static jmethodID LDKCOption_QuantityZ_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1QuantityZ_init (JNIEnv *env, jclass clz) {
+       LDKCOption_QuantityZ_Some_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_QuantityZ$Some"));
+       CHECK(LDKCOption_QuantityZ_Some_class != NULL);
+       LDKCOption_QuantityZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_QuantityZ_Some_class, "<init>", "(J)V");
+       CHECK(LDKCOption_QuantityZ_Some_meth != NULL);
+       LDKCOption_QuantityZ_None_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_QuantityZ$None"));
+       CHECK(LDKCOption_QuantityZ_None_class != NULL);
+       LDKCOption_QuantityZ_None_meth = (*env)->GetMethodID(env, LDKCOption_QuantityZ_None_class, "<init>", "()V");
+       CHECK(LDKCOption_QuantityZ_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1QuantityZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKCOption_QuantityZ *obj = (LDKCOption_QuantityZ*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKCOption_QuantityZ_Some: {
+                       int64_t some_ref = tag_ptr(&obj->some, false);
+                       return (*env)->NewObject(env, LDKCOption_QuantityZ_Some_class, LDKCOption_QuantityZ_Some_meth, some_ref);
+               }
+               case LDKCOption_QuantityZ_None: {
+                       return (*env)->NewObject(env, LDKCOption_QuantityZ_None_class, LDKCOption_QuantityZ_None_meth);
+               }
+               default: abort();
+       }
+}
 static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesNoneZ_get_ok(LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR owner){
 CHECK(owner->result_ok);
        return ThirtyTwoBytes_clone(&*owner->contents.result);
@@ -2473,44 +2814,45 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RecoverableSignatureN
        CResult_RecoverableSignatureNoneZ_get_err(owner_conv);
 }
 
-static inline struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){
+static inline struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){
 CHECK(owner->result_ok);
        return *owner->contents.result;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner);
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner);
        int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_SchnorrSignatureNoneZ_get_ok(owner_conv).compact_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_ECDSASignatureNoneZ_get_ok(owner_conv).compact_form);
        return ret_arr;
 }
 
-static inline void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){
+static inline void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){
 CHECK(!owner->result_ok);
        return *owner->contents.err;
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner);
-       CResult_SchnorrSignatureNoneZ_get_err(owner_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner);
+       CResult_ECDSASignatureNoneZ_get_err(owner_conv);
 }
 
-static inline struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){
+static inline struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){
 CHECK(owner->result_ok);
        return *owner->contents.result;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner);
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_ECDSASignatureNoneZ_get_ok(owner_conv).compact_form);
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner);
+       LDKTransaction ret_var = CResult_TransactionNoneZ_get_ok(owner_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
        return ret_arr;
 }
 
-static inline void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){
+static inline void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){
 CHECK(!owner->result_ok);
        return *owner->contents.err;
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner);
-       CResult_ECDSASignatureNoneZ_get_err(owner_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner);
+       CResult_TransactionNoneZ_get_err(owner_conv);
 }
 
 static inline struct LDKECDSASignature C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR owner){
@@ -3764,27 +4106,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDeco
        return ret_ref;
 }
 
-static inline struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
-       return *owner->contents.result;
-}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner);
-       LDKTransaction ret_var = CResult_TransactionNoneZ_get_ok(owner_conv);
-       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
-       return ret_arr;
-}
-
-static inline void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
-       return *owner->contents.err;
-}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner);
-       CResult_TransactionNoneZ_get_err(owner_conv);
-}
-
 static jclass LDKCandidateRouteHop_FirstHop_class = NULL;
 static jmethodID LDKCandidateRouteHop_FirstHop_meth = NULL;
 static jclass LDKCandidateRouteHop_PublicHop_class = NULL;
@@ -5168,6 +5489,32 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScore
        return ret_ref;
 }
 
+static inline struct LDKBestBlock CResult_BestBlockDecodeErrorZ_get_ok(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner){
+       LDKBestBlock ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_BestBlockDecodeErrorZ* owner_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(owner);
+       LDKBestBlock ret_var = CResult_BestBlockDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_BestBlockDecodeErrorZ_get_err(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_BestBlockDecodeErrorZ* owner_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_BestBlockDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 static inline uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner){
        return owner->a;
 }
@@ -5251,8 +5598,154 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateS
        CResult_ChannelMonitorUpdateStatusNoneZ_get_err(owner_conv);
 }
 
+static jclass LDKClosureReason_CounterpartyForceClosed_class = NULL;
+static jmethodID LDKClosureReason_CounterpartyForceClosed_meth = NULL;
+static jclass LDKClosureReason_HolderForceClosed_class = NULL;
+static jmethodID LDKClosureReason_HolderForceClosed_meth = NULL;
+static jclass LDKClosureReason_LegacyCooperativeClosure_class = NULL;
+static jmethodID LDKClosureReason_LegacyCooperativeClosure_meth = NULL;
+static jclass LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class = NULL;
+static jmethodID LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth = NULL;
+static jclass LDKClosureReason_LocallyInitiatedCooperativeClosure_class = NULL;
+static jmethodID LDKClosureReason_LocallyInitiatedCooperativeClosure_meth = NULL;
+static jclass LDKClosureReason_CommitmentTxConfirmed_class = NULL;
+static jmethodID LDKClosureReason_CommitmentTxConfirmed_meth = NULL;
+static jclass LDKClosureReason_FundingTimedOut_class = NULL;
+static jmethodID LDKClosureReason_FundingTimedOut_meth = NULL;
+static jclass LDKClosureReason_ProcessingError_class = NULL;
+static jmethodID LDKClosureReason_ProcessingError_meth = NULL;
+static jclass LDKClosureReason_DisconnectedPeer_class = NULL;
+static jmethodID LDKClosureReason_DisconnectedPeer_meth = NULL;
+static jclass LDKClosureReason_OutdatedChannelManager_class = NULL;
+static jmethodID LDKClosureReason_OutdatedChannelManager_meth = NULL;
+static jclass LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class = NULL;
+static jmethodID LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = NULL;
+static jclass LDKClosureReason_FundingBatchClosure_class = NULL;
+static jmethodID LDKClosureReason_FundingBatchClosure_meth = NULL;
+static jclass LDKClosureReason_HTLCsTimedOut_class = NULL;
+static jmethodID LDKClosureReason_HTLCsTimedOut_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKClosureReason_init (JNIEnv *env, jclass clz) {
+       LDKClosureReason_CounterpartyForceClosed_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyForceClosed"));
+       CHECK(LDKClosureReason_CounterpartyForceClosed_class != NULL);
+       LDKClosureReason_CounterpartyForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyForceClosed_class, "<init>", "(J)V");
+       CHECK(LDKClosureReason_CounterpartyForceClosed_meth != NULL);
+       LDKClosureReason_HolderForceClosed_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$HolderForceClosed"));
+       CHECK(LDKClosureReason_HolderForceClosed_class != NULL);
+       LDKClosureReason_HolderForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_HolderForceClosed_class, "<init>", "()V");
+       CHECK(LDKClosureReason_HolderForceClosed_meth != NULL);
+       LDKClosureReason_LegacyCooperativeClosure_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$LegacyCooperativeClosure"));
+       CHECK(LDKClosureReason_LegacyCooperativeClosure_class != NULL);
+       LDKClosureReason_LegacyCooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_LegacyCooperativeClosure_class, "<init>", "()V");
+       CHECK(LDKClosureReason_LegacyCooperativeClosure_meth != NULL);
+       LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyInitiatedCooperativeClosure"));
+       CHECK(LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class != NULL);
+       LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class, "<init>", "()V");
+       CHECK(LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth != NULL);
+       LDKClosureReason_LocallyInitiatedCooperativeClosure_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$LocallyInitiatedCooperativeClosure"));
+       CHECK(LDKClosureReason_LocallyInitiatedCooperativeClosure_class != NULL);
+       LDKClosureReason_LocallyInitiatedCooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_LocallyInitiatedCooperativeClosure_class, "<init>", "()V");
+       CHECK(LDKClosureReason_LocallyInitiatedCooperativeClosure_meth != NULL);
+       LDKClosureReason_CommitmentTxConfirmed_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CommitmentTxConfirmed"));
+       CHECK(LDKClosureReason_CommitmentTxConfirmed_class != NULL);
+       LDKClosureReason_CommitmentTxConfirmed_meth = (*env)->GetMethodID(env, LDKClosureReason_CommitmentTxConfirmed_class, "<init>", "()V");
+       CHECK(LDKClosureReason_CommitmentTxConfirmed_meth != NULL);
+       LDKClosureReason_FundingTimedOut_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingTimedOut"));
+       CHECK(LDKClosureReason_FundingTimedOut_class != NULL);
+       LDKClosureReason_FundingTimedOut_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingTimedOut_class, "<init>", "()V");
+       CHECK(LDKClosureReason_FundingTimedOut_meth != NULL);
+       LDKClosureReason_ProcessingError_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$ProcessingError"));
+       CHECK(LDKClosureReason_ProcessingError_class != NULL);
+       LDKClosureReason_ProcessingError_meth = (*env)->GetMethodID(env, LDKClosureReason_ProcessingError_class, "<init>", "(Ljava/lang/String;)V");
+       CHECK(LDKClosureReason_ProcessingError_meth != NULL);
+       LDKClosureReason_DisconnectedPeer_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$DisconnectedPeer"));
+       CHECK(LDKClosureReason_DisconnectedPeer_class != NULL);
+       LDKClosureReason_DisconnectedPeer_meth = (*env)->GetMethodID(env, LDKClosureReason_DisconnectedPeer_class, "<init>", "()V");
+       CHECK(LDKClosureReason_DisconnectedPeer_meth != NULL);
+       LDKClosureReason_OutdatedChannelManager_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$OutdatedChannelManager"));
+       CHECK(LDKClosureReason_OutdatedChannelManager_class != NULL);
+       LDKClosureReason_OutdatedChannelManager_meth = (*env)->GetMethodID(env, LDKClosureReason_OutdatedChannelManager_class, "<init>", "()V");
+       CHECK(LDKClosureReason_OutdatedChannelManager_meth != NULL);
+       LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyCoopClosedUnfundedChannel"));
+       CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class != NULL);
+       LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, "<init>", "()V");
+       CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth != NULL);
+       LDKClosureReason_FundingBatchClosure_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingBatchClosure"));
+       CHECK(LDKClosureReason_FundingBatchClosure_class != NULL);
+       LDKClosureReason_FundingBatchClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingBatchClosure_class, "<init>", "()V");
+       CHECK(LDKClosureReason_FundingBatchClosure_meth != NULL);
+       LDKClosureReason_HTLCsTimedOut_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$HTLCsTimedOut"));
+       CHECK(LDKClosureReason_HTLCsTimedOut_class != NULL);
+       LDKClosureReason_HTLCsTimedOut_meth = (*env)->GetMethodID(env, LDKClosureReason_HTLCsTimedOut_class, "<init>", "()V");
+       CHECK(LDKClosureReason_HTLCsTimedOut_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKClosureReason_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKClosureReason_CounterpartyForceClosed: {
+                       LDKUntrustedString peer_msg_var = obj->counterparty_force_closed.peer_msg;
+                       int64_t peer_msg_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(peer_msg_var);
+                       peer_msg_ref = tag_ptr(peer_msg_var.inner, false);
+                       return (*env)->NewObject(env, LDKClosureReason_CounterpartyForceClosed_class, LDKClosureReason_CounterpartyForceClosed_meth, peer_msg_ref);
+               }
+               case LDKClosureReason_HolderForceClosed: {
+                       return (*env)->NewObject(env, LDKClosureReason_HolderForceClosed_class, LDKClosureReason_HolderForceClosed_meth);
+               }
+               case LDKClosureReason_LegacyCooperativeClosure: {
+                       return (*env)->NewObject(env, LDKClosureReason_LegacyCooperativeClosure_class, LDKClosureReason_LegacyCooperativeClosure_meth);
+               }
+               case LDKClosureReason_CounterpartyInitiatedCooperativeClosure: {
+                       return (*env)->NewObject(env, LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class, LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth);
+               }
+               case LDKClosureReason_LocallyInitiatedCooperativeClosure: {
+                       return (*env)->NewObject(env, LDKClosureReason_LocallyInitiatedCooperativeClosure_class, LDKClosureReason_LocallyInitiatedCooperativeClosure_meth);
+               }
+               case LDKClosureReason_CommitmentTxConfirmed: {
+                       return (*env)->NewObject(env, LDKClosureReason_CommitmentTxConfirmed_class, LDKClosureReason_CommitmentTxConfirmed_meth);
+               }
+               case LDKClosureReason_FundingTimedOut: {
+                       return (*env)->NewObject(env, LDKClosureReason_FundingTimedOut_class, LDKClosureReason_FundingTimedOut_meth);
+               }
+               case LDKClosureReason_ProcessingError: {
+                       LDKStr err_str = obj->processing_error.err;
+                       jstring err_conv = str_ref_to_java(env, err_str.chars, err_str.len);
+                       return (*env)->NewObject(env, LDKClosureReason_ProcessingError_class, LDKClosureReason_ProcessingError_meth, err_conv);
+               }
+               case LDKClosureReason_DisconnectedPeer: {
+                       return (*env)->NewObject(env, LDKClosureReason_DisconnectedPeer_class, LDKClosureReason_DisconnectedPeer_meth);
+               }
+               case LDKClosureReason_OutdatedChannelManager: {
+                       return (*env)->NewObject(env, LDKClosureReason_OutdatedChannelManager_class, LDKClosureReason_OutdatedChannelManager_meth);
+               }
+               case LDKClosureReason_CounterpartyCoopClosedUnfundedChannel: {
+                       return (*env)->NewObject(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth);
+               }
+               case LDKClosureReason_FundingBatchClosure: {
+                       return (*env)->NewObject(env, LDKClosureReason_FundingBatchClosure_class, LDKClosureReason_FundingBatchClosure_meth);
+               }
+               case LDKClosureReason_HTLCsTimedOut: {
+                       return (*env)->NewObject(env, LDKClosureReason_HTLCsTimedOut_class, LDKClosureReason_HTLCsTimedOut_meth);
+               }
+               default: abort();
+       }
+}
 static jclass LDKMonitorEvent_HTLCEvent_class = NULL;
 static jmethodID LDKMonitorEvent_HTLCEvent_meth = NULL;
+static jclass LDKMonitorEvent_HolderForceClosedWithInfo_class = NULL;
+static jmethodID LDKMonitorEvent_HolderForceClosedWithInfo_meth = NULL;
 static jclass LDKMonitorEvent_HolderForceClosed_class = NULL;
 static jmethodID LDKMonitorEvent_HolderForceClosed_meth = NULL;
 static jclass LDKMonitorEvent_Completed_class = NULL;
@@ -5263,6 +5756,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKMonitorEvent_init (JNI
        CHECK(LDKMonitorEvent_HTLCEvent_class != NULL);
        LDKMonitorEvent_HTLCEvent_meth = (*env)->GetMethodID(env, LDKMonitorEvent_HTLCEvent_class, "<init>", "(J)V");
        CHECK(LDKMonitorEvent_HTLCEvent_meth != NULL);
+       LDKMonitorEvent_HolderForceClosedWithInfo_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$HolderForceClosedWithInfo"));
+       CHECK(LDKMonitorEvent_HolderForceClosedWithInfo_class != NULL);
+       LDKMonitorEvent_HolderForceClosedWithInfo_meth = (*env)->GetMethodID(env, LDKMonitorEvent_HolderForceClosedWithInfo_class, "<init>", "(JJJ)V");
+       CHECK(LDKMonitorEvent_HolderForceClosedWithInfo_meth != NULL);
        LDKMonitorEvent_HolderForceClosed_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$HolderForceClosed"));
        CHECK(LDKMonitorEvent_HolderForceClosed_class != NULL);
@@ -5271,7 +5769,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKMonitorEvent_init (JNI
        LDKMonitorEvent_Completed_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$Completed"));
        CHECK(LDKMonitorEvent_Completed_class != NULL);
-       LDKMonitorEvent_Completed_meth = (*env)->GetMethodID(env, LDKMonitorEvent_Completed_class, "<init>", "(JJ)V");
+       LDKMonitorEvent_Completed_meth = (*env)->GetMethodID(env, LDKMonitorEvent_Completed_class, "<init>", "(JJJ)V");
        CHECK(LDKMonitorEvent_Completed_meth != NULL);
 }
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMonitorEvent_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
@@ -5284,6 +5782,18 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMonitorEvent_1ref_1from_
                        htlc_event_ref = tag_ptr(htlc_event_var.inner, false);
                        return (*env)->NewObject(env, LDKMonitorEvent_HTLCEvent_class, LDKMonitorEvent_HTLCEvent_meth, htlc_event_ref);
                }
+               case LDKMonitorEvent_HolderForceClosedWithInfo: {
+                       int64_t reason_ref = tag_ptr(&obj->holder_force_closed_with_info.reason, false);
+                       LDKOutPoint outpoint_var = obj->holder_force_closed_with_info.outpoint;
+                       int64_t outpoint_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_var);
+                       outpoint_ref = tag_ptr(outpoint_var.inner, false);
+                       LDKChannelId channel_id_var = obj->holder_force_closed_with_info.channel_id;
+                       int64_t channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+                       channel_id_ref = tag_ptr(channel_id_var.inner, false);
+                       return (*env)->NewObject(env, LDKMonitorEvent_HolderForceClosedWithInfo_class, LDKMonitorEvent_HolderForceClosedWithInfo_meth, reason_ref, outpoint_ref, channel_id_ref);
+               }
                case LDKMonitorEvent_HolderForceClosed: {
                        LDKOutPoint holder_force_closed_var = obj->holder_force_closed;
                        int64_t holder_force_closed_ref = 0;
@@ -5296,8 +5806,12 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMonitorEvent_1ref_1from_
                        int64_t funding_txo_ref = 0;
                        CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_var);
                        funding_txo_ref = tag_ptr(funding_txo_var.inner, false);
+                       LDKChannelId channel_id_var = obj->completed.channel_id;
+                       int64_t channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+                       channel_id_ref = tag_ptr(channel_id_var.inner, false);
                        int64_t monitor_update_id_conv = obj->completed.monitor_update_id;
-                       return (*env)->NewObject(env, LDKMonitorEvent_Completed_class, LDKMonitorEvent_Completed_meth, funding_txo_ref, monitor_update_id_conv);
+                       return (*env)->NewObject(env, LDKMonitorEvent_Completed_class, LDKMonitorEvent_Completed_meth, funding_txo_ref, channel_id_ref, monitor_update_id_conv);
                }
                default: abort();
        }
@@ -5309,26 +5823,40 @@ static inline LDKCVec_MonitorEventZ CVec_MonitorEventZ_clone(const LDKCVec_Monit
        }
        return ret;
 }
-static inline struct LDKOutPoint C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
+static inline struct LDKOutPoint C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
        LDKOutPoint ret = owner->a;
        ret.is_owned = false;
        return ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
-       LDKOutPoint ret_var = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
+       LDKOutPoint ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(owner_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
 
-static inline struct LDKCVec_MonitorEventZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
-       return CVec_MonitorEventZ_clone(&owner->b);
+static inline struct LDKChannelId C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
+       LDKChannelId ret = owner->b;
+       ret.is_owned = false;
+       return ret;
 }
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
-       LDKCVec_MonitorEventZ ret_var = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
+       LDKChannelId ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKCVec_MonitorEventZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
+       return CVec_MonitorEventZ_clone(&owner->c);
+}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
+       LDKCVec_MonitorEventZ ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(owner_conv);
        int64_tArray ret_arr = NULL;
        ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
        int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
@@ -5343,20 +5871,20 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_
        return ret_arr;
 }
 
-static inline struct LDKPublicKey C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
-       return owner->c;
+static inline struct LDKPublicKey C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
+       return owner->d;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1d(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(owner_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(owner_conv).compressed_form);
        return ret_arr;
 }
 
-static inline LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_clone(const LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ *orig) {
-       LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ) * orig->datalen, "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ clone bytes"), .datalen = orig->datalen };
+static inline LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_clone(const LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ *orig) {
+       LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ) * orig->datalen, "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ clone bytes"), .datalen = orig->datalen };
        for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(&orig->data[i]);
+               ret.data[i] = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(&orig->data[i]);
        }
        return ret;
 }
@@ -5542,6 +6070,123 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTypeFeature
        return ret_ref;
 }
 
+static inline struct LDKOfferId CResult_OfferIdDecodeErrorZ_get_ok(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner){
+       LDKOfferId ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_OfferIdDecodeErrorZ* owner_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(owner);
+       LDKOfferId ret_var = CResult_OfferIdDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_OfferIdDecodeErrorZ_get_err(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_OfferIdDecodeErrorZ* owner_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_OfferIdDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return *owner->contents.result;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner);
+       CResult_NoneBolt12SemanticErrorZ_get_ok(owner_conv);
+}
+
+static inline enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_NoneBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
+static inline struct LDKOffer CResult_OfferBolt12SemanticErrorZ_get_ok(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKOffer ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_OfferBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKOffer ret_var = CResult_OfferBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_OfferBolt12SemanticErrorZ_get_err(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_OfferBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_OfferBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
+static inline struct LDKInvoiceRequestWithDerivedPayerIdBuilder CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKInvoiceRequestWithDerivedPayerIdBuilder ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKInvoiceRequestWithDerivedPayerIdBuilder ret_var = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
+static inline struct LDKInvoiceRequestWithExplicitPayerIdBuilder CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKInvoiceRequestWithExplicitPayerIdBuilder ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKInvoiceRequestWithExplicitPayerIdBuilder ret_var = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
 static inline struct LDKOffer CResult_OfferBolt12ParseErrorZ_get_ok(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR owner){
        LDKOffer ret = *owner->contents.result;
        ret.is_owned = false;
@@ -5570,27 +6215,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseEr
        return ret_ref;
 }
 
-static inline struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
-       return *owner->contents.result;
-}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner);
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CResult_PublicKeySecp256k1ErrorZ_get_ok(owner_conv).compressed_form);
-       return ret_arr;
-}
-
-static inline enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
-       return *owner->contents.err;
-}
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner);
-       jclass ret_conv = LDKSecp256k1Error_to_java(env, CResult_PublicKeySecp256k1ErrorZ_get_err(owner_conv));
-       return ret_conv;
-}
-
 static inline struct LDKNodeId CResult_NodeIdDecodeErrorZ_get_ok(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner){
        LDKNodeId ret = *owner->contents.result;
        ret.is_owned = false;
@@ -5617,6 +6241,27 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ
        return ret_ref;
 }
 
+static inline struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return *owner->contents.result;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CResult_PublicKeySecp256k1ErrorZ_get_ok(owner_conv).compressed_form);
+       return ret_arr;
+}
+
+static inline enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return *owner->contents.err;
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKSecp256k1Error_to_java(env, CResult_PublicKeySecp256k1ErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
 static jclass LDKNetworkUpdate_ChannelUpdateMessage_class = NULL;
 static jmethodID LDKNetworkUpdate_ChannelUpdateMessage_meth = NULL;
 static jclass LDKNetworkUpdate_ChannelFailure_class = NULL;
@@ -7007,6 +7652,26 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1CVec_1SocketAdd
                default: abort();
        }
 }
+static inline uint64_t CResult_u64ShortChannelIdErrorZ_get_ok(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return *owner->contents.result;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_u64ShortChannelIdErrorZ* owner_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(owner);
+       int64_t ret_conv = CResult_u64ShortChannelIdErrorZ_get_ok(owner_conv);
+       return ret_conv;
+}
+
+static inline enum LDKShortChannelIdError CResult_u64ShortChannelIdErrorZ_get_err(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return ShortChannelIdError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_u64ShortChannelIdErrorZ* owner_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKShortChannelIdError_to_java(env, CResult_u64ShortChannelIdErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
 static inline struct LDKPendingHTLCInfo CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR owner){
        LDKPendingHTLCInfo ret = *owner->contents.result;
        ret.is_owned = false;
@@ -7146,6 +7811,85 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1UtxoZNoneZ_1get
        CResult_CVec_UtxoZNoneZ_get_err(owner_conv);
 }
 
+static jclass LDKPaymentContext_Unknown_class = NULL;
+static jmethodID LDKPaymentContext_Unknown_meth = NULL;
+static jclass LDKPaymentContext_Bolt12Offer_class = NULL;
+static jmethodID LDKPaymentContext_Bolt12Offer_meth = NULL;
+static jclass LDKPaymentContext_Bolt12Refund_class = NULL;
+static jmethodID LDKPaymentContext_Bolt12Refund_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPaymentContext_init (JNIEnv *env, jclass clz) {
+       LDKPaymentContext_Unknown_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentContext$Unknown"));
+       CHECK(LDKPaymentContext_Unknown_class != NULL);
+       LDKPaymentContext_Unknown_meth = (*env)->GetMethodID(env, LDKPaymentContext_Unknown_class, "<init>", "(J)V");
+       CHECK(LDKPaymentContext_Unknown_meth != NULL);
+       LDKPaymentContext_Bolt12Offer_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentContext$Bolt12Offer"));
+       CHECK(LDKPaymentContext_Bolt12Offer_class != NULL);
+       LDKPaymentContext_Bolt12Offer_meth = (*env)->GetMethodID(env, LDKPaymentContext_Bolt12Offer_class, "<init>", "(J)V");
+       CHECK(LDKPaymentContext_Bolt12Offer_meth != NULL);
+       LDKPaymentContext_Bolt12Refund_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentContext$Bolt12Refund"));
+       CHECK(LDKPaymentContext_Bolt12Refund_class != NULL);
+       LDKPaymentContext_Bolt12Refund_meth = (*env)->GetMethodID(env, LDKPaymentContext_Bolt12Refund_class, "<init>", "(J)V");
+       CHECK(LDKPaymentContext_Bolt12Refund_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPaymentContext_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKPaymentContext_Unknown: {
+                       LDKUnknownPaymentContext unknown_var = obj->unknown;
+                       int64_t unknown_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(unknown_var);
+                       unknown_ref = tag_ptr(unknown_var.inner, false);
+                       return (*env)->NewObject(env, LDKPaymentContext_Unknown_class, LDKPaymentContext_Unknown_meth, unknown_ref);
+               }
+               case LDKPaymentContext_Bolt12Offer: {
+                       LDKBolt12OfferContext bolt12_offer_var = obj->bolt12_offer;
+                       int64_t bolt12_offer_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(bolt12_offer_var);
+                       bolt12_offer_ref = tag_ptr(bolt12_offer_var.inner, false);
+                       return (*env)->NewObject(env, LDKPaymentContext_Bolt12Offer_class, LDKPaymentContext_Bolt12Offer_meth, bolt12_offer_ref);
+               }
+               case LDKPaymentContext_Bolt12Refund: {
+                       LDKBolt12RefundContext bolt12_refund_var = obj->bolt12_refund;
+                       int64_t bolt12_refund_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(bolt12_refund_var);
+                       bolt12_refund_ref = tag_ptr(bolt12_refund_var.inner, false);
+                       return (*env)->NewObject(env, LDKPaymentContext_Bolt12Refund_class, LDKPaymentContext_Bolt12Refund_meth, bolt12_refund_ref);
+               }
+               default: abort();
+       }
+}
+static jclass LDKCOption_PaymentContextZ_Some_class = NULL;
+static jmethodID LDKCOption_PaymentContextZ_Some_meth = NULL;
+static jclass LDKCOption_PaymentContextZ_None_class = NULL;
+static jmethodID LDKCOption_PaymentContextZ_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1PaymentContextZ_init (JNIEnv *env, jclass clz) {
+       LDKCOption_PaymentContextZ_Some_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_PaymentContextZ$Some"));
+       CHECK(LDKCOption_PaymentContextZ_Some_class != NULL);
+       LDKCOption_PaymentContextZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_PaymentContextZ_Some_class, "<init>", "(J)V");
+       CHECK(LDKCOption_PaymentContextZ_Some_meth != NULL);
+       LDKCOption_PaymentContextZ_None_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_PaymentContextZ$None"));
+       CHECK(LDKCOption_PaymentContextZ_None_class != NULL);
+       LDKCOption_PaymentContextZ_None_meth = (*env)->GetMethodID(env, LDKCOption_PaymentContextZ_None_class, "<init>", "()V");
+       CHECK(LDKCOption_PaymentContextZ_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1PaymentContextZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKCOption_PaymentContextZ *obj = (LDKCOption_PaymentContextZ*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKCOption_PaymentContextZ_Some: {
+                       int64_t some_ref = tag_ptr(&obj->some, false);
+                       return (*env)->NewObject(env, LDKCOption_PaymentContextZ_Some_class, LDKCOption_PaymentContextZ_Some_meth, some_ref);
+               }
+               case LDKCOption_PaymentContextZ_None: {
+                       return (*env)->NewObject(env, LDKCOption_PaymentContextZ_None_class, LDKCOption_PaymentContextZ_None_meth);
+               }
+               default: abort();
+       }
+}
 static inline uint64_t C2Tuple_u64u16Z_get_a(LDKC2Tuple_u64u16Z *NONNULL_PTR owner){
        return owner->a;
 }
@@ -7224,25 +7968,28 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1ChannelShutdown
                default: abort();
        }
 }
-static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
-       return ThirtyTwoBytes_clone(&*owner->contents.result);
+static inline struct LDKChannelId CResult_ChannelIdAPIErrorZ_get_ok(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner){
+       LDKChannelId ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner);
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner_conv).data);
-       return ret_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_ChannelIdAPIErrorZ* owner_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(owner);
+       LDKChannelId ret_var = CResult_ChannelIdAPIErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-static inline struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){
+static inline struct LDKAPIError CResult_ChannelIdAPIErrorZ_get_err(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner){
 CHECK(!owner->result_ok);
        return APIError_clone(&*owner->contents.err);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_ChannelIdAPIErrorZ* owner_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(owner);
        LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError");
-       *ret_copy = CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner_conv);
+       *ret_copy = CResult_ChannelIdAPIErrorZ_get_err(owner_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -7607,33 +8354,68 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1Thi
        return ret_ref;
 }
 
-static inline struct LDKThirtyTwoBytes C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner){
-       return ThirtyTwoBytes_clone(&owner->a);
+static inline struct LDKChannelId C2Tuple_ChannelIdPublicKeyZ_get_a(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner){
+       LDKChannelId ret = owner->a;
+       ret.is_owned = false;
+       return ret;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* owner_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(owner);
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(owner_conv).data);
-       return ret_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC2Tuple_ChannelIdPublicKeyZ* owner_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(owner);
+       LDKChannelId ret_var = C2Tuple_ChannelIdPublicKeyZ_get_a(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-static inline struct LDKPublicKey C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner){
+static inline struct LDKPublicKey C2Tuple_ChannelIdPublicKeyZ_get_b(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner){
        return owner->b;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* owner_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(owner);
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC2Tuple_ChannelIdPublicKeyZ* owner_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(owner);
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(owner_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C2Tuple_ChannelIdPublicKeyZ_get_b(owner_conv).compressed_form);
        return ret_arr;
 }
 
-static inline LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_clone(const LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ *orig) {
-       LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ) * orig->datalen, "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ clone bytes"), .datalen = orig->datalen };
+static inline LDKCVec_C2Tuple_ChannelIdPublicKeyZZ CVec_C2Tuple_ChannelIdPublicKeyZZ_clone(const LDKCVec_C2Tuple_ChannelIdPublicKeyZZ *orig) {
+       LDKCVec_C2Tuple_ChannelIdPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ) * orig->datalen, "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = C2Tuple_ChannelIdPublicKeyZ_clone(&orig->data[i]);
+       }
+       return ret;
+}
+static inline LDKCVec_ChannelIdZ CVec_ChannelIdZ_clone(const LDKCVec_ChannelIdZ *orig) {
+       LDKCVec_ChannelIdZ ret = { .data = MALLOC(sizeof(LDKChannelId) * orig->datalen, "LDKCVec_ChannelIdZ clone bytes"), .datalen = orig->datalen };
        for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(&orig->data[i]);
+               ret.data[i] = ChannelId_clone(&orig->data[i]);
        }
        return ret;
 }
+static inline struct LDKOfferWithDerivedMetadataBuilder CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKOfferWithDerivedMetadataBuilder ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKOfferWithDerivedMetadataBuilder ret_var = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
 static jclass LDKCOption_StrZ_Some_class = NULL;
 static jmethodID LDKCOption_StrZ_Some_meth = NULL;
 static jclass LDKCOption_StrZ_None_class = NULL;
@@ -7664,25 +8446,6 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1StrZ_1ref_1from
                default: abort();
        }
 }
-static inline void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
-       return *owner->contents.result;
-}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner);
-       CResult_NoneBolt12SemanticErrorZ_get_ok(owner_conv);
-}
-
-static inline enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
-       return Bolt12SemanticError_clone(&*owner->contents.err);
-}
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner);
-       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_NoneBolt12SemanticErrorZ_get_err(owner_conv));
-       return ret_conv;
-}
-
 static inline struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_ok(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR owner){
 CHECK(owner->result_ok);
        return C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_clone(&*owner->contents.result);
@@ -7703,6 +8466,29 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoByt
        CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err(owner_conv);
 }
 
+static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return ThirtyTwoBytes_clone(&*owner->contents.result);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner_conv).data);
+       return ret_arr;
+}
+
+static inline struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return APIError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner);
+       LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError");
+       *ret_copy = CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 static jclass LDKOffersMessage_InvoiceRequest_class = NULL;
 static jmethodID LDKOffersMessage_InvoiceRequest_meth = NULL;
 static jclass LDKOffersMessage_Invoice_class = NULL;
@@ -8004,12 +8790,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPendingHTLCRouting_ini
        LDKPendingHTLCRouting_Receive_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPendingHTLCRouting$Receive"));
        CHECK(LDKPendingHTLCRouting_Receive_class != NULL);
-       LDKPendingHTLCRouting_Receive_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_Receive_class, "<init>", "(JJI[B[JZ)V");
+       LDKPendingHTLCRouting_Receive_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_Receive_class, "<init>", "(JJJI[B[JZ)V");
        CHECK(LDKPendingHTLCRouting_Receive_meth != NULL);
        LDKPendingHTLCRouting_ReceiveKeysend_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPendingHTLCRouting$ReceiveKeysend"));
        CHECK(LDKPendingHTLCRouting_ReceiveKeysend_class != NULL);
-       LDKPendingHTLCRouting_ReceiveKeysend_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_ReceiveKeysend_class, "<init>", "(J[BJI[J)V");
+       LDKPendingHTLCRouting_ReceiveKeysend_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_ReceiveKeysend_class, "<init>", "(J[BJI[JZ)V");
        CHECK(LDKPendingHTLCRouting_ReceiveKeysend_meth != NULL);
 }
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPendingHTLCRouting_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
@@ -8033,6 +8819,7 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPendingHTLCRouting_1ref_
                        CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_data_var);
                        payment_data_ref = tag_ptr(payment_data_var.inner, false);
                        int64_t payment_metadata_ref = tag_ptr(&obj->receive.payment_metadata, false);
+                       int64_t payment_context_ref = tag_ptr(&obj->receive.payment_context, false);
                        int32_t incoming_cltv_expiry_conv = obj->receive.incoming_cltv_expiry;
                        int8_tArray phantom_shared_secret_arr = (*env)->NewByteArray(env, 32);
                        (*env)->SetByteArrayRegion(env, phantom_shared_secret_arr, 0, 32, obj->receive.phantom_shared_secret.data);
@@ -8048,7 +8835,7 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPendingHTLCRouting_1ref_
                        }
                        (*env)->ReleasePrimitiveArrayCritical(env, custom_tlvs_arr, custom_tlvs_arr_ptr, 0);
                        jboolean requires_blinded_error_conv = obj->receive.requires_blinded_error;
-                       return (*env)->NewObject(env, LDKPendingHTLCRouting_Receive_class, LDKPendingHTLCRouting_Receive_meth, payment_data_ref, payment_metadata_ref, incoming_cltv_expiry_conv, phantom_shared_secret_arr, custom_tlvs_arr, requires_blinded_error_conv);
+                       return (*env)->NewObject(env, LDKPendingHTLCRouting_Receive_class, LDKPendingHTLCRouting_Receive_meth, payment_data_ref, payment_metadata_ref, payment_context_ref, incoming_cltv_expiry_conv, phantom_shared_secret_arr, custom_tlvs_arr, requires_blinded_error_conv);
                }
                case LDKPendingHTLCRouting_ReceiveKeysend: {
                        LDKFinalOnionHopData payment_data_var = obj->receive_keysend.payment_data;
@@ -8070,7 +8857,8 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPendingHTLCRouting_1ref_
                                custom_tlvs_arr_ptr[x] = tag_ptr(custom_tlvs_conv_23_conv, true);
                        }
                        (*env)->ReleasePrimitiveArrayCritical(env, custom_tlvs_arr, custom_tlvs_arr_ptr, 0);
-                       return (*env)->NewObject(env, LDKPendingHTLCRouting_ReceiveKeysend_class, LDKPendingHTLCRouting_ReceiveKeysend_meth, payment_data_ref, payment_preimage_arr, payment_metadata_ref, incoming_cltv_expiry_conv, custom_tlvs_arr);
+                       jboolean requires_blinded_error_conv = obj->receive_keysend.requires_blinded_error;
+                       return (*env)->NewObject(env, LDKPendingHTLCRouting_ReceiveKeysend_class, LDKPendingHTLCRouting_ReceiveKeysend_meth, payment_data_ref, payment_preimage_arr, payment_metadata_ref, incoming_cltv_expiry_conv, custom_tlvs_arr, requires_blinded_error_conv);
                }
                default: abort();
        }
@@ -8265,7 +9053,7 @@ LDKChannelMonitorUpdateStatus update_channel_LDKWatch_jcall(const void* this_arg
        }
        return ret_conv;
 }
-LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) {
+LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) {
        LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
        JNIEnv *env;
        jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -8281,20 +9069,20 @@ LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ release_pending_monitor_ev
                (*env)->ExceptionDescribe(env);
                (*env)->FatalError(env, "A call to release_pending_monitor_events in LDKWatch from rust threw an exception.");
        }
-       LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_constr;
+       LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret_constr;
        ret_constr.datalen = (*env)->GetArrayLength(env, ret);
        if (ret_constr.datalen > 0)
-               ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Elements");
+               ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Elements");
        else
                ret_constr.data = NULL;
        int64_t* ret_vals = (*env)->GetLongArrayElements (env, ret, NULL);
-       for (size_t x = 0; x < ret_constr.datalen; x++) {
-               int64_t ret_conv_49 = ret_vals[x];
-               void* ret_conv_49_ptr = untag_ptr(ret_conv_49);
-               CHECK_ACCESS(ret_conv_49_ptr);
-               LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ ret_conv_49_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(ret_conv_49_ptr);
-               FREE(untag_ptr(ret_conv_49));
-               ret_constr.data[x] = ret_conv_49_conv;
+       for (size_t f = 0; f < ret_constr.datalen; f++) {
+               int64_t ret_conv_57 = ret_vals[f];
+               void* ret_conv_57_ptr = untag_ptr(ret_conv_57);
+               CHECK_ACCESS(ret_conv_57_ptr);
+               LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_conv_57_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(ret_conv_57_ptr);
+               FREE(untag_ptr(ret_conv_57));
+               ret_constr.data[f] = ret_conv_57_conv;
        }
        (*env)->ReleaseLongArrayElements(env, ret, ret_vals, 0);
        if (get_jenv_res == JNI_EDETACHED) {
@@ -8375,14 +9163,14 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_Watch_1release_1pendin
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKWatch* this_arg_conv = (LDKWatch*)this_arg_ptr;
-       LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg);
+       LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg);
        int64_tArray ret_arr = NULL;
        ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
        int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t x = 0; x < ret_var.datalen; x++) {
-               LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv_49_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ");
-               *ret_conv_49_conv = ret_var.data[x];
-               ret_arr_ptr[x] = tag_ptr(ret_conv_49_conv, true);
+       for (size_t f = 0; f < ret_var.datalen; f++) {
+               LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv_57_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ");
+               *ret_conv_57_conv = ret_var.data[f];
+               ret_arr_ptr[f] = tag_ptr(ret_conv_57_conv, true);
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
@@ -8785,7 +9573,7 @@ LDKCResult_SchnorrSignatureNoneZ sign_bolt12_invoice_request_LDKNodeSigner_jcall
        }
        LDKUnsignedInvoiceRequest invoice_request_var = *invoice_request;
        int64_t invoice_request_ref = 0;
-       // WARNING: we may need a move here but no clone is available for LDKUnsignedInvoiceRequest
+       invoice_request_var = UnsignedInvoiceRequest_clone(&invoice_request_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_var);
        invoice_request_ref = tag_ptr(invoice_request_var.inner, invoice_request_var.is_owned);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
@@ -8815,7 +9603,7 @@ LDKCResult_SchnorrSignatureNoneZ sign_bolt12_invoice_LDKNodeSigner_jcall(const v
        }
        LDKUnsignedBolt12Invoice invoice_var = *invoice;
        int64_t invoice_ref = 0;
-       // WARNING: we may need a move here but no clone is available for LDKUnsignedBolt12Invoice
+       invoice_var = UnsignedBolt12Invoice_clone(&invoice_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_var);
        invoice_ref = tag_ptr(invoice_var.inner, invoice_var.is_owned);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
@@ -11044,34 +11832,6 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1SocketAddressZ_
                default: abort();
        }
 }
-static inline struct LDKPublicKey C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner){
-       return owner->a;
-}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* owner_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(owner);
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(owner_conv).compressed_form);
-       return ret_arr;
-}
-
-static inline struct LDKCOption_SocketAddressZ C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner){
-       return COption_SocketAddressZ_clone(&owner->b);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* owner_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(owner);
-       LDKCOption_SocketAddressZ *ret_copy = MALLOC(sizeof(LDKCOption_SocketAddressZ), "LDKCOption_SocketAddressZ");
-       *ret_copy = C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(owner_conv);
-       int64_t ret_ref = tag_ptr(ret_copy, true);
-       return ret_ref;
-}
-
-static inline LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_clone(const LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ *orig) {
-       LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ) * orig->datalen, "LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(&orig->data[i]);
-       }
-       return ret;
-}
 static inline struct LDKCVec_u8Z CResult_CVec_u8ZPeerHandleErrorZ_get_ok(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner){
 CHECK(owner->result_ok);
        return CVec_u8Z_clone(&*owner->contents.result);
@@ -11312,6 +12072,54 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoB
        return ret_conv;
 }
 
+static inline struct LDKUnsignedInvoiceRequest CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKUnsignedInvoiceRequest ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKUnsignedInvoiceRequest ret_var = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
+static inline struct LDKInvoiceRequest CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKInvoiceRequest ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKInvoiceRequest ret_var = CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
 static jclass LDKCOption_SecretKeyZ_Some_class = NULL;
 static jmethodID LDKCOption_SecretKeyZ_Some_meth = NULL;
 static jclass LDKCOption_SecretKeyZ_None_class = NULL;
@@ -11342,6 +12150,30 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1SecretKeyZ_1ref
                default: abort();
        }
 }
+static inline struct LDKInvoiceWithExplicitSigningPubkeyBuilder CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKInvoiceWithExplicitSigningPubkeyBuilder ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKInvoiceWithExplicitSigningPubkeyBuilder ret_var = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
 static inline struct LDKVerifiedInvoiceRequest CResult_VerifiedInvoiceRequestNoneZ_get_ok(LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR owner){
        LDKVerifiedInvoiceRequest ret = *owner->contents.result;
        ret.is_owned = false;
@@ -11365,6 +12197,56 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceReques
        CResult_VerifiedInvoiceRequestNoneZ_get_err(owner_conv);
 }
 
+static inline struct LDKInvoiceWithDerivedSigningPubkeyBuilder CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKInvoiceWithDerivedSigningPubkeyBuilder ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKInvoiceWithDerivedSigningPubkeyBuilder ret_var = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
+static inline struct LDKInvoiceRequestFields CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner){
+       LDKInvoiceRequestFields ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceRequestFieldsDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(owner);
+       LDKInvoiceRequestFields ret_var = CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceRequestFieldsDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 static inline LDKCVec_WitnessZ CVec_WitnessZ_clone(const LDKCVec_WitnessZ *orig) {
        LDKCVec_WitnessZ ret = { .data = MALLOC(sizeof(LDKWitness) * orig->datalen, "LDKCVec_WitnessZ clone bytes"), .datalen = orig->datalen };
        for (size_t i = 0; i < ret.datalen; i++) {
@@ -11372,6 +12254,36 @@ static inline LDKCVec_WitnessZ CVec_WitnessZ_clone(const LDKCVec_WitnessZ *orig)
        }
        return ret;
 }
+static jclass LDKCOption_ECDSASignatureZ_Some_class = NULL;
+static jmethodID LDKCOption_ECDSASignatureZ_Some_meth = NULL;
+static jclass LDKCOption_ECDSASignatureZ_None_class = NULL;
+static jmethodID LDKCOption_ECDSASignatureZ_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1ECDSASignatureZ_init (JNIEnv *env, jclass clz) {
+       LDKCOption_ECDSASignatureZ_Some_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_ECDSASignatureZ$Some"));
+       CHECK(LDKCOption_ECDSASignatureZ_Some_class != NULL);
+       LDKCOption_ECDSASignatureZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_ECDSASignatureZ_Some_class, "<init>", "([B)V");
+       CHECK(LDKCOption_ECDSASignatureZ_Some_meth != NULL);
+       LDKCOption_ECDSASignatureZ_None_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_ECDSASignatureZ$None"));
+       CHECK(LDKCOption_ECDSASignatureZ_None_class != NULL);
+       LDKCOption_ECDSASignatureZ_None_meth = (*env)->GetMethodID(env, LDKCOption_ECDSASignatureZ_None_class, "<init>", "()V");
+       CHECK(LDKCOption_ECDSASignatureZ_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1ECDSASignatureZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKCOption_ECDSASignatureZ *obj = (LDKCOption_ECDSASignatureZ*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKCOption_ECDSASignatureZ_Some: {
+                       int8_tArray some_arr = (*env)->NewByteArray(env, 64);
+                       (*env)->SetByteArrayRegion(env, some_arr, 0, 64, obj->some.compact_form);
+                       return (*env)->NewObject(env, LDKCOption_ECDSASignatureZ_Some_class, LDKCOption_ECDSASignatureZ_Some_meth, some_arr);
+               }
+               case LDKCOption_ECDSASignatureZ_None: {
+                       return (*env)->NewObject(env, LDKCOption_ECDSASignatureZ_None_class, LDKCOption_ECDSASignatureZ_None_meth);
+               }
+               default: abort();
+       }
+}
 static jclass LDKCOption_i64Z_Some_class = NULL;
 static jmethodID LDKCOption_i64Z_Some_meth = NULL;
 static jclass LDKCOption_i64Z_None_class = NULL;
@@ -12863,13 +13775,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt11InvoiceSignO
        return ret_ref;
 }
 
-static inline LDKCVec_FutureZ CVec_FutureZ_clone(const LDKCVec_FutureZ *orig) {
-       LDKCVec_FutureZ ret = { .data = MALLOC(sizeof(LDKFuture) * orig->datalen, "LDKCVec_FutureZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = Future_clone(&orig->data[i]);
-       }
-       return ret;
-}
 static inline struct LDKOffersMessage CResult_OffersMessageDecodeErrorZ_get_ok(LDKCResult_OffersMessageDecodeErrorZ *NONNULL_PTR owner){
 CHECK(owner->result_ok);
        return OffersMessage_clone(&*owner->contents.result);
@@ -13314,16 +14219,30 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownScriptInva
        return ret_ref;
 }
 
-static jclass LDKPaymentPurpose_InvoicePayment_class = NULL;
-static jmethodID LDKPaymentPurpose_InvoicePayment_meth = NULL;
+static jclass LDKPaymentPurpose_Bolt11InvoicePayment_class = NULL;
+static jmethodID LDKPaymentPurpose_Bolt11InvoicePayment_meth = NULL;
+static jclass LDKPaymentPurpose_Bolt12OfferPayment_class = NULL;
+static jmethodID LDKPaymentPurpose_Bolt12OfferPayment_meth = NULL;
+static jclass LDKPaymentPurpose_Bolt12RefundPayment_class = NULL;
+static jmethodID LDKPaymentPurpose_Bolt12RefundPayment_meth = NULL;
 static jclass LDKPaymentPurpose_SpontaneousPayment_class = NULL;
 static jmethodID LDKPaymentPurpose_SpontaneousPayment_meth = NULL;
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPaymentPurpose_init (JNIEnv *env, jclass clz) {
-       LDKPaymentPurpose_InvoicePayment_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$InvoicePayment"));
-       CHECK(LDKPaymentPurpose_InvoicePayment_class != NULL);
-       LDKPaymentPurpose_InvoicePayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_InvoicePayment_class, "<init>", "(J[B)V");
-       CHECK(LDKPaymentPurpose_InvoicePayment_meth != NULL);
+       LDKPaymentPurpose_Bolt11InvoicePayment_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$Bolt11InvoicePayment"));
+       CHECK(LDKPaymentPurpose_Bolt11InvoicePayment_class != NULL);
+       LDKPaymentPurpose_Bolt11InvoicePayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_Bolt11InvoicePayment_class, "<init>", "(J[B)V");
+       CHECK(LDKPaymentPurpose_Bolt11InvoicePayment_meth != NULL);
+       LDKPaymentPurpose_Bolt12OfferPayment_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$Bolt12OfferPayment"));
+       CHECK(LDKPaymentPurpose_Bolt12OfferPayment_class != NULL);
+       LDKPaymentPurpose_Bolt12OfferPayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_Bolt12OfferPayment_class, "<init>", "(J[BJ)V");
+       CHECK(LDKPaymentPurpose_Bolt12OfferPayment_meth != NULL);
+       LDKPaymentPurpose_Bolt12RefundPayment_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$Bolt12RefundPayment"));
+       CHECK(LDKPaymentPurpose_Bolt12RefundPayment_class != NULL);
+       LDKPaymentPurpose_Bolt12RefundPayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_Bolt12RefundPayment_class, "<init>", "(J[BJ)V");
+       CHECK(LDKPaymentPurpose_Bolt12RefundPayment_meth != NULL);
        LDKPaymentPurpose_SpontaneousPayment_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$SpontaneousPayment"));
        CHECK(LDKPaymentPurpose_SpontaneousPayment_class != NULL);
@@ -13333,11 +14252,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPaymentPurpose_init (J
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPaymentPurpose_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
        LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr);
        switch(obj->tag) {
-               case LDKPaymentPurpose_InvoicePayment: {
-                       int64_t payment_preimage_ref = tag_ptr(&obj->invoice_payment.payment_preimage, false);
+               case LDKPaymentPurpose_Bolt11InvoicePayment: {
+                       int64_t payment_preimage_ref = tag_ptr(&obj->bolt11_invoice_payment.payment_preimage, false);
+                       int8_tArray payment_secret_arr = (*env)->NewByteArray(env, 32);
+                       (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->bolt11_invoice_payment.payment_secret.data);
+                       return (*env)->NewObject(env, LDKPaymentPurpose_Bolt11InvoicePayment_class, LDKPaymentPurpose_Bolt11InvoicePayment_meth, payment_preimage_ref, payment_secret_arr);
+               }
+               case LDKPaymentPurpose_Bolt12OfferPayment: {
+                       int64_t payment_preimage_ref = tag_ptr(&obj->bolt12_offer_payment.payment_preimage, false);
                        int8_tArray payment_secret_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->invoice_payment.payment_secret.data);
-                       return (*env)->NewObject(env, LDKPaymentPurpose_InvoicePayment_class, LDKPaymentPurpose_InvoicePayment_meth, payment_preimage_ref, payment_secret_arr);
+                       (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->bolt12_offer_payment.payment_secret.data);
+                       LDKBolt12OfferContext payment_context_var = obj->bolt12_offer_payment.payment_context;
+                       int64_t payment_context_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_var);
+                       payment_context_ref = tag_ptr(payment_context_var.inner, false);
+                       return (*env)->NewObject(env, LDKPaymentPurpose_Bolt12OfferPayment_class, LDKPaymentPurpose_Bolt12OfferPayment_meth, payment_preimage_ref, payment_secret_arr, payment_context_ref);
+               }
+               case LDKPaymentPurpose_Bolt12RefundPayment: {
+                       int64_t payment_preimage_ref = tag_ptr(&obj->bolt12_refund_payment.payment_preimage, false);
+                       int8_tArray payment_secret_arr = (*env)->NewByteArray(env, 32);
+                       (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->bolt12_refund_payment.payment_secret.data);
+                       LDKBolt12RefundContext payment_context_var = obj->bolt12_refund_payment.payment_context;
+                       int64_t payment_context_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_var);
+                       payment_context_ref = tag_ptr(payment_context_var.inner, false);
+                       return (*env)->NewObject(env, LDKPaymentPurpose_Bolt12RefundPayment_class, LDKPaymentPurpose_Bolt12RefundPayment_meth, payment_preimage_ref, payment_secret_arr, payment_context_ref);
                }
                case LDKPaymentPurpose_SpontaneousPayment: {
                        int8_tArray spontaneous_payment_arr = (*env)->NewByteArray(env, 32);
@@ -13480,120 +14419,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1PathFailu
        return ret_ref;
 }
 
-static jclass LDKClosureReason_CounterpartyForceClosed_class = NULL;
-static jmethodID LDKClosureReason_CounterpartyForceClosed_meth = NULL;
-static jclass LDKClosureReason_HolderForceClosed_class = NULL;
-static jmethodID LDKClosureReason_HolderForceClosed_meth = NULL;
-static jclass LDKClosureReason_CooperativeClosure_class = NULL;
-static jmethodID LDKClosureReason_CooperativeClosure_meth = NULL;
-static jclass LDKClosureReason_CommitmentTxConfirmed_class = NULL;
-static jmethodID LDKClosureReason_CommitmentTxConfirmed_meth = NULL;
-static jclass LDKClosureReason_FundingTimedOut_class = NULL;
-static jmethodID LDKClosureReason_FundingTimedOut_meth = NULL;
-static jclass LDKClosureReason_ProcessingError_class = NULL;
-static jmethodID LDKClosureReason_ProcessingError_meth = NULL;
-static jclass LDKClosureReason_DisconnectedPeer_class = NULL;
-static jmethodID LDKClosureReason_DisconnectedPeer_meth = NULL;
-static jclass LDKClosureReason_OutdatedChannelManager_class = NULL;
-static jmethodID LDKClosureReason_OutdatedChannelManager_meth = NULL;
-static jclass LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class = NULL;
-static jmethodID LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = NULL;
-static jclass LDKClosureReason_FundingBatchClosure_class = NULL;
-static jmethodID LDKClosureReason_FundingBatchClosure_meth = NULL;
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKClosureReason_init (JNIEnv *env, jclass clz) {
-       LDKClosureReason_CounterpartyForceClosed_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyForceClosed"));
-       CHECK(LDKClosureReason_CounterpartyForceClosed_class != NULL);
-       LDKClosureReason_CounterpartyForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyForceClosed_class, "<init>", "(J)V");
-       CHECK(LDKClosureReason_CounterpartyForceClosed_meth != NULL);
-       LDKClosureReason_HolderForceClosed_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$HolderForceClosed"));
-       CHECK(LDKClosureReason_HolderForceClosed_class != NULL);
-       LDKClosureReason_HolderForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_HolderForceClosed_class, "<init>", "()V");
-       CHECK(LDKClosureReason_HolderForceClosed_meth != NULL);
-       LDKClosureReason_CooperativeClosure_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CooperativeClosure"));
-       CHECK(LDKClosureReason_CooperativeClosure_class != NULL);
-       LDKClosureReason_CooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_CooperativeClosure_class, "<init>", "()V");
-       CHECK(LDKClosureReason_CooperativeClosure_meth != NULL);
-       LDKClosureReason_CommitmentTxConfirmed_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CommitmentTxConfirmed"));
-       CHECK(LDKClosureReason_CommitmentTxConfirmed_class != NULL);
-       LDKClosureReason_CommitmentTxConfirmed_meth = (*env)->GetMethodID(env, LDKClosureReason_CommitmentTxConfirmed_class, "<init>", "()V");
-       CHECK(LDKClosureReason_CommitmentTxConfirmed_meth != NULL);
-       LDKClosureReason_FundingTimedOut_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingTimedOut"));
-       CHECK(LDKClosureReason_FundingTimedOut_class != NULL);
-       LDKClosureReason_FundingTimedOut_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingTimedOut_class, "<init>", "()V");
-       CHECK(LDKClosureReason_FundingTimedOut_meth != NULL);
-       LDKClosureReason_ProcessingError_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$ProcessingError"));
-       CHECK(LDKClosureReason_ProcessingError_class != NULL);
-       LDKClosureReason_ProcessingError_meth = (*env)->GetMethodID(env, LDKClosureReason_ProcessingError_class, "<init>", "(Ljava/lang/String;)V");
-       CHECK(LDKClosureReason_ProcessingError_meth != NULL);
-       LDKClosureReason_DisconnectedPeer_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$DisconnectedPeer"));
-       CHECK(LDKClosureReason_DisconnectedPeer_class != NULL);
-       LDKClosureReason_DisconnectedPeer_meth = (*env)->GetMethodID(env, LDKClosureReason_DisconnectedPeer_class, "<init>", "()V");
-       CHECK(LDKClosureReason_DisconnectedPeer_meth != NULL);
-       LDKClosureReason_OutdatedChannelManager_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$OutdatedChannelManager"));
-       CHECK(LDKClosureReason_OutdatedChannelManager_class != NULL);
-       LDKClosureReason_OutdatedChannelManager_meth = (*env)->GetMethodID(env, LDKClosureReason_OutdatedChannelManager_class, "<init>", "()V");
-       CHECK(LDKClosureReason_OutdatedChannelManager_meth != NULL);
-       LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyCoopClosedUnfundedChannel"));
-       CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class != NULL);
-       LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, "<init>", "()V");
-       CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth != NULL);
-       LDKClosureReason_FundingBatchClosure_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingBatchClosure"));
-       CHECK(LDKClosureReason_FundingBatchClosure_class != NULL);
-       LDKClosureReason_FundingBatchClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingBatchClosure_class, "<init>", "()V");
-       CHECK(LDKClosureReason_FundingBatchClosure_meth != NULL);
-}
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKClosureReason_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr);
-       switch(obj->tag) {
-               case LDKClosureReason_CounterpartyForceClosed: {
-                       LDKUntrustedString peer_msg_var = obj->counterparty_force_closed.peer_msg;
-                       int64_t peer_msg_ref = 0;
-                       CHECK_INNER_FIELD_ACCESS_OR_NULL(peer_msg_var);
-                       peer_msg_ref = tag_ptr(peer_msg_var.inner, false);
-                       return (*env)->NewObject(env, LDKClosureReason_CounterpartyForceClosed_class, LDKClosureReason_CounterpartyForceClosed_meth, peer_msg_ref);
-               }
-               case LDKClosureReason_HolderForceClosed: {
-                       return (*env)->NewObject(env, LDKClosureReason_HolderForceClosed_class, LDKClosureReason_HolderForceClosed_meth);
-               }
-               case LDKClosureReason_CooperativeClosure: {
-                       return (*env)->NewObject(env, LDKClosureReason_CooperativeClosure_class, LDKClosureReason_CooperativeClosure_meth);
-               }
-               case LDKClosureReason_CommitmentTxConfirmed: {
-                       return (*env)->NewObject(env, LDKClosureReason_CommitmentTxConfirmed_class, LDKClosureReason_CommitmentTxConfirmed_meth);
-               }
-               case LDKClosureReason_FundingTimedOut: {
-                       return (*env)->NewObject(env, LDKClosureReason_FundingTimedOut_class, LDKClosureReason_FundingTimedOut_meth);
-               }
-               case LDKClosureReason_ProcessingError: {
-                       LDKStr err_str = obj->processing_error.err;
-                       jstring err_conv = str_ref_to_java(env, err_str.chars, err_str.len);
-                       return (*env)->NewObject(env, LDKClosureReason_ProcessingError_class, LDKClosureReason_ProcessingError_meth, err_conv);
-               }
-               case LDKClosureReason_DisconnectedPeer: {
-                       return (*env)->NewObject(env, LDKClosureReason_DisconnectedPeer_class, LDKClosureReason_DisconnectedPeer_meth);
-               }
-               case LDKClosureReason_OutdatedChannelManager: {
-                       return (*env)->NewObject(env, LDKClosureReason_OutdatedChannelManager_class, LDKClosureReason_OutdatedChannelManager_meth);
-               }
-               case LDKClosureReason_CounterpartyCoopClosedUnfundedChannel: {
-                       return (*env)->NewObject(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth);
-               }
-               case LDKClosureReason_FundingBatchClosure: {
-                       return (*env)->NewObject(env, LDKClosureReason_FundingBatchClosure_class, LDKClosureReason_FundingBatchClosure_meth);
-               }
-               default: abort();
-       }
-}
 static jclass LDKCOption_ClosureReasonZ_Some_class = NULL;
 static jmethodID LDKCOption_ClosureReasonZ_Some_meth = NULL;
 static jclass LDKCOption_ClosureReasonZ_None_class = NULL;
@@ -13653,13 +14478,15 @@ static jclass LDKHTLCDestination_UnknownNextHop_class = NULL;
 static jmethodID LDKHTLCDestination_UnknownNextHop_meth = NULL;
 static jclass LDKHTLCDestination_InvalidForward_class = NULL;
 static jmethodID LDKHTLCDestination_InvalidForward_meth = NULL;
+static jclass LDKHTLCDestination_InvalidOnion_class = NULL;
+static jmethodID LDKHTLCDestination_InvalidOnion_meth = NULL;
 static jclass LDKHTLCDestination_FailedPayment_class = NULL;
 static jmethodID LDKHTLCDestination_FailedPayment_meth = NULL;
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKHTLCDestination_init (JNIEnv *env, jclass clz) {
        LDKHTLCDestination_NextHopChannel_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$NextHopChannel"));
        CHECK(LDKHTLCDestination_NextHopChannel_class != NULL);
-       LDKHTLCDestination_NextHopChannel_meth = (*env)->GetMethodID(env, LDKHTLCDestination_NextHopChannel_class, "<init>", "([B[B)V");
+       LDKHTLCDestination_NextHopChannel_meth = (*env)->GetMethodID(env, LDKHTLCDestination_NextHopChannel_class, "<init>", "([BJ)V");
        CHECK(LDKHTLCDestination_NextHopChannel_meth != NULL);
        LDKHTLCDestination_UnknownNextHop_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$UnknownNextHop"));
@@ -13671,6 +14498,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKHTLCDestination_init (
        CHECK(LDKHTLCDestination_InvalidForward_class != NULL);
        LDKHTLCDestination_InvalidForward_meth = (*env)->GetMethodID(env, LDKHTLCDestination_InvalidForward_class, "<init>", "(J)V");
        CHECK(LDKHTLCDestination_InvalidForward_meth != NULL);
+       LDKHTLCDestination_InvalidOnion_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$InvalidOnion"));
+       CHECK(LDKHTLCDestination_InvalidOnion_class != NULL);
+       LDKHTLCDestination_InvalidOnion_meth = (*env)->GetMethodID(env, LDKHTLCDestination_InvalidOnion_class, "<init>", "()V");
+       CHECK(LDKHTLCDestination_InvalidOnion_meth != NULL);
        LDKHTLCDestination_FailedPayment_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$FailedPayment"));
        CHECK(LDKHTLCDestination_FailedPayment_class != NULL);
@@ -13683,9 +14515,11 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKHTLCDestination_1ref_1fr
                case LDKHTLCDestination_NextHopChannel: {
                        int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
                        (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->next_hop_channel.node_id.compressed_form);
-                       int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->next_hop_channel.channel_id.data);
-                       return (*env)->NewObject(env, LDKHTLCDestination_NextHopChannel_class, LDKHTLCDestination_NextHopChannel_meth, node_id_arr, channel_id_arr);
+                       LDKChannelId channel_id_var = obj->next_hop_channel.channel_id;
+                       int64_t channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+                       channel_id_ref = tag_ptr(channel_id_var.inner, false);
+                       return (*env)->NewObject(env, LDKHTLCDestination_NextHopChannel_class, LDKHTLCDestination_NextHopChannel_meth, node_id_arr, channel_id_ref);
                }
                case LDKHTLCDestination_UnknownNextHop: {
                        int64_t requested_forward_scid_conv = obj->unknown_next_hop.requested_forward_scid;
@@ -13695,6 +14529,9 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKHTLCDestination_1ref_1fr
                        int64_t requested_forward_scid_conv = obj->invalid_forward.requested_forward_scid;
                        return (*env)->NewObject(env, LDKHTLCDestination_InvalidForward_class, LDKHTLCDestination_InvalidForward_meth, requested_forward_scid_conv);
                }
+               case LDKHTLCDestination_InvalidOnion: {
+                       return (*env)->NewObject(env, LDKHTLCDestination_InvalidOnion_class, LDKHTLCDestination_InvalidOnion_meth);
+               }
                case LDKHTLCDestination_FailedPayment: {
                        int8_tArray payment_hash_arr = (*env)->NewByteArray(env, 32);
                        (*env)->SetByteArrayRegion(env, payment_hash_arr, 0, 32, obj->failed_payment.payment_hash.data);
@@ -13852,18 +14689,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKBumpTransactionEvent_i
        LDKBumpTransactionEvent_ChannelClose_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKBumpTransactionEvent$ChannelClose"));
        CHECK(LDKBumpTransactionEvent_ChannelClose_class != NULL);
-       LDKBumpTransactionEvent_ChannelClose_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_ChannelClose_class, "<init>", "([BI[BJJ[J)V");
+       LDKBumpTransactionEvent_ChannelClose_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_ChannelClose_class, "<init>", "(J[B[BI[BJJ[J)V");
        CHECK(LDKBumpTransactionEvent_ChannelClose_meth != NULL);
        LDKBumpTransactionEvent_HTLCResolution_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKBumpTransactionEvent$HTLCResolution"));
        CHECK(LDKBumpTransactionEvent_HTLCResolution_class != NULL);
-       LDKBumpTransactionEvent_HTLCResolution_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_HTLCResolution_class, "<init>", "([BI[JI)V");
+       LDKBumpTransactionEvent_HTLCResolution_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_HTLCResolution_class, "<init>", "(J[B[BI[JI)V");
        CHECK(LDKBumpTransactionEvent_HTLCResolution_meth != NULL);
 }
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKBumpTransactionEvent_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
        LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr);
        switch(obj->tag) {
                case LDKBumpTransactionEvent_ChannelClose: {
+                       LDKChannelId channel_id_var = obj->channel_close.channel_id;
+                       int64_t channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+                       channel_id_ref = tag_ptr(channel_id_var.inner, false);
+                       int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
+                       (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->channel_close.counterparty_node_id.compressed_form);
                        int8_tArray claim_id_arr = (*env)->NewByteArray(env, 32);
                        (*env)->SetByteArrayRegion(env, claim_id_arr, 0, 32, obj->channel_close.claim_id.data);
                        int32_t package_target_feerate_sat_per_1000_weight_conv = obj->channel_close.package_target_feerate_sat_per_1000_weight;
@@ -13887,9 +14730,15 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKBumpTransactionEvent_1re
                                pending_htlcs_arr_ptr[y] = pending_htlcs_conv_24_ref;
                        }
                        (*env)->ReleasePrimitiveArrayCritical(env, pending_htlcs_arr, pending_htlcs_arr_ptr, 0);
-                       return (*env)->NewObject(env, LDKBumpTransactionEvent_ChannelClose_class, LDKBumpTransactionEvent_ChannelClose_meth, claim_id_arr, package_target_feerate_sat_per_1000_weight_conv, commitment_tx_arr, commitment_tx_fee_satoshis_conv, anchor_descriptor_ref, pending_htlcs_arr);
+                       return (*env)->NewObject(env, LDKBumpTransactionEvent_ChannelClose_class, LDKBumpTransactionEvent_ChannelClose_meth, channel_id_ref, counterparty_node_id_arr, claim_id_arr, package_target_feerate_sat_per_1000_weight_conv, commitment_tx_arr, commitment_tx_fee_satoshis_conv, anchor_descriptor_ref, pending_htlcs_arr);
                }
                case LDKBumpTransactionEvent_HTLCResolution: {
+                       LDKChannelId channel_id_var = obj->htlc_resolution.channel_id;
+                       int64_t channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+                       channel_id_ref = tag_ptr(channel_id_var.inner, false);
+                       int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
+                       (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->htlc_resolution.counterparty_node_id.compressed_form);
                        int8_tArray claim_id_arr = (*env)->NewByteArray(env, 32);
                        (*env)->SetByteArrayRegion(env, claim_id_arr, 0, 32, obj->htlc_resolution.claim_id.data);
                        int32_t target_feerate_sat_per_1000_weight_conv = obj->htlc_resolution.target_feerate_sat_per_1000_weight;
@@ -13906,7 +14755,7 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKBumpTransactionEvent_1re
                        }
                        (*env)->ReleasePrimitiveArrayCritical(env, htlc_descriptors_arr, htlc_descriptors_arr_ptr, 0);
                        int32_t tx_lock_time_conv = obj->htlc_resolution.tx_lock_time;
-                       return (*env)->NewObject(env, LDKBumpTransactionEvent_HTLCResolution_class, LDKBumpTransactionEvent_HTLCResolution_meth, claim_id_arr, target_feerate_sat_per_1000_weight_conv, htlc_descriptors_arr, tx_lock_time_conv);
+                       return (*env)->NewObject(env, LDKBumpTransactionEvent_HTLCResolution_class, LDKBumpTransactionEvent_HTLCResolution_meth, channel_id_ref, counterparty_node_id_arr, claim_id_arr, target_feerate_sat_per_1000_weight_conv, htlc_descriptors_arr, tx_lock_time_conv);
                }
                default: abort();
        }
@@ -13959,7 +14808,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKEvent_init (JNIEnv *en
        LDKEvent_FundingGenerationReady_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$FundingGenerationReady"));
        CHECK(LDKEvent_FundingGenerationReady_class != NULL);
-       LDKEvent_FundingGenerationReady_meth = (*env)->GetMethodID(env, LDKEvent_FundingGenerationReady_class, "<init>", "([B[BJ[B[B)V");
+       LDKEvent_FundingGenerationReady_meth = (*env)->GetMethodID(env, LDKEvent_FundingGenerationReady_class, "<init>", "(J[BJ[B[B)V");
        CHECK(LDKEvent_FundingGenerationReady_meth != NULL);
        LDKEvent_PaymentClaimable_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$PaymentClaimable"));
@@ -14029,37 +14878,37 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKEvent_init (JNIEnv *en
        LDKEvent_PaymentForwarded_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$PaymentForwarded"));
        CHECK(LDKEvent_PaymentForwarded_class != NULL);
-       LDKEvent_PaymentForwarded_meth = (*env)->GetMethodID(env, LDKEvent_PaymentForwarded_class, "<init>", "(JJJZJ)V");
+       LDKEvent_PaymentForwarded_meth = (*env)->GetMethodID(env, LDKEvent_PaymentForwarded_class, "<init>", "(JJJJJJZJ)V");
        CHECK(LDKEvent_PaymentForwarded_meth != NULL);
        LDKEvent_ChannelPending_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$ChannelPending"));
        CHECK(LDKEvent_ChannelPending_class != NULL);
-       LDKEvent_ChannelPending_meth = (*env)->GetMethodID(env, LDKEvent_ChannelPending_class, "<init>", "([B[BJ[BJ)V");
+       LDKEvent_ChannelPending_meth = (*env)->GetMethodID(env, LDKEvent_ChannelPending_class, "<init>", "(J[BJ[BJJ)V");
        CHECK(LDKEvent_ChannelPending_meth != NULL);
        LDKEvent_ChannelReady_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$ChannelReady"));
        CHECK(LDKEvent_ChannelReady_class != NULL);
-       LDKEvent_ChannelReady_meth = (*env)->GetMethodID(env, LDKEvent_ChannelReady_class, "<init>", "([B[B[BJ)V");
+       LDKEvent_ChannelReady_meth = (*env)->GetMethodID(env, LDKEvent_ChannelReady_class, "<init>", "(J[B[BJ)V");
        CHECK(LDKEvent_ChannelReady_meth != NULL);
        LDKEvent_ChannelClosed_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$ChannelClosed"));
        CHECK(LDKEvent_ChannelClosed_class != NULL);
-       LDKEvent_ChannelClosed_meth = (*env)->GetMethodID(env, LDKEvent_ChannelClosed_class, "<init>", "([B[BJ[BJJ)V");
+       LDKEvent_ChannelClosed_meth = (*env)->GetMethodID(env, LDKEvent_ChannelClosed_class, "<init>", "(J[BJ[BJJ)V");
        CHECK(LDKEvent_ChannelClosed_meth != NULL);
        LDKEvent_DiscardFunding_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$DiscardFunding"));
        CHECK(LDKEvent_DiscardFunding_class != NULL);
-       LDKEvent_DiscardFunding_meth = (*env)->GetMethodID(env, LDKEvent_DiscardFunding_class, "<init>", "([B[B)V");
+       LDKEvent_DiscardFunding_meth = (*env)->GetMethodID(env, LDKEvent_DiscardFunding_class, "<init>", "(J[B)V");
        CHECK(LDKEvent_DiscardFunding_meth != NULL);
        LDKEvent_OpenChannelRequest_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$OpenChannelRequest"));
        CHECK(LDKEvent_OpenChannelRequest_class != NULL);
-       LDKEvent_OpenChannelRequest_meth = (*env)->GetMethodID(env, LDKEvent_OpenChannelRequest_class, "<init>", "([B[BJJJ)V");
+       LDKEvent_OpenChannelRequest_meth = (*env)->GetMethodID(env, LDKEvent_OpenChannelRequest_class, "<init>", "(J[BJJJ)V");
        CHECK(LDKEvent_OpenChannelRequest_meth != NULL);
        LDKEvent_HTLCHandlingFailed_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$HTLCHandlingFailed"));
        CHECK(LDKEvent_HTLCHandlingFailed_class != NULL);
-       LDKEvent_HTLCHandlingFailed_meth = (*env)->GetMethodID(env, LDKEvent_HTLCHandlingFailed_class, "<init>", "([BJ)V");
+       LDKEvent_HTLCHandlingFailed_meth = (*env)->GetMethodID(env, LDKEvent_HTLCHandlingFailed_class, "<init>", "(JJ)V");
        CHECK(LDKEvent_HTLCHandlingFailed_meth != NULL);
        LDKEvent_BumpTransaction_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$BumpTransaction"));
@@ -14071,8 +14920,10 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN
        LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
        switch(obj->tag) {
                case LDKEvent_FundingGenerationReady: {
-                       int8_tArray temporary_channel_id_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, temporary_channel_id_arr, 0, 32, obj->funding_generation_ready.temporary_channel_id.data);
+                       LDKChannelId temporary_channel_id_var = obj->funding_generation_ready.temporary_channel_id;
+                       int64_t temporary_channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_var);
+                       temporary_channel_id_ref = tag_ptr(temporary_channel_id_var.inner, false);
                        int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
                        (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->funding_generation_ready.counterparty_node_id.compressed_form);
                        int64_t channel_value_satoshis_conv = obj->funding_generation_ready.channel_value_satoshis;
@@ -14081,7 +14932,7 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN
                        (*env)->SetByteArrayRegion(env, output_script_arr, 0, output_script_var.datalen, output_script_var.data);
                        int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16);
                        (*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->funding_generation_ready.user_channel_id.le_bytes);
-                       return (*env)->NewObject(env, LDKEvent_FundingGenerationReady_class, LDKEvent_FundingGenerationReady_meth, temporary_channel_id_arr, counterparty_node_id_arr, channel_value_satoshis_conv, output_script_arr, user_channel_id_arr);
+                       return (*env)->NewObject(env, LDKEvent_FundingGenerationReady_class, LDKEvent_FundingGenerationReady_meth, temporary_channel_id_ref, counterparty_node_id_arr, channel_value_satoshis_conv, output_script_arr, user_channel_id_arr);
                }
                case LDKEvent_PaymentClaimable: {
                        int8_tArray receiver_node_id_arr = (*env)->NewByteArray(env, 33);
@@ -14095,7 +14946,10 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN
                        int64_t amount_msat_conv = obj->payment_claimable.amount_msat;
                        int64_t counterparty_skimmed_fee_msat_conv = obj->payment_claimable.counterparty_skimmed_fee_msat;
                        int64_t purpose_ref = tag_ptr(&obj->payment_claimable.purpose, false);
-                       int64_t via_channel_id_ref = tag_ptr(&obj->payment_claimable.via_channel_id, false);
+                       LDKChannelId via_channel_id_var = obj->payment_claimable.via_channel_id;
+                       int64_t via_channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(via_channel_id_var);
+                       via_channel_id_ref = tag_ptr(via_channel_id_var.inner, false);
                        int64_t via_user_channel_id_ref = tag_ptr(&obj->payment_claimable.via_user_channel_id, false);
                        int64_t claim_deadline_ref = tag_ptr(&obj->payment_claimable.claim_deadline, false);
                        return (*env)->NewObject(env, LDKEvent_PaymentClaimable_class, LDKEvent_PaymentClaimable_meth, receiver_node_id_arr, payment_hash_arr, onion_fields_ref, amount_msat_conv, counterparty_skimmed_fee_msat_conv, purpose_ref, via_channel_id_ref, via_user_channel_id_ref, claim_deadline_ref);
@@ -14228,34 +15082,57 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN
                                outputs_arr_ptr[b] = outputs_conv_27_ref;
                        }
                        (*env)->ReleasePrimitiveArrayCritical(env, outputs_arr, outputs_arr_ptr, 0);
-                       int64_t channel_id_ref = tag_ptr(&obj->spendable_outputs.channel_id, false);
+                       LDKChannelId channel_id_var = obj->spendable_outputs.channel_id;
+                       int64_t channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+                       channel_id_ref = tag_ptr(channel_id_var.inner, false);
                        return (*env)->NewObject(env, LDKEvent_SpendableOutputs_class, LDKEvent_SpendableOutputs_meth, outputs_arr, channel_id_ref);
                }
                case LDKEvent_PaymentForwarded: {
-                       int64_t prev_channel_id_ref = tag_ptr(&obj->payment_forwarded.prev_channel_id, false);
-                       int64_t next_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_channel_id, false);
-                       int64_t fee_earned_msat_ref = tag_ptr(&obj->payment_forwarded.fee_earned_msat, false);
+                       LDKChannelId prev_channel_id_var = obj->payment_forwarded.prev_channel_id;
+                       int64_t prev_channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_var);
+                       prev_channel_id_ref = tag_ptr(prev_channel_id_var.inner, false);
+                       LDKChannelId next_channel_id_var = obj->payment_forwarded.next_channel_id;
+                       int64_t next_channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(next_channel_id_var);
+                       next_channel_id_ref = tag_ptr(next_channel_id_var.inner, false);
+                       int64_t prev_user_channel_id_ref = tag_ptr(&obj->payment_forwarded.prev_user_channel_id, false);
+                       int64_t next_user_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_user_channel_id, false);
+                       int64_t total_fee_earned_msat_ref = tag_ptr(&obj->payment_forwarded.total_fee_earned_msat, false);
+                       int64_t skimmed_fee_msat_ref = tag_ptr(&obj->payment_forwarded.skimmed_fee_msat, false);
                        jboolean claim_from_onchain_tx_conv = obj->payment_forwarded.claim_from_onchain_tx;
                        int64_t outbound_amount_forwarded_msat_ref = tag_ptr(&obj->payment_forwarded.outbound_amount_forwarded_msat, false);
-                       return (*env)->NewObject(env, LDKEvent_PaymentForwarded_class, LDKEvent_PaymentForwarded_meth, prev_channel_id_ref, next_channel_id_ref, fee_earned_msat_ref, claim_from_onchain_tx_conv, outbound_amount_forwarded_msat_ref);
+                       return (*env)->NewObject(env, LDKEvent_PaymentForwarded_class, LDKEvent_PaymentForwarded_meth, prev_channel_id_ref, next_channel_id_ref, prev_user_channel_id_ref, next_user_channel_id_ref, total_fee_earned_msat_ref, skimmed_fee_msat_ref, claim_from_onchain_tx_conv, outbound_amount_forwarded_msat_ref);
                }
                case LDKEvent_ChannelPending: {
-                       int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->channel_pending.channel_id.data);
+                       LDKChannelId channel_id_var = obj->channel_pending.channel_id;
+                       int64_t channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+                       channel_id_ref = tag_ptr(channel_id_var.inner, false);
                        int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16);
                        (*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->channel_pending.user_channel_id.le_bytes);
-                       int64_t former_temporary_channel_id_ref = tag_ptr(&obj->channel_pending.former_temporary_channel_id, false);
+                       LDKChannelId former_temporary_channel_id_var = obj->channel_pending.former_temporary_channel_id;
+                       int64_t former_temporary_channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(former_temporary_channel_id_var);
+                       former_temporary_channel_id_ref = tag_ptr(former_temporary_channel_id_var.inner, false);
                        int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
                        (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->channel_pending.counterparty_node_id.compressed_form);
                        LDKOutPoint funding_txo_var = obj->channel_pending.funding_txo;
                        int64_t funding_txo_ref = 0;
                        CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_var);
                        funding_txo_ref = tag_ptr(funding_txo_var.inner, false);
-                       return (*env)->NewObject(env, LDKEvent_ChannelPending_class, LDKEvent_ChannelPending_meth, channel_id_arr, user_channel_id_arr, former_temporary_channel_id_ref, counterparty_node_id_arr, funding_txo_ref);
+                       LDKChannelTypeFeatures channel_type_var = obj->channel_pending.channel_type;
+                       int64_t channel_type_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var);
+                       channel_type_ref = tag_ptr(channel_type_var.inner, false);
+                       return (*env)->NewObject(env, LDKEvent_ChannelPending_class, LDKEvent_ChannelPending_meth, channel_id_ref, user_channel_id_arr, former_temporary_channel_id_ref, counterparty_node_id_arr, funding_txo_ref, channel_type_ref);
                }
                case LDKEvent_ChannelReady: {
-                       int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->channel_ready.channel_id.data);
+                       LDKChannelId channel_id_var = obj->channel_ready.channel_id;
+                       int64_t channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+                       channel_id_ref = tag_ptr(channel_id_var.inner, false);
                        int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16);
                        (*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->channel_ready.user_channel_id.le_bytes);
                        int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
@@ -14264,11 +15141,13 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN
                        int64_t channel_type_ref = 0;
                        CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var);
                        channel_type_ref = tag_ptr(channel_type_var.inner, false);
-                       return (*env)->NewObject(env, LDKEvent_ChannelReady_class, LDKEvent_ChannelReady_meth, channel_id_arr, user_channel_id_arr, counterparty_node_id_arr, channel_type_ref);
+                       return (*env)->NewObject(env, LDKEvent_ChannelReady_class, LDKEvent_ChannelReady_meth, channel_id_ref, user_channel_id_arr, counterparty_node_id_arr, channel_type_ref);
                }
                case LDKEvent_ChannelClosed: {
-                       int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->channel_closed.channel_id.data);
+                       LDKChannelId channel_id_var = obj->channel_closed.channel_id;
+                       int64_t channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+                       channel_id_ref = tag_ptr(channel_id_var.inner, false);
                        int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16);
                        (*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->channel_closed.user_channel_id.le_bytes);
                        int64_t reason_ref = tag_ptr(&obj->channel_closed.reason, false);
@@ -14279,19 +15158,23 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN
                        int64_t channel_funding_txo_ref = 0;
                        CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_txo_var);
                        channel_funding_txo_ref = tag_ptr(channel_funding_txo_var.inner, false);
-                       return (*env)->NewObject(env, LDKEvent_ChannelClosed_class, LDKEvent_ChannelClosed_meth, channel_id_arr, user_channel_id_arr, reason_ref, counterparty_node_id_arr, channel_capacity_sats_ref, channel_funding_txo_ref);
+                       return (*env)->NewObject(env, LDKEvent_ChannelClosed_class, LDKEvent_ChannelClosed_meth, channel_id_ref, user_channel_id_arr, reason_ref, counterparty_node_id_arr, channel_capacity_sats_ref, channel_funding_txo_ref);
                }
                case LDKEvent_DiscardFunding: {
-                       int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->discard_funding.channel_id.data);
+                       LDKChannelId channel_id_var = obj->discard_funding.channel_id;
+                       int64_t channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+                       channel_id_ref = tag_ptr(channel_id_var.inner, false);
                        LDKTransaction transaction_var = obj->discard_funding.transaction;
                        int8_tArray transaction_arr = (*env)->NewByteArray(env, transaction_var.datalen);
                        (*env)->SetByteArrayRegion(env, transaction_arr, 0, transaction_var.datalen, transaction_var.data);
-                       return (*env)->NewObject(env, LDKEvent_DiscardFunding_class, LDKEvent_DiscardFunding_meth, channel_id_arr, transaction_arr);
+                       return (*env)->NewObject(env, LDKEvent_DiscardFunding_class, LDKEvent_DiscardFunding_meth, channel_id_ref, transaction_arr);
                }
                case LDKEvent_OpenChannelRequest: {
-                       int8_tArray temporary_channel_id_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, temporary_channel_id_arr, 0, 32, obj->open_channel_request.temporary_channel_id.data);
+                       LDKChannelId temporary_channel_id_var = obj->open_channel_request.temporary_channel_id;
+                       int64_t temporary_channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_var);
+                       temporary_channel_id_ref = tag_ptr(temporary_channel_id_var.inner, false);
                        int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
                        (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->open_channel_request.counterparty_node_id.compressed_form);
                        int64_t funding_satoshis_conv = obj->open_channel_request.funding_satoshis;
@@ -14300,13 +15183,15 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN
                        int64_t channel_type_ref = 0;
                        CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var);
                        channel_type_ref = tag_ptr(channel_type_var.inner, false);
-                       return (*env)->NewObject(env, LDKEvent_OpenChannelRequest_class, LDKEvent_OpenChannelRequest_meth, temporary_channel_id_arr, counterparty_node_id_arr, funding_satoshis_conv, push_msat_conv, channel_type_ref);
+                       return (*env)->NewObject(env, LDKEvent_OpenChannelRequest_class, LDKEvent_OpenChannelRequest_meth, temporary_channel_id_ref, counterparty_node_id_arr, funding_satoshis_conv, push_msat_conv, channel_type_ref);
                }
                case LDKEvent_HTLCHandlingFailed: {
-                       int8_tArray prev_channel_id_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, prev_channel_id_arr, 0, 32, obj->htlc_handling_failed.prev_channel_id.data);
+                       LDKChannelId prev_channel_id_var = obj->htlc_handling_failed.prev_channel_id;
+                       int64_t prev_channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_var);
+                       prev_channel_id_ref = tag_ptr(prev_channel_id_var.inner, false);
                        int64_t failed_next_destination_ref = tag_ptr(&obj->htlc_handling_failed.failed_next_destination, false);
-                       return (*env)->NewObject(env, LDKEvent_HTLCHandlingFailed_class, LDKEvent_HTLCHandlingFailed_meth, prev_channel_id_arr, failed_next_destination_ref);
+                       return (*env)->NewObject(env, LDKEvent_HTLCHandlingFailed_class, LDKEvent_HTLCHandlingFailed_meth, prev_channel_id_ref, failed_next_destination_ref);
                }
                case LDKEvent_BumpTransaction: {
                        int64_t bump_transaction_ref = tag_ptr(&obj->bump_transaction, false);
@@ -15003,6 +15888,32 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UntrustedStringDec
        return ret_ref;
 }
 
+static inline struct LDKChannelId CResult_ChannelIdDecodeErrorZ_get_ok(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner){
+       LDKChannelId ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_ChannelIdDecodeErrorZ* owner_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(owner);
+       LDKChannelId ret_var = CResult_ChannelIdDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_ChannelIdDecodeErrorZ_get_err(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_ChannelIdDecodeErrorZ* owner_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelIdDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 static inline struct LDKThirtyTwoBytes C2Tuple__u832u16Z_get_a(LDKC2Tuple__u832u16Z *NONNULL_PTR owner){
        return ThirtyTwoBytes_clone(&owner->a);
 }
@@ -15074,62 +15985,106 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentConstraints
        return ret_ref;
 }
 
-static inline struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
-       return ThirtyTwoBytes_clone(&owner->a);
+static inline struct LDKPaymentContext CResult_PaymentContextDecodeErrorZ_get_ok(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return PaymentContext_clone(&*owner->contents.result);
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(owner_conv).data);
-       return ret_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_PaymentContextDecodeErrorZ* owner_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(owner);
+       LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+       *ret_copy = CResult_PaymentContextDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
 }
 
-static inline struct LDKRecipientOnionFields C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
-       LDKRecipientOnionFields ret = owner->b;
+static inline struct LDKDecodeError CResult_PaymentContextDecodeErrorZ_get_err(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_PaymentContextDecodeErrorZ* owner_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_PaymentContextDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKUnknownPaymentContext CResult_UnknownPaymentContextDecodeErrorZ_get_ok(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner){
+       LDKUnknownPaymentContext ret = *owner->contents.result;
        ret.is_owned = false;
        return ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
-       LDKRecipientOnionFields ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_UnknownPaymentContextDecodeErrorZ* owner_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(owner);
+       LDKUnknownPaymentContext ret_var = CResult_UnknownPaymentContextDecodeErrorZ_get_ok(owner_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
 
-static inline struct LDKRouteParameters C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
-       LDKRouteParameters ret = owner->c;
+static inline struct LDKDecodeError CResult_UnknownPaymentContextDecodeErrorZ_get_err(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_UnknownPaymentContextDecodeErrorZ* owner_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UnknownPaymentContextDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKBolt12OfferContext CResult_Bolt12OfferContextDecodeErrorZ_get_ok(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner){
+       LDKBolt12OfferContext ret = *owner->contents.result;
        ret.is_owned = false;
        return ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
-       LDKRouteParameters ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_Bolt12OfferContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(owner);
+       LDKBolt12OfferContext ret_var = CResult_Bolt12OfferContextDecodeErrorZ_get_ok(owner_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
 
-static inline struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
-       return C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(&*owner->contents.result);
+static inline struct LDKDecodeError CResult_Bolt12OfferContextDecodeErrorZ_get_err(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner);
-       LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ");
-       *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(owner_conv);
-       return tag_ptr(ret_conv, true);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_Bolt12OfferContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_Bolt12OfferContextDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
 }
 
-static inline void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){
+static inline struct LDKBolt12RefundContext CResult_Bolt12RefundContextDecodeErrorZ_get_ok(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner){
+       LDKBolt12RefundContext ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_Bolt12RefundContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(owner);
+       LDKBolt12RefundContext ret_var = CResult_Bolt12RefundContextDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_Bolt12RefundContextDecodeErrorZ_get_err(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner){
 CHECK(!owner->result_ok);
-       return *owner->contents.err;
+       return DecodeError_clone(&*owner->contents.err);
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner);
-       CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_Bolt12RefundContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_Bolt12RefundContextDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
 }
 
 static inline struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner){
@@ -15153,6 +16108,64 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_
        return ret_conv;
 }
 
+static inline struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
+       return ThirtyTwoBytes_clone(&owner->a);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(owner_conv).data);
+       return ret_arr;
+}
+
+static inline struct LDKRecipientOnionFields C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
+       LDKRecipientOnionFields ret = owner->b;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
+       LDKRecipientOnionFields ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKRouteParameters C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
+       LDKRouteParameters ret = owner->c;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
+       LDKRouteParameters ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(&*owner->contents.result);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner);
+       LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ");
+       *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(owner_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+static inline void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return *owner->contents.err;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner);
+       CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(owner_conv);
+}
+
 static inline struct LDKPublicKey C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR owner){
        return owner->a;
 }
@@ -15204,6 +16217,8 @@ static jclass LDKSendError_BufferFull_class = NULL;
 static jmethodID LDKSendError_BufferFull_meth = NULL;
 static jclass LDKSendError_GetNodeIdFailed_class = NULL;
 static jmethodID LDKSendError_GetNodeIdFailed_meth = NULL;
+static jclass LDKSendError_UnresolvedIntroductionNode_class = NULL;
+static jmethodID LDKSendError_UnresolvedIntroductionNode_meth = NULL;
 static jclass LDKSendError_BlindedPathAdvanceFailed_class = NULL;
 static jmethodID LDKSendError_BlindedPathAdvanceFailed_meth = NULL;
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSendError_init (JNIEnv *env, jclass clz) {
@@ -15247,6 +16262,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSendError_init (JNIEnv
        CHECK(LDKSendError_GetNodeIdFailed_class != NULL);
        LDKSendError_GetNodeIdFailed_meth = (*env)->GetMethodID(env, LDKSendError_GetNodeIdFailed_class, "<init>", "()V");
        CHECK(LDKSendError_GetNodeIdFailed_meth != NULL);
+       LDKSendError_UnresolvedIntroductionNode_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSendError$UnresolvedIntroductionNode"));
+       CHECK(LDKSendError_UnresolvedIntroductionNode_class != NULL);
+       LDKSendError_UnresolvedIntroductionNode_meth = (*env)->GetMethodID(env, LDKSendError_UnresolvedIntroductionNode_class, "<init>", "()V");
+       CHECK(LDKSendError_UnresolvedIntroductionNode_meth != NULL);
        LDKSendError_BlindedPathAdvanceFailed_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSendError$BlindedPathAdvanceFailed"));
        CHECK(LDKSendError_BlindedPathAdvanceFailed_class != NULL);
@@ -15283,6 +16303,9 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSendError_1ref_1from_1pt
                case LDKSendError_GetNodeIdFailed: {
                        return (*env)->NewObject(env, LDKSendError_GetNodeIdFailed_class, LDKSendError_GetNodeIdFailed_meth);
                }
+               case LDKSendError_UnresolvedIntroductionNode: {
+                       return (*env)->NewObject(env, LDKSendError_UnresolvedIntroductionNode_class, LDKSendError_UnresolvedIntroductionNode_meth);
+               }
                case LDKSendError_BlindedPathAdvanceFailed: {
                        return (*env)->NewObject(env, LDKSendError_BlindedPathAdvanceFailed_class, LDKSendError_BlindedPathAdvanceFailed_meth);
                }
@@ -15312,6 +16335,37 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKey
        return ret_ref;
 }
 
+static jclass LDKNextMessageHop_NodeId_class = NULL;
+static jmethodID LDKNextMessageHop_NodeId_meth = NULL;
+static jclass LDKNextMessageHop_ShortChannelId_class = NULL;
+static jmethodID LDKNextMessageHop_ShortChannelId_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKNextMessageHop_init (JNIEnv *env, jclass clz) {
+       LDKNextMessageHop_NodeId_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKNextMessageHop$NodeId"));
+       CHECK(LDKNextMessageHop_NodeId_class != NULL);
+       LDKNextMessageHop_NodeId_meth = (*env)->GetMethodID(env, LDKNextMessageHop_NodeId_class, "<init>", "([B)V");
+       CHECK(LDKNextMessageHop_NodeId_meth != NULL);
+       LDKNextMessageHop_ShortChannelId_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKNextMessageHop$ShortChannelId"));
+       CHECK(LDKNextMessageHop_ShortChannelId_class != NULL);
+       LDKNextMessageHop_ShortChannelId_meth = (*env)->GetMethodID(env, LDKNextMessageHop_ShortChannelId_class, "<init>", "(J)V");
+       CHECK(LDKNextMessageHop_ShortChannelId_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKNextMessageHop_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKNextMessageHop *obj = (LDKNextMessageHop*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKNextMessageHop_NodeId: {
+                       int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
+                       (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->node_id.compressed_form);
+                       return (*env)->NewObject(env, LDKNextMessageHop_NodeId_class, LDKNextMessageHop_NodeId_meth, node_id_arr);
+               }
+               case LDKNextMessageHop_ShortChannelId: {
+                       int64_t short_channel_id_conv = obj->short_channel_id;
+                       return (*env)->NewObject(env, LDKNextMessageHop_ShortChannelId_class, LDKNextMessageHop_ShortChannelId_meth, short_channel_id_conv);
+               }
+               default: abort();
+       }
+}
 static jclass LDKParsedOnionMessageContents_Offers_class = NULL;
 static jmethodID LDKParsedOnionMessageContents_Offers_meth = NULL;
 static jclass LDKParsedOnionMessageContents_Custom_class = NULL;
@@ -15351,7 +16405,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPeeledOnion_init (JNIE
        LDKPeeledOnion_Forward_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPeeledOnion$Forward"));
        CHECK(LDKPeeledOnion_Forward_class != NULL);
-       LDKPeeledOnion_Forward_meth = (*env)->GetMethodID(env, LDKPeeledOnion_Forward_class, "<init>", "([BJ)V");
+       LDKPeeledOnion_Forward_meth = (*env)->GetMethodID(env, LDKPeeledOnion_Forward_class, "<init>", "(JJ)V");
        CHECK(LDKPeeledOnion_Forward_meth != NULL);
        LDKPeeledOnion_Receive_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPeeledOnion$Receive"));
@@ -15363,13 +16417,12 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPeeledOnion_1ref_1from_1
        LDKPeeledOnion *obj = (LDKPeeledOnion*)untag_ptr(ptr);
        switch(obj->tag) {
                case LDKPeeledOnion_Forward: {
-                       int8_tArray _0_arr = (*env)->NewByteArray(env, 33);
-                       (*env)->SetByteArrayRegion(env, _0_arr, 0, 33, obj->forward._0.compressed_form);
+                       int64_t _0_ref = tag_ptr(&obj->forward._0, false);
                        LDKOnionMessage _1_var = obj->forward._1;
                        int64_t _1_ref = 0;
                        CHECK_INNER_FIELD_ACCESS_OR_NULL(_1_var);
                        _1_ref = tag_ptr(_1_var.inner, false);
-                       return (*env)->NewObject(env, LDKPeeledOnion_Forward_class, LDKPeeledOnion_Forward_meth, _0_arr, _1_ref);
+                       return (*env)->NewObject(env, LDKPeeledOnion_Forward_class, LDKPeeledOnion_Forward_meth, _0_ref, _1_ref);
                }
                case LDKPeeledOnion_Receive: {
                        int64_t _0_ref = tag_ptr(&obj->receive._0, false);
@@ -15587,158 +16640,106 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceErrorDecode
        return ret_ref;
 }
 
-static inline struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){
-       LDKDelayedPaymentBasepoint ret = *owner->contents.result;
+static inline struct LDKTrackedSpendableOutput CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner){
+       LDKTrackedSpendableOutput ret = *owner->contents.result;
        ret.is_owned = false;
        return ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner);
-       LDKDelayedPaymentBasepoint ret_var = CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_TrackedSpendableOutputDecodeErrorZ* owner_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(owner);
+       LDKTrackedSpendableOutput ret_var = CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(owner_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
 
-static inline struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){
+static inline struct LDKDecodeError CResult_TrackedSpendableOutputDecodeErrorZ_get_err(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner){
 CHECK(!owner->result_ok);
        return DecodeError_clone(&*owner->contents.err);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_TrackedSpendableOutputDecodeErrorZ* owner_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(owner);
        LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
-       *ret_copy = CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = tag_ptr(ret_copy, true);
-       return ret_ref;
-}
-
-static inline struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){
-       LDKDelayedPaymentKey ret = *owner->contents.result;
-       ret.is_owned = false;
-       return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner);
-       LDKDelayedPaymentKey ret_var = CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
-static inline struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
-       return DecodeError_clone(&*owner->contents.err);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
-       *ret_copy = CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = tag_ptr(ret_copy, true);
-       return ret_ref;
-}
-
-static inline struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){
-       LDKHtlcBasepoint ret = *owner->contents.result;
-       ret.is_owned = false;
-       return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner);
-       LDKHtlcBasepoint ret_var = CResult_HtlcBasepointDecodeErrorZ_get_ok(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
-static inline struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
-       return DecodeError_clone(&*owner->contents.err);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
-       *ret_copy = CResult_HtlcBasepointDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = tag_ptr(ret_copy, true);
-       return ret_ref;
-}
-
-static inline struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){
-       LDKHtlcKey ret = *owner->contents.result;
-       ret.is_owned = false;
-       return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner);
-       LDKHtlcKey ret_var = CResult_HtlcKeyDecodeErrorZ_get_ok(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
-static inline struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
-       return DecodeError_clone(&*owner->contents.err);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
-       *ret_copy = CResult_HtlcKeyDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = tag_ptr(ret_copy, true);
-       return ret_ref;
-}
-
-static inline struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){
-       LDKRevocationBasepoint ret = *owner->contents.result;
-       ret.is_owned = false;
-       return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner);
-       LDKRevocationBasepoint ret_var = CResult_RevocationBasepointDecodeErrorZ_get_ok(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
+       *ret_copy = CResult_TrackedSpendableOutputDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static jclass LDKOutputSpendStatus_PendingInitialBroadcast_class = NULL;
+static jmethodID LDKOutputSpendStatus_PendingInitialBroadcast_meth = NULL;
+static jclass LDKOutputSpendStatus_PendingFirstConfirmation_class = NULL;
+static jmethodID LDKOutputSpendStatus_PendingFirstConfirmation_meth = NULL;
+static jclass LDKOutputSpendStatus_PendingThresholdConfirmations_class = NULL;
+static jmethodID LDKOutputSpendStatus_PendingThresholdConfirmations_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKOutputSpendStatus_init (JNIEnv *env, jclass clz) {
+       LDKOutputSpendStatus_PendingInitialBroadcast_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKOutputSpendStatus$PendingInitialBroadcast"));
+       CHECK(LDKOutputSpendStatus_PendingInitialBroadcast_class != NULL);
+       LDKOutputSpendStatus_PendingInitialBroadcast_meth = (*env)->GetMethodID(env, LDKOutputSpendStatus_PendingInitialBroadcast_class, "<init>", "(J)V");
+       CHECK(LDKOutputSpendStatus_PendingInitialBroadcast_meth != NULL);
+       LDKOutputSpendStatus_PendingFirstConfirmation_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKOutputSpendStatus$PendingFirstConfirmation"));
+       CHECK(LDKOutputSpendStatus_PendingFirstConfirmation_class != NULL);
+       LDKOutputSpendStatus_PendingFirstConfirmation_meth = (*env)->GetMethodID(env, LDKOutputSpendStatus_PendingFirstConfirmation_class, "<init>", "([BI[B)V");
+       CHECK(LDKOutputSpendStatus_PendingFirstConfirmation_meth != NULL);
+       LDKOutputSpendStatus_PendingThresholdConfirmations_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKOutputSpendStatus$PendingThresholdConfirmations"));
+       CHECK(LDKOutputSpendStatus_PendingThresholdConfirmations_class != NULL);
+       LDKOutputSpendStatus_PendingThresholdConfirmations_meth = (*env)->GetMethodID(env, LDKOutputSpendStatus_PendingThresholdConfirmations_class, "<init>", "([BI[BI[B)V");
+       CHECK(LDKOutputSpendStatus_PendingThresholdConfirmations_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKOutputSpendStatus_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKOutputSpendStatus_PendingInitialBroadcast: {
+                       int64_t delayed_until_height_ref = tag_ptr(&obj->pending_initial_broadcast.delayed_until_height, false);
+                       return (*env)->NewObject(env, LDKOutputSpendStatus_PendingInitialBroadcast_class, LDKOutputSpendStatus_PendingInitialBroadcast_meth, delayed_until_height_ref);
+               }
+               case LDKOutputSpendStatus_PendingFirstConfirmation: {
+                       int8_tArray first_broadcast_hash_arr = (*env)->NewByteArray(env, 32);
+                       (*env)->SetByteArrayRegion(env, first_broadcast_hash_arr, 0, 32, obj->pending_first_confirmation.first_broadcast_hash.data);
+                       int32_t latest_broadcast_height_conv = obj->pending_first_confirmation.latest_broadcast_height;
+                       LDKTransaction latest_spending_tx_var = obj->pending_first_confirmation.latest_spending_tx;
+                       int8_tArray latest_spending_tx_arr = (*env)->NewByteArray(env, latest_spending_tx_var.datalen);
+                       (*env)->SetByteArrayRegion(env, latest_spending_tx_arr, 0, latest_spending_tx_var.datalen, latest_spending_tx_var.data);
+                       return (*env)->NewObject(env, LDKOutputSpendStatus_PendingFirstConfirmation_class, LDKOutputSpendStatus_PendingFirstConfirmation_meth, first_broadcast_hash_arr, latest_broadcast_height_conv, latest_spending_tx_arr);
+               }
+               case LDKOutputSpendStatus_PendingThresholdConfirmations: {
+                       int8_tArray first_broadcast_hash_arr = (*env)->NewByteArray(env, 32);
+                       (*env)->SetByteArrayRegion(env, first_broadcast_hash_arr, 0, 32, obj->pending_threshold_confirmations.first_broadcast_hash.data);
+                       int32_t latest_broadcast_height_conv = obj->pending_threshold_confirmations.latest_broadcast_height;
+                       LDKTransaction latest_spending_tx_var = obj->pending_threshold_confirmations.latest_spending_tx;
+                       int8_tArray latest_spending_tx_arr = (*env)->NewByteArray(env, latest_spending_tx_var.datalen);
+                       (*env)->SetByteArrayRegion(env, latest_spending_tx_arr, 0, latest_spending_tx_var.datalen, latest_spending_tx_var.data);
+                       int32_t confirmation_height_conv = obj->pending_threshold_confirmations.confirmation_height;
+                       int8_tArray confirmation_hash_arr = (*env)->NewByteArray(env, 32);
+                       (*env)->SetByteArrayRegion(env, confirmation_hash_arr, 0, 32, obj->pending_threshold_confirmations.confirmation_hash.data);
+                       return (*env)->NewObject(env, LDKOutputSpendStatus_PendingThresholdConfirmations_class, LDKOutputSpendStatus_PendingThresholdConfirmations_meth, first_broadcast_hash_arr, latest_broadcast_height_conv, latest_spending_tx_arr, confirmation_height_conv, confirmation_hash_arr);
+               }
+               default: abort();
+       }
 }
-
-static inline struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
-       return DecodeError_clone(&*owner->contents.err);
+static inline struct LDKOutputSpendStatus CResult_OutputSpendStatusDecodeErrorZ_get_ok(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return OutputSpendStatus_clone(&*owner->contents.result);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
-       *ret_copy = CResult_RevocationBasepointDecodeErrorZ_get_err(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_OutputSpendStatusDecodeErrorZ* owner_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(owner);
+       LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+       *ret_copy = CResult_OutputSpendStatusDecodeErrorZ_get_ok(owner_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-static inline struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){
-       LDKRevocationKey ret = *owner->contents.result;
-       ret.is_owned = false;
-       return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner);
-       LDKRevocationKey ret_var = CResult_RevocationKeyDecodeErrorZ_get_ok(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
-static inline struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){
+static inline struct LDKDecodeError CResult_OutputSpendStatusDecodeErrorZ_get_err(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner){
 CHECK(!owner->result_ok);
        return DecodeError_clone(&*owner->contents.err);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_OutputSpendStatusDecodeErrorZ* owner_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(owner);
        LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
-       *ret_copy = CResult_RevocationKeyDecodeErrorZ_get_err(owner_conv);
+       *ret_copy = CResult_OutputSpendStatusDecodeErrorZ_get_err(owner_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -15907,85 +16908,96 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1FilterZ_1ref_1f
                default: abort();
        }
 }
-static inline struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){
-       LDKLockedChannelMonitor ret = *owner->contents.result;
-       ret.is_owned = false;
-       return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner);
-       LDKLockedChannelMonitor ret_var = CResult_LockedChannelMonitorNoneZ_get_ok(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
-static inline void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
-       return *owner->contents.err;
-}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner);
-       CResult_LockedChannelMonitorNoneZ_get_err(owner_conv);
-}
-
-static inline LDKCVec_OutPointZ CVec_OutPointZ_clone(const LDKCVec_OutPointZ *orig) {
-       LDKCVec_OutPointZ ret = { .data = MALLOC(sizeof(LDKOutPoint) * orig->datalen, "LDKCVec_OutPointZ clone bytes"), .datalen = orig->datalen };
+static inline LDKCVec_TrackedSpendableOutputZ CVec_TrackedSpendableOutputZ_clone(const LDKCVec_TrackedSpendableOutputZ *orig) {
+       LDKCVec_TrackedSpendableOutputZ ret = { .data = MALLOC(sizeof(LDKTrackedSpendableOutput) * orig->datalen, "LDKCVec_TrackedSpendableOutputZ clone bytes"), .datalen = orig->datalen };
        for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = OutPoint_clone(&orig->data[i]);
+               ret.data[i] = TrackedSpendableOutput_clone(&orig->data[i]);
        }
        return ret;
 }
-static inline LDKCVec_MonitorUpdateIdZ CVec_MonitorUpdateIdZ_clone(const LDKCVec_MonitorUpdateIdZ *orig) {
-       LDKCVec_MonitorUpdateIdZ ret = { .data = MALLOC(sizeof(LDKMonitorUpdateId) * orig->datalen, "LDKCVec_MonitorUpdateIdZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = MonitorUpdateId_clone(&orig->data[i]);
+typedef struct LDKChangeDestinationSource_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID get_change_destination_script_meth;
+} LDKChangeDestinationSource_JCalls;
+static void LDKChangeDestinationSource_JCalls_free(void* this_arg) {
+       LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+               } else {
+                       DO_ASSERT(get_jenv_res == JNI_OK);
+               }
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+               }
+               FREE(j_calls);
        }
-       return ret;
 }
-static inline struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){
-       LDKOutPoint ret = owner->a;
-       ret.is_owned = false;
-       return ret;
+LDKCResult_CVec_u8ZNoneZ get_change_destination_script_LDKChangeDestinationSource_jcall(const void* this_arg) {
+       LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->get_change_destination_script_meth);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to get_change_destination_script in LDKChangeDestinationSource from rust threw an exception.");
+       }
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_CVec_u8ZNoneZ ret_conv = *(LDKCResult_CVec_u8ZNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+       return ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner);
-       LDKOutPoint ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
+static void LDKChangeDestinationSource_JCalls_cloned(LDKChangeDestinationSource* new_obj) {
+       LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) new_obj->this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
 }
+static inline LDKChangeDestinationSource LDKChangeDestinationSource_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKChangeDestinationSource_JCalls *calls = MALLOC(sizeof(LDKChangeDestinationSource_JCalls), "LDKChangeDestinationSource_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->get_change_destination_script_meth = (*env)->GetMethodID(env, c, "get_change_destination_script", "()J");
+       CHECK(calls->get_change_destination_script_meth != NULL);
 
-static inline struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){
-       return CVec_MonitorUpdateIdZ_clone(&owner->b);
+       LDKChangeDestinationSource ret = {
+               .this_arg = (void*) calls,
+               .get_change_destination_script = get_change_destination_script_LDKChangeDestinationSource_jcall,
+               .free = LDKChangeDestinationSource_JCalls_free,
+       };
+       return ret;
 }
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner);
-       LDKCVec_MonitorUpdateIdZ ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner_conv);
-       int64_tArray ret_arr = NULL;
-       ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
-       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t r = 0; r < ret_var.datalen; r++) {
-               LDKMonitorUpdateId ret_conv_17_var = ret_var.data[r];
-               int64_t ret_conv_17_ref = 0;
-               CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_17_var);
-               ret_conv_17_ref = tag_ptr(ret_conv_17_var.inner, ret_conv_17_var.is_owned);
-               ret_arr_ptr[r] = ret_conv_17_ref;
-       }
-       (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
-       FREE(ret_var.data);
-       return ret_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKChangeDestinationSource_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKChangeDestinationSource *res_ptr = MALLOC(sizeof(LDKChangeDestinationSource), "LDKChangeDestinationSource");
+       *res_ptr = LDKChangeDestinationSource_init(env, clz, o);
+       return tag_ptr(res_ptr, true);
 }
-
-static inline LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ CVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ_clone(const LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ *orig) {
-       LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone(&orig->data[i]);
-       }
-       return ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChangeDestinationSource_1get_1change_1destination_1script(JNIEnv *env, jclass clz, int64_t this_arg) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKChangeDestinationSource* this_arg_conv = (LDKChangeDestinationSource*)this_arg_ptr;
+       LDKCResult_CVec_u8ZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZNoneZ), "LDKCResult_CVec_u8ZNoneZ");
+       *ret_conv = (this_arg_conv->get_change_destination_script)(this_arg_conv->this_arg);
+       return tag_ptr(ret_conv, true);
 }
+
 typedef struct LDKKVStore_JCalls {
        atomic_size_t refcnt;
        JavaVM *vm;
@@ -16235,6 +17247,499 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KVStore_1list(JNIEnv *env,
        return tag_ptr(ret_conv, true);
 }
 
+typedef struct LDKOutputSpender_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID spend_spendable_outputs_meth;
+} LDKOutputSpender_JCalls;
+static void LDKOutputSpender_JCalls_free(void* this_arg) {
+       LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+               } else {
+                       DO_ASSERT(get_jenv_res == JNI_OK);
+               }
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+               }
+               FREE(j_calls);
+       }
+}
+LDKCResult_TransactionNoneZ spend_spendable_outputs_LDKOutputSpender_jcall(const void* this_arg, LDKCVec_SpendableOutputDescriptorZ descriptors, LDKCVec_TxOutZ outputs, LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, LDKCOption_u32Z locktime) {
+       LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       LDKCVec_SpendableOutputDescriptorZ descriptors_var = descriptors;
+       int64_tArray descriptors_arr = NULL;
+       descriptors_arr = (*env)->NewLongArray(env, descriptors_var.datalen);
+       int64_t *descriptors_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, descriptors_arr, NULL);
+       for (size_t b = 0; b < descriptors_var.datalen; b++) {
+               LDKSpendableOutputDescriptor *descriptors_conv_27_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor");
+               *descriptors_conv_27_copy = descriptors_var.data[b];
+               int64_t descriptors_conv_27_ref = tag_ptr(descriptors_conv_27_copy, true);
+               descriptors_arr_ptr[b] = descriptors_conv_27_ref;
+       }
+       (*env)->ReleasePrimitiveArrayCritical(env, descriptors_arr, descriptors_arr_ptr, 0);
+       FREE(descriptors_var.data);
+       LDKCVec_TxOutZ outputs_var = outputs;
+       int64_tArray outputs_arr = NULL;
+       outputs_arr = (*env)->NewLongArray(env, outputs_var.datalen);
+       int64_t *outputs_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, outputs_arr, NULL);
+       for (size_t h = 0; h < outputs_var.datalen; h++) {
+               LDKTxOut* outputs_conv_7_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+               *outputs_conv_7_ref = outputs_var.data[h];
+               outputs_arr_ptr[h] = tag_ptr(outputs_conv_7_ref, true);
+       }
+       (*env)->ReleasePrimitiveArrayCritical(env, outputs_arr, outputs_arr_ptr, 0);
+       FREE(outputs_var.data);
+       LDKCVec_u8Z change_destination_script_var = change_destination_script;
+       int8_tArray change_destination_script_arr = (*env)->NewByteArray(env, change_destination_script_var.datalen);
+       (*env)->SetByteArrayRegion(env, change_destination_script_arr, 0, change_destination_script_var.datalen, change_destination_script_var.data);
+       CVec_u8Z_free(change_destination_script_var);
+       int32_t feerate_sat_per_1000_weight_conv = feerate_sat_per_1000_weight;
+       LDKCOption_u32Z *locktime_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z");
+       *locktime_copy = locktime;
+       int64_t locktime_ref = tag_ptr(locktime_copy, true);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->spend_spendable_outputs_meth, descriptors_arr, outputs_arr, change_destination_script_arr, feerate_sat_per_1000_weight_conv, locktime_ref);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to spend_spendable_outputs in LDKOutputSpender from rust threw an exception.");
+       }
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+       return ret_conv;
+}
+static void LDKOutputSpender_JCalls_cloned(LDKOutputSpender* new_obj) {
+       LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) new_obj->this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKOutputSpender LDKOutputSpender_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKOutputSpender_JCalls *calls = MALLOC(sizeof(LDKOutputSpender_JCalls), "LDKOutputSpender_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->spend_spendable_outputs_meth = (*env)->GetMethodID(env, c, "spend_spendable_outputs", "([J[J[BIJ)J");
+       CHECK(calls->spend_spendable_outputs_meth != NULL);
+
+       LDKOutputSpender ret = {
+               .this_arg = (void*) calls,
+               .spend_spendable_outputs = spend_spendable_outputs_LDKOutputSpender_jcall,
+               .free = LDKOutputSpender_JCalls_free,
+       };
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKOutputSpender_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKOutputSpender *res_ptr = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender");
+       *res_ptr = LDKOutputSpender_init(env, clz, o);
+       return tag_ptr(res_ptr, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpender_1spend_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKOutputSpender* this_arg_conv = (LDKOutputSpender*)this_arg_ptr;
+       LDKCVec_SpendableOutputDescriptorZ descriptors_constr;
+       descriptors_constr.datalen = (*env)->GetArrayLength(env, descriptors);
+       if (descriptors_constr.datalen > 0)
+               descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
+       else
+               descriptors_constr.data = NULL;
+       int64_t* descriptors_vals = (*env)->GetLongArrayElements (env, descriptors, NULL);
+       for (size_t b = 0; b < descriptors_constr.datalen; b++) {
+               int64_t descriptors_conv_27 = descriptors_vals[b];
+               void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27);
+               CHECK_ACCESS(descriptors_conv_27_ptr);
+               LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr);
+               descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27));
+               descriptors_constr.data[b] = descriptors_conv_27_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, descriptors, descriptors_vals, 0);
+       LDKCVec_TxOutZ outputs_constr;
+       outputs_constr.datalen = (*env)->GetArrayLength(env, outputs);
+       if (outputs_constr.datalen > 0)
+               outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements");
+       else
+               outputs_constr.data = NULL;
+       int64_t* outputs_vals = (*env)->GetLongArrayElements (env, outputs, NULL);
+       for (size_t h = 0; h < outputs_constr.datalen; h++) {
+               int64_t outputs_conv_7 = outputs_vals[h];
+               void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7);
+               CHECK_ACCESS(outputs_conv_7_ptr);
+               LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr);
+               outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7));
+               outputs_constr.data[h] = outputs_conv_7_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0);
+       LDKCVec_u8Z change_destination_script_ref;
+       change_destination_script_ref.datalen = (*env)->GetArrayLength(env, change_destination_script);
+       change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, change_destination_script, 0, change_destination_script_ref.datalen, change_destination_script_ref.data);
+       void* locktime_ptr = untag_ptr(locktime);
+       CHECK_ACCESS(locktime_ptr);
+       LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr);
+       locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime));
+       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
+       *ret_conv = (this_arg_conv->spend_spendable_outputs)(this_arg_conv->this_arg, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+static inline struct LDKOutputSweeper CResult_OutputSweeperDecodeErrorZ_get_ok(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner){
+       LDKOutputSweeper ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_OutputSweeperDecodeErrorZ* owner_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(owner);
+       LDKOutputSweeper ret_var = CResult_OutputSweeperDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_OutputSweeperDecodeErrorZ_get_err(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_OutputSweeperDecodeErrorZ* owner_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_OutputSweeperDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKBestBlock C2Tuple_BestBlockOutputSweeperZ_get_a(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner){
+       LDKBestBlock ret = owner->a;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC2Tuple_BestBlockOutputSweeperZ* owner_conv = (LDKC2Tuple_BestBlockOutputSweeperZ*)untag_ptr(owner);
+       LDKBestBlock ret_var = C2Tuple_BestBlockOutputSweeperZ_get_a(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKOutputSweeper C2Tuple_BestBlockOutputSweeperZ_get_b(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner){
+       LDKOutputSweeper ret = owner->b;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC2Tuple_BestBlockOutputSweeperZ* owner_conv = (LDKC2Tuple_BestBlockOutputSweeperZ*)untag_ptr(owner);
+       LDKOutputSweeper ret_var = C2Tuple_BestBlockOutputSweeperZ_get_b(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKC2Tuple_BestBlockOutputSweeperZ *CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return &*owner->contents.result;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(owner);
+       int64_t ret_ret = tag_ptr(CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(owner_conv), false);
+       return ret_ret;
+}
+
+static inline struct LDKDecodeError CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){
+       LDKDelayedPaymentBasepoint ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner);
+       LDKDelayedPaymentBasepoint ret_var = CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){
+       LDKDelayedPaymentKey ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner);
+       LDKDelayedPaymentKey ret_var = CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){
+       LDKHtlcBasepoint ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner);
+       LDKHtlcBasepoint ret_var = CResult_HtlcBasepointDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_HtlcBasepointDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){
+       LDKHtlcKey ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner);
+       LDKHtlcKey ret_var = CResult_HtlcKeyDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_HtlcKeyDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){
+       LDKRevocationBasepoint ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner);
+       LDKRevocationBasepoint ret_var = CResult_RevocationBasepointDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RevocationBasepointDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){
+       LDKRevocationKey ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner);
+       LDKRevocationKey ret_var = CResult_RevocationKeyDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RevocationKeyDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){
+       LDKLockedChannelMonitor ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner);
+       LDKLockedChannelMonitor ret_var = CResult_LockedChannelMonitorNoneZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return *owner->contents.err;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner);
+       CResult_LockedChannelMonitorNoneZ_get_err(owner_conv);
+}
+
+static inline struct LDKOutPoint C2Tuple_OutPointChannelIdZ_get_a(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner){
+       LDKOutPoint ret = owner->a;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC2Tuple_OutPointChannelIdZ* owner_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(owner);
+       LDKOutPoint ret_var = C2Tuple_OutPointChannelIdZ_get_a(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKChannelId C2Tuple_OutPointChannelIdZ_get_b(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner){
+       LDKChannelId ret = owner->b;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC2Tuple_OutPointChannelIdZ* owner_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(owner);
+       LDKChannelId ret_var = C2Tuple_OutPointChannelIdZ_get_b(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline LDKCVec_C2Tuple_OutPointChannelIdZZ CVec_C2Tuple_OutPointChannelIdZZ_clone(const LDKCVec_C2Tuple_OutPointChannelIdZZ *orig) {
+       LDKCVec_C2Tuple_OutPointChannelIdZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointChannelIdZZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = C2Tuple_OutPointChannelIdZ_clone(&orig->data[i]);
+       }
+       return ret;
+}
+static inline LDKCVec_MonitorUpdateIdZ CVec_MonitorUpdateIdZ_clone(const LDKCVec_MonitorUpdateIdZ *orig) {
+       LDKCVec_MonitorUpdateIdZ ret = { .data = MALLOC(sizeof(LDKMonitorUpdateId) * orig->datalen, "LDKCVec_MonitorUpdateIdZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = MonitorUpdateId_clone(&orig->data[i]);
+       }
+       return ret;
+}
+static inline struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){
+       LDKOutPoint ret = owner->a;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner);
+       LDKOutPoint ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){
+       return CVec_MonitorUpdateIdZ_clone(&owner->b);
+}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner);
+       LDKCVec_MonitorUpdateIdZ ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner_conv);
+       int64_tArray ret_arr = NULL;
+       ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+       for (size_t r = 0; r < ret_var.datalen; r++) {
+               LDKMonitorUpdateId ret_conv_17_var = ret_var.data[r];
+               int64_t ret_conv_17_ref = 0;
+               CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_17_var);
+               ret_conv_17_ref = tag_ptr(ret_conv_17_var.inner, ret_conv_17_var.is_owned);
+               ret_arr_ptr[r] = ret_conv_17_ref;
+       }
+       (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+       FREE(ret_var.data);
+       return ret_arr;
+}
+
+static inline LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ CVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ_clone(const LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ *orig) {
+       LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone(&orig->data[i]);
+       }
+       return ret;
+}
 typedef struct LDKPersister_JCalls {
        atomic_size_t refcnt;
        JavaVM *vm;
@@ -16425,6 +17930,7 @@ typedef struct LDKPersist_JCalls {
        jweak o;
        jmethodID persist_new_channel_meth;
        jmethodID update_persisted_channel_meth;
+       jmethodID archive_persisted_channel_meth;
 } LDKPersist_JCalls;
 static void LDKPersist_JCalls_free(void* this_arg) {
        LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
@@ -16443,7 +17949,7 @@ static void LDKPersist_JCalls_free(void* this_arg) {
                FREE(j_calls);
        }
 }
-LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
+LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
        LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
        JNIEnv *env;
        jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -16452,10 +17958,10 @@ LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* t
        } else {
                DO_ASSERT(get_jenv_res == JNI_OK);
        }
-       LDKOutPoint channel_id_var = channel_id;
-       int64_t channel_id_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
-       channel_id_ref = tag_ptr(channel_id_var.inner, channel_id_var.is_owned);
+       LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint;
+       int64_t channel_funding_outpoint_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var);
+       channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned);
        LDKChannelMonitor data_var = *data;
        int64_t data_ref = 0;
        data_var = ChannelMonitor_clone(&data_var);
@@ -16467,7 +17973,7 @@ LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* t
        update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->persist_new_channel_meth, channel_id_ref, data_ref, update_id_ref);
+       jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->persist_new_channel_meth, channel_funding_outpoint_ref, data_ref, update_id_ref);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
                (*env)->ExceptionDescribe(env);
                (*env)->FatalError(env, "A call to persist_new_channel in LDKPersist from rust threw an exception.");
@@ -16478,7 +17984,7 @@ LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* t
        }
        return ret_conv;
 }
-LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, LDKChannelMonitorUpdate update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
+LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint, LDKChannelMonitorUpdate update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
        LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
        JNIEnv *env;
        jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -16487,10 +17993,10 @@ LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const vo
        } else {
                DO_ASSERT(get_jenv_res == JNI_OK);
        }
-       LDKOutPoint channel_id_var = channel_id;
-       int64_t channel_id_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
-       channel_id_ref = tag_ptr(channel_id_var.inner, channel_id_var.is_owned);
+       LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint;
+       int64_t channel_funding_outpoint_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var);
+       channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned);
        LDKChannelMonitorUpdate update_var = update;
        int64_t update_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_var);
@@ -16506,7 +18012,7 @@ LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const vo
        update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->update_persisted_channel_meth, channel_id_ref, update_ref, data_ref, update_id_ref);
+       jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->update_persisted_channel_meth, channel_funding_outpoint_ref, update_ref, data_ref, update_id_ref);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
                (*env)->ExceptionDescribe(env);
                (*env)->FatalError(env, "A call to update_persisted_channel in LDKPersist from rust threw an exception.");
@@ -16517,6 +18023,30 @@ LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const vo
        }
        return ret_conv;
 }
+void archive_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint) {
+       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint;
+       int64_t channel_funding_outpoint_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var);
+       channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       (*env)->CallVoidMethod(env, obj, j_calls->archive_persisted_channel_meth, channel_funding_outpoint_ref);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to archive_persisted_channel in LDKPersist from rust threw an exception.");
+       }
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+}
 static void LDKPersist_JCalls_cloned(LDKPersist* new_obj) {
        LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) new_obj->this_arg;
        atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
@@ -16532,11 +18062,14 @@ static inline LDKPersist LDKPersist_init (JNIEnv *env, jclass clz, jobject o) {
        CHECK(calls->persist_new_channel_meth != NULL);
        calls->update_persisted_channel_meth = (*env)->GetMethodID(env, c, "update_persisted_channel", "(JJJJ)Lorg/ldk/enums/ChannelMonitorUpdateStatus;");
        CHECK(calls->update_persisted_channel_meth != NULL);
+       calls->archive_persisted_channel_meth = (*env)->GetMethodID(env, c, "archive_persisted_channel", "(J)V");
+       CHECK(calls->archive_persisted_channel_meth != NULL);
 
        LDKPersist ret = {
                .this_arg = (void*) calls,
                .persist_new_channel = persist_new_channel_LDKPersist_jcall,
                .update_persisted_channel = update_persisted_channel_LDKPersist_jcall,
+               .archive_persisted_channel = archive_persisted_channel_LDKPersist_jcall,
                .free = LDKPersist_JCalls_free,
        };
        return ret;
@@ -16546,15 +18079,15 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKPersist_1new(JNIEnv *env
        *res_ptr = LDKPersist_init(env, clz, o);
        return tag_ptr(res_ptr, true);
 }
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int64_t data, int64_t update_id) {
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_funding_outpoint, int64_t data, int64_t update_id) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
-       LDKOutPoint channel_id_conv;
-       channel_id_conv.inner = untag_ptr(channel_id);
-       channel_id_conv.is_owned = ptr_is_owned(channel_id);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
-       channel_id_conv = OutPoint_clone(&channel_id_conv);
+       LDKOutPoint channel_funding_outpoint_conv;
+       channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint);
+       channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv);
+       channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv);
        LDKChannelMonitor data_conv;
        data_conv.inner = untag_ptr(data);
        data_conv.is_owned = ptr_is_owned(data);
@@ -16565,19 +18098,19 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1chann
        update_id_conv.is_owned = ptr_is_owned(update_id);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv);
        update_id_conv = MonitorUpdateId_clone(&update_id_conv);
-       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_id_conv, &data_conv, update_id_conv));
+       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv, &data_conv, update_id_conv));
        return ret_conv;
 }
 
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int64_t update, int64_t data, int64_t update_id) {
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_funding_outpoint, int64_t update, int64_t data, int64_t update_id) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
-       LDKOutPoint channel_id_conv;
-       channel_id_conv.inner = untag_ptr(channel_id);
-       channel_id_conv.is_owned = ptr_is_owned(channel_id);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
-       channel_id_conv = OutPoint_clone(&channel_id_conv);
+       LDKOutPoint channel_funding_outpoint_conv;
+       channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint);
+       channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv);
+       channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv);
        LDKChannelMonitorUpdate update_conv;
        update_conv.inner = untag_ptr(update);
        update_conv.is_owned = ptr_is_owned(update);
@@ -16593,84 +18126,20 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1
        update_id_conv.is_owned = ptr_is_owned(update_id);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv);
        update_id_conv = MonitorUpdateId_clone(&update_id_conv);
-       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_id_conv, update_conv, &data_conv, update_id_conv));
+       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv, update_conv, &data_conv, update_id_conv));
        return ret_conv;
 }
 
-typedef struct LDKFutureCallback_JCalls {
-       atomic_size_t refcnt;
-       JavaVM *vm;
-       jweak o;
-       jmethodID call_meth;
-} LDKFutureCallback_JCalls;
-static void LDKFutureCallback_JCalls_free(void* this_arg) {
-       LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               JNIEnv *env;
-               jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
-               if (get_jenv_res == JNI_EDETACHED) {
-                       DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
-               } else {
-                       DO_ASSERT(get_jenv_res == JNI_OK);
-               }
-               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
-               if (get_jenv_res == JNI_EDETACHED) {
-                       DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
-               }
-               FREE(j_calls);
-       }
-}
-void call_LDKFutureCallback_jcall(const void* this_arg) {
-       LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg;
-       JNIEnv *env;
-       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
-       if (get_jenv_res == JNI_EDETACHED) {
-               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
-       } else {
-               DO_ASSERT(get_jenv_res == JNI_OK);
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       (*env)->CallVoidMethod(env, obj, j_calls->call_meth);
-       if (UNLIKELY((*env)->ExceptionCheck(env))) {
-               (*env)->ExceptionDescribe(env);
-               (*env)->FatalError(env, "A call to call in LDKFutureCallback from rust threw an exception.");
-       }
-       if (get_jenv_res == JNI_EDETACHED) {
-               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
-       }
-}
-static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) {
-       LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-}
-static inline LDKFutureCallback LDKFutureCallback_init (JNIEnv *env, jclass clz, jobject o) {
-       jclass c = (*env)->GetObjectClass(env, o);
-       CHECK(c != NULL);
-       LDKFutureCallback_JCalls *calls = MALLOC(sizeof(LDKFutureCallback_JCalls), "LDKFutureCallback_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
-       calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->call_meth = (*env)->GetMethodID(env, c, "call", "()V");
-       CHECK(calls->call_meth != NULL);
-
-       LDKFutureCallback ret = {
-               .this_arg = (void*) calls,
-               .call = call_LDKFutureCallback_jcall,
-               .free = LDKFutureCallback_JCalls_free,
-       };
-       return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKFutureCallback_1new(JNIEnv *env, jclass clz, jobject o) {
-       LDKFutureCallback *res_ptr = MALLOC(sizeof(LDKFutureCallback), "LDKFutureCallback");
-       *res_ptr = LDKFutureCallback_init(env, clz, o);
-       return tag_ptr(res_ptr, true);
-}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1call(JNIEnv *env, jclass clz, int64_t this_arg) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Persist_1archive_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_funding_outpoint) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
-       LDKFutureCallback* this_arg_conv = (LDKFutureCallback*)this_arg_ptr;
-       (this_arg_conv->call)(this_arg_conv->this_arg);
+       LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
+       LDKOutPoint channel_funding_outpoint_conv;
+       channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint);
+       channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv);
+       channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv);
+       (this_arg_conv->archive_persisted_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv);
 }
 
 typedef struct LDKListen_JCalls {
@@ -17104,14 +18573,44 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_Confirm_1get_1relevant
        return ret_arr;
 }
 
-typedef struct LDKEventHandler_JCalls {
+static jclass LDKSpendingDelay_Relative_class = NULL;
+static jmethodID LDKSpendingDelay_Relative_meth = NULL;
+static jclass LDKSpendingDelay_Absolute_class = NULL;
+static jmethodID LDKSpendingDelay_Absolute_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSpendingDelay_init (JNIEnv *env, jclass clz) {
+       LDKSpendingDelay_Relative_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSpendingDelay$Relative"));
+       CHECK(LDKSpendingDelay_Relative_class != NULL);
+       LDKSpendingDelay_Relative_meth = (*env)->GetMethodID(env, LDKSpendingDelay_Relative_class, "<init>", "(I)V");
+       CHECK(LDKSpendingDelay_Relative_meth != NULL);
+       LDKSpendingDelay_Absolute_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSpendingDelay$Absolute"));
+       CHECK(LDKSpendingDelay_Absolute_class != NULL);
+       LDKSpendingDelay_Absolute_meth = (*env)->GetMethodID(env, LDKSpendingDelay_Absolute_class, "<init>", "(I)V");
+       CHECK(LDKSpendingDelay_Absolute_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSpendingDelay_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKSpendingDelay *obj = (LDKSpendingDelay*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKSpendingDelay_Relative: {
+                       int32_t num_blocks_conv = obj->relative.num_blocks;
+                       return (*env)->NewObject(env, LDKSpendingDelay_Relative_class, LDKSpendingDelay_Relative_meth, num_blocks_conv);
+               }
+               case LDKSpendingDelay_Absolute: {
+                       int32_t height_conv = obj->absolute.height;
+                       return (*env)->NewObject(env, LDKSpendingDelay_Absolute_class, LDKSpendingDelay_Absolute_meth, height_conv);
+               }
+               default: abort();
+       }
+}
+typedef struct LDKFutureCallback_JCalls {
        atomic_size_t refcnt;
        JavaVM *vm;
        jweak o;
-       jmethodID handle_event_meth;
-} LDKEventHandler_JCalls;
-static void LDKEventHandler_JCalls_free(void* this_arg) {
-       LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) this_arg;
+       jmethodID call_meth;
+} LDKFutureCallback_JCalls;
+static void LDKFutureCallback_JCalls_free(void* this_arg) {
+       LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg;
        if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
                JNIEnv *env;
                jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -17127,7 +18626,83 @@ static void LDKEventHandler_JCalls_free(void* this_arg) {
                FREE(j_calls);
        }
 }
-void handle_event_LDKEventHandler_jcall(const void* this_arg, LDKEvent event) {
+void call_LDKFutureCallback_jcall(const void* this_arg) {
+       LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       (*env)->CallVoidMethod(env, obj, j_calls->call_meth);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to call in LDKFutureCallback from rust threw an exception.");
+       }
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+}
+static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) {
+       LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKFutureCallback LDKFutureCallback_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKFutureCallback_JCalls *calls = MALLOC(sizeof(LDKFutureCallback_JCalls), "LDKFutureCallback_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->call_meth = (*env)->GetMethodID(env, c, "call", "()V");
+       CHECK(calls->call_meth != NULL);
+
+       LDKFutureCallback ret = {
+               .this_arg = (void*) calls,
+               .call = call_LDKFutureCallback_jcall,
+               .free = LDKFutureCallback_JCalls_free,
+       };
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKFutureCallback_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKFutureCallback *res_ptr = MALLOC(sizeof(LDKFutureCallback), "LDKFutureCallback");
+       *res_ptr = LDKFutureCallback_init(env, clz, o);
+       return tag_ptr(res_ptr, true);
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1call(JNIEnv *env, jclass clz, int64_t this_arg) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKFutureCallback* this_arg_conv = (LDKFutureCallback*)this_arg_ptr;
+       (this_arg_conv->call)(this_arg_conv->this_arg);
+}
+
+typedef struct LDKEventHandler_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID handle_event_meth;
+} LDKEventHandler_JCalls;
+static void LDKEventHandler_JCalls_free(void* this_arg) {
+       LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+               } else {
+                       DO_ASSERT(get_jenv_res == JNI_OK);
+               }
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+               }
+               FREE(j_calls);
+       }
+}
+void handle_event_LDKEventHandler_jcall(const void* this_arg, LDKEvent event) {
        LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) this_arg;
        JNIEnv *env;
        jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -17441,9 +19016,6 @@ typedef struct LDKChannelMessageHandler_JCalls {
        jmethodID handle_shutdown_meth;
        jmethodID handle_closing_signed_meth;
        jmethodID handle_stfu_meth;
-       jmethodID handle_splice_meth;
-       jmethodID handle_splice_ack_meth;
-       jmethodID handle_splice_locked_meth;
        jmethodID handle_tx_add_input_meth;
        jmethodID handle_tx_add_output_meth;
        jmethodID handle_tx_remove_input_meth;
@@ -17757,87 +19329,6 @@ void handle_stfu_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicK
                DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
        }
 }
-void handle_splice_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSplice * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
-       if (get_jenv_res == JNI_EDETACHED) {
-               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
-       } else {
-               DO_ASSERT(get_jenv_res == JNI_OK);
-       }
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKSplice msg_var = *msg;
-       int64_t msg_ref = 0;
-       msg_var = Splice_clone(&msg_var);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
-       msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       (*env)->CallVoidMethod(env, obj, j_calls->handle_splice_meth, their_node_id_arr, msg_ref);
-       if (UNLIKELY((*env)->ExceptionCheck(env))) {
-               (*env)->ExceptionDescribe(env);
-               (*env)->FatalError(env, "A call to handle_splice in LDKChannelMessageHandler from rust threw an exception.");
-       }
-       if (get_jenv_res == JNI_EDETACHED) {
-               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
-       }
-}
-void handle_splice_ack_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSpliceAck * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
-       if (get_jenv_res == JNI_EDETACHED) {
-               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
-       } else {
-               DO_ASSERT(get_jenv_res == JNI_OK);
-       }
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKSpliceAck msg_var = *msg;
-       int64_t msg_ref = 0;
-       msg_var = SpliceAck_clone(&msg_var);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
-       msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       (*env)->CallVoidMethod(env, obj, j_calls->handle_splice_ack_meth, their_node_id_arr, msg_ref);
-       if (UNLIKELY((*env)->ExceptionCheck(env))) {
-               (*env)->ExceptionDescribe(env);
-               (*env)->FatalError(env, "A call to handle_splice_ack in LDKChannelMessageHandler from rust threw an exception.");
-       }
-       if (get_jenv_res == JNI_EDETACHED) {
-               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
-       }
-}
-void handle_splice_locked_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSpliceLocked * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
-       if (get_jenv_res == JNI_EDETACHED) {
-               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
-       } else {
-               DO_ASSERT(get_jenv_res == JNI_OK);
-       }
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKSpliceLocked msg_var = *msg;
-       int64_t msg_ref = 0;
-       msg_var = SpliceLocked_clone(&msg_var);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
-       msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       (*env)->CallVoidMethod(env, obj, j_calls->handle_splice_locked_meth, their_node_id_arr, msg_ref);
-       if (UNLIKELY((*env)->ExceptionCheck(env))) {
-               (*env)->ExceptionDescribe(env);
-               (*env)->FatalError(env, "A call to handle_splice_locked in LDKChannelMessageHandler from rust threw an exception.");
-       }
-       if (get_jenv_res == JNI_EDETACHED) {
-               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
-       }
-}
 void handle_tx_add_input_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxAddInput * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
        JNIEnv *env;
@@ -18542,12 +20033,6 @@ static inline LDKChannelMessageHandler LDKChannelMessageHandler_init (JNIEnv *en
        CHECK(calls->handle_closing_signed_meth != NULL);
        calls->handle_stfu_meth = (*env)->GetMethodID(env, c, "handle_stfu", "([BJ)V");
        CHECK(calls->handle_stfu_meth != NULL);
-       calls->handle_splice_meth = (*env)->GetMethodID(env, c, "handle_splice", "([BJ)V");
-       CHECK(calls->handle_splice_meth != NULL);
-       calls->handle_splice_ack_meth = (*env)->GetMethodID(env, c, "handle_splice_ack", "([BJ)V");
-       CHECK(calls->handle_splice_ack_meth != NULL);
-       calls->handle_splice_locked_meth = (*env)->GetMethodID(env, c, "handle_splice_locked", "([BJ)V");
-       CHECK(calls->handle_splice_locked_meth != NULL);
        calls->handle_tx_add_input_meth = (*env)->GetMethodID(env, c, "handle_tx_add_input", "([BJ)V");
        CHECK(calls->handle_tx_add_input_meth != NULL);
        calls->handle_tx_add_output_meth = (*env)->GetMethodID(env, c, "handle_tx_add_output", "([BJ)V");
@@ -18611,9 +20096,6 @@ static inline LDKChannelMessageHandler LDKChannelMessageHandler_init (JNIEnv *en
                .handle_shutdown = handle_shutdown_LDKChannelMessageHandler_jcall,
                .handle_closing_signed = handle_closing_signed_LDKChannelMessageHandler_jcall,
                .handle_stfu = handle_stfu_LDKChannelMessageHandler_jcall,
-               .handle_splice = handle_splice_LDKChannelMessageHandler_jcall,
-               .handle_splice_ack = handle_splice_ack_LDKChannelMessageHandler_jcall,
-               .handle_splice_locked = handle_splice_locked_LDKChannelMessageHandler_jcall,
                .handle_tx_add_input = handle_tx_add_input_LDKChannelMessageHandler_jcall,
                .handle_tx_add_output = handle_tx_add_output_LDKChannelMessageHandler_jcall,
                .handle_tx_remove_input = handle_tx_remove_input_LDKChannelMessageHandler_jcall,
@@ -18804,51 +20286,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_
        (this_arg_conv->handle_stfu)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       void* this_arg_ptr = untag_ptr(this_arg);
-       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKSplice msg_conv;
-       msg_conv.inner = untag_ptr(msg);
-       msg_conv.is_owned = ptr_is_owned(msg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_splice)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice_1ack(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       void* this_arg_ptr = untag_ptr(this_arg);
-       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKSpliceAck msg_conv;
-       msg_conv.inner = untag_ptr(msg);
-       msg_conv.is_owned = ptr_is_owned(msg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_splice_ack)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice_1locked(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       void* this_arg_ptr = untag_ptr(this_arg);
-       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKSpliceLocked msg_conv;
-       msg_conv.inner = untag_ptr(msg);
-       msg_conv.is_owned = ptr_is_owned(msg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_splice_locked)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
-}
-
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1tx_1add_1input(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
@@ -19361,6 +20798,89 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_OffersMessageHandler_1
        return ret_arr;
 }
 
+typedef struct LDKNodeIdLookUp_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID next_node_id_meth;
+} LDKNodeIdLookUp_JCalls;
+static void LDKNodeIdLookUp_JCalls_free(void* this_arg) {
+       LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+               } else {
+                       DO_ASSERT(get_jenv_res == JNI_OK);
+               }
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+               }
+               FREE(j_calls);
+       }
+}
+LDKPublicKey next_node_id_LDKNodeIdLookUp_jcall(const void* this_arg, uint64_t short_channel_id) {
+       LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       int64_t short_channel_id_conv = short_channel_id;
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       int8_tArray ret = (*env)->CallObjectMethod(env, obj, j_calls->next_node_id_meth, short_channel_id_conv);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to next_node_id in LDKNodeIdLookUp from rust threw an exception.");
+       }
+       LDKPublicKey ret_ref;
+       CHECK((*env)->GetArrayLength(env, ret) == 33);
+       (*env)->GetByteArrayRegion(env, ret, 0, 33, ret_ref.compressed_form);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+       return ret_ref;
+}
+static void LDKNodeIdLookUp_JCalls_cloned(LDKNodeIdLookUp* new_obj) {
+       LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) new_obj->this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKNodeIdLookUp LDKNodeIdLookUp_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKNodeIdLookUp_JCalls *calls = MALLOC(sizeof(LDKNodeIdLookUp_JCalls), "LDKNodeIdLookUp_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->next_node_id_meth = (*env)->GetMethodID(env, c, "next_node_id", "(J)[B");
+       CHECK(calls->next_node_id_meth != NULL);
+
+       LDKNodeIdLookUp ret = {
+               .this_arg = (void*) calls,
+               .next_node_id = next_node_id_LDKNodeIdLookUp_jcall,
+               .free = LDKNodeIdLookUp_JCalls_free,
+       };
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKNodeIdLookUp_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKNodeIdLookUp *res_ptr = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp");
+       *res_ptr = LDKNodeIdLookUp_init(env, clz, o);
+       return tag_ptr(res_ptr, true);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeIdLookUp_1next_1node_1id(JNIEnv *env, jclass clz, int64_t this_arg, int64_t short_channel_id) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKNodeIdLookUp* this_arg_conv = (LDKNodeIdLookUp*)this_arg_ptr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, (this_arg_conv->next_node_id)(this_arg_conv->this_arg, short_channel_id).compressed_form);
+       return ret_arr;
+}
+
 typedef struct LDKRoutingMessageHandler_JCalls {
        atomic_size_t refcnt;
        JavaVM *vm;
@@ -21144,6 +22664,221 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1hash(JNIE
        return ret_conv;
 }
 
+typedef struct LDKSignBolt12InvoiceFn_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID sign_invoice_meth;
+} LDKSignBolt12InvoiceFn_JCalls;
+static void LDKSignBolt12InvoiceFn_JCalls_free(void* this_arg) {
+       LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+               } else {
+                       DO_ASSERT(get_jenv_res == JNI_OK);
+               }
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+               }
+               FREE(j_calls);
+       }
+}
+LDKCResult_SchnorrSignatureNoneZ sign_invoice_LDKSignBolt12InvoiceFn_jcall(const void* this_arg, const LDKUnsignedBolt12Invoice * message) {
+       LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       LDKUnsignedBolt12Invoice message_var = *message;
+       int64_t message_ref = 0;
+       message_var = UnsignedBolt12Invoice_clone(&message_var);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var);
+       message_ref = tag_ptr(message_var.inner, message_var.is_owned);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->sign_invoice_meth, message_ref);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to sign_invoice in LDKSignBolt12InvoiceFn from rust threw an exception.");
+       }
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+       return ret_conv;
+}
+static void LDKSignBolt12InvoiceFn_JCalls_cloned(LDKSignBolt12InvoiceFn* new_obj) {
+       LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) new_obj->this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKSignBolt12InvoiceFn LDKSignBolt12InvoiceFn_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKSignBolt12InvoiceFn_JCalls *calls = MALLOC(sizeof(LDKSignBolt12InvoiceFn_JCalls), "LDKSignBolt12InvoiceFn_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->sign_invoice_meth = (*env)->GetMethodID(env, c, "sign_invoice", "(J)J");
+       CHECK(calls->sign_invoice_meth != NULL);
+
+       LDKSignBolt12InvoiceFn ret = {
+               .this_arg = (void*) calls,
+               .sign_invoice = sign_invoice_LDKSignBolt12InvoiceFn_jcall,
+               .free = LDKSignBolt12InvoiceFn_JCalls_free,
+       };
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKSignBolt12InvoiceFn_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKSignBolt12InvoiceFn *res_ptr = MALLOC(sizeof(LDKSignBolt12InvoiceFn), "LDKSignBolt12InvoiceFn");
+       *res_ptr = LDKSignBolt12InvoiceFn_init(env, clz, o);
+       return tag_ptr(res_ptr, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignBolt12InvoiceFn_1sign_1invoice(JNIEnv *env, jclass clz, int64_t this_arg, int64_t message) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKSignBolt12InvoiceFn* this_arg_conv = (LDKSignBolt12InvoiceFn*)this_arg_ptr;
+       LDKUnsignedBolt12Invoice message_conv;
+       message_conv.inner = untag_ptr(message);
+       message_conv.is_owned = ptr_is_owned(message);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(message_conv);
+       message_conv.is_owned = false;
+       LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+       *ret_conv = (this_arg_conv->sign_invoice)(this_arg_conv->this_arg, &message_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+typedef struct LDKSignInvoiceRequestFn_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID sign_invoice_request_meth;
+} LDKSignInvoiceRequestFn_JCalls;
+static void LDKSignInvoiceRequestFn_JCalls_free(void* this_arg) {
+       LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+               } else {
+                       DO_ASSERT(get_jenv_res == JNI_OK);
+               }
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+               }
+               FREE(j_calls);
+       }
+}
+LDKCResult_SchnorrSignatureNoneZ sign_invoice_request_LDKSignInvoiceRequestFn_jcall(const void* this_arg, const LDKUnsignedInvoiceRequest * message) {
+       LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       LDKUnsignedInvoiceRequest message_var = *message;
+       int64_t message_ref = 0;
+       message_var = UnsignedInvoiceRequest_clone(&message_var);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var);
+       message_ref = tag_ptr(message_var.inner, message_var.is_owned);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->sign_invoice_request_meth, message_ref);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to sign_invoice_request in LDKSignInvoiceRequestFn from rust threw an exception.");
+       }
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+       return ret_conv;
+}
+static void LDKSignInvoiceRequestFn_JCalls_cloned(LDKSignInvoiceRequestFn* new_obj) {
+       LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) new_obj->this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKSignInvoiceRequestFn LDKSignInvoiceRequestFn_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKSignInvoiceRequestFn_JCalls *calls = MALLOC(sizeof(LDKSignInvoiceRequestFn_JCalls), "LDKSignInvoiceRequestFn_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->sign_invoice_request_meth = (*env)->GetMethodID(env, c, "sign_invoice_request", "(J)J");
+       CHECK(calls->sign_invoice_request_meth != NULL);
+
+       LDKSignInvoiceRequestFn ret = {
+               .this_arg = (void*) calls,
+               .sign_invoice_request = sign_invoice_request_LDKSignInvoiceRequestFn_jcall,
+               .free = LDKSignInvoiceRequestFn_JCalls_free,
+       };
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKSignInvoiceRequestFn_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKSignInvoiceRequestFn *res_ptr = MALLOC(sizeof(LDKSignInvoiceRequestFn), "LDKSignInvoiceRequestFn");
+       *res_ptr = LDKSignInvoiceRequestFn_init(env, clz, o);
+       return tag_ptr(res_ptr, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignInvoiceRequestFn_1sign_1invoice_1request(JNIEnv *env, jclass clz, int64_t this_arg, int64_t message) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKSignInvoiceRequestFn* this_arg_conv = (LDKSignInvoiceRequestFn*)this_arg_ptr;
+       LDKUnsignedInvoiceRequest message_conv;
+       message_conv.inner = untag_ptr(message);
+       message_conv.is_owned = ptr_is_owned(message);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(message_conv);
+       message_conv.is_owned = false;
+       LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+       *ret_conv = (this_arg_conv->sign_invoice_request)(this_arg_conv->this_arg, &message_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+static jclass LDKSignError_Signing_class = NULL;
+static jmethodID LDKSignError_Signing_meth = NULL;
+static jclass LDKSignError_Verification_class = NULL;
+static jmethodID LDKSignError_Verification_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSignError_init (JNIEnv *env, jclass clz) {
+       LDKSignError_Signing_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSignError$Signing"));
+       CHECK(LDKSignError_Signing_class != NULL);
+       LDKSignError_Signing_meth = (*env)->GetMethodID(env, LDKSignError_Signing_class, "<init>", "()V");
+       CHECK(LDKSignError_Signing_meth != NULL);
+       LDKSignError_Verification_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSignError$Verification"));
+       CHECK(LDKSignError_Verification_class != NULL);
+       LDKSignError_Verification_meth = (*env)->GetMethodID(env, LDKSignError_Verification_class, "<init>", "(Lorg/ldk/enums/Secp256k1Error;)V");
+       CHECK(LDKSignError_Verification_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSignError_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKSignError *obj = (LDKSignError*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKSignError_Signing: {
+                       return (*env)->NewObject(env, LDKSignError_Signing_class, LDKSignError_Signing_meth);
+               }
+               case LDKSignError_Verification: {
+                       jclass verification_conv = LDKSecp256k1Error_to_java(env, obj->verification);
+                       return (*env)->NewObject(env, LDKSignError_Verification_class, LDKSignError_Verification_meth, verification_conv);
+               }
+               default: abort();
+       }
+}
 static jclass LDKEffectiveCapacity_ExactLiquidity_class = NULL;
 static jmethodID LDKEffectiveCapacity_ExactLiquidity_meth = NULL;
 static jclass LDKEffectiveCapacity_AdvertisedMaxHTLC_class = NULL;
@@ -21380,6 +23115,38 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Score_1write(JNIEnv *en
        return ret_arr;
 }
 
+static jclass LDKIntroductionNode_NodeId_class = NULL;
+static jmethodID LDKIntroductionNode_NodeId_meth = NULL;
+static jclass LDKIntroductionNode_DirectedShortChannelId_class = NULL;
+static jmethodID LDKIntroductionNode_DirectedShortChannelId_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKIntroductionNode_init (JNIEnv *env, jclass clz) {
+       LDKIntroductionNode_NodeId_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKIntroductionNode$NodeId"));
+       CHECK(LDKIntroductionNode_NodeId_class != NULL);
+       LDKIntroductionNode_NodeId_meth = (*env)->GetMethodID(env, LDKIntroductionNode_NodeId_class, "<init>", "([B)V");
+       CHECK(LDKIntroductionNode_NodeId_meth != NULL);
+       LDKIntroductionNode_DirectedShortChannelId_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKIntroductionNode$DirectedShortChannelId"));
+       CHECK(LDKIntroductionNode_DirectedShortChannelId_class != NULL);
+       LDKIntroductionNode_DirectedShortChannelId_meth = (*env)->GetMethodID(env, LDKIntroductionNode_DirectedShortChannelId_class, "<init>", "(Lorg/ldk/enums/Direction;J)V");
+       CHECK(LDKIntroductionNode_DirectedShortChannelId_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKIntroductionNode_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKIntroductionNode *obj = (LDKIntroductionNode*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKIntroductionNode_NodeId: {
+                       int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
+                       (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->node_id.compressed_form);
+                       return (*env)->NewObject(env, LDKIntroductionNode_NodeId_class, LDKIntroductionNode_NodeId_meth, node_id_arr);
+               }
+               case LDKIntroductionNode_DirectedShortChannelId: {
+                       jclass _0_conv = LDKDirection_to_java(env, obj->directed_short_channel_id._0);
+                       int64_t _1_conv = obj->directed_short_channel_id._1;
+                       return (*env)->NewObject(env, LDKIntroductionNode_DirectedShortChannelId_class, LDKIntroductionNode_DirectedShortChannelId_meth, _0_conv, _1_conv);
+               }
+               default: abort();
+       }
+}
 typedef struct LDKCoinSelectionSource_JCalls {
        atomic_size_t refcnt;
        JavaVM *vm;
@@ -21924,6 +23691,24 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1new(JNIEnv
        return tag_ptr(ret_ref, true);
 }
 
+static inline uint64_t BigEndianScalar_clone_ptr(LDKBigEndianScalar *NONNULL_PTR arg) {
+       LDKBigEndianScalar* ret_ref = MALLOC(sizeof(LDKBigEndianScalar), "LDKBigEndianScalar");
+       *ret_ref = BigEndianScalar_clone(arg);
+       return tag_ptr(ret_ref, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKBigEndianScalar* arg_conv = (LDKBigEndianScalar*)untag_ptr(arg);
+       int64_t ret_conv = BigEndianScalar_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKBigEndianScalar* orig_conv = (LDKBigEndianScalar*)untag_ptr(orig);
+       LDKBigEndianScalar* ret_ref = MALLOC(sizeof(LDKBigEndianScalar), "LDKBigEndianScalar");
+       *ret_ref = BigEndianScalar_clone(orig_conv);
+       return tag_ptr(ret_ref, true);
+}
+
 static inline uint64_t Bech32Error_clone_ptr(LDKBech32Error *NONNULL_PTR arg) {
        LDKBech32Error *ret_copy = MALLOC(sizeof(LDKBech32Error), "LDKBech32Error");
        *ret_copy = Bech32Error_clone(arg);
@@ -22090,6 +23875,116 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Str_1free(JNIEnv *env, jclass
        Str_free(dummy);
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free(JNIEnv *env, jclass clz, int8_tArray _res) {
+       LDKCVec_u8Z _res_ref;
+       _res_ref.datalen = (*env)->GetArrayLength(env, _res);
+       _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, _res, 0, _res_ref.datalen, _res_ref.data);
+       CVec_u8Z_free(_res_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKRefundMaybeWithDerivedMetadataBuilder o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&o_conv);
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg) {
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* arg_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* orig_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(orig);
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKRefund o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = Refund_clone(&o_conv);
+       LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ");
+       *ret_conv = CResult_RefundBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ");
+       *ret_conv = CResult_RefundBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_RefundBolt12SemanticErrorZ* o_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_RefundBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_RefundBolt12SemanticErrorZ _res_conv = *(LDKCResult_RefundBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_RefundBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_RefundBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR arg) {
+       LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ");
+       *ret_conv = CResult_RefundBolt12SemanticErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_RefundBolt12SemanticErrorZ* arg_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_RefundBolt12SemanticErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_RefundBolt12SemanticErrorZ* orig_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(orig);
+       LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ");
+       *ret_conv = CResult_RefundBolt12SemanticErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1u64Z_1some(JNIEnv *env, jclass clz, int64_t o) {
        LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
        *ret_copy = COption_u64Z_some(o);
@@ -22396,14 +24291,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ThirtyTwoBytesZ_1c
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free(JNIEnv *env, jclass clz, int8_tArray _res) {
-       LDKCVec_u8Z _res_ref;
-       _res_ref.datalen = (*env)->GetArrayLength(env, _res);
-       _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes");
-       (*env)->GetByteArrayRegion(env, _res, 0, _res_ref.datalen, _res_ref.data);
-       CVec_u8Z_free(_res_ref);
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1u8ZZ_1some(JNIEnv *env, jclass clz, int8_tArray o) {
        LDKCVec_u8Z o_ref;
        o_ref.datalen = (*env)->GetArrayLength(env, o);
@@ -22612,6 +24499,156 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RecipientOnionFiel
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKUnsignedBolt12Invoice o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = UnsignedBolt12Invoice_clone(&o_conv);
+       LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ");
+       *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ");
+       *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* o_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ _res_conv = *(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg) {
+       LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ");
+       *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* arg_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* orig_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(orig);
+       LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ");
+       *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKBolt12Invoice o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = Bolt12Invoice_clone(&o_conv);
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
+       *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
+       *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* o_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ _res_conv = *(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg) {
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
+       *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* arg_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* orig_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(orig);
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
+       *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
+       LDKSchnorrSignature o_ref;
+       CHECK((*env)->GetArrayLength(env, o) == 64);
+       (*env)->GetByteArrayRegion(env, o, 0, 64, o_ref.compact_form);
+       LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+       *ret_conv = CResult_SchnorrSignatureNoneZ_ok(o_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1err(JNIEnv *env, jclass clz) {
+       LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+       *ret_conv = CResult_SchnorrSignatureNoneZ_err();
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_SchnorrSignatureNoneZ* o_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_SchnorrSignatureNoneZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_SchnorrSignatureNoneZ _res_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_SchnorrSignatureNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg) {
+       LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+       *ret_conv = CResult_SchnorrSignatureNoneZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_SchnorrSignatureNoneZ* arg_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_SchnorrSignatureNoneZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_SchnorrSignatureNoneZ* orig_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(orig);
+       LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+       *ret_conv = CResult_SchnorrSignatureNoneZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ThirtyTwoBytesZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
        LDKCVec_ThirtyTwoBytesZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
@@ -22685,6 +24722,100 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1ThirtyTwoByt
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1some(JNIEnv *env, jclass clz, int64_t o) {
+       void* o_ptr = untag_ptr(o);
+       CHECK_ACCESS(o_ptr);
+       LDKAmount o_conv = *(LDKAmount*)(o_ptr);
+       o_conv = Amount_clone((LDKAmount*)untag_ptr(o));
+       LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+       *ret_copy = COption_AmountZ_some(o_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1none(JNIEnv *env, jclass clz) {
+       LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+       *ret_copy = COption_AmountZ_none();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCOption_AmountZ _res_conv = *(LDKCOption_AmountZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       COption_AmountZ_free(_res_conv);
+}
+
+static inline uint64_t COption_AmountZ_clone_ptr(LDKCOption_AmountZ *NONNULL_PTR arg) {
+       LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+       *ret_copy = COption_AmountZ_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCOption_AmountZ* arg_conv = (LDKCOption_AmountZ*)untag_ptr(arg);
+       int64_t ret_conv = COption_AmountZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCOption_AmountZ* orig_conv = (LDKCOption_AmountZ*)untag_ptr(orig);
+       LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+       *ret_copy = COption_AmountZ_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1some(JNIEnv *env, jclass clz, int64_t o) {
+       void* o_ptr = untag_ptr(o);
+       CHECK_ACCESS(o_ptr);
+       LDKQuantity o_conv = *(LDKQuantity*)(o_ptr);
+       o_conv = Quantity_clone((LDKQuantity*)untag_ptr(o));
+       LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+       *ret_copy = COption_QuantityZ_some(o_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1none(JNIEnv *env, jclass clz) {
+       LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+       *ret_copy = COption_QuantityZ_none();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCOption_QuantityZ _res_conv = *(LDKCOption_QuantityZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       COption_QuantityZ_free(_res_conv);
+}
+
+static inline uint64_t COption_QuantityZ_clone_ptr(LDKCOption_QuantityZ *NONNULL_PTR arg) {
+       LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+       *ret_copy = COption_QuantityZ_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCOption_QuantityZ* arg_conv = (LDKCOption_QuantityZ*)untag_ptr(arg);
+       int64_t ret_conv = COption_QuantityZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCOption_QuantityZ* orig_conv = (LDKCOption_QuantityZ*)untag_ptr(orig);
+       LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+       *ret_copy = COption_QuantityZ_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
        LDKThirtyTwoBytes o_ref;
        CHECK((*env)->GetArrayLength(env, o) == 32);
@@ -23322,7 +25453,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1BigEndianScalarZ_1
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
        LDKBigEndianScalar o_conv = *(LDKBigEndianScalar*)(o_ptr);
-       // WARNING: we may need a move here but no clone is available for LDKBigEndianScalar
+       o_conv = BigEndianScalar_clone((LDKBigEndianScalar*)untag_ptr(o));
        LDKCOption_BigEndianScalarZ *ret_copy = MALLOC(sizeof(LDKCOption_BigEndianScalarZ), "LDKCOption_BigEndianScalarZ");
        *ret_copy = COption_BigEndianScalarZ_some(o_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
@@ -23430,54 +25561,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RecoverableSignatu
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
-       LDKSchnorrSignature o_ref;
-       CHECK((*env)->GetArrayLength(env, o) == 64);
-       (*env)->GetByteArrayRegion(env, o, 0, 64, o_ref.compact_form);
-       LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
-       *ret_conv = CResult_SchnorrSignatureNoneZ_ok(o_ref);
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1err(JNIEnv *env, jclass clz) {
-       LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
-       *ret_conv = CResult_SchnorrSignatureNoneZ_err();
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKCResult_SchnorrSignatureNoneZ* o_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(o);
-       jboolean ret_conv = CResult_SchnorrSignatureNoneZ_is_ok(o_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if (!ptr_is_owned(_res)) return;
-       void* _res_ptr = untag_ptr(_res);
-       CHECK_ACCESS(_res_ptr);
-       LDKCResult_SchnorrSignatureNoneZ _res_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(_res_ptr);
-       FREE(untag_ptr(_res));
-       CResult_SchnorrSignatureNoneZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg) {
-       LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
-       *ret_conv = CResult_SchnorrSignatureNoneZ_clone(arg);
-       return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_SchnorrSignatureNoneZ* arg_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(arg);
-       int64_t ret_conv = CResult_SchnorrSignatureNoneZ_clone_ptr(arg_conv);
-       return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_SchnorrSignatureNoneZ* orig_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(orig);
-       LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
-       *ret_conv = CResult_SchnorrSignatureNoneZ_clone(orig_conv);
-       return tag_ptr(ret_conv, true);
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
        LDKECDSASignature o_ref;
        CHECK((*env)->GetArrayLength(env, o) == 64);
@@ -23526,6 +25609,56 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNone
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
+       LDKTransaction o_ref;
+       o_ref.datalen = (*env)->GetArrayLength(env, o);
+       o_ref.data = MALLOC(o_ref.datalen, "LDKTransaction Bytes");
+       (*env)->GetByteArrayRegion(env, o, 0, o_ref.datalen, o_ref.data);
+       o_ref.data_is_owned = true;
+       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
+       *ret_conv = CResult_TransactionNoneZ_ok(o_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1err(JNIEnv *env, jclass clz) {
+       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
+       *ret_conv = CResult_TransactionNoneZ_err();
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_TransactionNoneZ* o_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_TransactionNoneZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_TransactionNoneZ _res_conv = *(LDKCResult_TransactionNoneZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_TransactionNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg) {
+       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
+       *ret_conv = CResult_TransactionNoneZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_TransactionNoneZ* arg_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_TransactionNoneZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_TransactionNoneZ* orig_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(orig);
+       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
+       *ret_conv = CResult_TransactionNoneZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1WriteableEcdsaChannelSignerDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -23986,56 +26119,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDeco
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
-       LDKTransaction o_ref;
-       o_ref.datalen = (*env)->GetArrayLength(env, o);
-       o_ref.data = MALLOC(o_ref.datalen, "LDKTransaction Bytes");
-       (*env)->GetByteArrayRegion(env, o, 0, o_ref.datalen, o_ref.data);
-       o_ref.data_is_owned = true;
-       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
-       *ret_conv = CResult_TransactionNoneZ_ok(o_ref);
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1err(JNIEnv *env, jclass clz) {
-       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
-       *ret_conv = CResult_TransactionNoneZ_err();
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKCResult_TransactionNoneZ* o_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(o);
-       jboolean ret_conv = CResult_TransactionNoneZ_is_ok(o_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if (!ptr_is_owned(_res)) return;
-       void* _res_ptr = untag_ptr(_res);
-       CHECK_ACCESS(_res_ptr);
-       LDKCResult_TransactionNoneZ _res_conv = *(LDKCResult_TransactionNoneZ*)(_res_ptr);
-       FREE(untag_ptr(_res));
-       CResult_TransactionNoneZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg) {
-       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
-       *ret_conv = CResult_TransactionNoneZ_clone(arg);
-       return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_TransactionNoneZ* arg_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(arg);
-       int64_t ret_conv = CResult_TransactionNoneZ_clone_ptr(arg_conv);
-       return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_TransactionNoneZ* orig_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(orig);
-       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
-       *ret_conv = CResult_TransactionNoneZ_clone(orig_conv);
-       return tag_ptr(ret_conv, true);
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1WriteableScoreZ_1some(JNIEnv *env, jclass clz, int64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -25291,6 +27374,60 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDe
        CResult_ProbabilisticScorerDecodeErrorZ_free(_res_conv);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKBestBlock o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = BestBlock_clone(&o_conv);
+       LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ");
+       *ret_conv = CResult_BestBlockDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ");
+       *ret_conv = CResult_BestBlockDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_BestBlockDecodeErrorZ* o_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_BestBlockDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_BestBlockDecodeErrorZ _res_conv = *(LDKCResult_BestBlockDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_BestBlockDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_BestBlockDecodeErrorZ_clone_ptr(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ");
+       *ret_conv = CResult_BestBlockDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_BestBlockDecodeErrorZ* arg_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_BestBlockDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_BestBlockDecodeErrorZ* orig_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ");
+       *ret_conv = CResult_BestBlockDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 static inline uint64_t C2Tuple_usizeTransactionZ_clone_ptr(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR arg) {
        LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
        *ret_conv = C2Tuple_usizeTransactionZ_clone(arg);
@@ -25475,81 +27612,86 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorEventZ_1free(JNIE
        CVec_MonitorEventZ_free(_res_constr);
 }
 
-static inline uint64_t C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg) {
-       LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ");
-       *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(arg);
+static inline uint64_t C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg) {
+       LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ");
+       *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(arg);
        return tag_ptr(ret_conv, true);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* arg_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(arg);
-       int64_t ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(arg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* arg_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(arg);
+       int64_t ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(arg_conv);
        return ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* orig_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(orig);
-       LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ");
-       *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* orig_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(orig);
+       LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ");
+       *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(orig_conv);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_tArray b, int8_tArray c) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b, int64_tArray c, int8_tArray d) {
        LDKOutPoint a_conv;
        a_conv.inner = untag_ptr(a);
        a_conv.is_owned = ptr_is_owned(a);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
        a_conv = OutPoint_clone(&a_conv);
-       LDKCVec_MonitorEventZ b_constr;
-       b_constr.datalen = (*env)->GetArrayLength(env, b);
-       if (b_constr.datalen > 0)
-               b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements");
+       LDKChannelId b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv = ChannelId_clone(&b_conv);
+       LDKCVec_MonitorEventZ c_constr;
+       c_constr.datalen = (*env)->GetArrayLength(env, c);
+       if (c_constr.datalen > 0)
+               c_constr.data = MALLOC(c_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements");
        else
-               b_constr.data = NULL;
-       int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
-       for (size_t o = 0; o < b_constr.datalen; o++) {
-               int64_t b_conv_14 = b_vals[o];
-               void* b_conv_14_ptr = untag_ptr(b_conv_14);
-               CHECK_ACCESS(b_conv_14_ptr);
-               LDKMonitorEvent b_conv_14_conv = *(LDKMonitorEvent*)(b_conv_14_ptr);
-               b_conv_14_conv = MonitorEvent_clone((LDKMonitorEvent*)untag_ptr(b_conv_14));
-               b_constr.data[o] = b_conv_14_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
-       LDKPublicKey c_ref;
-       CHECK((*env)->GetArrayLength(env, c) == 33);
-       (*env)->GetByteArrayRegion(env, c, 0, 33, c_ref.compressed_form);
-       LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ");
-       *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(a_conv, b_constr, c_ref);
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+               c_constr.data = NULL;
+       int64_t* c_vals = (*env)->GetLongArrayElements (env, c, NULL);
+       for (size_t o = 0; o < c_constr.datalen; o++) {
+               int64_t c_conv_14 = c_vals[o];
+               void* c_conv_14_ptr = untag_ptr(c_conv_14);
+               CHECK_ACCESS(c_conv_14_ptr);
+               LDKMonitorEvent c_conv_14_conv = *(LDKMonitorEvent*)(c_conv_14_ptr);
+               c_conv_14_conv = MonitorEvent_clone((LDKMonitorEvent*)untag_ptr(c_conv_14));
+               c_constr.data[o] = c_conv_14_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, c, c_vals, 0);
+       LDKPublicKey d_ref;
+       CHECK((*env)->GetArrayLength(env, d) == 33);
+       (*env)->GetByteArrayRegion(env, d, 0, 33, d_ref.compressed_form);
+       LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ");
+       *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(a_conv, b_conv, c_constr, d_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if (!ptr_is_owned(_res)) return;
        void* _res_ptr = untag_ptr(_res);
        CHECK_ACCESS(_res_ptr);
-       LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(_res_ptr);
+       LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(_res_ptr);
        FREE(untag_ptr(_res));
-       C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(_res_conv);
+       C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ _res_constr;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Elements");
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t x = 0; x < _res_constr.datalen; x++) {
-               int64_t _res_conv_49 = _res_vals[x];
-               void* _res_conv_49_ptr = untag_ptr(_res_conv_49);
-               CHECK_ACCESS(_res_conv_49_ptr);
-               LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res_conv_49_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(_res_conv_49_ptr);
-               FREE(untag_ptr(_res_conv_49));
-               _res_constr.data[x] = _res_conv_49_conv;
+       for (size_t f = 0; f < _res_constr.datalen; f++) {
+               int64_t _res_conv_57 = _res_vals[f];
+               void* _res_conv_57_ptr = untag_ptr(_res_conv_57);
+               CHECK_ACCESS(_res_conv_57_ptr);
+               LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res_conv_57_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(_res_conv_57_ptr);
+               FREE(untag_ptr(_res_conv_57));
+               _res_constr.data[f] = _res_conv_57_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(_res_constr);
+       CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(_res_constr);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
@@ -25930,6 +28072,225 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTypeFeature
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKOfferId o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = OfferId_clone(&o_conv);
+       LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ");
+       *ret_conv = CResult_OfferIdDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ");
+       *ret_conv = CResult_OfferIdDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_OfferIdDecodeErrorZ* o_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_OfferIdDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_OfferIdDecodeErrorZ _res_conv = *(LDKCResult_OfferIdDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_OfferIdDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_OfferIdDecodeErrorZ_clone_ptr(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ");
+       *ret_conv = CResult_OfferIdDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_OfferIdDecodeErrorZ* arg_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_OfferIdDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_OfferIdDecodeErrorZ* orig_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ");
+       *ret_conv = CResult_OfferIdDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz) {
+       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       *ret_conv = CResult_NoneBolt12SemanticErrorZ_ok();
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       *ret_conv = CResult_NoneBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_NoneBolt12SemanticErrorZ* o_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_NoneBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_NoneBolt12SemanticErrorZ _res_conv = *(LDKCResult_NoneBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_NoneBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg) {
+       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NoneBolt12SemanticErrorZ* arg_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_NoneBolt12SemanticErrorZ* orig_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(orig);
+       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKOffer o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = Offer_clone(&o_conv);
+       LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+       *ret_conv = CResult_OfferBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+       *ret_conv = CResult_OfferBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_OfferBolt12SemanticErrorZ* o_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_OfferBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_OfferBolt12SemanticErrorZ _res_conv = *(LDKCResult_OfferBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_OfferBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_OfferBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR arg) {
+       LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+       *ret_conv = CResult_OfferBolt12SemanticErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_OfferBolt12SemanticErrorZ* arg_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_OfferBolt12SemanticErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_OfferBolt12SemanticErrorZ* orig_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(orig);
+       LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+       *ret_conv = CResult_OfferBolt12SemanticErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKInvoiceRequestWithDerivedPayerIdBuilder o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+       
+       LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKInvoiceRequestWithExplicitPayerIdBuilder o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+       
+       LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        LDKOffer o_conv;
        o_conv.inner = untag_ptr(o);
@@ -25985,55 +28346,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseEr
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
-       LDKPublicKey o_ref;
-       CHECK((*env)->GetArrayLength(env, o) == 33);
-       (*env)->GetByteArrayRegion(env, o, 0, 33, o_ref.compressed_form);
-       LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
-       *ret_conv = CResult_PublicKeySecp256k1ErrorZ_ok(o_ref);
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
-       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
-       LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
-       *ret_conv = CResult_PublicKeySecp256k1ErrorZ_err(e_conv);
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKCResult_PublicKeySecp256k1ErrorZ* o_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(o);
-       jboolean ret_conv = CResult_PublicKeySecp256k1ErrorZ_is_ok(o_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if (!ptr_is_owned(_res)) return;
-       void* _res_ptr = untag_ptr(_res);
-       CHECK_ACCESS(_res_ptr);
-       LDKCResult_PublicKeySecp256k1ErrorZ _res_conv = *(LDKCResult_PublicKeySecp256k1ErrorZ*)(_res_ptr);
-       FREE(untag_ptr(_res));
-       CResult_PublicKeySecp256k1ErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg) {
-       LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
-       *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(arg);
-       return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_PublicKeySecp256k1ErrorZ* arg_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(arg);
-       int64_t ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg_conv);
-       return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_PublicKeySecp256k1ErrorZ* orig_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(orig);
-       LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
-       *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(orig_conv);
-       return tag_ptr(ret_conv, true);
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        LDKNodeId o_conv;
        o_conv.inner = untag_ptr(o);
@@ -26088,6 +28400,55 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
+       LDKPublicKey o_ref;
+       CHECK((*env)->GetArrayLength(env, o) == 33);
+       (*env)->GetByteArrayRegion(env, o, 0, 33, o_ref.compressed_form);
+       LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
+       *ret_conv = CResult_PublicKeySecp256k1ErrorZ_ok(o_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
+       LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
+       *ret_conv = CResult_PublicKeySecp256k1ErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_PublicKeySecp256k1ErrorZ* o_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_PublicKeySecp256k1ErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_PublicKeySecp256k1ErrorZ _res_conv = *(LDKCResult_PublicKeySecp256k1ErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_PublicKeySecp256k1ErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg) {
+       LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
+       *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_PublicKeySecp256k1ErrorZ* arg_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_PublicKeySecp256k1ErrorZ* orig_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(orig);
+       LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
+       *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1NetworkUpdateZ_1some(JNIEnv *env, jclass clz, int64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -26873,6 +29234,34 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1SocketAddres
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ");
+       *ret_conv = CResult_u64ShortChannelIdErrorZ_ok(o);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKShortChannelIdError e_conv = LDKShortChannelIdError_from_java(env, e);
+       LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ");
+       *ret_conv = CResult_u64ShortChannelIdErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_u64ShortChannelIdErrorZ* o_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_u64ShortChannelIdErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_u64ShortChannelIdErrorZ _res_conv = *(LDKCResult_u64ShortChannelIdErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_u64ShortChannelIdErrorZ_free(_res_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        LDKPendingHTLCInfo o_conv;
        o_conv.inner = untag_ptr(o);
@@ -26889,8 +29278,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInb
        e_conv.inner = untag_ptr(e);
        e_conv.is_owned = ptr_is_owned(e);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       // WARNING: we need a move here but no clone is available for LDKInboundHTLCErr
-       
+       e_conv = InboundHTLCErr_clone(&e_conv);
        LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ");
        *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -26911,6 +29299,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboun
        CResult_PendingHTLCInfoInboundHTLCErrZ_free(_res_conv);
 }
 
+static inline uint64_t CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR arg) {
+       LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ");
+       *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_PendingHTLCInfoInboundHTLCErrZ* arg_conv = (LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_PendingHTLCInfoInboundHTLCErrZ* orig_conv = (LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)untag_ptr(orig);
+       LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ");
+       *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1HTLCOutputInCommitmentZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
        LDKCVec_HTLCOutputInCommitmentZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
@@ -27150,6 +29556,53 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1UtxoZNoneZ_1
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1some(JNIEnv *env, jclass clz, int64_t o) {
+       void* o_ptr = untag_ptr(o);
+       CHECK_ACCESS(o_ptr);
+       LDKPaymentContext o_conv = *(LDKPaymentContext*)(o_ptr);
+       o_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(o));
+       LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ");
+       *ret_copy = COption_PaymentContextZ_some(o_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1none(JNIEnv *env, jclass clz) {
+       LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ");
+       *ret_copy = COption_PaymentContextZ_none();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCOption_PaymentContextZ _res_conv = *(LDKCOption_PaymentContextZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       COption_PaymentContextZ_free(_res_conv);
+}
+
+static inline uint64_t COption_PaymentContextZ_clone_ptr(LDKCOption_PaymentContextZ *NONNULL_PTR arg) {
+       LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ");
+       *ret_copy = COption_PaymentContextZ_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCOption_PaymentContextZ* arg_conv = (LDKCOption_PaymentContextZ*)untag_ptr(arg);
+       int64_t ret_conv = COption_PaymentContextZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCOption_PaymentContextZ* orig_conv = (LDKCOption_PaymentContextZ*)untag_ptr(orig);
+       LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ");
+       *ret_copy = COption_PaymentContextZ_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 static inline uint64_t C2Tuple_u64u16Z_clone_ptr(LDKC2Tuple_u64u16Z *NONNULL_PTR arg) {
        LDKC2Tuple_u64u16Z* ret_conv = MALLOC(sizeof(LDKC2Tuple_u64u16Z), "LDKC2Tuple_u64u16Z");
        *ret_conv = C2Tuple_u64u16Z_clone(arg);
@@ -27274,55 +29727,57 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ChannelShutdownSta
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
-       LDKThirtyTwoBytes o_ref;
-       CHECK((*env)->GetArrayLength(env, o) == 32);
-       (*env)->GetByteArrayRegion(env, o, 0, 32, o_ref.data);
-       LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
-       *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_ok(o_ref);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKChannelId o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = ChannelId_clone(&o_conv);
+       LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ");
+       *ret_conv = CResult_ChannelIdAPIErrorZ_ok(o_conv);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        void* e_ptr = untag_ptr(e);
        CHECK_ACCESS(e_ptr);
        LDKAPIError e_conv = *(LDKAPIError*)(e_ptr);
        e_conv = APIError_clone((LDKAPIError*)untag_ptr(e));
-       LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
-       *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_err(e_conv);
+       LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ");
+       *ret_conv = CResult_ChannelIdAPIErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKCResult_ThirtyTwoBytesAPIErrorZ* o_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(o);
-       jboolean ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o_conv);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_ChannelIdAPIErrorZ* o_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_ChannelIdAPIErrorZ_is_ok(o_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if (!ptr_is_owned(_res)) return;
        void* _res_ptr = untag_ptr(_res);
        CHECK_ACCESS(_res_ptr);
-       LDKCResult_ThirtyTwoBytesAPIErrorZ _res_conv = *(LDKCResult_ThirtyTwoBytesAPIErrorZ*)(_res_ptr);
+       LDKCResult_ChannelIdAPIErrorZ _res_conv = *(LDKCResult_ChannelIdAPIErrorZ*)(_res_ptr);
        FREE(untag_ptr(_res));
-       CResult_ThirtyTwoBytesAPIErrorZ_free(_res_conv);
+       CResult_ChannelIdAPIErrorZ_free(_res_conv);
 }
 
-static inline uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg) {
-       LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
-       *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(arg);
+static inline uint64_t CResult_ChannelIdAPIErrorZ_clone_ptr(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR arg) {
+       LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ");
+       *ret_conv = CResult_ChannelIdAPIErrorZ_clone(arg);
        return tag_ptr(ret_conv, true);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ThirtyTwoBytesAPIErrorZ* arg_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(arg);
-       int64_t ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelIdAPIErrorZ* arg_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_ChannelIdAPIErrorZ_clone_ptr(arg_conv);
        return ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_ThirtyTwoBytesAPIErrorZ* orig_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(orig);
-       LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
-       *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ChannelIdAPIErrorZ* orig_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(orig);
+       LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ");
+       *ret_conv = CResult_ChannelIdAPIErrorZ_clone(orig_conv);
        return tag_ptr(ret_conv, true);
 }
 
@@ -27719,63 +30174,136 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1Thi
        return tag_ptr(ret_conv, true);
 }
 
-static inline uint64_t C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR arg) {
-       LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ");
-       *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(arg);
+static inline uint64_t C2Tuple_ChannelIdPublicKeyZ_clone_ptr(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR arg) {
+       LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ");
+       *ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone(arg);
        return tag_ptr(ret_conv, true);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* arg_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(arg);
-       int64_t ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(arg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKC2Tuple_ChannelIdPublicKeyZ* arg_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(arg);
+       int64_t ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone_ptr(arg_conv);
        return ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* orig_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(orig);
-       LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ");
-       *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKC2Tuple_ChannelIdPublicKeyZ* orig_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(orig);
+       LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ");
+       *ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone(orig_conv);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int8_tArray b) {
-       LDKThirtyTwoBytes a_ref;
-       CHECK((*env)->GetArrayLength(env, a) == 32);
-       (*env)->GetByteArrayRegion(env, a, 0, 32, a_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
+       LDKChannelId a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv = ChannelId_clone(&a_conv);
        LDKPublicKey b_ref;
        CHECK((*env)->GetArrayLength(env, b) == 33);
        (*env)->GetByteArrayRegion(env, b, 0, 33, b_ref.compressed_form);
-       LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ");
-       *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_new(a_ref, b_ref);
+       LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ");
+       *ret_conv = C2Tuple_ChannelIdPublicKeyZ_new(a_conv, b_ref);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if (!ptr_is_owned(_res)) return;
        void* _res_ptr = untag_ptr(_res);
        CHECK_ACCESS(_res_ptr);
-       LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(_res_ptr);
+       LDKC2Tuple_ChannelIdPublicKeyZ _res_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(_res_ptr);
        FREE(untag_ptr(_res));
-       C2Tuple_ThirtyTwoBytesPublicKeyZ_free(_res_conv);
+       C2Tuple_ChannelIdPublicKeyZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1ThirtyTwoBytesPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ _res_constr;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1ChannelIdPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_C2Tuple_ChannelIdPublicKeyZZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ Elements");
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t j = 0; j < _res_constr.datalen; j++) {
-               int64_t _res_conv_35 = _res_vals[j];
-               void* _res_conv_35_ptr = untag_ptr(_res_conv_35);
-               CHECK_ACCESS(_res_conv_35_ptr);
-               LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res_conv_35_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(_res_conv_35_ptr);
-               FREE(untag_ptr(_res_conv_35));
-               _res_constr.data[j] = _res_conv_35_conv;
+       for (size_t e = 0; e < _res_constr.datalen; e++) {
+               int64_t _res_conv_30 = _res_vals[e];
+               void* _res_conv_30_ptr = untag_ptr(_res_conv_30);
+               CHECK_ACCESS(_res_conv_30_ptr);
+               LDKC2Tuple_ChannelIdPublicKeyZ _res_conv_30_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(_res_conv_30_ptr);
+               FREE(untag_ptr(_res_conv_30));
+               _res_constr.data[e] = _res_conv_30_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+       CVec_C2Tuple_ChannelIdPublicKeyZZ_free(_res_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelIdZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_ChannelIdZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements");
+       else
+               _res_constr.data = NULL;
+       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
+       for (size_t l = 0; l < _res_constr.datalen; l++) {
+               int64_t _res_conv_11 = _res_vals[l];
+               LDKChannelId _res_conv_11_conv;
+               _res_conv_11_conv.inner = untag_ptr(_res_conv_11);
+               _res_conv_11_conv.is_owned = ptr_is_owned(_res_conv_11);
+               CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_11_conv);
+               _res_constr.data[l] = _res_conv_11_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(_res_constr);
+       CVec_ChannelIdZ_free(_res_constr);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKOfferWithDerivedMetadataBuilder o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = OfferWithDerivedMetadataBuilder_clone(&o_conv);
+       LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg) {
+       LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* arg_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* orig_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(orig);
+       LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1StrZ_1some(JNIEnv *env, jclass clz, jstring o) {
@@ -27822,52 +30350,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1StrZ_1clone(JNIEnv
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz) {
-       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
-       *ret_conv = CResult_NoneBolt12SemanticErrorZ_ok();
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
-       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
-       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
-       *ret_conv = CResult_NoneBolt12SemanticErrorZ_err(e_conv);
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKCResult_NoneBolt12SemanticErrorZ* o_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(o);
-       jboolean ret_conv = CResult_NoneBolt12SemanticErrorZ_is_ok(o_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if (!ptr_is_owned(_res)) return;
-       void* _res_ptr = untag_ptr(_res);
-       CHECK_ACCESS(_res_ptr);
-       LDKCResult_NoneBolt12SemanticErrorZ _res_conv = *(LDKCResult_NoneBolt12SemanticErrorZ*)(_res_ptr);
-       FREE(untag_ptr(_res));
-       CResult_NoneBolt12SemanticErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg) {
-       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
-       *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(arg);
-       return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NoneBolt12SemanticErrorZ* arg_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(arg);
-       int64_t ret_conv = CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg_conv);
-       return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_NoneBolt12SemanticErrorZ* orig_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(orig);
-       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
-       *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(orig_conv);
-       return tag_ptr(ret_conv, true);
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -27917,6 +30399,58 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwo
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
+       LDKThirtyTwoBytes o_ref;
+       CHECK((*env)->GetArrayLength(env, o) == 32);
+       (*env)->GetByteArrayRegion(env, o, 0, 32, o_ref.data);
+       LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
+       *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_ok(o_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKAPIError e_conv = *(LDKAPIError*)(e_ptr);
+       e_conv = APIError_clone((LDKAPIError*)untag_ptr(e));
+       LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
+       *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_ThirtyTwoBytesAPIErrorZ* o_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_ThirtyTwoBytesAPIErrorZ _res_conv = *(LDKCResult_ThirtyTwoBytesAPIErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_ThirtyTwoBytesAPIErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg) {
+       LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
+       *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ThirtyTwoBytesAPIErrorZ* arg_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ThirtyTwoBytesAPIErrorZ* orig_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(orig);
+       LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
+       *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1OffersMessageZ_1some(JNIEnv *env, jclass clz, int64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -29239,25 +31773,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CommitmentTransactionZ_1
        CVec_CommitmentTransactionZ_free(_res_constr);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
-       LDKCVec_TransactionZ _res_constr;
-       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTransaction), "LDKCVec_TransactionZ Elements");
-       else
-               _res_constr.data = NULL;
-       for (size_t i = 0; i < _res_constr.datalen; i++) {
-               int8_tArray _res_conv_8 = (*env)->GetObjectArrayElement(env, _res, i);
-               LDKTransaction _res_conv_8_ref;
-               _res_conv_8_ref.datalen = (*env)->GetArrayLength(env, _res_conv_8);
-               _res_conv_8_ref.data = MALLOC(_res_conv_8_ref.datalen, "LDKTransaction Bytes");
-               (*env)->GetByteArrayRegion(env, _res_conv_8, 0, _res_conv_8_ref.datalen, _res_conv_8_ref.data);
-               _res_conv_8_ref.data_is_owned = true;
-               _res_constr.data[i] = _res_conv_8_ref;
-       }
-       CVec_TransactionZ_free(_res_constr);
-}
-
 static inline uint64_t C2Tuple_u32TxOutZ_clone_ptr(LDKC2Tuple_u32TxOutZ *NONNULL_PTR arg) {
        LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
        *ret_conv = C2Tuple_u32TxOutZ_clone(arg);
@@ -29958,64 +32473,24 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1SocketAddressZ_1cl
        return ret_ref;
 }
 
-static inline uint64_t C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR arg) {
-       LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ");
-       *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(arg);
-       return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* arg_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(arg);
-       int64_t ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(arg_conv);
-       return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* orig_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(orig);
-       LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ");
-       *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(orig_conv);
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
-       LDKPublicKey a_ref;
-       CHECK((*env)->GetArrayLength(env, a) == 33);
-       (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form);
-       void* b_ptr = untag_ptr(b);
-       CHECK_ACCESS(b_ptr);
-       LDKCOption_SocketAddressZ b_conv = *(LDKCOption_SocketAddressZ*)(b_ptr);
-       b_conv = COption_SocketAddressZ_clone((LDKCOption_SocketAddressZ*)untag_ptr(b));
-       LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ");
-       *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_new(a_ref, b_conv);
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if (!ptr_is_owned(_res)) return;
-       void* _res_ptr = untag_ptr(_res);
-       CHECK_ACCESS(_res_ptr);
-       LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res_conv = *(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)(_res_ptr);
-       FREE(untag_ptr(_res));
-       C2Tuple_PublicKeyCOption_SocketAddressZZ_free(_res_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1PublicKeyCOption_1SocketAddressZZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ _res_constr;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PeerDetailsZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_PeerDetailsZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPeerDetails), "LDKCVec_PeerDetailsZ Elements");
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t r = 0; r < _res_constr.datalen; r++) {
-               int64_t _res_conv_43 = _res_vals[r];
-               void* _res_conv_43_ptr = untag_ptr(_res_conv_43);
-               CHECK_ACCESS(_res_conv_43_ptr);
-               LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res_conv_43_conv = *(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)(_res_conv_43_ptr);
-               FREE(untag_ptr(_res_conv_43));
-               _res_constr.data[r] = _res_conv_43_conv;
+       for (size_t n = 0; n < _res_constr.datalen; n++) {
+               int64_t _res_conv_13 = _res_vals[n];
+               LDKPeerDetails _res_conv_13_conv;
+               _res_conv_13_conv.inner = untag_ptr(_res_conv_13);
+               _res_conv_13_conv.is_owned = ptr_is_owned(_res_conv_13);
+               CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_13_conv);
+               _res_constr.data[n] = _res_conv_13_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(_res_constr);
+       CVec_PeerDetailsZ_free(_res_constr);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
@@ -30457,6 +32932,108 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwo
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKUnsignedInvoiceRequest o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = UnsignedInvoiceRequest_clone(&o_conv);
+       LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
+       *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
+       *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* o_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ _res_conv = *(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg) {
+       LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
+       *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* arg_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* orig_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(orig);
+       LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
+       *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKInvoiceRequest o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = InvoiceRequest_clone(&o_conv);
+       LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_InvoiceRequestBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_InvoiceRequestBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_InvoiceRequestBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg) {
+       LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_InvoiceRequestBolt12SemanticErrorZ* arg_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_InvoiceRequestBolt12SemanticErrorZ* orig_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(orig);
+       LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1SecretKeyZ_1some(JNIEnv *env, jclass clz, int8_tArray o) {
        LDKSecretKey o_ref;
        CHECK((*env)->GetArrayLength(env, o) == 32);
@@ -30503,6 +33080,40 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1SecretKeyZ_1clone(
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKInvoiceWithExplicitSigningPubkeyBuilder o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+       
+       LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceRequestNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        LDKVerifiedInvoiceRequest o_conv;
        o_conv.inner = untag_ptr(o);
@@ -30553,6 +33164,94 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceReq
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKInvoiceWithDerivedSigningPubkeyBuilder o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+       
+       LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKInvoiceRequestFields o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = InvoiceRequestFields_clone(&o_conv);
+       LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ");
+       *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ");
+       *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_InvoiceRequestFieldsDecodeErrorZ* o_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_InvoiceRequestFieldsDecodeErrorZ _res_conv = *(LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_InvoiceRequestFieldsDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ");
+       *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_InvoiceRequestFieldsDecodeErrorZ* arg_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_InvoiceRequestFieldsDecodeErrorZ* orig_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ");
+       *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_COption_1NoneZ_1some(JNIEnv *env, jclass clz) {
        jclass ret_conv = LDKCOption_NoneZ_to_java(env, COption_NoneZ_some());
        return ret_conv;
@@ -30587,6 +33286,52 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1WitnessZ_1free(JNIEnv *e
        CVec_WitnessZ_free(_res_constr);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1some(JNIEnv *env, jclass clz, int8_tArray o) {
+       LDKECDSASignature o_ref;
+       CHECK((*env)->GetArrayLength(env, o) == 64);
+       (*env)->GetByteArrayRegion(env, o, 0, 64, o_ref.compact_form);
+       LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ");
+       *ret_copy = COption_ECDSASignatureZ_some(o_ref);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1none(JNIEnv *env, jclass clz) {
+       LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ");
+       *ret_copy = COption_ECDSASignatureZ_none();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCOption_ECDSASignatureZ _res_conv = *(LDKCOption_ECDSASignatureZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       COption_ECDSASignatureZ_free(_res_conv);
+}
+
+static inline uint64_t COption_ECDSASignatureZ_clone_ptr(LDKCOption_ECDSASignatureZ *NONNULL_PTR arg) {
+       LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ");
+       *ret_copy = COption_ECDSASignatureZ_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCOption_ECDSASignatureZ* arg_conv = (LDKCOption_ECDSASignatureZ*)untag_ptr(arg);
+       int64_t ret_conv = COption_ECDSASignatureZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCOption_ECDSASignatureZ* orig_conv = (LDKCOption_ECDSASignatureZ*)untag_ptr(orig);
+       LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ");
+       *ret_copy = COption_ECDSASignatureZ_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1i64Z_1some(JNIEnv *env, jclass clz, int64_t o) {
        LDKCOption_i64Z *ret_copy = MALLOC(sizeof(LDKCOption_i64Z), "LDKCOption_i64Z");
        *ret_copy = COption_i64Z_some(o);
@@ -34500,6 +37245,25 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownScriptInva
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
+       LDKCVec_TransactionZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTransaction), "LDKCVec_TransactionZ Elements");
+       else
+               _res_constr.data = NULL;
+       for (size_t i = 0; i < _res_constr.datalen; i++) {
+               int8_tArray _res_conv_8 = (*env)->GetObjectArrayElement(env, _res, i);
+               LDKTransaction _res_conv_8_ref;
+               _res_conv_8_ref.datalen = (*env)->GetArrayLength(env, _res_conv_8);
+               _res_conv_8_ref.data = MALLOC(_res_conv_8_ref.datalen, "LDKTransaction Bytes");
+               (*env)->GetByteArrayRegion(env, _res_conv_8, 0, _res_conv_8_ref.datalen, _res_conv_8_ref.data);
+               _res_conv_8_ref.data_is_owned = true;
+               _res_constr.data[i] = _res_conv_8_ref;
+       }
+       CVec_TransactionZ_free(_res_constr);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentPurposeDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -36012,6 +38776,60 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UntrustedStringDec
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKChannelId o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = ChannelId_clone(&o_conv);
+       LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ");
+       *ret_conv = CResult_ChannelIdDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ");
+       *ret_conv = CResult_ChannelIdDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_ChannelIdDecodeErrorZ* o_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_ChannelIdDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_ChannelIdDecodeErrorZ _res_conv = *(LDKCResult_ChannelIdDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_ChannelIdDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_ChannelIdDecodeErrorZ_clone_ptr(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ");
+       *ret_conv = CResult_ChannelIdDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelIdDecodeErrorZ* arg_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_ChannelIdDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ChannelIdDecodeErrorZ* orig_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ");
+       *ret_conv = CResult_ChannelIdDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 static inline uint64_t C2Tuple__u832u16Z_clone_ptr(LDKC2Tuple__u832u16Z *NONNULL_PTR arg) {
        LDKC2Tuple__u832u16Z* ret_conv = MALLOC(sizeof(LDKC2Tuple__u832u16Z), "LDKC2Tuple__u832u16Z");
        *ret_conv = C2Tuple__u832u16Z_clone(arg);
@@ -36156,6 +38974,268 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentConstraints
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       void* o_ptr = untag_ptr(o);
+       CHECK_ACCESS(o_ptr);
+       LDKPaymentContext o_conv = *(LDKPaymentContext*)(o_ptr);
+       o_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(o));
+       LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ");
+       *ret_conv = CResult_PaymentContextDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ");
+       *ret_conv = CResult_PaymentContextDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_PaymentContextDecodeErrorZ* o_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_PaymentContextDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_PaymentContextDecodeErrorZ _res_conv = *(LDKCResult_PaymentContextDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_PaymentContextDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_PaymentContextDecodeErrorZ_clone_ptr(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ");
+       *ret_conv = CResult_PaymentContextDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_PaymentContextDecodeErrorZ* arg_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_PaymentContextDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_PaymentContextDecodeErrorZ* orig_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ");
+       *ret_conv = CResult_PaymentContextDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKUnknownPaymentContext o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = UnknownPaymentContext_clone(&o_conv);
+       LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ");
+       *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ");
+       *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_UnknownPaymentContextDecodeErrorZ* o_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_UnknownPaymentContextDecodeErrorZ _res_conv = *(LDKCResult_UnknownPaymentContextDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_UnknownPaymentContextDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ");
+       *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UnknownPaymentContextDecodeErrorZ* arg_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_UnknownPaymentContextDecodeErrorZ* orig_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ");
+       *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKBolt12OfferContext o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = Bolt12OfferContext_clone(&o_conv);
+       LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ");
+       *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ");
+       *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_Bolt12OfferContextDecodeErrorZ* o_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_Bolt12OfferContextDecodeErrorZ _res_conv = *(LDKCResult_Bolt12OfferContextDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_Bolt12OfferContextDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ");
+       *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_Bolt12OfferContextDecodeErrorZ* arg_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_Bolt12OfferContextDecodeErrorZ* orig_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ");
+       *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKBolt12RefundContext o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = Bolt12RefundContext_clone(&o_conv);
+       LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ");
+       *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ");
+       *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_Bolt12RefundContextDecodeErrorZ* o_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_Bolt12RefundContextDecodeErrorZ _res_conv = *(LDKCResult_Bolt12RefundContextDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_Bolt12RefundContextDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ");
+       *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_Bolt12RefundContextDecodeErrorZ* arg_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_Bolt12RefundContextDecodeErrorZ* orig_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ");
+       *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, jstring o) {
+       LDKStr o_conv = java_to_owned_str(env, o);
+       LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
+       *ret_conv = CResult_StrSecp256k1ErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
+       LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
+       *ret_conv = CResult_StrSecp256k1ErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_StrSecp256k1ErrorZ* o_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_StrSecp256k1ErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_StrSecp256k1ErrorZ _res_conv = *(LDKCResult_StrSecp256k1ErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_StrSecp256k1ErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_StrSecp256k1ErrorZ_clone_ptr(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR arg) {
+       LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
+       *ret_conv = CResult_StrSecp256k1ErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_StrSecp256k1ErrorZ* arg_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_StrSecp256k1ErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_StrSecp256k1ErrorZ* orig_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(orig);
+       LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
+       *ret_conv = CResult_StrSecp256k1ErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 static inline uint64_t C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR arg) {
        LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ");
        *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(arg);
@@ -36251,53 +39331,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwo
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, jstring o) {
-       LDKStr o_conv = java_to_owned_str(env, o);
-       LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
-       *ret_conv = CResult_StrSecp256k1ErrorZ_ok(o_conv);
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
-       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
-       LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
-       *ret_conv = CResult_StrSecp256k1ErrorZ_err(e_conv);
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKCResult_StrSecp256k1ErrorZ* o_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(o);
-       jboolean ret_conv = CResult_StrSecp256k1ErrorZ_is_ok(o_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if (!ptr_is_owned(_res)) return;
-       void* _res_ptr = untag_ptr(_res);
-       CHECK_ACCESS(_res_ptr);
-       LDKCResult_StrSecp256k1ErrorZ _res_conv = *(LDKCResult_StrSecp256k1ErrorZ*)(_res_ptr);
-       FREE(untag_ptr(_res));
-       CResult_StrSecp256k1ErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_StrSecp256k1ErrorZ_clone_ptr(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR arg) {
-       LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
-       *ret_conv = CResult_StrSecp256k1ErrorZ_clone(arg);
-       return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_StrSecp256k1ErrorZ* arg_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(arg);
-       int64_t ret_conv = CResult_StrSecp256k1ErrorZ_clone_ptr(arg_conv);
-       return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_StrSecp256k1ErrorZ* orig_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(orig);
-       LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
-       *ret_conv = CResult_StrSecp256k1ErrorZ_clone(orig_conv);
-       return tag_ptr(ret_conv, true);
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutUtxoLookupErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -36428,6 +39461,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOni
        CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(_res_conv);
 }
 
+static inline uint64_t CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR arg) {
+       LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ");
+       *ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* arg_conv = (LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* orig_conv = (LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)untag_ptr(orig);
+       LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ");
+       *ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -36459,6 +39510,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1fre
        CResult_PeeledOnionNoneZ_free(_res_conv);
 }
 
+static inline uint64_t CResult_PeeledOnionNoneZ_clone_ptr(LDKCResult_PeeledOnionNoneZ *NONNULL_PTR arg) {
+       LDKCResult_PeeledOnionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PeeledOnionNoneZ), "LDKCResult_PeeledOnionNoneZ");
+       *ret_conv = CResult_PeeledOnionNoneZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_PeeledOnionNoneZ* arg_conv = (LDKCResult_PeeledOnionNoneZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_PeeledOnionNoneZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_PeeledOnionNoneZ* orig_conv = (LDKCResult_PeeledOnionNoneZ*)untag_ptr(orig);
+       LDKCResult_PeeledOnionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PeeledOnionNoneZ), "LDKCResult_PeeledOnionNoneZ");
+       *ret_conv = CResult_PeeledOnionNoneZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -36494,6 +39563,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ
        CResult_SendSuccessSendErrorZ_free(_res_conv);
 }
 
+static inline uint64_t CResult_SendSuccessSendErrorZ_clone_ptr(LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR arg) {
+       LDKCResult_SendSuccessSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SendSuccessSendErrorZ), "LDKCResult_SendSuccessSendErrorZ");
+       *ret_conv = CResult_SendSuccessSendErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_SendSuccessSendErrorZ* arg_conv = (LDKCResult_SendSuccessSendErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_SendSuccessSendErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_SendSuccessSendErrorZ* orig_conv = (LDKCResult_SendSuccessSendErrorZ*)untag_ptr(orig);
+       LDKCResult_SendSuccessSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SendSuccessSendErrorZ), "LDKCResult_SendSuccessSendErrorZ");
+       *ret_conv = CResult_SendSuccessSendErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedPathNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        LDKBlindedPath o_conv;
        o_conv.inner = untag_ptr(o);
@@ -36775,6 +39862,261 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceErrorDecode
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKTrackedSpendableOutput o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = TrackedSpendableOutput_clone(&o_conv);
+       LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ");
+       *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ");
+       *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_TrackedSpendableOutputDecodeErrorZ* o_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_TrackedSpendableOutputDecodeErrorZ _res_conv = *(LDKCResult_TrackedSpendableOutputDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_TrackedSpendableOutputDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ");
+       *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_TrackedSpendableOutputDecodeErrorZ* arg_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_TrackedSpendableOutputDecodeErrorZ* orig_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ");
+       *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       void* o_ptr = untag_ptr(o);
+       CHECK_ACCESS(o_ptr);
+       LDKOutputSpendStatus o_conv = *(LDKOutputSpendStatus*)(o_ptr);
+       o_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(o));
+       LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ");
+       *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ");
+       *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_OutputSpendStatusDecodeErrorZ* o_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_OutputSpendStatusDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_OutputSpendStatusDecodeErrorZ _res_conv = *(LDKCResult_OutputSpendStatusDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_OutputSpendStatusDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ");
+       *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_OutputSpendStatusDecodeErrorZ* arg_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_OutputSpendStatusDecodeErrorZ* orig_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ");
+       *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1some(JNIEnv *env, jclass clz, int64_t o) {
+       void* o_ptr = untag_ptr(o);
+       CHECK_ACCESS(o_ptr);
+       LDKFilter o_conv = *(LDKFilter*)(o_ptr);
+       if (o_conv.free == LDKFilter_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKFilter_JCalls_cloned(&o_conv);
+       }
+       LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ");
+       *ret_copy = COption_FilterZ_some(o_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1none(JNIEnv *env, jclass clz) {
+       LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ");
+       *ret_copy = COption_FilterZ_none();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCOption_FilterZ _res_conv = *(LDKCOption_FilterZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       COption_FilterZ_free(_res_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TrackedSpendableOutputZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_TrackedSpendableOutputZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTrackedSpendableOutput), "LDKCVec_TrackedSpendableOutputZ Elements");
+       else
+               _res_constr.data = NULL;
+       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
+       for (size_t y = 0; y < _res_constr.datalen; y++) {
+               int64_t _res_conv_24 = _res_vals[y];
+               LDKTrackedSpendableOutput _res_conv_24_conv;
+               _res_conv_24_conv.inner = untag_ptr(_res_conv_24);
+               _res_conv_24_conv.is_owned = ptr_is_owned(_res_conv_24);
+               CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_24_conv);
+               _res_constr.data[y] = _res_conv_24_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+       CVec_TrackedSpendableOutputZ_free(_res_constr);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKOutputSweeper o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       // WARNING: we need a move here but no clone is available for LDKOutputSweeper
+       
+       LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ");
+       *ret_conv = CResult_OutputSweeperDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ");
+       *ret_conv = CResult_OutputSweeperDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_OutputSweeperDecodeErrorZ* o_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_OutputSweeperDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_OutputSweeperDecodeErrorZ _res_conv = *(LDKCResult_OutputSweeperDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_OutputSweeperDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKBestBlock a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv = BestBlock_clone(&a_conv);
+       LDKOutputSweeper b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       // WARNING: we need a move here but no clone is available for LDKOutputSweeper
+       
+       LDKC2Tuple_BestBlockOutputSweeperZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BestBlockOutputSweeperZ), "LDKC2Tuple_BestBlockOutputSweeperZ");
+       *ret_conv = C2Tuple_BestBlockOutputSweeperZ_new(a_conv, b_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKC2Tuple_BestBlockOutputSweeperZ _res_conv = *(LDKC2Tuple_BestBlockOutputSweeperZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       C2Tuple_BestBlockOutputSweeperZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       void* o_ptr = untag_ptr(o);
+       CHECK_ACCESS(o_ptr);
+       LDKC2Tuple_BestBlockOutputSweeperZ o_conv = *(LDKC2Tuple_BestBlockOutputSweeperZ*)(o_ptr);
+       // WARNING: we may need a move here but no clone is available for LDKC2Tuple_BestBlockOutputSweeperZ
+       LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ");
+       *ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ");
+       *ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* o_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(_res_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        LDKDelayedPaymentBasepoint o_conv;
        o_conv.inner = untag_ptr(o);
@@ -37099,36 +40441,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecod
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1some(JNIEnv *env, jclass clz, int64_t o) {
-       void* o_ptr = untag_ptr(o);
-       CHECK_ACCESS(o_ptr);
-       LDKFilter o_conv = *(LDKFilter*)(o_ptr);
-       if (o_conv.free == LDKFilter_JCalls_free) {
-               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
-               LDKFilter_JCalls_cloned(&o_conv);
-       }
-       LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ");
-       *ret_copy = COption_FilterZ_some(o_conv);
-       int64_t ret_ref = tag_ptr(ret_copy, true);
-       return ret_ref;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1none(JNIEnv *env, jclass clz) {
-       LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ");
-       *ret_copy = COption_FilterZ_none();
-       int64_t ret_ref = tag_ptr(ret_copy, true);
-       return ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if (!ptr_is_owned(_res)) return;
-       void* _res_ptr = untag_ptr(_res);
-       CHECK_ACCESS(_res_ptr);
-       LDKCOption_FilterZ _res_conv = *(LDKCOption_FilterZ*)(_res_ptr);
-       FREE(untag_ptr(_res));
-       COption_FilterZ_free(_res_conv);
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        LDKLockedChannelMonitor o_conv;
        o_conv.inner = untag_ptr(o);
@@ -37162,24 +40474,67 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorN
        CResult_LockedChannelMonitorNoneZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1OutPointZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_OutPointZ _res_constr;
+static inline uint64_t C2Tuple_OutPointChannelIdZ_clone_ptr(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR arg) {
+       LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ");
+       *ret_conv = C2Tuple_OutPointChannelIdZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKC2Tuple_OutPointChannelIdZ* arg_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(arg);
+       int64_t ret_conv = C2Tuple_OutPointChannelIdZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKC2Tuple_OutPointChannelIdZ* orig_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(orig);
+       LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ");
+       *ret_conv = C2Tuple_OutPointChannelIdZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKOutPoint a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv = OutPoint_clone(&a_conv);
+       LDKChannelId b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv = ChannelId_clone(&b_conv);
+       LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ");
+       *ret_conv = C2Tuple_OutPointChannelIdZ_new(a_conv, b_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKC2Tuple_OutPointChannelIdZ _res_conv = *(LDKC2Tuple_OutPointChannelIdZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       C2Tuple_OutPointChannelIdZ_free(_res_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1OutPointChannelIdZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_C2Tuple_OutPointChannelIdZZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKOutPoint), "LDKCVec_OutPointZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKCVec_C2Tuple_OutPointChannelIdZZ Elements");
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t k = 0; k < _res_constr.datalen; k++) {
-               int64_t _res_conv_10 = _res_vals[k];
-               LDKOutPoint _res_conv_10_conv;
-               _res_conv_10_conv.inner = untag_ptr(_res_conv_10);
-               _res_conv_10_conv.is_owned = ptr_is_owned(_res_conv_10);
-               CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_10_conv);
-               _res_constr.data[k] = _res_conv_10_conv;
+       for (size_t d = 0; d < _res_constr.datalen; d++) {
+               int64_t _res_conv_29 = _res_vals[d];
+               void* _res_conv_29_ptr = untag_ptr(_res_conv_29);
+               CHECK_ACCESS(_res_conv_29_ptr);
+               LDKC2Tuple_OutPointChannelIdZ _res_conv_29_conv = *(LDKC2Tuple_OutPointChannelIdZ*)(_res_conv_29_ptr);
+               FREE(untag_ptr(_res_conv_29));
+               _res_constr.data[d] = _res_conv_29_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_OutPointZ_free(_res_constr);
+       CVec_C2Tuple_OutPointChannelIdZZ_free(_res_constr);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorUpdateIdZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
@@ -37679,6 +41034,19 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimite
        return ret_arr;
 }
 
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimited_1as_1transaction(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKTransactionU16LenLimited this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKTransaction ret_var = TransactionU16LenLimited_as_transaction(&this_arg_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       Transaction_free(ret_var);
+       return ret_arr;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimited_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKTransactionU16LenLimited obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -37911,6 +41279,55 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorUpdatingPersister_1a
        return tag_ptr(ret_ret, true);
 }
 
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKShortChannelIdError* orig_conv = (LDKShortChannelIdError*)untag_ptr(orig);
+       jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_clone(orig_conv));
+       return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1block_1overflow(JNIEnv *env, jclass clz) {
+       jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_block_overflow());
+       return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1tx_1index_1overflow(JNIEnv *env, jclass clz) {
+       jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_tx_index_overflow());
+       return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1vout_1index_1overflow(JNIEnv *env, jclass clz) {
+       jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_vout_index_overflow());
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKShortChannelIdError* a_conv = (LDKShortChannelIdError*)untag_ptr(a);
+       LDKShortChannelIdError* b_conv = (LDKShortChannelIdError*)untag_ptr(b);
+       jboolean ret_conv = ShortChannelIdError_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_block_1from_1scid(JNIEnv *env, jclass clz, int64_t short_channel_id) {
+       int32_t ret_conv = block_from_scid(short_channel_id);
+       return ret_conv;
+}
+
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_tx_1index_1from_1scid(JNIEnv *env, jclass clz, int64_t short_channel_id) {
+       int32_t ret_conv = tx_index_from_scid(short_channel_id);
+       return ret_conv;
+}
+
+JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_vout_1from_1scid(JNIEnv *env, jclass clz, int64_t short_channel_id) {
+       int16_t ret_conv = vout_from_scid(short_channel_id);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_scid_1from_1parts(JNIEnv *env, jclass clz, int64_t block, int64_t tx_index, int64_t vout_index) {
+       LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ");
+       *ret_conv = scid_from_parts(block, tx_index, vout_index);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UntrustedString_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKUntrustedString this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -38067,53 +41484,647 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PrintableString_1new(JNIEnv
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       if (!ptr_is_owned(this_ptr)) return;
-       void* this_ptr_ptr = untag_ptr(this_ptr);
-       CHECK_ACCESS(this_ptr_ptr);
-       LDKFutureCallback this_ptr_conv = *(LDKFutureCallback*)(this_ptr_ptr);
-       FREE(untag_ptr(this_ptr));
-       FutureCallback_free(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
-       LDKFuture this_obj_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKTrackedSpendableOutput this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
        this_obj_conv.is_owned = ptr_is_owned(this_obj);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
-       Future_free(this_obj_conv);
+       TrackedSpendableOutput_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1descriptor(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKTrackedSpendableOutput this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKSpendableOutputDescriptor *ret_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor");
+       *ret_copy = TrackedSpendableOutput_get_descriptor(&this_ptr_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1descriptor(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKTrackedSpendableOutput this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       void* val_ptr = untag_ptr(val);
+       CHECK_ACCESS(val_ptr);
+       LDKSpendableOutputDescriptor val_conv = *(LDKSpendableOutputDescriptor*)(val_ptr);
+       val_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(val));
+       TrackedSpendableOutput_set_descriptor(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKTrackedSpendableOutput this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKChannelId ret_var = TrackedSpendableOutput_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKTrackedSpendableOutput this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       TrackedSpendableOutput_set_channel_id(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1status(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKTrackedSpendableOutput this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+       *ret_copy = TrackedSpendableOutput_get_status(&this_ptr_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1status(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKTrackedSpendableOutput this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       void* val_ptr = untag_ptr(val);
+       CHECK_ACCESS(val_ptr);
+       LDKOutputSpendStatus val_conv = *(LDKOutputSpendStatus*)(val_ptr);
+       val_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(val));
+       TrackedSpendableOutput_set_status(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1new(JNIEnv *env, jclass clz, int64_t descriptor_arg, int64_t channel_id_arg, int64_t status_arg) {
+       void* descriptor_arg_ptr = untag_ptr(descriptor_arg);
+       CHECK_ACCESS(descriptor_arg_ptr);
+       LDKSpendableOutputDescriptor descriptor_arg_conv = *(LDKSpendableOutputDescriptor*)(descriptor_arg_ptr);
+       descriptor_arg_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptor_arg));
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+       void* status_arg_ptr = untag_ptr(status_arg);
+       CHECK_ACCESS(status_arg_ptr);
+       LDKOutputSpendStatus status_arg_conv = *(LDKOutputSpendStatus*)(status_arg_ptr);
+       status_arg_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(status_arg));
+       LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_new(descriptor_arg_conv, channel_id_arg_conv, status_arg_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-static inline uint64_t Future_clone_ptr(LDKFuture *NONNULL_PTR arg) {
-       LDKFuture ret_var = Future_clone(arg);
+static inline uint64_t TrackedSpendableOutput_clone_ptr(LDKTrackedSpendableOutput *NONNULL_PTR arg) {
+       LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_clone(arg);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Future_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKFuture arg_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKTrackedSpendableOutput arg_conv;
        arg_conv.inner = untag_ptr(arg);
        arg_conv.is_owned = ptr_is_owned(arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
        arg_conv.is_owned = false;
-       int64_t ret_conv = Future_clone_ptr(&arg_conv);
+       int64_t ret_conv = TrackedSpendableOutput_clone_ptr(&arg_conv);
        return ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Future_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKFuture orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKTrackedSpendableOutput orig_conv;
        orig_conv.inner = untag_ptr(orig);
        orig_conv.is_owned = ptr_is_owned(orig);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
        orig_conv.is_owned = false;
-       LDKFuture ret_var = Future_clone(&orig_conv);
+       LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_clone(&orig_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKTrackedSpendableOutput a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKTrackedSpendableOutput b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = TrackedSpendableOutput_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1is_1spent_1in(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray tx) {
+       LDKTrackedSpendableOutput this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKTransaction tx_ref;
+       tx_ref.datalen = (*env)->GetArrayLength(env, tx);
+       tx_ref.data = MALLOC(tx_ref.datalen, "LDKTransaction Bytes");
+       (*env)->GetByteArrayRegion(env, tx, 0, tx_ref.datalen, tx_ref.data);
+       tx_ref.data_is_owned = true;
+       jboolean ret_conv = TrackedSpendableOutput_is_spent_in(&this_arg_conv, tx_ref);
+       return ret_conv;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKTrackedSpendableOutput obj_conv;
+       obj_conv.inner = untag_ptr(obj);
+       obj_conv.is_owned = ptr_is_owned(obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = TrackedSpendableOutput_write(&obj_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ");
+       *ret_conv = TrackedSpendableOutput_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKOutputSpendStatus this_ptr_conv = *(LDKOutputSpendStatus*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       OutputSpendStatus_free(this_ptr_conv);
+}
+
+static inline uint64_t OutputSpendStatus_clone_ptr(LDKOutputSpendStatus *NONNULL_PTR arg) {
+       LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+       *ret_copy = OutputSpendStatus_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKOutputSpendStatus* arg_conv = (LDKOutputSpendStatus*)untag_ptr(arg);
+       int64_t ret_conv = OutputSpendStatus_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKOutputSpendStatus* orig_conv = (LDKOutputSpendStatus*)untag_ptr(orig);
+       LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+       *ret_copy = OutputSpendStatus_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1initial_1broadcast(JNIEnv *env, jclass clz, int64_t delayed_until_height) {
+       void* delayed_until_height_ptr = untag_ptr(delayed_until_height);
+       CHECK_ACCESS(delayed_until_height_ptr);
+       LDKCOption_u32Z delayed_until_height_conv = *(LDKCOption_u32Z*)(delayed_until_height_ptr);
+       delayed_until_height_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(delayed_until_height));
+       LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+       *ret_copy = OutputSpendStatus_pending_initial_broadcast(delayed_until_height_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1first_1confirmation(JNIEnv *env, jclass clz, int8_tArray first_broadcast_hash, int32_t latest_broadcast_height, int8_tArray latest_spending_tx) {
+       LDKThirtyTwoBytes first_broadcast_hash_ref;
+       CHECK((*env)->GetArrayLength(env, first_broadcast_hash) == 32);
+       (*env)->GetByteArrayRegion(env, first_broadcast_hash, 0, 32, first_broadcast_hash_ref.data);
+       LDKTransaction latest_spending_tx_ref;
+       latest_spending_tx_ref.datalen = (*env)->GetArrayLength(env, latest_spending_tx);
+       latest_spending_tx_ref.data = MALLOC(latest_spending_tx_ref.datalen, "LDKTransaction Bytes");
+       (*env)->GetByteArrayRegion(env, latest_spending_tx, 0, latest_spending_tx_ref.datalen, latest_spending_tx_ref.data);
+       latest_spending_tx_ref.data_is_owned = true;
+       LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+       *ret_copy = OutputSpendStatus_pending_first_confirmation(first_broadcast_hash_ref, latest_broadcast_height, latest_spending_tx_ref);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1threshold_1confirmations(JNIEnv *env, jclass clz, int8_tArray first_broadcast_hash, int32_t latest_broadcast_height, int8_tArray latest_spending_tx, int32_t confirmation_height, int8_tArray confirmation_hash) {
+       LDKThirtyTwoBytes first_broadcast_hash_ref;
+       CHECK((*env)->GetArrayLength(env, first_broadcast_hash) == 32);
+       (*env)->GetByteArrayRegion(env, first_broadcast_hash, 0, 32, first_broadcast_hash_ref.data);
+       LDKTransaction latest_spending_tx_ref;
+       latest_spending_tx_ref.datalen = (*env)->GetArrayLength(env, latest_spending_tx);
+       latest_spending_tx_ref.data = MALLOC(latest_spending_tx_ref.datalen, "LDKTransaction Bytes");
+       (*env)->GetByteArrayRegion(env, latest_spending_tx, 0, latest_spending_tx_ref.datalen, latest_spending_tx_ref.data);
+       latest_spending_tx_ref.data_is_owned = true;
+       LDKThirtyTwoBytes confirmation_hash_ref;
+       CHECK((*env)->GetArrayLength(env, confirmation_hash) == 32);
+       (*env)->GetByteArrayRegion(env, confirmation_hash, 0, 32, confirmation_hash_ref.data);
+       LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+       *ret_copy = OutputSpendStatus_pending_threshold_confirmations(first_broadcast_hash_ref, latest_broadcast_height, latest_spending_tx_ref, confirmation_height, confirmation_hash_ref);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKOutputSpendStatus* a_conv = (LDKOutputSpendStatus*)untag_ptr(a);
+       LDKOutputSpendStatus* b_conv = (LDKOutputSpendStatus*)untag_ptr(b);
+       jboolean ret_conv = OutputSpendStatus_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKOutputSpendStatus* obj_conv = (LDKOutputSpendStatus*)untag_ptr(obj);
+       LDKCVec_u8Z ret_var = OutputSpendStatus_write(obj_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ");
+       *ret_conv = OutputSpendStatus_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKOutputSweeper this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       OutputSweeper_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1new(JNIEnv *env, jclass clz, int64_t best_block, int64_t broadcaster, int64_t fee_estimator, int64_t chain_data_source, int64_t output_spender, int64_t change_destination_source, int64_t kv_store, int64_t logger) {
+       LDKBestBlock best_block_conv;
+       best_block_conv.inner = untag_ptr(best_block);
+       best_block_conv.is_owned = ptr_is_owned(best_block);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(best_block_conv);
+       best_block_conv = BestBlock_clone(&best_block_conv);
+       void* broadcaster_ptr = untag_ptr(broadcaster);
+       CHECK_ACCESS(broadcaster_ptr);
+       LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr);
+       if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv);
+       }
+       void* fee_estimator_ptr = untag_ptr(fee_estimator);
+       CHECK_ACCESS(fee_estimator_ptr);
+       LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr);
+       if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv);
+       }
+       void* chain_data_source_ptr = untag_ptr(chain_data_source);
+       CHECK_ACCESS(chain_data_source_ptr);
+       LDKCOption_FilterZ chain_data_source_conv = *(LDKCOption_FilterZ*)(chain_data_source_ptr);
+       // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ
+       if (chain_data_source_conv.tag == LDKCOption_FilterZ_Some) {
+               // Manually implement clone for Java trait instances
+               if (chain_data_source_conv.some.free == LDKFilter_JCalls_free) {
+                       // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+                       LDKFilter_JCalls_cloned(&chain_data_source_conv.some);
+               }
+       }
+       void* output_spender_ptr = untag_ptr(output_spender);
+       CHECK_ACCESS(output_spender_ptr);
+       LDKOutputSpender output_spender_conv = *(LDKOutputSpender*)(output_spender_ptr);
+       if (output_spender_conv.free == LDKOutputSpender_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKOutputSpender_JCalls_cloned(&output_spender_conv);
+       }
+       void* change_destination_source_ptr = untag_ptr(change_destination_source);
+       CHECK_ACCESS(change_destination_source_ptr);
+       LDKChangeDestinationSource change_destination_source_conv = *(LDKChangeDestinationSource*)(change_destination_source_ptr);
+       if (change_destination_source_conv.free == LDKChangeDestinationSource_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKChangeDestinationSource_JCalls_cloned(&change_destination_source_conv);
+       }
+       void* kv_store_ptr = untag_ptr(kv_store);
+       CHECK_ACCESS(kv_store_ptr);
+       LDKKVStore kv_store_conv = *(LDKKVStore*)(kv_store_ptr);
+       if (kv_store_conv.free == LDKKVStore_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKKVStore_JCalls_cloned(&kv_store_conv);
+       }
+       void* logger_ptr = untag_ptr(logger);
+       CHECK_ACCESS(logger_ptr);
+       LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+       if (logger_conv.free == LDKLogger_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKLogger_JCalls_cloned(&logger_conv);
+       }
+       LDKOutputSweeper ret_var = OutputSweeper_new(best_block_conv, broadcaster_conv, fee_estimator_conv, chain_data_source_conv, output_spender_conv, change_destination_source_conv, kv_store_conv, logger_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1track_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray output_descriptors, int64_t channel_id, jboolean exclude_static_outputs, int64_t delay_until_height) {
+       LDKOutputSweeper this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKCVec_SpendableOutputDescriptorZ output_descriptors_constr;
+       output_descriptors_constr.datalen = (*env)->GetArrayLength(env, output_descriptors);
+       if (output_descriptors_constr.datalen > 0)
+               output_descriptors_constr.data = MALLOC(output_descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
+       else
+               output_descriptors_constr.data = NULL;
+       int64_t* output_descriptors_vals = (*env)->GetLongArrayElements (env, output_descriptors, NULL);
+       for (size_t b = 0; b < output_descriptors_constr.datalen; b++) {
+               int64_t output_descriptors_conv_27 = output_descriptors_vals[b];
+               void* output_descriptors_conv_27_ptr = untag_ptr(output_descriptors_conv_27);
+               CHECK_ACCESS(output_descriptors_conv_27_ptr);
+               LDKSpendableOutputDescriptor output_descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(output_descriptors_conv_27_ptr);
+               output_descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(output_descriptors_conv_27));
+               output_descriptors_constr.data[b] = output_descriptors_conv_27_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, output_descriptors, output_descriptors_vals, 0);
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv = ChannelId_clone(&channel_id_conv);
+       void* delay_until_height_ptr = untag_ptr(delay_until_height);
+       CHECK_ACCESS(delay_until_height_ptr);
+       LDKCOption_u32Z delay_until_height_conv = *(LDKCOption_u32Z*)(delay_until_height_ptr);
+       delay_until_height_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(delay_until_height));
+       LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+       *ret_conv = OutputSweeper_track_spendable_outputs(&this_arg_conv, output_descriptors_constr, channel_id_conv, exclude_static_outputs, delay_until_height_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1tracked_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKOutputSweeper this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKCVec_TrackedSpendableOutputZ ret_var = OutputSweeper_tracked_spendable_outputs(&this_arg_conv);
+       int64_tArray ret_arr = NULL;
+       ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+       for (size_t y = 0; y < ret_var.datalen; y++) {
+               LDKTrackedSpendableOutput ret_conv_24_var = ret_var.data[y];
+               int64_t ret_conv_24_ref = 0;
+               CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_24_var);
+               ret_conv_24_ref = tag_ptr(ret_conv_24_var.inner, ret_conv_24_var.is_owned);
+               ret_arr_ptr[y] = ret_conv_24_ref;
+       }
+       (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+       FREE(ret_var.data);
+       return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1current_1best_1block(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKOutputSweeper this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKBestBlock ret_var = OutputSweeper_current_best_block(&this_arg_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1as_1Listen(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKOutputSweeper this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKListen* ret_ret = MALLOC(sizeof(LDKListen), "LDKListen");
+       *ret_ret = OutputSweeper_as_Listen(&this_arg_conv);
+       return tag_ptr(ret_ret, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1as_1Confirm(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKOutputSweeper this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKConfirm* ret_ret = MALLOC(sizeof(LDKConfirm), "LDKConfirm");
+       *ret_ret = OutputSweeper_as_Confirm(&this_arg_conv);
+       return tag_ptr(ret_ret, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKSpendingDelay this_ptr_conv = *(LDKSpendingDelay*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       SpendingDelay_free(this_ptr_conv);
+}
+
+static inline uint64_t SpendingDelay_clone_ptr(LDKSpendingDelay *NONNULL_PTR arg) {
+       LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay");
+       *ret_copy = SpendingDelay_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKSpendingDelay* arg_conv = (LDKSpendingDelay*)untag_ptr(arg);
+       int64_t ret_conv = SpendingDelay_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKSpendingDelay* orig_conv = (LDKSpendingDelay*)untag_ptr(orig);
+       LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay");
+       *ret_copy = SpendingDelay_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1relative(JNIEnv *env, jclass clz, int32_t num_blocks) {
+       LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay");
+       *ret_copy = SpendingDelay_relative(num_blocks);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1absolute(JNIEnv *env, jclass clz, int32_t height) {
+       LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay");
+       *ret_copy = SpendingDelay_absolute(height);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1read(JNIEnv *env, jclass clz, int8_tArray ser, int64_t arg_a, int64_t arg_b, int64_t arg_c, int64_t arg_d, int64_t arg_e, int64_t arg_f, int64_t arg_g) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       void* arg_a_ptr = untag_ptr(arg_a);
+       CHECK_ACCESS(arg_a_ptr);
+       LDKBroadcasterInterface arg_a_conv = *(LDKBroadcasterInterface*)(arg_a_ptr);
+       if (arg_a_conv.free == LDKBroadcasterInterface_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKBroadcasterInterface_JCalls_cloned(&arg_a_conv);
+       }
+       void* arg_b_ptr = untag_ptr(arg_b);
+       CHECK_ACCESS(arg_b_ptr);
+       LDKFeeEstimator arg_b_conv = *(LDKFeeEstimator*)(arg_b_ptr);
+       if (arg_b_conv.free == LDKFeeEstimator_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKFeeEstimator_JCalls_cloned(&arg_b_conv);
+       }
+       void* arg_c_ptr = untag_ptr(arg_c);
+       CHECK_ACCESS(arg_c_ptr);
+       LDKCOption_FilterZ arg_c_conv = *(LDKCOption_FilterZ*)(arg_c_ptr);
+       // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ
+       if (arg_c_conv.tag == LDKCOption_FilterZ_Some) {
+               // Manually implement clone for Java trait instances
+               if (arg_c_conv.some.free == LDKFilter_JCalls_free) {
+                       // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+                       LDKFilter_JCalls_cloned(&arg_c_conv.some);
+               }
+       }
+       void* arg_d_ptr = untag_ptr(arg_d);
+       CHECK_ACCESS(arg_d_ptr);
+       LDKOutputSpender arg_d_conv = *(LDKOutputSpender*)(arg_d_ptr);
+       if (arg_d_conv.free == LDKOutputSpender_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKOutputSpender_JCalls_cloned(&arg_d_conv);
+       }
+       void* arg_e_ptr = untag_ptr(arg_e);
+       CHECK_ACCESS(arg_e_ptr);
+       LDKChangeDestinationSource arg_e_conv = *(LDKChangeDestinationSource*)(arg_e_ptr);
+       if (arg_e_conv.free == LDKChangeDestinationSource_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKChangeDestinationSource_JCalls_cloned(&arg_e_conv);
+       }
+       void* arg_f_ptr = untag_ptr(arg_f);
+       CHECK_ACCESS(arg_f_ptr);
+       LDKKVStore arg_f_conv = *(LDKKVStore*)(arg_f_ptr);
+       if (arg_f_conv.free == LDKKVStore_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKKVStore_JCalls_cloned(&arg_f_conv);
+       }
+       void* arg_g_ptr = untag_ptr(arg_g);
+       CHECK_ACCESS(arg_g_ptr);
+       LDKLogger arg_g_conv = *(LDKLogger*)(arg_g_ptr);
+       if (arg_g_conv.free == LDKLogger_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKLogger_JCalls_cloned(&arg_g_conv);
+       }
+       LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ");
+       *ret_conv = OutputSweeper_read(ser_ref, arg_a_conv, arg_b_conv, arg_c_conv, arg_d_conv, arg_e_conv, arg_f_conv, arg_g_conv);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1read(JNIEnv *env, jclass clz, int8_tArray ser, int64_t arg_a, int64_t arg_b, int64_t arg_c, int64_t arg_d, int64_t arg_e, int64_t arg_f, int64_t arg_g) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       void* arg_a_ptr = untag_ptr(arg_a);
+       CHECK_ACCESS(arg_a_ptr);
+       LDKBroadcasterInterface arg_a_conv = *(LDKBroadcasterInterface*)(arg_a_ptr);
+       if (arg_a_conv.free == LDKBroadcasterInterface_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKBroadcasterInterface_JCalls_cloned(&arg_a_conv);
+       }
+       void* arg_b_ptr = untag_ptr(arg_b);
+       CHECK_ACCESS(arg_b_ptr);
+       LDKFeeEstimator arg_b_conv = *(LDKFeeEstimator*)(arg_b_ptr);
+       if (arg_b_conv.free == LDKFeeEstimator_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKFeeEstimator_JCalls_cloned(&arg_b_conv);
+       }
+       void* arg_c_ptr = untag_ptr(arg_c);
+       CHECK_ACCESS(arg_c_ptr);
+       LDKCOption_FilterZ arg_c_conv = *(LDKCOption_FilterZ*)(arg_c_ptr);
+       // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ
+       if (arg_c_conv.tag == LDKCOption_FilterZ_Some) {
+               // Manually implement clone for Java trait instances
+               if (arg_c_conv.some.free == LDKFilter_JCalls_free) {
+                       // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+                       LDKFilter_JCalls_cloned(&arg_c_conv.some);
+               }
+       }
+       void* arg_d_ptr = untag_ptr(arg_d);
+       CHECK_ACCESS(arg_d_ptr);
+       LDKOutputSpender arg_d_conv = *(LDKOutputSpender*)(arg_d_ptr);
+       if (arg_d_conv.free == LDKOutputSpender_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKOutputSpender_JCalls_cloned(&arg_d_conv);
+       }
+       void* arg_e_ptr = untag_ptr(arg_e);
+       CHECK_ACCESS(arg_e_ptr);
+       LDKChangeDestinationSource arg_e_conv = *(LDKChangeDestinationSource*)(arg_e_ptr);
+       if (arg_e_conv.free == LDKChangeDestinationSource_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKChangeDestinationSource_JCalls_cloned(&arg_e_conv);
+       }
+       void* arg_f_ptr = untag_ptr(arg_f);
+       CHECK_ACCESS(arg_f_ptr);
+       LDKKVStore arg_f_conv = *(LDKKVStore*)(arg_f_ptr);
+       if (arg_f_conv.free == LDKKVStore_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKKVStore_JCalls_cloned(&arg_f_conv);
+       }
+       void* arg_g_ptr = untag_ptr(arg_g);
+       CHECK_ACCESS(arg_g_ptr);
+       LDKLogger arg_g_conv = *(LDKLogger*)(arg_g_ptr);
+       if (arg_g_conv.free == LDKLogger_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKLogger_JCalls_cloned(&arg_g_conv);
+       }
+       LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ");
+       *ret_conv = C2Tuple_BestBlockOutputSweeperZ_read(ser_ref, arg_a_conv, arg_b_conv, arg_c_conv, arg_d_conv, arg_e_conv, arg_f_conv, arg_g_conv);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKFutureCallback this_ptr_conv = *(LDKFutureCallback*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       FutureCallback_free(this_ptr_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKFuture this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       Future_free(this_obj_conv);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1register_1callback_1fn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t callback) {
        LDKFuture this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -38135,8 +42146,8 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1wait(JNIEnv *env, jcla
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
-       this_arg_conv = Future_clone(&this_arg_conv);
-       Future_wait(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       Future_wait(&this_arg_conv);
 }
 
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Future_1wait_1timeout(JNIEnv *env, jclass clz, int64_t this_arg, int64_t max_wait) {
@@ -38144,8 +42155,8 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Future_1wait_1timeout(JNIE
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
-       this_arg_conv = Future_clone(&this_arg_conv);
-       jboolean ret_conv = Future_wait_timeout(this_arg_conv, max_wait);
+       this_arg_conv.is_owned = false;
+       jboolean ret_conv = Future_wait_timeout(&this_arg_conv, max_wait);
        return ret_conv;
 }
 
@@ -38162,8 +42173,8 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Sleeper_1from_1single_1futu
        future_conv.inner = untag_ptr(future);
        future_conv.is_owned = ptr_is_owned(future);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(future_conv);
-       future_conv = Future_clone(&future_conv);
-       LDKSleeper ret_var = Sleeper_from_single_future(future_conv);
+       future_conv.is_owned = false;
+       LDKSleeper ret_var = Sleeper_from_single_future(&future_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -38175,13 +42186,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Sleeper_1from_1two_1futures
        fut_a_conv.inner = untag_ptr(fut_a);
        fut_a_conv.is_owned = ptr_is_owned(fut_a);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(fut_a_conv);
-       fut_a_conv = Future_clone(&fut_a_conv);
+       fut_a_conv.is_owned = false;
        LDKFuture fut_b_conv;
        fut_b_conv.inner = untag_ptr(fut_b);
        fut_b_conv.is_owned = ptr_is_owned(fut_b);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(fut_b_conv);
-       fut_b_conv = Future_clone(&fut_b_conv);
-       LDKSleeper ret_var = Sleeper_from_two_futures(fut_a_conv, fut_b_conv);
+       fut_b_conv.is_owned = false;
+       LDKSleeper ret_var = Sleeper_from_two_futures(&fut_a_conv, &fut_b_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -38202,7 +42213,8 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Sleeper_1new(JNIEnv *env, j
                futures_conv_8_conv.inner = untag_ptr(futures_conv_8);
                futures_conv_8_conv.is_owned = ptr_is_owned(futures_conv_8);
                CHECK_INNER_FIELD_ACCESS_OR_NULL(futures_conv_8_conv);
-               futures_conv_8_conv = Future_clone(&futures_conv_8_conv);
+               // WARNING: we need a move here but no clone is available for LDKFuture
+               
                futures_constr.data[i] = futures_conv_8_conv;
        }
        (*env)->ReleaseLongArrayElements(env, futures, futures_vals, 0);
@@ -38343,9 +42355,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Record_1get_1channel_1id(JN
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKCOption_ThirtyTwoBytesZ *ret_copy = MALLOC(sizeof(LDKCOption_ThirtyTwoBytesZ), "LDKCOption_ThirtyTwoBytesZ");
-       *ret_copy = Record_get_channel_id(&this_ptr_conv);
-       int64_t ret_ref = tag_ptr(ret_copy, true);
+       LDKChannelId ret_var = Record_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
 
@@ -38355,10 +42368,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Record_1set_1channel_1id(JNIEn
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       void* val_ptr = untag_ptr(val);
-       CHECK_ACCESS(val_ptr);
-       LDKCOption_ThirtyTwoBytesZ val_conv = *(LDKCOption_ThirtyTwoBytesZ*)(val_ptr);
-       val_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(val));
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
        Record_set_channel_id(&this_ptr_conv, val_conv);
 }
 
@@ -38452,10 +42466,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Record_1new(JNIEnv *env, jc
        LDKPublicKey peer_id_arg_ref;
        CHECK((*env)->GetArrayLength(env, peer_id_arg) == 33);
        (*env)->GetByteArrayRegion(env, peer_id_arg, 0, 33, peer_id_arg_ref.compressed_form);
-       void* channel_id_arg_ptr = untag_ptr(channel_id_arg);
-       CHECK_ACCESS(channel_id_arg_ptr);
-       LDKCOption_ThirtyTwoBytesZ channel_id_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(channel_id_arg_ptr);
-       channel_id_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(channel_id_arg));
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKStr args_arg_conv = java_to_owned_str(env, args_arg);
        LDKStr module_path_arg_conv = java_to_owned_str(env, module_path_arg);
        LDKStr file_arg_conv = java_to_owned_str(env, file_arg);
@@ -39714,6 +43729,59 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1free(JNIEnv *env, j
        BestBlock_free(this_obj_conv);
 }
 
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1get_1block_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKBestBlock this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *BestBlock_get_block_hash(&this_ptr_conv));
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1set_1block_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKBestBlock this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKThirtyTwoBytes val_ref;
+       CHECK((*env)->GetArrayLength(env, val) == 32);
+       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+       BestBlock_set_block_hash(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1get_1height(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKBestBlock this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int32_t ret_conv = BestBlock_get_height(&this_ptr_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1set_1height(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
+       LDKBestBlock this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       BestBlock_set_height(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1new(JNIEnv *env, jclass clz, int8_tArray block_hash_arg, int32_t height_arg) {
+       LDKThirtyTwoBytes block_hash_arg_ref;
+       CHECK((*env)->GetArrayLength(env, block_hash_arg) == 32);
+       (*env)->GetByteArrayRegion(env, block_hash_arg, 0, 32, block_hash_arg_ref.data);
+       LDKBestBlock ret_var = BestBlock_new(block_hash_arg_ref, height_arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
 static inline uint64_t BestBlock_clone_ptr(LDKBestBlock *NONNULL_PTR arg) {
        LDKBestBlock ret_var = BestBlock_clone(arg);
        int64_t ret_ref = 0;
@@ -39744,6 +43812,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1clone(JNIEnv *en
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKBestBlock o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv.is_owned = false;
+       int64_t ret_conv = BestBlock_hash(&o_conv);
+       return ret_conv;
+}
+
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_BestBlock_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
        LDKBestBlock a_conv;
        a_conv.inner = untag_ptr(a);
@@ -39768,36 +43846,27 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1from_1network(JN
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1new(JNIEnv *env, jclass clz, int8_tArray block_hash, int32_t height) {
-       LDKThirtyTwoBytes block_hash_ref;
-       CHECK((*env)->GetArrayLength(env, block_hash) == 32);
-       (*env)->GetByteArrayRegion(env, block_hash, 0, 32, block_hash_ref.data);
-       LDKBestBlock ret_var = BestBlock_new(block_hash_ref, height);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1block_1hash(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKBestBlock this_arg_conv;
-       this_arg_conv.inner = untag_ptr(this_arg);
-       this_arg_conv.is_owned = ptr_is_owned(this_arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
-       this_arg_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, BestBlock_block_hash(&this_arg_conv).data);
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKBestBlock obj_conv;
+       obj_conv.inner = untag_ptr(obj);
+       obj_conv.is_owned = ptr_is_owned(obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = BestBlock_write(&obj_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
        return ret_arr;
 }
 
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1height(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKBestBlock this_arg_conv;
-       this_arg_conv.inner = untag_ptr(this_arg);
-       this_arg_conv.is_owned = ptr_is_owned(this_arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
-       this_arg_conv.is_owned = false;
-       int32_t ret_conv = BestBlock_height(&this_arg_conv);
-       return ret_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ");
+       *ret_conv = BestBlock_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Listen_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -40071,6 +44140,11 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1channel_
        return ret_conv;
 }
 
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1output_1spending_1fee(JNIEnv *env, jclass clz) {
+       jclass ret_conv = LDKConfirmationTarget_to_java(env, ConfirmationTarget_output_spending_fee());
+       return ret_conv;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1hash(JNIEnv *env, jclass clz, int64_t o) {
        LDKConfirmationTarget* o_conv = (LDKConfirmationTarget*)untag_ptr(o);
        int64_t ret_conv = ConfirmationTarget_hash(o_conv);
@@ -40288,16 +44362,14 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1list_1mo
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKCVec_OutPointZ ret_var = ChainMonitor_list_monitors(&this_arg_conv);
+       LDKCVec_C2Tuple_OutPointChannelIdZZ ret_var = ChainMonitor_list_monitors(&this_arg_conv);
        int64_tArray ret_arr = NULL;
        ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
        int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t k = 0; k < ret_var.datalen; k++) {
-               LDKOutPoint ret_conv_10_var = ret_var.data[k];
-               int64_t ret_conv_10_ref = 0;
-               CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_10_var);
-               ret_conv_10_ref = tag_ptr(ret_conv_10_var.inner, ret_conv_10_var.is_owned);
-               ret_arr_ptr[k] = ret_conv_10_ref;
+       for (size_t d = 0; d < ret_var.datalen; d++) {
+               LDKC2Tuple_OutPointChannelIdZ* ret_conv_29_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ");
+               *ret_conv_29_conv = ret_var.data[d];
+               ret_arr_ptr[d] = tag_ptr(ret_conv_29_conv, true);
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
@@ -40367,6 +44439,29 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1rebroadcast_1pen
        ChainMonitor_rebroadcast_pending_claims(&this_arg_conv);
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1signer_1unblocked(JNIEnv *env, jclass clz, int64_t this_arg, int64_t monitor_opt) {
+       LDKChainMonitor this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKOutPoint monitor_opt_conv;
+       monitor_opt_conv.inner = untag_ptr(monitor_opt);
+       monitor_opt_conv.is_owned = ptr_is_owned(monitor_opt);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_opt_conv);
+       monitor_opt_conv = OutPoint_clone(&monitor_opt_conv);
+       ChainMonitor_signer_unblocked(&this_arg_conv, monitor_opt_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1archive_1fully_1resolved_1channel_1monitors(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKChainMonitor this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       ChainMonitor_archive_fully_resolved_channel_monitors(&this_arg_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1as_1Listen(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKChainMonitor this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -40438,6 +44533,33 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1upd
        ChannelMonitorUpdate_set_update_id(&this_ptr_conv, val);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKChannelMonitorUpdate this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKChannelId ret_var = ChannelMonitorUpdate_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKChannelMonitorUpdate this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       ChannelMonitorUpdate_set_channel_id(&this_ptr_conv, val_conv);
+}
+
 static inline uint64_t ChannelMonitorUpdate_clone_ptr(LDKChannelMonitorUpdate *NONNULL_PTR arg) {
        LDKChannelMonitorUpdate ret_var = ChannelMonitorUpdate_clone(arg);
        int64_t ret_ref = 0;
@@ -40547,6 +44669,27 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1htlcevent(JNI
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1holder_1force_1closed_1with_1info(JNIEnv *env, jclass clz, int64_t reason, int64_t outpoint, int64_t channel_id) {
+       void* reason_ptr = untag_ptr(reason);
+       CHECK_ACCESS(reason_ptr);
+       LDKClosureReason reason_conv = *(LDKClosureReason*)(reason_ptr);
+       reason_conv = ClosureReason_clone((LDKClosureReason*)untag_ptr(reason));
+       LDKOutPoint outpoint_conv;
+       outpoint_conv.inner = untag_ptr(outpoint);
+       outpoint_conv.is_owned = ptr_is_owned(outpoint);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_conv);
+       outpoint_conv = OutPoint_clone(&outpoint_conv);
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv = ChannelId_clone(&channel_id_conv);
+       LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
+       *ret_copy = MonitorEvent_holder_force_closed_with_info(reason_conv, outpoint_conv, channel_id_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1holder_1force_1closed(JNIEnv *env, jclass clz, int64_t a) {
        LDKOutPoint a_conv;
        a_conv.inner = untag_ptr(a);
@@ -40559,14 +44702,19 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1holder_1force
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1completed(JNIEnv *env, jclass clz, int64_t funding_txo, int64_t monitor_update_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1completed(JNIEnv *env, jclass clz, int64_t funding_txo, int64_t channel_id, int64_t monitor_update_id) {
        LDKOutPoint funding_txo_conv;
        funding_txo_conv.inner = untag_ptr(funding_txo);
        funding_txo_conv.is_owned = ptr_is_owned(funding_txo);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv);
        funding_txo_conv = OutPoint_clone(&funding_txo_conv);
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv = ChannelId_clone(&channel_id_conv);
        LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
-       *ret_copy = MonitorEvent_completed(funding_txo_conv, monitor_update_id);
+       *ret_copy = MonitorEvent_completed(funding_txo_conv, channel_id_conv, monitor_update_id);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -40866,6 +45014,19 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1fundin
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1channel_1id(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKChannelMonitor this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKChannelId ret_var = ChannelMonitor_channel_id(&this_arg_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
 JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1outputs_1to_1watch(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKChannelMonitor this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -41001,29 +45162,22 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1co
        return ret_arr;
 }
 
-JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1holder_1commitment_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t logger) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1broadcast_1latest_1holder_1commitment_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t broadcaster, int64_t fee_estimator, int64_t logger) {
        LDKChannelMonitor this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
+       void* broadcaster_ptr = untag_ptr(broadcaster);
+       if (ptr_is_owned(broadcaster)) { CHECK_ACCESS(broadcaster_ptr); }
+       LDKBroadcasterInterface* broadcaster_conv = (LDKBroadcasterInterface*)broadcaster_ptr;
+       void* fee_estimator_ptr = untag_ptr(fee_estimator);
+       if (ptr_is_owned(fee_estimator)) { CHECK_ACCESS(fee_estimator_ptr); }
+       LDKFeeEstimator* fee_estimator_conv = (LDKFeeEstimator*)fee_estimator_ptr;
        void* logger_ptr = untag_ptr(logger);
        if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); }
        LDKLogger* logger_conv = (LDKLogger*)logger_ptr;
-       LDKCVec_TransactionZ ret_var = ChannelMonitor_get_latest_holder_commitment_txn(&this_arg_conv, logger_conv);
-       jobjectArray ret_arr = NULL;
-       ret_arr = (*env)->NewObjectArray(env, ret_var.datalen, arr_of_B_clz, NULL);
-       ;
-       for (size_t i = 0; i < ret_var.datalen; i++) {
-               LDKTransaction ret_conv_8_var = ret_var.data[i];
-               int8_tArray ret_conv_8_arr = (*env)->NewByteArray(env, ret_conv_8_var.datalen);
-               (*env)->SetByteArrayRegion(env, ret_conv_8_arr, 0, ret_conv_8_var.datalen, ret_conv_8_var.data);
-               Transaction_free(ret_conv_8_var);
-               (*env)->SetObjectArrayElement(env, ret_arr, i, ret_conv_8_arr);
-       }
-       
-       FREE(ret_var.data);
-       return ret_arr;
+       ChannelMonitor_broadcast_latest_holder_commitment_txn(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv);
 }
 
 JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1block_1connected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray header, int64_tArray txdata, int32_t height, int64_t broadcaster, int64_t fee_estimator, int64_t logger) {
@@ -41300,6 +45454,32 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1rebroadcast_1p
        ChannelMonitor_rebroadcast_pending_claims(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv);
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1signer_1unblocked(JNIEnv *env, jclass clz, int64_t this_arg, int64_t broadcaster, int64_t fee_estimator, int64_t logger) {
+       LDKChannelMonitor this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       void* broadcaster_ptr = untag_ptr(broadcaster);
+       CHECK_ACCESS(broadcaster_ptr);
+       LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr);
+       if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv);
+       }
+       void* fee_estimator_ptr = untag_ptr(fee_estimator);
+       CHECK_ACCESS(fee_estimator_ptr);
+       LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr);
+       if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv);
+       }
+       void* logger_ptr = untag_ptr(logger);
+       if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); }
+       LDKLogger* logger_conv = (LDKLogger*)logger_ptr;
+       ChannelMonitor_signer_unblocked(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv);
+}
+
 JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray tx, int32_t confirmation_height) {
        LDKChannelMonitor this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -41326,6 +45506,19 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1s
        return ret_arr;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1is_1fully_1resolved(JNIEnv *env, jclass clz, int64_t this_arg, int64_t logger) {
+       LDKChannelMonitor this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       void* logger_ptr = untag_ptr(logger);
+       if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); }
+       LDKLogger* logger_conv = (LDKLogger*)logger_ptr;
+       jboolean ret_conv = ChannelMonitor_is_fully_resolved(&this_arg_conv, logger_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1claimable_1balances(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKChannelMonitor this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -41479,17 +45672,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutPoint_1hash(JNIEnv *env,
        return ret_conv;
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1to_1channel_1id(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKOutPoint this_arg_conv;
-       this_arg_conv.inner = untag_ptr(this_arg);
-       this_arg_conv.is_owned = ptr_is_owned(this_arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
-       this_arg_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, OutPoint_to_channel_id(&this_arg_conv).data);
-       return ret_arr;
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKOutPoint obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -41601,6 +45783,61 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1new(JNIEnv
        return ret_ref;
 }
 
+static inline uint64_t InboundHTLCErr_clone_ptr(LDKInboundHTLCErr *NONNULL_PTR arg) {
+       LDKInboundHTLCErr ret_var = InboundHTLCErr_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKInboundHTLCErr arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = InboundHTLCErr_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKInboundHTLCErr orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKInboundHTLCErr ret_var = InboundHTLCErr_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKInboundHTLCErr o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv.is_owned = false;
+       int64_t ret_conv = InboundHTLCErr_hash(&o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKInboundHTLCErr a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKInboundHTLCErr b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = InboundHTLCErr_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_peel_1payment_1onion(JNIEnv *env, jclass clz, int64_t msg, int64_t node_signer, int64_t logger, int32_t cur_height, jboolean accept_mpp_keysend, jboolean allow_skimmed_fees) {
        LDKUpdateAddHTLC msg_conv;
        msg_conv.inner = untag_ptr(msg);
@@ -41664,7 +45901,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1forward
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive(JNIEnv *env, jclass clz, int64_t payment_data, int64_t payment_metadata, int32_t incoming_cltv_expiry, int8_tArray phantom_shared_secret, int64_tArray custom_tlvs, jboolean requires_blinded_error) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive(JNIEnv *env, jclass clz, int64_t payment_data, int64_t payment_metadata, int64_t payment_context, int32_t incoming_cltv_expiry, int8_tArray phantom_shared_secret, int64_tArray custom_tlvs, jboolean requires_blinded_error) {
        LDKFinalOnionHopData payment_data_conv;
        payment_data_conv.inner = untag_ptr(payment_data);
        payment_data_conv.is_owned = ptr_is_owned(payment_data);
@@ -41674,6 +45911,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive
        CHECK_ACCESS(payment_metadata_ptr);
        LDKCOption_CVec_u8ZZ payment_metadata_conv = *(LDKCOption_CVec_u8ZZ*)(payment_metadata_ptr);
        payment_metadata_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(payment_metadata));
+       void* payment_context_ptr = untag_ptr(payment_context);
+       CHECK_ACCESS(payment_context_ptr);
+       LDKCOption_PaymentContextZ payment_context_conv = *(LDKCOption_PaymentContextZ*)(payment_context_ptr);
+       payment_context_conv = COption_PaymentContextZ_clone((LDKCOption_PaymentContextZ*)untag_ptr(payment_context));
        LDKThirtyTwoBytes phantom_shared_secret_ref;
        CHECK((*env)->GetArrayLength(env, phantom_shared_secret) == 32);
        (*env)->GetByteArrayRegion(env, phantom_shared_secret, 0, 32, phantom_shared_secret_ref.data);
@@ -41694,12 +45935,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive
        }
        (*env)->ReleaseLongArrayElements(env, custom_tlvs, custom_tlvs_vals, 0);
        LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting");
-       *ret_copy = PendingHTLCRouting_receive(payment_data_conv, payment_metadata_conv, incoming_cltv_expiry, phantom_shared_secret_ref, custom_tlvs_constr, requires_blinded_error);
+       *ret_copy = PendingHTLCRouting_receive(payment_data_conv, payment_metadata_conv, payment_context_conv, incoming_cltv_expiry, phantom_shared_secret_ref, custom_tlvs_constr, requires_blinded_error);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive_1keysend(JNIEnv *env, jclass clz, int64_t payment_data, int8_tArray payment_preimage, int64_t payment_metadata, int32_t incoming_cltv_expiry, int64_tArray custom_tlvs) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive_1keysend(JNIEnv *env, jclass clz, int64_t payment_data, int8_tArray payment_preimage, int64_t payment_metadata, int32_t incoming_cltv_expiry, int64_tArray custom_tlvs, jboolean requires_blinded_error) {
        LDKFinalOnionHopData payment_data_conv;
        payment_data_conv.inner = untag_ptr(payment_data);
        payment_data_conv.is_owned = ptr_is_owned(payment_data);
@@ -41729,7 +45970,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive
        }
        (*env)->ReleaseLongArrayElements(env, custom_tlvs, custom_tlvs_vals, 0);
        LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting");
-       *ret_copy = PendingHTLCRouting_receive_keysend(payment_data_conv, payment_preimage_ref, payment_metadata_conv, incoming_cltv_expiry, custom_tlvs_constr);
+       *ret_copy = PendingHTLCRouting_receive_keysend(payment_data_conv, payment_preimage_ref, payment_metadata_conv, incoming_cltv_expiry, custom_tlvs_constr, requires_blinded_error);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -42596,27 +46837,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1free(JNIEnv *e
        ChannelDetails_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelDetails this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelDetails_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = ChannelDetails_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKChannelDetails this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       ChannelDetails_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       ChannelDetails_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1counterparty(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -43215,83 +47460,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1config(JN
        ChannelDetails_set_config(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t counterparty_arg, int64_t funding_txo_arg, int64_t channel_type_arg, int64_t short_channel_id_arg, int64_t outbound_scid_alias_arg, int64_t inbound_scid_alias_arg, int64_t channel_value_satoshis_arg, int64_t unspendable_punishment_reserve_arg, int8_tArray user_channel_id_arg, int64_t feerate_sat_per_1000_weight_arg, int64_t balance_msat_arg, int64_t outbound_capacity_msat_arg, int64_t next_outbound_htlc_limit_msat_arg, int64_t next_outbound_htlc_minimum_msat_arg, int64_t inbound_capacity_msat_arg, int64_t confirmations_required_arg, int64_t confirmations_arg, int64_t force_close_spend_delay_arg, jboolean is_outbound_arg, jboolean is_channel_ready_arg, int64_t channel_shutdown_state_arg, jboolean is_usable_arg, jboolean is_public_arg, int64_t inbound_htlc_minimum_msat_arg, int64_t inbound_htlc_maximum_msat_arg, int64_t config_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
-       LDKChannelCounterparty counterparty_arg_conv;
-       counterparty_arg_conv.inner = untag_ptr(counterparty_arg);
-       counterparty_arg_conv.is_owned = ptr_is_owned(counterparty_arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(counterparty_arg_conv);
-       counterparty_arg_conv = ChannelCounterparty_clone(&counterparty_arg_conv);
-       LDKOutPoint funding_txo_arg_conv;
-       funding_txo_arg_conv.inner = untag_ptr(funding_txo_arg);
-       funding_txo_arg_conv.is_owned = ptr_is_owned(funding_txo_arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_arg_conv);
-       funding_txo_arg_conv = OutPoint_clone(&funding_txo_arg_conv);
-       LDKChannelTypeFeatures channel_type_arg_conv;
-       channel_type_arg_conv.inner = untag_ptr(channel_type_arg);
-       channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
-       channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
-       void* short_channel_id_arg_ptr = untag_ptr(short_channel_id_arg);
-       CHECK_ACCESS(short_channel_id_arg_ptr);
-       LDKCOption_u64Z short_channel_id_arg_conv = *(LDKCOption_u64Z*)(short_channel_id_arg_ptr);
-       short_channel_id_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(short_channel_id_arg));
-       void* outbound_scid_alias_arg_ptr = untag_ptr(outbound_scid_alias_arg);
-       CHECK_ACCESS(outbound_scid_alias_arg_ptr);
-       LDKCOption_u64Z outbound_scid_alias_arg_conv = *(LDKCOption_u64Z*)(outbound_scid_alias_arg_ptr);
-       outbound_scid_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(outbound_scid_alias_arg));
-       void* inbound_scid_alias_arg_ptr = untag_ptr(inbound_scid_alias_arg);
-       CHECK_ACCESS(inbound_scid_alias_arg_ptr);
-       LDKCOption_u64Z inbound_scid_alias_arg_conv = *(LDKCOption_u64Z*)(inbound_scid_alias_arg_ptr);
-       inbound_scid_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_scid_alias_arg));
-       void* unspendable_punishment_reserve_arg_ptr = untag_ptr(unspendable_punishment_reserve_arg);
-       CHECK_ACCESS(unspendable_punishment_reserve_arg_ptr);
-       LDKCOption_u64Z unspendable_punishment_reserve_arg_conv = *(LDKCOption_u64Z*)(unspendable_punishment_reserve_arg_ptr);
-       LDKU128 user_channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, user_channel_id_arg) == 16);
-       (*env)->GetByteArrayRegion(env, user_channel_id_arg, 0, 16, user_channel_id_arg_ref.le_bytes);
-       void* feerate_sat_per_1000_weight_arg_ptr = untag_ptr(feerate_sat_per_1000_weight_arg);
-       CHECK_ACCESS(feerate_sat_per_1000_weight_arg_ptr);
-       LDKCOption_u32Z feerate_sat_per_1000_weight_arg_conv = *(LDKCOption_u32Z*)(feerate_sat_per_1000_weight_arg_ptr);
-       feerate_sat_per_1000_weight_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(feerate_sat_per_1000_weight_arg));
-       void* confirmations_required_arg_ptr = untag_ptr(confirmations_required_arg);
-       CHECK_ACCESS(confirmations_required_arg_ptr);
-       LDKCOption_u32Z confirmations_required_arg_conv = *(LDKCOption_u32Z*)(confirmations_required_arg_ptr);
-       confirmations_required_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(confirmations_required_arg));
-       void* confirmations_arg_ptr = untag_ptr(confirmations_arg);
-       CHECK_ACCESS(confirmations_arg_ptr);
-       LDKCOption_u32Z confirmations_arg_conv = *(LDKCOption_u32Z*)(confirmations_arg_ptr);
-       confirmations_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(confirmations_arg));
-       void* force_close_spend_delay_arg_ptr = untag_ptr(force_close_spend_delay_arg);
-       CHECK_ACCESS(force_close_spend_delay_arg_ptr);
-       LDKCOption_u16Z force_close_spend_delay_arg_conv = *(LDKCOption_u16Z*)(force_close_spend_delay_arg_ptr);
-       force_close_spend_delay_arg_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(force_close_spend_delay_arg));
-       void* channel_shutdown_state_arg_ptr = untag_ptr(channel_shutdown_state_arg);
-       CHECK_ACCESS(channel_shutdown_state_arg_ptr);
-       LDKCOption_ChannelShutdownStateZ channel_shutdown_state_arg_conv = *(LDKCOption_ChannelShutdownStateZ*)(channel_shutdown_state_arg_ptr);
-       channel_shutdown_state_arg_conv = COption_ChannelShutdownStateZ_clone((LDKCOption_ChannelShutdownStateZ*)untag_ptr(channel_shutdown_state_arg));
-       void* inbound_htlc_minimum_msat_arg_ptr = untag_ptr(inbound_htlc_minimum_msat_arg);
-       CHECK_ACCESS(inbound_htlc_minimum_msat_arg_ptr);
-       LDKCOption_u64Z inbound_htlc_minimum_msat_arg_conv = *(LDKCOption_u64Z*)(inbound_htlc_minimum_msat_arg_ptr);
-       inbound_htlc_minimum_msat_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_htlc_minimum_msat_arg));
-       void* inbound_htlc_maximum_msat_arg_ptr = untag_ptr(inbound_htlc_maximum_msat_arg);
-       CHECK_ACCESS(inbound_htlc_maximum_msat_arg_ptr);
-       LDKCOption_u64Z inbound_htlc_maximum_msat_arg_conv = *(LDKCOption_u64Z*)(inbound_htlc_maximum_msat_arg_ptr);
-       inbound_htlc_maximum_msat_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_htlc_maximum_msat_arg));
-       LDKChannelConfig config_arg_conv;
-       config_arg_conv.inner = untag_ptr(config_arg);
-       config_arg_conv.is_owned = ptr_is_owned(config_arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(config_arg_conv);
-       config_arg_conv = ChannelConfig_clone(&config_arg_conv);
-       LDKChannelDetails ret_var = ChannelDetails_new(channel_id_arg_ref, counterparty_arg_conv, funding_txo_arg_conv, channel_type_arg_conv, short_channel_id_arg_conv, outbound_scid_alias_arg_conv, inbound_scid_alias_arg_conv, channel_value_satoshis_arg, unspendable_punishment_reserve_arg_conv, user_channel_id_arg_ref, feerate_sat_per_1000_weight_arg_conv, balance_msat_arg, outbound_capacity_msat_arg, next_outbound_htlc_limit_msat_arg, next_outbound_htlc_minimum_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg_conv, confirmations_arg_conv, force_close_spend_delay_arg_conv, is_outbound_arg, is_channel_ready_arg, channel_shutdown_state_arg_conv, is_usable_arg, is_public_arg, inbound_htlc_minimum_msat_arg_conv, inbound_htlc_maximum_msat_arg_conv, config_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 static inline uint64_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg) {
        LDKChannelDetails ret_var = ChannelDetails_clone(arg);
        int64_t ret_ref = 0;
@@ -43718,16 +47886,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1cha
        LDKU128 user_channel_id_ref;
        CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
        (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
-       void* temporary_channel_id_ptr = untag_ptr(temporary_channel_id);
-       CHECK_ACCESS(temporary_channel_id_ptr);
-       LDKCOption_ThirtyTwoBytesZ temporary_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(temporary_channel_id_ptr);
-       temporary_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(temporary_channel_id));
+       LDKChannelId temporary_channel_id_conv;
+       temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+       temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+       temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv);
        LDKUserConfig override_config_conv;
        override_config_conv.inner = untag_ptr(override_config);
        override_config_conv.is_owned = ptr_is_owned(override_config);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(override_config_conv);
        override_config_conv = UserConfig_clone(&override_config_conv);
-       LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
+       LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ");
        *ret_conv = ChannelManager_create_channel(&this_arg_conv, their_network_key_ref, channel_value_satoshis, push_msat, user_channel_id_ref, temporary_channel_id_conv, override_config_conv);
        return tag_ptr(ret_conv, true);
 }
@@ -43822,34 +47991,36 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelManager_1list_1
        return ret_arr;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       uint8_t channel_id_arr[32];
-       CHECK((*env)->GetArrayLength(env, channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr);
-       uint8_t (*channel_id_ref)[32] = &channel_id_arr;
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv.is_owned = false;
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
        LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = ChannelManager_close_channel(&this_arg_conv, channel_id_ref, counterparty_node_id_ref);
+       *ret_conv = ChannelManager_close_channel(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel_1with_1feerate_1and_1script(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id, int64_t target_feerate_sats_per_1000_weight, int64_t shutdown_script) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel_1with_1feerate_1and_1script(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id, int64_t target_feerate_sats_per_1000_weight, int64_t shutdown_script) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       uint8_t channel_id_arr[32];
-       CHECK((*env)->GetArrayLength(env, channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr);
-       uint8_t (*channel_id_ref)[32] = &channel_id_arr;
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv.is_owned = false;
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
@@ -43863,43 +48034,45 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1chan
        CHECK_INNER_FIELD_ACCESS_OR_NULL(shutdown_script_conv);
        shutdown_script_conv = ShutdownScript_clone(&shutdown_script_conv);
        LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = ChannelManager_close_channel_with_feerate_and_script(&this_arg_conv, channel_id_ref, counterparty_node_id_ref, target_feerate_sats_per_1000_weight_conv, shutdown_script_conv);
+       *ret_conv = ChannelManager_close_channel_with_feerate_and_script(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref, target_feerate_sats_per_1000_weight_conv, shutdown_script_conv);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1broadcasting_1latest_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1broadcasting_1latest_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       uint8_t channel_id_arr[32];
-       CHECK((*env)->GetArrayLength(env, channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr);
-       uint8_t (*channel_id_ref)[32] = &channel_id_arr;
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv.is_owned = false;
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
        LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = ChannelManager_force_close_broadcasting_latest_txn(&this_arg_conv, channel_id_ref, counterparty_node_id_ref);
+       *ret_conv = ChannelManager_force_close_broadcasting_latest_txn(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1without_1broadcasting_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1without_1broadcasting_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       uint8_t channel_id_arr[32];
-       CHECK((*env)->GetArrayLength(env, channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr);
-       uint8_t (*channel_id_ref)[32] = &channel_id_arr;
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv.is_owned = false;
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
        LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = ChannelManager_force_close_without_broadcasting_txn(&this_arg_conv, channel_id_ref, counterparty_node_id_ref);
+       *ret_conv = ChannelManager_force_close_without_broadcasting_txn(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref);
        return tag_ptr(ret_conv, true);
 }
 
@@ -44105,16 +48278,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1send_1prefl
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1funding_1transaction_1generated(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray funding_transaction) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1funding_1transaction_1generated(JNIEnv *env, jclass clz, int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray funding_transaction) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       uint8_t temporary_channel_id_arr[32];
-       CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_arr);
-       uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr;
+       LDKChannelId temporary_channel_id_conv;
+       temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+       temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+       temporary_channel_id_conv.is_owned = false;
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
@@ -44124,7 +48298,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1funding_1tr
        (*env)->GetByteArrayRegion(env, funding_transaction, 0, funding_transaction_ref.datalen, funding_transaction_ref.data);
        funding_transaction_ref.data_is_owned = true;
        LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = ChannelManager_funding_transaction_generated(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, funding_transaction_ref);
+       *ret_conv = ChannelManager_funding_transaction_generated(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, funding_transaction_ref);
        return tag_ptr(ret_conv, true);
 }
 
@@ -44134,20 +48308,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1batch_1fund
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ temporary_channels_constr;
+       LDKCVec_C2Tuple_ChannelIdPublicKeyZZ temporary_channels_constr;
        temporary_channels_constr.datalen = (*env)->GetArrayLength(env, temporary_channels);
        if (temporary_channels_constr.datalen > 0)
-               temporary_channels_constr.data = MALLOC(temporary_channels_constr.datalen * sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ Elements");
+               temporary_channels_constr.data = MALLOC(temporary_channels_constr.datalen * sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ Elements");
        else
                temporary_channels_constr.data = NULL;
        int64_t* temporary_channels_vals = (*env)->GetLongArrayElements (env, temporary_channels, NULL);
-       for (size_t j = 0; j < temporary_channels_constr.datalen; j++) {
-               int64_t temporary_channels_conv_35 = temporary_channels_vals[j];
-               void* temporary_channels_conv_35_ptr = untag_ptr(temporary_channels_conv_35);
-               CHECK_ACCESS(temporary_channels_conv_35_ptr);
-               LDKC2Tuple_ThirtyTwoBytesPublicKeyZ temporary_channels_conv_35_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(temporary_channels_conv_35_ptr);
-               temporary_channels_conv_35_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone((LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(temporary_channels_conv_35));
-               temporary_channels_constr.data[j] = temporary_channels_conv_35_conv;
+       for (size_t e = 0; e < temporary_channels_constr.datalen; e++) {
+               int64_t temporary_channels_conv_30 = temporary_channels_vals[e];
+               void* temporary_channels_conv_30_ptr = untag_ptr(temporary_channels_conv_30);
+               CHECK_ACCESS(temporary_channels_conv_30_ptr);
+               LDKC2Tuple_ChannelIdPublicKeyZ temporary_channels_conv_30_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(temporary_channels_conv_30_ptr);
+               temporary_channels_conv_30_conv = C2Tuple_ChannelIdPublicKeyZ_clone((LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(temporary_channels_conv_30));
+               temporary_channels_constr.data[e] = temporary_channels_conv_30_conv;
        }
        (*env)->ReleaseLongArrayElements(env, temporary_channels, temporary_channels_vals, 0);
        LDKTransaction funding_transaction_ref;
@@ -44160,7 +48334,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1batch_1fund
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1partial_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, jobjectArray channel_ids, int64_t config_update) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1partial_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, int64_tArray channel_ids, int64_t config_update) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
@@ -44169,19 +48343,23 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1par
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
-       LDKCVec_ThirtyTwoBytesZ channel_ids_constr;
+       LDKCVec_ChannelIdZ channel_ids_constr;
        channel_ids_constr.datalen = (*env)->GetArrayLength(env, channel_ids);
        if (channel_ids_constr.datalen > 0)
-               channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements");
+               channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements");
        else
                channel_ids_constr.data = NULL;
-       for (size_t i = 0; i < channel_ids_constr.datalen; i++) {
-               int8_tArray channel_ids_conv_8 = (*env)->GetObjectArrayElement(env, channel_ids, i);
-               LDKThirtyTwoBytes channel_ids_conv_8_ref;
-               CHECK((*env)->GetArrayLength(env, channel_ids_conv_8) == 32);
-               (*env)->GetByteArrayRegion(env, channel_ids_conv_8, 0, 32, channel_ids_conv_8_ref.data);
-               channel_ids_constr.data[i] = channel_ids_conv_8_ref;
-       }
+       int64_t* channel_ids_vals = (*env)->GetLongArrayElements (env, channel_ids, NULL);
+       for (size_t l = 0; l < channel_ids_constr.datalen; l++) {
+               int64_t channel_ids_conv_11 = channel_ids_vals[l];
+               LDKChannelId channel_ids_conv_11_conv;
+               channel_ids_conv_11_conv.inner = untag_ptr(channel_ids_conv_11);
+               channel_ids_conv_11_conv.is_owned = ptr_is_owned(channel_ids_conv_11);
+               CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_ids_conv_11_conv);
+               channel_ids_conv_11_conv = ChannelId_clone(&channel_ids_conv_11_conv);
+               channel_ids_constr.data[l] = channel_ids_conv_11_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, channel_ids, channel_ids_vals, 0);
        LDKChannelConfigUpdate config_update_conv;
        config_update_conv.inner = untag_ptr(config_update);
        config_update_conv.is_owned = ptr_is_owned(config_update);
@@ -44192,7 +48370,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1par
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, jobjectArray channel_ids, int64_t config) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, int64_tArray channel_ids, int64_t config) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
@@ -44201,19 +48379,23 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1cha
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
-       LDKCVec_ThirtyTwoBytesZ channel_ids_constr;
+       LDKCVec_ChannelIdZ channel_ids_constr;
        channel_ids_constr.datalen = (*env)->GetArrayLength(env, channel_ids);
        if (channel_ids_constr.datalen > 0)
-               channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements");
+               channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements");
        else
                channel_ids_constr.data = NULL;
-       for (size_t i = 0; i < channel_ids_constr.datalen; i++) {
-               int8_tArray channel_ids_conv_8 = (*env)->GetObjectArrayElement(env, channel_ids, i);
-               LDKThirtyTwoBytes channel_ids_conv_8_ref;
-               CHECK((*env)->GetArrayLength(env, channel_ids_conv_8) == 32);
-               (*env)->GetByteArrayRegion(env, channel_ids_conv_8, 0, 32, channel_ids_conv_8_ref.data);
-               channel_ids_constr.data[i] = channel_ids_conv_8_ref;
-       }
+       int64_t* channel_ids_vals = (*env)->GetLongArrayElements (env, channel_ids, NULL);
+       for (size_t l = 0; l < channel_ids_constr.datalen; l++) {
+               int64_t channel_ids_conv_11 = channel_ids_vals[l];
+               LDKChannelId channel_ids_conv_11_conv;
+               channel_ids_conv_11_conv.inner = untag_ptr(channel_ids_conv_11);
+               channel_ids_conv_11_conv.is_owned = ptr_is_owned(channel_ids_conv_11);
+               CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_ids_conv_11_conv);
+               channel_ids_conv_11_conv = ChannelId_clone(&channel_ids_conv_11_conv);
+               channel_ids_constr.data[l] = channel_ids_conv_11_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, channel_ids, channel_ids_vals, 0);
        LDKChannelConfig config_conv;
        config_conv.inner = untag_ptr(config);
        config_conv.is_owned = ptr_is_owned(config);
@@ -44224,7 +48406,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1cha
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1forward_1intercepted_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray intercept_id, int8_tArray next_hop_channel_id, int8_tArray next_node_id, int64_t amt_to_forward_msat) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1forward_1intercepted_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray intercept_id, int64_t next_hop_channel_id, int8_tArray next_node_id, int64_t amt_to_forward_msat) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
@@ -44233,15 +48415,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1forward_1in
        LDKThirtyTwoBytes intercept_id_ref;
        CHECK((*env)->GetArrayLength(env, intercept_id) == 32);
        (*env)->GetByteArrayRegion(env, intercept_id, 0, 32, intercept_id_ref.data);
-       uint8_t next_hop_channel_id_arr[32];
-       CHECK((*env)->GetArrayLength(env, next_hop_channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, next_hop_channel_id, 0, 32, next_hop_channel_id_arr);
-       uint8_t (*next_hop_channel_id_ref)[32] = &next_hop_channel_id_arr;
+       LDKChannelId next_hop_channel_id_conv;
+       next_hop_channel_id_conv.inner = untag_ptr(next_hop_channel_id);
+       next_hop_channel_id_conv.is_owned = ptr_is_owned(next_hop_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(next_hop_channel_id_conv);
+       next_hop_channel_id_conv.is_owned = false;
        LDKPublicKey next_node_id_ref;
        CHECK((*env)->GetArrayLength(env, next_node_id) == 33);
        (*env)->GetByteArrayRegion(env, next_node_id, 0, 33, next_node_id_ref.compressed_form);
        LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = ChannelManager_forward_intercepted_htlc(&this_arg_conv, intercept_id_ref, next_hop_channel_id_ref, next_node_id_ref, amt_to_forward_msat);
+       *ret_conv = ChannelManager_forward_intercepted_htlc(&this_arg_conv, intercept_id_ref, &next_hop_channel_id_conv, next_node_id_ref, amt_to_forward_msat);
        return tag_ptr(ret_conv, true);
 }
 
@@ -44342,16 +48525,17 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelManager_1get_1ou
        return ret_arr;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       uint8_t temporary_channel_id_arr[32];
-       CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_arr);
-       uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr;
+       LDKChannelId temporary_channel_id_conv;
+       temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+       temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+       temporary_channel_id_conv.is_owned = false;
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
@@ -44359,20 +48543,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inb
        CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
        (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
        LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = ChannelManager_accept_inbound_channel(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, user_channel_id_ref);
+       *ret_conv = ChannelManager_accept_inbound_channel(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, user_channel_id_ref);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel_1from_1trusted_1peer_10conf(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel_1from_1trusted_1peer_10conf(JNIEnv *env, jclass clz, int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       uint8_t temporary_channel_id_arr[32];
-       CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_arr);
-       uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr;
+       LDKChannelId temporary_channel_id_conv;
+       temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+       temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+       temporary_channel_id_conv.is_owned = false;
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
@@ -44380,7 +48565,40 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inb
        CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
        (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
        LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, user_channel_id_ref);
+       *ret_conv = ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, user_channel_id_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1offer_1builder(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKChannelManager this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = ChannelManager_create_offer_builder(&this_arg_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1refund_1builder(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats, int64_t absolute_expiry, int8_tArray payment_id, int64_t retry_strategy, int64_t max_total_routing_fee_msat) {
+       LDKChannelManager this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKThirtyTwoBytes payment_id_ref;
+       CHECK((*env)->GetArrayLength(env, payment_id) == 32);
+       (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data);
+       void* retry_strategy_ptr = untag_ptr(retry_strategy);
+       CHECK_ACCESS(retry_strategy_ptr);
+       LDKRetry retry_strategy_conv = *(LDKRetry*)(retry_strategy_ptr);
+       retry_strategy_conv = Retry_clone((LDKRetry*)untag_ptr(retry_strategy));
+       void* max_total_routing_fee_msat_ptr = untag_ptr(max_total_routing_fee_msat);
+       CHECK_ACCESS(max_total_routing_fee_msat_ptr);
+       LDKCOption_u64Z max_total_routing_fee_msat_conv = *(LDKCOption_u64Z*)(max_total_routing_fee_msat_ptr);
+       max_total_routing_fee_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(max_total_routing_fee_msat));
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = ChannelManager_create_refund_builder(&this_arg_conv, amount_msats, absolute_expiry, payment_id_ref, retry_strategy_conv, max_total_routing_fee_msat_conv);
        return tag_ptr(ret_conv, true);
 }
 
@@ -44434,7 +48652,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1request_1re
        refund_conv.is_owned = ptr_is_owned(refund);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(refund_conv);
        refund_conv.is_owned = false;
-       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
        *ret_conv = ChannelManager_request_refund_payment(&this_arg_conv, &refund_conv);
        return tag_ptr(ret_conv, true);
 }
@@ -44697,6 +48915,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1OffersM
        return tag_ptr(ret_ret, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1NodeIdLookUp(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKChannelManager this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKNodeIdLookUp* ret_ret = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp");
+       *ret_ret = ChannelManager_as_NodeIdLookUp(&this_arg_conv);
+       return tag_ptr(ret_ret, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_provided_1init_1features(JNIEnv *env, jclass clz, int64_t config) {
        LDKUserConfig config_conv;
        config_conv.inner = untag_ptr(config);
@@ -45379,6 +49608,20 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint
        return ret_arr;
 }
 
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint_1derive_1add_1tweak(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray per_commitment_point) {
+       LDKDelayedPaymentBasepoint this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKPublicKey per_commitment_point_ref;
+       CHECK((*env)->GetArrayLength(env, per_commitment_point) == 33);
+       (*env)->GetByteArrayRegion(env, per_commitment_point, 0, 33, per_commitment_point_ref.compressed_form);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, DelayedPaymentBasepoint_derive_add_tweak(&this_arg_conv, per_commitment_point_ref).data);
+       return ret_arr;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKDelayedPaymentBasepoint obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -45659,6 +49902,20 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1to_1publ
        return ret_arr;
 }
 
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1derive_1add_1tweak(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray per_commitment_point) {
+       LDKHtlcBasepoint this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKPublicKey per_commitment_point_ref;
+       CHECK((*env)->GetArrayLength(env, per_commitment_point) == 33);
+       (*env)->GetByteArrayRegion(env, per_commitment_point, 0, 33, per_commitment_point_ref.compressed_form);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, HtlcBasepoint_derive_add_tweak(&this_arg_conv, per_commitment_point_ref).data);
+       return ret_arr;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKHtlcBasepoint obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -45831,6 +50088,19 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HtlcKey_1read(JNIEnv *env,
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_add_1public_1key_1tweak(JNIEnv *env, jclass clz, int8_tArray base_point, int8_tArray tweak) {
+       LDKPublicKey base_point_ref;
+       CHECK((*env)->GetArrayLength(env, base_point) == 33);
+       (*env)->GetByteArrayRegion(env, base_point, 0, 33, base_point_ref.compressed_form);
+       uint8_t tweak_arr[32];
+       CHECK((*env)->GetArrayLength(env, tweak) == 32);
+       (*env)->GetByteArrayRegion(env, tweak, 0, 32, tweak_arr);
+       uint8_t (*tweak_ref)[32] = &tweak_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, add_public_key_tweak(base_point_ref, tweak_ref).compressed_form);
+       return ret_arr;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevocationBasepoint_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKRevocationBasepoint this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -46252,6 +50522,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1unsupported_1c
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1dangerous_1value(JNIEnv *env, jclass clz) {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_dangerous_value();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1hash(JNIEnv *env, jclass clz, int64_t o) {
        LDKDecodeError* o_conv = (LDKDecodeError*)untag_ptr(o);
        int64_t ret_conv = DecodeError_hash(o_conv);
@@ -46433,27 +50710,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1free(JNIEnv *env
        ErrorMessage_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKErrorMessage this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ErrorMessage_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = ErrorMessage_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKErrorMessage this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       ErrorMessage_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       ErrorMessage_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -46478,12 +50759,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1data(JNIEnv
        ErrorMessage_set_data(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, jstring data_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, jstring data_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKStr data_arg_conv = java_to_owned_str(env, data_arg);
-       LDKErrorMessage ret_var = ErrorMessage_new(channel_id_arg_ref, data_arg_conv);
+       LDKErrorMessage ret_var = ErrorMessage_new(channel_id_arg_conv, data_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -46553,27 +50836,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1free(JNIEnv *e
        WarningMessage_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKWarningMessage this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *WarningMessage_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = WarningMessage_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKWarningMessage this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       WarningMessage_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       WarningMessage_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -46598,12 +50885,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1set_1data(JNIE
        WarningMessage_set_data(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WarningMessage_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, jstring data_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WarningMessage_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, jstring data_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKStr data_arg_conv = java_to_owned_str(env, data_arg);
-       LDKWarningMessage ret_var = WarningMessage_new(channel_id_arg_ref, data_arg_conv);
+       LDKWarningMessage ret_var = WarningMessage_new(channel_id_arg_conv, data_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -46864,27 +51153,27 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Pong_1eq(JNIEnv *env, jcla
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
-       LDKOpenChannel this_obj_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKCommonOpenChannelFields this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
        this_obj_conv.is_owned = ptr_is_owned(this_obj);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
-       OpenChannel_free(this_obj_conv);
+       CommonOpenChannelFields_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannel_get_chain_hash(&this_ptr_conv));
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *CommonOpenChannelFields_get_chain_hash(&this_ptr_conv));
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -46892,216 +51181,182 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1chain_1hash(
        LDKThirtyTwoBytes val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 32);
        (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       OpenChannel_set_chain_hash(&this_ptr_conv, val_ref);
+       CommonOpenChannelFields_set_chain_hash(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannel_get_temporary_channel_id(&this_ptr_conv));
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannel this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       OpenChannel_set_temporary_channel_id(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int64_t ret_conv = OpenChannel_get_funding_satoshis(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannel this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       OpenChannel_set_funding_satoshis(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int64_t ret_conv = OpenChannel_get_push_msat(&this_ptr_conv);
-       return ret_conv;
+       LDKChannelId ret_var = CommonOpenChannelFields_get_temporary_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       OpenChannel_set_push_msat(&this_ptr_conv, val);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       CommonOpenChannelFields_set_temporary_channel_id(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int64_t ret_conv = OpenChannel_get_dust_limit_satoshis(&this_ptr_conv);
+       int64_t ret_conv = CommonOpenChannelFields_get_funding_satoshis(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       OpenChannel_set_dust_limit_satoshis(&this_ptr_conv, val);
+       CommonOpenChannelFields_set_funding_satoshis(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int64_t ret_conv = OpenChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
+       int64_t ret_conv = CommonOpenChannelFields_get_dust_limit_satoshis(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       OpenChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
+       CommonOpenChannelFields_set_dust_limit_satoshis(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int64_t ret_conv = OpenChannel_get_channel_reserve_satoshis(&this_ptr_conv);
+       int64_t ret_conv = CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       OpenChannel_set_channel_reserve_satoshis(&this_ptr_conv, val);
+       CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int64_t ret_conv = OpenChannel_get_htlc_minimum_msat(&this_ptr_conv);
+       int64_t ret_conv = CommonOpenChannelFields_get_htlc_minimum_msat(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       OpenChannel_set_htlc_minimum_msat(&this_ptr_conv, val);
+       CommonOpenChannelFields_set_htlc_minimum_msat(&this_ptr_conv, val);
 }
 
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1feerate_1per_1kw(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int32_t ret_conv = OpenChannel_get_feerate_per_kw(&this_ptr_conv);
+       int32_t ret_conv = CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1feerate_1per_1kw(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       OpenChannel_set_feerate_per_kw(&this_ptr_conv, val);
+       CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(&this_ptr_conv, val);
 }
 
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int16_t ret_conv = OpenChannel_get_to_self_delay(&this_ptr_conv);
+       int16_t ret_conv = CommonOpenChannelFields_get_to_self_delay(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       OpenChannel_set_to_self_delay(&this_ptr_conv, val);
+       CommonOpenChannelFields_set_to_self_delay(&this_ptr_conv, val);
 }
 
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int16_t ret_conv = OpenChannel_get_max_accepted_htlcs(&this_ptr_conv);
+       int16_t ret_conv = CommonOpenChannelFields_get_max_accepted_htlcs(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       OpenChannel_set_max_accepted_htlcs(&this_ptr_conv, val);
+       CommonOpenChannelFields_set_max_accepted_htlcs(&this_ptr_conv, val);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_funding_pubkey(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_funding_pubkey(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -47109,22 +51364,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1pub
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannel_set_funding_pubkey(&this_ptr_conv, val_ref);
+       CommonOpenChannelFields_set_funding_pubkey(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_revocation_basepoint(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -47132,22 +51387,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1revocation_1
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannel_set_revocation_basepoint(&this_ptr_conv, val_ref);
+       CommonOpenChannelFields_set_revocation_basepoint(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_payment_point(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_payment_basepoint(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -47155,22 +51410,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1payment_1poi
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannel_set_payment_point(&this_ptr_conv, val_ref);
+       CommonOpenChannelFields_set_payment_basepoint(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -47178,22 +51433,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1delayed_1pay
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
+       CommonOpenChannelFields_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_htlc_basepoint(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -47201,22 +51456,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1basepo
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannel_set_htlc_basepoint(&this_ptr_conv, val_ref);
+       CommonOpenChannelFields_set_htlc_basepoint(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -47224,42 +51479,42 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1first_1per_1
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref);
+       CommonOpenChannelFields_set_first_per_commitment_point(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_t ret_conv = OpenChannel_get_channel_flags(&this_ptr_conv);
+       int8_t ret_conv = CommonOpenChannelFields_get_channel_flags(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       OpenChannel_set_channel_flags(&this_ptr_conv, val);
+       CommonOpenChannelFields_set_channel_flags(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ");
-       *ret_copy = OpenChannel_get_shutdown_scriptpubkey(&this_ptr_conv);
+       *ret_copy = CommonOpenChannelFields_get_shutdown_scriptpubkey(&this_ptr_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -47268,24 +51523,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1shutdown_1sc
        CHECK_ACCESS(val_ptr);
        LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr);
        val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val));
-       OpenChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
+       CommonOpenChannelFields_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKChannelTypeFeatures ret_var = OpenChannel_get_channel_type(&this_ptr_conv);
+       LDKChannelTypeFeatures ret_var = CommonOpenChannelFields_get_channel_type(&this_ptr_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -47295,25 +51550,27 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1typ
        val_conv.is_owned = ptr_is_owned(val);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
        val_conv = ChannelTypeFeatures_clone(&val_conv);
-       OpenChannel_set_channel_type(&this_ptr_conv, val_conv);
+       CommonOpenChannelFields_set_channel_type(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1new(JNIEnv *env, jclass clz, int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t push_msat_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t feerate_per_kw_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1new(JNIEnv *env, jclass clz, int8_tArray chain_hash_arg, int64_t temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t commitment_feerate_sat_per_1000_weight_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) {
        LDKThirtyTwoBytes chain_hash_arg_ref;
        CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32);
        (*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data);
-       LDKThirtyTwoBytes temporary_channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data);
+       LDKChannelId temporary_channel_id_arg_conv;
+       temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg);
+       temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv);
+       temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv);
        LDKPublicKey funding_pubkey_arg_ref;
        CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
        (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
        LDKPublicKey revocation_basepoint_arg_ref;
        CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33);
        (*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form);
-       LDKPublicKey payment_point_arg_ref;
-       CHECK((*env)->GetArrayLength(env, payment_point_arg) == 33);
-       (*env)->GetByteArrayRegion(env, payment_point_arg, 0, 33, payment_point_arg_ref.compressed_form);
+       LDKPublicKey payment_basepoint_arg_ref;
+       CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33);
+       (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form);
        LDKPublicKey delayed_payment_basepoint_arg_ref;
        CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33);
        (*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form);
@@ -47332,7 +51589,148 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1new(JNIEnv *en
        channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
        channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
-       LDKOpenChannel ret_var = OpenChannel_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_satoshis_arg, push_msat_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, feerate_per_kw_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv);
+       LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_new(chain_hash_arg_ref, temporary_channel_id_arg_conv, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, commitment_feerate_sat_per_1000_weight_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline uint64_t CommonOpenChannelFields_clone_ptr(LDKCommonOpenChannelFields *NONNULL_PTR arg) {
+       LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCommonOpenChannelFields arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = CommonOpenChannelFields_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCommonOpenChannelFields orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCommonOpenChannelFields o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv.is_owned = false;
+       int64_t ret_conv = CommonOpenChannelFields_hash(&o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKCommonOpenChannelFields a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKCommonOpenChannelFields b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = CommonOpenChannelFields_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKOpenChannel this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       OpenChannel_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKOpenChannel this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCommonOpenChannelFields ret_var = OpenChannel_get_common_fields(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKOpenChannel this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCommonOpenChannelFields val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = CommonOpenChannelFields_clone(&val_conv);
+       OpenChannel_set_common_fields(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKOpenChannel this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int64_t ret_conv = OpenChannel_get_push_msat(&this_ptr_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKOpenChannel this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       OpenChannel_set_push_msat(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKOpenChannel this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int64_t ret_conv = OpenChannel_get_channel_reserve_satoshis(&this_ptr_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKOpenChannel this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       OpenChannel_set_channel_reserve_satoshis(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int64_t push_msat_arg, int64_t channel_reserve_satoshis_arg) {
+       LDKCommonOpenChannelFields common_fields_arg_conv;
+       common_fields_arg_conv.inner = untag_ptr(common_fields_arg);
+       common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv);
+       common_fields_arg_conv = CommonOpenChannelFields_clone(&common_fields_arg_conv);
+       LDKOpenChannel ret_var = OpenChannel_new(common_fields_arg_conv, push_msat_arg, channel_reserve_satoshis_arg);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -47402,50 +51800,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1free(JNIEnv *en
        OpenChannelV2_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKOpenChannelV2 this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannelV2_get_chain_hash(&this_ptr_conv));
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       OpenChannelV2_set_chain_hash(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannelV2_get_temporary_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKCommonOpenChannelFields ret_var = OpenChannelV2_get_common_fields(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKOpenChannelV2 this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       OpenChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref);
+       LDKCommonOpenChannelFields val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = CommonOpenChannelFields_clone(&val_conv);
+       OpenChannelV2_set_common_fields(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -47467,139 +51846,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1f
        OpenChannelV2_set_funding_feerate_sat_per_1000_weight(&this_ptr_conv, val);
 }
 
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int32_t ret_conv = OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int64_t ret_conv = OpenChannelV2_get_funding_satoshis(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       OpenChannelV2_set_funding_satoshis(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int64_t ret_conv = OpenChannelV2_get_dust_limit_satoshis(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       OpenChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int64_t ret_conv = OpenChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       OpenChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int64_t ret_conv = OpenChannelV2_get_htlc_minimum_msat(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       OpenChannelV2_set_htlc_minimum_msat(&this_ptr_conv, val);
-}
-
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int16_t ret_conv = OpenChannelV2_get_to_self_delay(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       OpenChannelV2_set_to_self_delay(&this_ptr_conv, val);
-}
-
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int16_t ret_conv = OpenChannelV2_get_max_accepted_htlcs(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       OpenChannelV2_set_max_accepted_htlcs(&this_ptr_conv, val);
-}
-
 JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1locktime(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKOpenChannelV2 this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
@@ -47619,144 +51865,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1locktime(J
        OpenChannelV2_set_locktime(&this_ptr_conv, val);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_funding_pubkey(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannelV2_set_funding_pubkey(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_revocation_basepoint(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannelV2_set_revocation_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_payment_basepoint(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannelV2_set_payment_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannelV2_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_htlc_basepoint(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannelV2_set_htlc_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannelV2_set_first_per_commitment_point(&this_ptr_conv, val_ref);
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1second_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKOpenChannelV2 this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
@@ -47780,77 +51888,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1second_1pe
        OpenChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_t ret_conv = OpenChannelV2_get_channel_flags(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       OpenChannelV2_set_channel_flags(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ");
-       *ret_copy = OpenChannelV2_get_shutdown_scriptpubkey(&this_ptr_conv);
-       int64_t ret_ref = tag_ptr(ret_copy, true);
-       return ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       void* val_ptr = untag_ptr(val);
-       CHECK_ACCESS(val_ptr);
-       LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr);
-       val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val));
-       OpenChannelV2_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKChannelTypeFeatures ret_var = OpenChannelV2_get_channel_type(&this_ptr_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKChannelTypeFeatures val_conv;
-       val_conv.inner = untag_ptr(val);
-       val_conv.is_owned = ptr_is_owned(val);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
-       val_conv = ChannelTypeFeatures_clone(&val_conv);
-       OpenChannelV2_set_channel_type(&this_ptr_conv, val_conv);
-}
-
 JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1require_1confirmed_1inputs(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKOpenChannelV2 this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
@@ -47871,45 +51908,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1require_1c
        OpenChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1new(JNIEnv *env, jclass clz, int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int32_t funding_feerate_sat_per_1000_weight_arg, int32_t commitment_feerate_sat_per_1000_weight_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_tArray second_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg, jclass require_confirmed_inputs_arg) {
-       LDKThirtyTwoBytes chain_hash_arg_ref;
-       CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32);
-       (*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data);
-       LDKThirtyTwoBytes temporary_channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data);
-       LDKPublicKey funding_pubkey_arg_ref;
-       CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
-       (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
-       LDKPublicKey revocation_basepoint_arg_ref;
-       CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33);
-       (*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form);
-       LDKPublicKey payment_basepoint_arg_ref;
-       CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33);
-       (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form);
-       LDKPublicKey delayed_payment_basepoint_arg_ref;
-       CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33);
-       (*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form);
-       LDKPublicKey htlc_basepoint_arg_ref;
-       CHECK((*env)->GetArrayLength(env, htlc_basepoint_arg) == 33);
-       (*env)->GetByteArrayRegion(env, htlc_basepoint_arg, 0, 33, htlc_basepoint_arg_ref.compressed_form);
-       LDKPublicKey first_per_commitment_point_arg_ref;
-       CHECK((*env)->GetArrayLength(env, first_per_commitment_point_arg) == 33);
-       (*env)->GetByteArrayRegion(env, first_per_commitment_point_arg, 0, 33, first_per_commitment_point_arg_ref.compressed_form);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int32_t funding_feerate_sat_per_1000_weight_arg, int32_t locktime_arg, int8_tArray second_per_commitment_point_arg, jclass require_confirmed_inputs_arg) {
+       LDKCommonOpenChannelFields common_fields_arg_conv;
+       common_fields_arg_conv.inner = untag_ptr(common_fields_arg);
+       common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv);
+       common_fields_arg_conv = CommonOpenChannelFields_clone(&common_fields_arg_conv);
        LDKPublicKey second_per_commitment_point_arg_ref;
        CHECK((*env)->GetArrayLength(env, second_per_commitment_point_arg) == 33);
        (*env)->GetByteArrayRegion(env, second_per_commitment_point_arg, 0, 33, second_per_commitment_point_arg_ref.compressed_form);
-       void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg);
-       CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr);
-       LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr);
-       shutdown_scriptpubkey_arg_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(shutdown_scriptpubkey_arg));
-       LDKChannelTypeFeatures channel_type_arg_conv;
-       channel_type_arg_conv.inner = untag_ptr(channel_type_arg);
-       channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
-       channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
        LDKCOption_NoneZ require_confirmed_inputs_arg_conv = LDKCOption_NoneZ_from_java(env, require_confirmed_inputs_arg);
-       LDKOpenChannelV2 ret_var = OpenChannelV2_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_feerate_sat_per_1000_weight_arg, commitment_feerate_sat_per_1000_weight_arg, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, to_self_delay_arg, max_accepted_htlcs_arg, locktime_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, second_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv, require_confirmed_inputs_arg_conv);
+       LDKOpenChannelV2 ret_var = OpenChannelV2_new(common_fields_arg_conv, funding_feerate_sat_per_1000_weight_arg, locktime_arg, second_per_commitment_point_arg_ref, require_confirmed_inputs_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -47971,183 +51980,168 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1eq(JNIEnv *
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
-       LDKAcceptChannel this_obj_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKCommonAcceptChannelFields this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
        this_obj_conv.is_owned = ptr_is_owned(this_obj);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
-       AcceptChannel_free(this_obj_conv);
+       CommonAcceptChannelFields_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *AcceptChannel_get_temporary_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = CommonAcceptChannelFields_get_temporary_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       AcceptChannel_set_temporary_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       CommonAcceptChannelFields_set_temporary_channel_id(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int64_t ret_conv = AcceptChannel_get_dust_limit_satoshis(&this_ptr_conv);
+       int64_t ret_conv = CommonAcceptChannelFields_get_dust_limit_satoshis(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       AcceptChannel_set_dust_limit_satoshis(&this_ptr_conv, val);
+       CommonAcceptChannelFields_set_dust_limit_satoshis(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int64_t ret_conv = AcceptChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
+       int64_t ret_conv = CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       AcceptChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
+       CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int64_t ret_conv = AcceptChannel_get_channel_reserve_satoshis(&this_ptr_conv);
+       int64_t ret_conv = CommonAcceptChannelFields_get_htlc_minimum_msat(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       AcceptChannel_set_channel_reserve_satoshis(&this_ptr_conv, val);
+       CommonAcceptChannelFields_set_htlc_minimum_msat(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int64_t ret_conv = AcceptChannel_get_htlc_minimum_msat(&this_ptr_conv);
+       int32_t ret_conv = CommonAcceptChannelFields_get_minimum_depth(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       AcceptChannel_set_htlc_minimum_msat(&this_ptr_conv, val);
+       CommonAcceptChannelFields_set_minimum_depth(&this_ptr_conv, val);
 }
 
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int32_t ret_conv = AcceptChannel_get_minimum_depth(&this_ptr_conv);
+       int16_t ret_conv = CommonAcceptChannelFields_get_to_self_delay(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       AcceptChannel_set_minimum_depth(&this_ptr_conv, val);
+       CommonAcceptChannelFields_set_to_self_delay(&this_ptr_conv, val);
 }
 
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int16_t ret_conv = AcceptChannel_get_to_self_delay(&this_ptr_conv);
+       int16_t ret_conv = CommonAcceptChannelFields_get_max_accepted_htlcs(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       AcceptChannel_set_to_self_delay(&this_ptr_conv, val);
+       CommonAcceptChannelFields_set_max_accepted_htlcs(&this_ptr_conv, val);
 }
 
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int16_t ret_conv = AcceptChannel_get_max_accepted_htlcs(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
-       LDKAcceptChannel this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       AcceptChannel_set_max_accepted_htlcs(&this_ptr_conv, val);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_funding_pubkey(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_funding_pubkey(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -48155,22 +52149,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1funding_1p
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannel_set_funding_pubkey(&this_ptr_conv, val_ref);
+       CommonAcceptChannelFields_set_funding_pubkey(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_revocation_basepoint(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -48178,22 +52172,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1revocation
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannel_set_revocation_basepoint(&this_ptr_conv, val_ref);
+       CommonAcceptChannelFields_set_revocation_basepoint(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_payment_point(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_payment_basepoint(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -48201,22 +52195,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1payment_1p
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannel_set_payment_point(&this_ptr_conv, val_ref);
+       CommonAcceptChannelFields_set_payment_basepoint(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -48224,22 +52218,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1delayed_1p
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
+       CommonAcceptChannelFields_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_htlc_basepoint(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -48247,22 +52241,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1base
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannel_set_htlc_basepoint(&this_ptr_conv, val_ref);
+       CommonAcceptChannelFields_set_htlc_basepoint(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -48270,23 +52264,23 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1first_1per
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref);
+       CommonAcceptChannelFields_set_first_per_commitment_point(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ");
-       *ret_copy = AcceptChannel_get_shutdown_scriptpubkey(&this_ptr_conv);
+       *ret_copy = CommonAcceptChannelFields_get_shutdown_scriptpubkey(&this_ptr_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -48295,24 +52289,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1shutdown_1
        CHECK_ACCESS(val_ptr);
        LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr);
        val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val));
-       AcceptChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
+       CommonAcceptChannelFields_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKChannelTypeFeatures ret_var = AcceptChannel_get_channel_type(&this_ptr_conv);
+       LDKChannelTypeFeatures ret_var = CommonAcceptChannelFields_get_channel_type(&this_ptr_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -48322,22 +52316,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1t
        val_conv.is_owned = ptr_is_owned(val);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
        val_conv = ChannelTypeFeatures_clone(&val_conv);
-       AcceptChannel_set_channel_type(&this_ptr_conv, val_conv);
+       CommonAcceptChannelFields_set_channel_type(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1new(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) {
-       LDKThirtyTwoBytes temporary_channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1new(JNIEnv *env, jclass clz, int64_t temporary_channel_id_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) {
+       LDKChannelId temporary_channel_id_arg_conv;
+       temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg);
+       temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv);
+       temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv);
        LDKPublicKey funding_pubkey_arg_ref;
        CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
        (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
        LDKPublicKey revocation_basepoint_arg_ref;
        CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33);
        (*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form);
-       LDKPublicKey payment_point_arg_ref;
-       CHECK((*env)->GetArrayLength(env, payment_point_arg) == 33);
-       (*env)->GetByteArrayRegion(env, payment_point_arg, 0, 33, payment_point_arg_ref.compressed_form);
+       LDKPublicKey payment_basepoint_arg_ref;
+       CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33);
+       (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form);
        LDKPublicKey delayed_payment_basepoint_arg_ref;
        CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33);
        (*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form);
@@ -48356,7 +52352,129 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1new(JNIEnv *
        channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
        channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
-       LDKAcceptChannel ret_var = AcceptChannel_new(temporary_channel_id_arg_ref, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv);
+       LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_new(temporary_channel_id_arg_conv, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline uint64_t CommonAcceptChannelFields_clone_ptr(LDKCommonAcceptChannelFields *NONNULL_PTR arg) {
+       LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCommonAcceptChannelFields arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = CommonAcceptChannelFields_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCommonAcceptChannelFields orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCommonAcceptChannelFields o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv.is_owned = false;
+       int64_t ret_conv = CommonAcceptChannelFields_hash(&o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKCommonAcceptChannelFields a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKCommonAcceptChannelFields b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = CommonAcceptChannelFields_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKAcceptChannel this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       AcceptChannel_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKAcceptChannel this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCommonAcceptChannelFields ret_var = AcceptChannel_get_common_fields(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKAcceptChannel this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCommonAcceptChannelFields val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = CommonAcceptChannelFields_clone(&val_conv);
+       AcceptChannel_set_common_fields(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKAcceptChannel this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int64_t ret_conv = AcceptChannel_get_channel_reserve_satoshis(&this_ptr_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKAcceptChannel this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       AcceptChannel_set_channel_reserve_satoshis(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int64_t channel_reserve_satoshis_arg) {
+       LDKCommonAcceptChannelFields common_fields_arg_conv;
+       common_fields_arg_conv.inner = untag_ptr(common_fields_arg);
+       common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv);
+       common_fields_arg_conv = CommonAcceptChannelFields_clone(&common_fields_arg_conv);
+       LDKAcceptChannel ret_var = AcceptChannel_new(common_fields_arg_conv, channel_reserve_satoshis_arg);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -48426,27 +52544,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1free(JNIEnv *
        AcceptChannelV2_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKAcceptChannelV2 this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *AcceptChannelV2_get_temporary_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKCommonAcceptChannelFields ret_var = AcceptChannelV2_get_common_fields(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKAcceptChannelV2 this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       AcceptChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref);
+       LDKCommonAcceptChannelFields val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = CommonAcceptChannelFields_clone(&val_conv);
+       AcceptChannelV2_set_common_fields(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -48468,258 +52590,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1funding_
        AcceptChannelV2_set_funding_satoshis(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int64_t ret_conv = AcceptChannelV2_get_dust_limit_satoshis(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       AcceptChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int64_t ret_conv = AcceptChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       AcceptChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int64_t ret_conv = AcceptChannelV2_get_htlc_minimum_msat(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       AcceptChannelV2_set_htlc_minimum_msat(&this_ptr_conv, val);
-}
-
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int32_t ret_conv = AcceptChannelV2_get_minimum_depth(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       AcceptChannelV2_set_minimum_depth(&this_ptr_conv, val);
-}
-
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int16_t ret_conv = AcceptChannelV2_get_to_self_delay(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       AcceptChannelV2_set_to_self_delay(&this_ptr_conv, val);
-}
-
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int16_t ret_conv = AcceptChannelV2_get_max_accepted_htlcs(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       AcceptChannelV2_set_max_accepted_htlcs(&this_ptr_conv, val);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_funding_pubkey(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannelV2_set_funding_pubkey(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_revocation_basepoint(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannelV2_set_revocation_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_payment_basepoint(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannelV2_set_payment_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannelV2_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_htlc_basepoint(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannelV2_set_htlc_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannelV2_set_first_per_commitment_point(&this_ptr_conv, val_ref);
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1second_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKAcceptChannelV2 this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
@@ -48743,58 +52613,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1second_1
        AcceptChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ");
-       *ret_copy = AcceptChannelV2_get_shutdown_scriptpubkey(&this_ptr_conv);
-       int64_t ret_ref = tag_ptr(ret_copy, true);
-       return ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       void* val_ptr = untag_ptr(val);
-       CHECK_ACCESS(val_ptr);
-       LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr);
-       val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val));
-       AcceptChannelV2_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKChannelTypeFeatures ret_var = AcceptChannelV2_get_channel_type(&this_ptr_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKChannelTypeFeatures val_conv;
-       val_conv.inner = untag_ptr(val);
-       val_conv.is_owned = ptr_is_owned(val);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
-       val_conv = ChannelTypeFeatures_clone(&val_conv);
-       AcceptChannelV2_set_channel_type(&this_ptr_conv, val_conv);
-}
-
 JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1require_1confirmed_1inputs(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKAcceptChannelV2 this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
@@ -48815,42 +52633,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1require_
        AcceptChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1new(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_tArray second_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg, jclass require_confirmed_inputs_arg) {
-       LDKThirtyTwoBytes temporary_channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data);
-       LDKPublicKey funding_pubkey_arg_ref;
-       CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
-       (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
-       LDKPublicKey revocation_basepoint_arg_ref;
-       CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33);
-       (*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form);
-       LDKPublicKey payment_basepoint_arg_ref;
-       CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33);
-       (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form);
-       LDKPublicKey delayed_payment_basepoint_arg_ref;
-       CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33);
-       (*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form);
-       LDKPublicKey htlc_basepoint_arg_ref;
-       CHECK((*env)->GetArrayLength(env, htlc_basepoint_arg) == 33);
-       (*env)->GetByteArrayRegion(env, htlc_basepoint_arg, 0, 33, htlc_basepoint_arg_ref.compressed_form);
-       LDKPublicKey first_per_commitment_point_arg_ref;
-       CHECK((*env)->GetArrayLength(env, first_per_commitment_point_arg) == 33);
-       (*env)->GetByteArrayRegion(env, first_per_commitment_point_arg, 0, 33, first_per_commitment_point_arg_ref.compressed_form);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int64_t funding_satoshis_arg, int8_tArray second_per_commitment_point_arg, jclass require_confirmed_inputs_arg) {
+       LDKCommonAcceptChannelFields common_fields_arg_conv;
+       common_fields_arg_conv.inner = untag_ptr(common_fields_arg);
+       common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv);
+       common_fields_arg_conv = CommonAcceptChannelFields_clone(&common_fields_arg_conv);
        LDKPublicKey second_per_commitment_point_arg_ref;
        CHECK((*env)->GetArrayLength(env, second_per_commitment_point_arg) == 33);
        (*env)->GetByteArrayRegion(env, second_per_commitment_point_arg, 0, 33, second_per_commitment_point_arg_ref.compressed_form);
-       void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg);
-       CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr);
-       LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr);
-       shutdown_scriptpubkey_arg_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(shutdown_scriptpubkey_arg));
-       LDKChannelTypeFeatures channel_type_arg_conv;
-       channel_type_arg_conv.inner = untag_ptr(channel_type_arg);
-       channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
-       channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
        LDKCOption_NoneZ require_confirmed_inputs_arg_conv = LDKCOption_NoneZ_from_java(env, require_confirmed_inputs_arg);
-       LDKAcceptChannelV2 ret_var = AcceptChannelV2_new(temporary_channel_id_arg_ref, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, second_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv, require_confirmed_inputs_arg_conv);
+       LDKAcceptChannelV2 ret_var = AcceptChannelV2_new(common_fields_arg_conv, funding_satoshis_arg, second_per_commitment_point_arg_ref, require_confirmed_inputs_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -48920,27 +52713,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1free(JNIEnv *e
        FundingCreated_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKFundingCreated this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *FundingCreated_get_temporary_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = FundingCreated_get_temporary_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKFundingCreated this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       FundingCreated_set_temporary_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       FundingCreated_set_temporary_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1funding_1txid(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -49008,17 +52805,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1signature
        FundingCreated_set_signature(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id_arg, int8_tArray funding_txid_arg, int16_t funding_output_index_arg, int8_tArray signature_arg) {
-       LDKThirtyTwoBytes temporary_channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new(JNIEnv *env, jclass clz, int64_t temporary_channel_id_arg, int8_tArray funding_txid_arg, int16_t funding_output_index_arg, int8_tArray signature_arg) {
+       LDKChannelId temporary_channel_id_arg_conv;
+       temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg);
+       temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv);
+       temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv);
        LDKThirtyTwoBytes funding_txid_arg_ref;
        CHECK((*env)->GetArrayLength(env, funding_txid_arg) == 32);
        (*env)->GetByteArrayRegion(env, funding_txid_arg, 0, 32, funding_txid_arg_ref.data);
        LDKECDSASignature signature_arg_ref;
        CHECK((*env)->GetArrayLength(env, signature_arg) == 64);
        (*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form);
-       LDKFundingCreated ret_var = FundingCreated_new(temporary_channel_id_arg_ref, funding_txid_arg_ref, funding_output_index_arg, signature_arg_ref);
+       LDKFundingCreated ret_var = FundingCreated_new(temporary_channel_id_arg_conv, funding_txid_arg_ref, funding_output_index_arg, signature_arg_ref);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -49088,27 +52887,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1free(JNIEnv *en
        FundingSigned_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKFundingSigned this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *FundingSigned_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = FundingSigned_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKFundingSigned this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       FundingSigned_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       FundingSigned_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1signature(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -49134,14 +52937,16 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1signature(
        FundingSigned_set_signature(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray signature_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray signature_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKECDSASignature signature_arg_ref;
        CHECK((*env)->GetArrayLength(env, signature_arg) == 64);
        (*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form);
-       LDKFundingSigned ret_var = FundingSigned_new(channel_id_arg_ref, signature_arg_ref);
+       LDKFundingSigned ret_var = FundingSigned_new(channel_id_arg_conv, signature_arg_ref);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -49211,27 +53016,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1free(JNIEnv *env
        ChannelReady_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelReady this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelReady_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = ChannelReady_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKChannelReady this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       ChannelReady_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       ChannelReady_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1next_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -49282,10 +53091,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1set_1short_1chan
        ChannelReady_set_short_channel_id_alias(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray next_per_commitment_point_arg, int64_t short_channel_id_alias_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray next_per_commitment_point_arg, int64_t short_channel_id_alias_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKPublicKey next_per_commitment_point_arg_ref;
        CHECK((*env)->GetArrayLength(env, next_per_commitment_point_arg) == 33);
        (*env)->GetByteArrayRegion(env, next_per_commitment_point_arg, 0, 33, next_per_commitment_point_arg_ref.compressed_form);
@@ -49293,7 +53104,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1new(JNIEnv *e
        CHECK_ACCESS(short_channel_id_alias_arg_ptr);
        LDKCOption_u64Z short_channel_id_alias_arg_conv = *(LDKCOption_u64Z*)(short_channel_id_alias_arg_ptr);
        short_channel_id_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(short_channel_id_alias_arg));
-       LDKChannelReady ret_var = ChannelReady_new(channel_id_arg_ref, next_per_commitment_point_arg_ref, short_channel_id_alias_arg_conv);
+       LDKChannelReady ret_var = ChannelReady_new(channel_id_arg_conv, next_per_commitment_point_arg_ref, short_channel_id_alias_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -49363,27 +53174,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1free(JNIEnv *env, jclass
        Stfu_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKStfu this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *Stfu_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = Stfu_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKStfu this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       Stfu_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       Stfu_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1initiator(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -49405,11 +53220,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1set_1initiator(JNIEnv *e
        Stfu_set_initiator(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Stfu_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_t initiator_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
-       LDKStfu ret_var = Stfu_new(channel_id_arg_ref, initiator_arg);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Stfu_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_t initiator_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+       LDKStfu ret_var = Stfu_new(channel_id_arg_conv, initiator_arg);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -49469,27 +53286,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1free(JNIEnv *env, jcla
        Splice_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Splice_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Splice_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKSplice this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *Splice_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = Splice_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKSplice this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       Splice_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       Splice_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Splice_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -49595,17 +53416,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1set_1funding_1pubkey(J
        Splice_set_funding_pubkey(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Splice_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int32_t funding_feerate_perkw_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Splice_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int32_t funding_feerate_perkw_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKThirtyTwoBytes chain_hash_arg_ref;
        CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32);
        (*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data);
        LDKPublicKey funding_pubkey_arg_ref;
        CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
        (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
-       LDKSplice ret_var = Splice_new(channel_id_arg_ref, chain_hash_arg_ref, relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, funding_pubkey_arg_ref);
+       LDKSplice ret_var = Splice_new(channel_id_arg_conv, chain_hash_arg_ref, relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, funding_pubkey_arg_ref);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -49665,27 +53488,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1free(JNIEnv *env, j
        SpliceAck_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKSpliceAck this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *SpliceAck_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = SpliceAck_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKSpliceAck this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       SpliceAck_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       SpliceAck_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -49753,17 +53580,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1set_1funding_1pubke
        SpliceAck_set_funding_pubkey(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceAck_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int8_tArray funding_pubkey_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceAck_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int8_tArray funding_pubkey_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKThirtyTwoBytes chain_hash_arg_ref;
        CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32);
        (*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data);
        LDKPublicKey funding_pubkey_arg_ref;
        CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
        (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
-       LDKSpliceAck ret_var = SpliceAck_new(channel_id_arg_ref, chain_hash_arg_ref, relative_satoshis_arg, funding_pubkey_arg_ref);
+       LDKSpliceAck ret_var = SpliceAck_new(channel_id_arg_conv, chain_hash_arg_ref, relative_satoshis_arg, funding_pubkey_arg_ref);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -49823,34 +53652,40 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1free(JNIEnv *env
        SpliceLocked_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKSpliceLocked this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *SpliceLocked_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = SpliceLocked_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKSpliceLocked this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       SpliceLocked_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       SpliceLocked_set_channel_id(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
-       LDKSpliceLocked ret_var = SpliceLocked_new(channel_id_arg_ref);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+       LDKSpliceLocked ret_var = SpliceLocked_new(channel_id_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -49910,27 +53745,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1free(JNIEnv *env,
        TxAddInput_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKTxAddInput this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAddInput_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = TxAddInput_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKTxAddInput this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       TxAddInput_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       TxAddInput_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -50017,16 +53856,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1set_1sequence(JNIE
        TxAddInput_set_sequence(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg, int64_t prevtx_arg, int32_t prevtx_out_arg, int32_t sequence_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg, int64_t prevtx_arg, int32_t prevtx_out_arg, int32_t sequence_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKTransactionU16LenLimited prevtx_arg_conv;
        prevtx_arg_conv.inner = untag_ptr(prevtx_arg);
        prevtx_arg_conv.is_owned = ptr_is_owned(prevtx_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(prevtx_arg_conv);
        prevtx_arg_conv = TransactionU16LenLimited_clone(&prevtx_arg_conv);
-       LDKTxAddInput ret_var = TxAddInput_new(channel_id_arg_ref, serial_id_arg, prevtx_arg_conv, prevtx_out_arg, sequence_arg);
+       LDKTxAddInput ret_var = TxAddInput_new(channel_id_arg_conv, serial_id_arg, prevtx_arg_conv, prevtx_out_arg, sequence_arg);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -50096,27 +53937,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1free(JNIEnv *env,
        TxAddOutput_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKTxAddOutput this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAddOutput_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = TxAddOutput_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKTxAddOutput this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       TxAddOutput_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       TxAddOutput_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -50183,15 +54028,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1set_1script(JNIEn
        TxAddOutput_set_script(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg, int64_t sats_arg, int8_tArray script_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg, int64_t sats_arg, int8_tArray script_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKCVec_u8Z script_arg_ref;
        script_arg_ref.datalen = (*env)->GetArrayLength(env, script_arg);
        script_arg_ref.data = MALLOC(script_arg_ref.datalen, "LDKCVec_u8Z Bytes");
        (*env)->GetByteArrayRegion(env, script_arg, 0, script_arg_ref.datalen, script_arg_ref.data);
-       LDKTxAddOutput ret_var = TxAddOutput_new(channel_id_arg_ref, serial_id_arg, sats_arg, script_arg_ref);
+       LDKTxAddOutput ret_var = TxAddOutput_new(channel_id_arg_conv, serial_id_arg, sats_arg, script_arg_ref);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -50261,27 +54108,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1free(JNIEnv *en
        TxRemoveInput_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKTxRemoveInput this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxRemoveInput_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = TxRemoveInput_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKTxRemoveInput this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       TxRemoveInput_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       TxRemoveInput_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -50303,11 +54154,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1set_1serial_1id
        TxRemoveInput_set_serial_id(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
-       LDKTxRemoveInput ret_var = TxRemoveInput_new(channel_id_arg_ref, serial_id_arg);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+       LDKTxRemoveInput ret_var = TxRemoveInput_new(channel_id_arg_conv, serial_id_arg);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -50377,27 +54230,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1free(JNIEnv *e
        TxRemoveOutput_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKTxRemoveOutput this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxRemoveOutput_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = TxRemoveOutput_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKTxRemoveOutput this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       TxRemoveOutput_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       TxRemoveOutput_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -50419,11 +54276,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1set_1serial_1i
        TxRemoveOutput_set_serial_id(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
-       LDKTxRemoveOutput ret_var = TxRemoveOutput_new(channel_id_arg_ref, serial_id_arg);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+       LDKTxRemoveOutput ret_var = TxRemoveOutput_new(channel_id_arg_conv, serial_id_arg);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -50493,34 +54352,40 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxComplete_1free(JNIEnv *env,
        TxComplete_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxComplete_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxComplete_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKTxComplete this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxComplete_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = TxComplete_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxComplete_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxComplete_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKTxComplete this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       TxComplete_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       TxComplete_set_channel_id(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxComplete_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
-       LDKTxComplete ret_var = TxComplete_new(channel_id_arg_ref);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxComplete_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+       LDKTxComplete ret_var = TxComplete_new(channel_id_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -50590,27 +54455,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1free(JNIEnv *env
        TxSignatures_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKTxSignatures this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxSignatures_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = TxSignatures_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKTxSignatures this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       TxSignatures_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       TxSignatures_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1tx_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -50682,10 +54551,37 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1witnesses(J
        TxSignatures_set_witnesses(&this_ptr_conv, val_constr);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray tx_hash_arg, jobjectArray witnesses_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1funding_1outpoint_1sig(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKTxSignatures this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ");
+       *ret_copy = TxSignatures_get_funding_outpoint_sig(&this_ptr_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1funding_1outpoint_1sig(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKTxSignatures this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       void* val_ptr = untag_ptr(val);
+       CHECK_ACCESS(val_ptr);
+       LDKCOption_ECDSASignatureZ val_conv = *(LDKCOption_ECDSASignatureZ*)(val_ptr);
+       val_conv = COption_ECDSASignatureZ_clone((LDKCOption_ECDSASignatureZ*)untag_ptr(val));
+       TxSignatures_set_funding_outpoint_sig(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray tx_hash_arg, jobjectArray witnesses_arg, int64_t funding_outpoint_sig_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKThirtyTwoBytes tx_hash_arg_ref;
        CHECK((*env)->GetArrayLength(env, tx_hash_arg) == 32);
        (*env)->GetByteArrayRegion(env, tx_hash_arg, 0, 32, tx_hash_arg_ref.data);
@@ -50704,7 +54600,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1new(JNIEnv *e
                witnesses_arg_conv_8_ref.data_is_owned = true;
                witnesses_arg_constr.data[i] = witnesses_arg_conv_8_ref;
        }
-       LDKTxSignatures ret_var = TxSignatures_new(channel_id_arg_ref, tx_hash_arg_ref, witnesses_arg_constr);
+       void* funding_outpoint_sig_arg_ptr = untag_ptr(funding_outpoint_sig_arg);
+       CHECK_ACCESS(funding_outpoint_sig_arg_ptr);
+       LDKCOption_ECDSASignatureZ funding_outpoint_sig_arg_conv = *(LDKCOption_ECDSASignatureZ*)(funding_outpoint_sig_arg_ptr);
+       funding_outpoint_sig_arg_conv = COption_ECDSASignatureZ_clone((LDKCOption_ECDSASignatureZ*)untag_ptr(funding_outpoint_sig_arg));
+       LDKTxSignatures ret_var = TxSignatures_new(channel_id_arg_conv, tx_hash_arg_ref, witnesses_arg_constr, funding_outpoint_sig_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -50774,27 +54674,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1free(JNIEnv *env, j
        TxInitRbf_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKTxInitRbf this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxInitRbf_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = TxInitRbf_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKTxInitRbf this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       TxInitRbf_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       TxInitRbf_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1locktime(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -50860,15 +54764,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1set_1funding_1outpu
        TxInitRbf_set_funding_output_contribution(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int32_t locktime_arg, int32_t feerate_sat_per_1000_weight_arg, int64_t funding_output_contribution_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int32_t locktime_arg, int32_t feerate_sat_per_1000_weight_arg, int64_t funding_output_contribution_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        void* funding_output_contribution_arg_ptr = untag_ptr(funding_output_contribution_arg);
        CHECK_ACCESS(funding_output_contribution_arg_ptr);
        LDKCOption_i64Z funding_output_contribution_arg_conv = *(LDKCOption_i64Z*)(funding_output_contribution_arg_ptr);
        funding_output_contribution_arg_conv = COption_i64Z_clone((LDKCOption_i64Z*)untag_ptr(funding_output_contribution_arg));
-       LDKTxInitRbf ret_var = TxInitRbf_new(channel_id_arg_ref, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg_conv);
+       LDKTxInitRbf ret_var = TxInitRbf_new(channel_id_arg_conv, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -50938,27 +54844,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1free(JNIEnv *env, jc
        TxAckRbf_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKTxAckRbf this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAckRbf_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = TxAckRbf_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKTxAckRbf this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       TxAckRbf_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       TxAckRbf_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1funding_1output_1contribution(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -50986,15 +54896,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1set_1funding_1output
        TxAckRbf_set_funding_output_contribution(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t funding_output_contribution_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t funding_output_contribution_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        void* funding_output_contribution_arg_ptr = untag_ptr(funding_output_contribution_arg);
        CHECK_ACCESS(funding_output_contribution_arg_ptr);
        LDKCOption_i64Z funding_output_contribution_arg_conv = *(LDKCOption_i64Z*)(funding_output_contribution_arg_ptr);
        funding_output_contribution_arg_conv = COption_i64Z_clone((LDKCOption_i64Z*)untag_ptr(funding_output_contribution_arg));
-       LDKTxAckRbf ret_var = TxAckRbf_new(channel_id_arg_ref, funding_output_contribution_arg_conv);
+       LDKTxAckRbf ret_var = TxAckRbf_new(channel_id_arg_conv, funding_output_contribution_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -51064,27 +54976,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1free(JNIEnv *env, jcl
        TxAbort_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKTxAbort this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAbort_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = TxAbort_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKTxAbort this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       TxAbort_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       TxAbort_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -51113,15 +55029,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1set_1data(JNIEnv *env
        TxAbort_set_data(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAbort_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray data_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAbort_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray data_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKCVec_u8Z data_arg_ref;
        data_arg_ref.datalen = (*env)->GetArrayLength(env, data_arg);
        data_arg_ref.data = MALLOC(data_arg_ref.datalen, "LDKCVec_u8Z Bytes");
        (*env)->GetByteArrayRegion(env, data_arg, 0, data_arg_ref.datalen, data_arg_ref.data);
-       LDKTxAbort ret_var = TxAbort_new(channel_id_arg_ref, data_arg_ref);
+       LDKTxAbort ret_var = TxAbort_new(channel_id_arg_conv, data_arg_ref);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -51191,27 +55109,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1free(JNIEnv *env, jc
        Shutdown_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKShutdown this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *Shutdown_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = Shutdown_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKShutdown this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       Shutdown_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       Shutdown_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -51240,15 +55162,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1scriptpubkey(JN
        Shutdown_set_scriptpubkey(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray scriptpubkey_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray scriptpubkey_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKCVec_u8Z scriptpubkey_arg_ref;
        scriptpubkey_arg_ref.datalen = (*env)->GetArrayLength(env, scriptpubkey_arg);
        scriptpubkey_arg_ref.data = MALLOC(scriptpubkey_arg_ref.datalen, "LDKCVec_u8Z Bytes");
        (*env)->GetByteArrayRegion(env, scriptpubkey_arg, 0, scriptpubkey_arg_ref.datalen, scriptpubkey_arg_ref.data);
-       LDKShutdown ret_var = Shutdown_new(channel_id_arg_ref, scriptpubkey_arg_ref);
+       LDKShutdown ret_var = Shutdown_new(channel_id_arg_conv, scriptpubkey_arg_ref);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -51427,27 +55351,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1free(JNIEnv *en
        ClosingSigned_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKClosingSigned this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ClosingSigned_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = ClosingSigned_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKClosingSigned this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       ClosingSigned_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       ClosingSigned_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1fee_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -51519,10 +55447,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1fee_1range
        ClosingSigned_set_fee_range(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t fee_satoshis_arg, int8_tArray signature_arg, int64_t fee_range_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t fee_satoshis_arg, int8_tArray signature_arg, int64_t fee_range_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKECDSASignature signature_arg_ref;
        CHECK((*env)->GetArrayLength(env, signature_arg) == 64);
        (*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form);
@@ -51531,7 +55461,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new(JNIEnv *
        fee_range_arg_conv.is_owned = ptr_is_owned(fee_range_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(fee_range_arg_conv);
        fee_range_arg_conv = ClosingSignedFeeRange_clone(&fee_range_arg_conv);
-       LDKClosingSigned ret_var = ClosingSigned_new(channel_id_arg_ref, fee_satoshis_arg, signature_arg_ref, fee_range_arg_conv);
+       LDKClosingSigned ret_var = ClosingSigned_new(channel_id_arg_conv, fee_satoshis_arg, signature_arg_ref, fee_range_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -51601,27 +55531,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1free(JNIEnv *en
        UpdateAddHTLC_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKUpdateAddHTLC this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateAddHTLC_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = UpdateAddHTLC_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKUpdateAddHTLC this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       UpdateAddHTLC_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       UpdateAddHTLC_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -51779,10 +55713,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1blinding_1
        UpdateAddHTLC_set_blinding_point(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t htlc_id_arg, int64_t amount_msat_arg, int8_tArray payment_hash_arg, int32_t cltv_expiry_arg, int64_t skimmed_fee_msat_arg, int64_t onion_routing_packet_arg, int8_tArray blinding_point_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t htlc_id_arg, int64_t amount_msat_arg, int8_tArray payment_hash_arg, int32_t cltv_expiry_arg, int64_t skimmed_fee_msat_arg, int64_t onion_routing_packet_arg, int8_tArray blinding_point_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKThirtyTwoBytes payment_hash_arg_ref;
        CHECK((*env)->GetArrayLength(env, payment_hash_arg) == 32);
        (*env)->GetByteArrayRegion(env, payment_hash_arg, 0, 32, payment_hash_arg_ref.data);
@@ -51798,7 +55734,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1new(JNIEnv *
        LDKPublicKey blinding_point_arg_ref;
        CHECK((*env)->GetArrayLength(env, blinding_point_arg) == 33);
        (*env)->GetByteArrayRegion(env, blinding_point_arg, 0, 33, blinding_point_arg_ref.compressed_form);
-       LDKUpdateAddHTLC ret_var = UpdateAddHTLC_new(channel_id_arg_ref, htlc_id_arg, amount_msat_arg, payment_hash_arg_ref, cltv_expiry_arg, skimmed_fee_msat_arg_conv, onion_routing_packet_arg_conv, blinding_point_arg_ref);
+       LDKUpdateAddHTLC ret_var = UpdateAddHTLC_new(channel_id_arg_conv, htlc_id_arg, amount_msat_arg, payment_hash_arg_ref, cltv_expiry_arg, skimmed_fee_msat_arg_conv, onion_routing_packet_arg_conv, blinding_point_arg_ref);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -51997,27 +55933,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1free(JNIEnv
        UpdateFulfillHTLC_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKUpdateFulfillHTLC this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFulfillHTLC_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = UpdateFulfillHTLC_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKUpdateFulfillHTLC this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       UpdateFulfillHTLC_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       UpdateFulfillHTLC_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -52062,14 +56002,16 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1paymen
        UpdateFulfillHTLC_set_payment_preimage(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t htlc_id_arg, int8_tArray payment_preimage_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t htlc_id_arg, int8_tArray payment_preimage_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKThirtyTwoBytes payment_preimage_arg_ref;
        CHECK((*env)->GetArrayLength(env, payment_preimage_arg) == 32);
        (*env)->GetByteArrayRegion(env, payment_preimage_arg, 0, 32, payment_preimage_arg_ref.data);
-       LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_new(channel_id_arg_ref, htlc_id_arg, payment_preimage_arg_ref);
+       LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_new(channel_id_arg_conv, htlc_id_arg, payment_preimage_arg_ref);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -52139,27 +56081,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1free(JNIEnv *e
        UpdateFailHTLC_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKUpdateFailHTLC this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFailHTLC_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = UpdateFailHTLC_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKUpdateFailHTLC this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       UpdateFailHTLC_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       UpdateFailHTLC_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -52244,27 +56190,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1free(
        UpdateFailMalformedHTLC_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKUpdateFailMalformedHTLC this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFailMalformedHTLC_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = UpdateFailMalformedHTLC_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKUpdateFailMalformedHTLC this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       UpdateFailMalformedHTLC_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       UpdateFailMalformedHTLC_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -52368,27 +56318,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1free(JNIEnv
        CommitmentSigned_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKCommitmentSigned this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *CommitmentSigned_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = CommitmentSigned_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKCommitmentSigned this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       CommitmentSigned_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       CommitmentSigned_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1signature(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -52456,10 +56410,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1htlc_1s
        CommitmentSigned_set_htlc_signatures(&this_ptr_conv, val_constr);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray signature_arg, jobjectArray htlc_signatures_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray signature_arg, jobjectArray htlc_signatures_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKECDSASignature signature_arg_ref;
        CHECK((*env)->GetArrayLength(env, signature_arg) == 64);
        (*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form);
@@ -52476,7 +56432,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new(JNIEn
                (*env)->GetByteArrayRegion(env, htlc_signatures_arg_conv_8, 0, 64, htlc_signatures_arg_conv_8_ref.compact_form);
                htlc_signatures_arg_constr.data[i] = htlc_signatures_arg_conv_8_ref;
        }
-       LDKCommitmentSigned ret_var = CommitmentSigned_new(channel_id_arg_ref, signature_arg_ref, htlc_signatures_arg_constr);
+       LDKCommitmentSigned ret_var = CommitmentSigned_new(channel_id_arg_conv, signature_arg_ref, htlc_signatures_arg_constr);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -52546,27 +56502,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1free(JNIEnv *env
        RevokeAndACK_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKRevokeAndACK this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *RevokeAndACK_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = RevokeAndACK_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKRevokeAndACK this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       RevokeAndACK_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       RevokeAndACK_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1per_1commitment_1secret(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -52615,17 +56575,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1next_1per_1
        RevokeAndACK_set_next_per_commitment_point(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray per_commitment_secret_arg, int8_tArray next_per_commitment_point_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray per_commitment_secret_arg, int8_tArray next_per_commitment_point_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKThirtyTwoBytes per_commitment_secret_arg_ref;
        CHECK((*env)->GetArrayLength(env, per_commitment_secret_arg) == 32);
        (*env)->GetByteArrayRegion(env, per_commitment_secret_arg, 0, 32, per_commitment_secret_arg_ref.data);
        LDKPublicKey next_per_commitment_point_arg_ref;
        CHECK((*env)->GetArrayLength(env, next_per_commitment_point_arg) == 33);
        (*env)->GetByteArrayRegion(env, next_per_commitment_point_arg, 0, 33, next_per_commitment_point_arg_ref.compressed_form);
-       LDKRevokeAndACK ret_var = RevokeAndACK_new(channel_id_arg_ref, per_commitment_secret_arg_ref, next_per_commitment_point_arg_ref);
+       LDKRevokeAndACK ret_var = RevokeAndACK_new(channel_id_arg_conv, per_commitment_secret_arg_ref, next_per_commitment_point_arg_ref);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -52695,27 +56657,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1free(JNIEnv *env, j
        UpdateFee_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKUpdateFee this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFee_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = UpdateFee_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKUpdateFee this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       UpdateFee_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       UpdateFee_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1feerate_1per_1kw(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -52737,11 +56703,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1feerate_1per_1
        UpdateFee_set_feerate_per_kw(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int32_t feerate_per_kw_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
-       LDKUpdateFee ret_var = UpdateFee_new(channel_id_arg_ref, feerate_per_kw_arg);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int32_t feerate_per_kw_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+       LDKUpdateFee ret_var = UpdateFee_new(channel_id_arg_conv, feerate_per_kw_arg);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -52811,27 +56779,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1free(JNIEn
        ChannelReestablish_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelReestablish this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelReestablish_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = ChannelReestablish_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKChannelReestablish this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       ChannelReestablish_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       ChannelReestablish_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1next_1local_1commitment_1number(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -52943,10 +56915,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1next_
        ChannelReestablish_set_next_funding_txid(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t next_local_commitment_number_arg, int64_t next_remote_commitment_number_arg, int8_tArray your_last_per_commitment_secret_arg, int8_tArray my_current_per_commitment_point_arg, int64_t next_funding_txid_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t next_local_commitment_number_arg, int64_t next_remote_commitment_number_arg, int8_tArray your_last_per_commitment_secret_arg, int8_tArray my_current_per_commitment_point_arg, int64_t next_funding_txid_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKThirtyTwoBytes your_last_per_commitment_secret_arg_ref;
        CHECK((*env)->GetArrayLength(env, your_last_per_commitment_secret_arg) == 32);
        (*env)->GetByteArrayRegion(env, your_last_per_commitment_secret_arg, 0, 32, your_last_per_commitment_secret_arg_ref.data);
@@ -52957,7 +56931,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1new(JNI
        CHECK_ACCESS(next_funding_txid_arg_ptr);
        LDKCOption_ThirtyTwoBytesZ next_funding_txid_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(next_funding_txid_arg_ptr);
        next_funding_txid_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(next_funding_txid_arg));
-       LDKChannelReestablish ret_var = ChannelReestablish_new(channel_id_arg_ref, next_local_commitment_number_arg, next_remote_commitment_number_arg, your_last_per_commitment_secret_arg_ref, my_current_per_commitment_point_arg_ref, next_funding_txid_arg_conv);
+       LDKChannelReestablish ret_var = ChannelReestablish_new(channel_id_arg_conv, next_local_commitment_number_arg, next_remote_commitment_number_arg, your_last_per_commitment_secret_arg_ref, my_current_per_commitment_point_arg_ref, next_funding_txid_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -53027,27 +57001,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1free(J
        AnnouncementSignatures_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKAnnouncementSignatures this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *AnnouncementSignatures_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = AnnouncementSignatures_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKAnnouncementSignatures this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       AnnouncementSignatures_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       AnnouncementSignatures_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1short_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -53115,17 +57093,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1b
        AnnouncementSignatures_set_bitcoin_signature(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t short_channel_id_arg, int8_tArray node_signature_arg, int8_tArray bitcoin_signature_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t short_channel_id_arg, int8_tArray node_signature_arg, int8_tArray bitcoin_signature_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKECDSASignature node_signature_arg_ref;
        CHECK((*env)->GetArrayLength(env, node_signature_arg) == 64);
        (*env)->GetByteArrayRegion(env, node_signature_arg, 0, 64, node_signature_arg_ref.compact_form);
        LDKECDSASignature bitcoin_signature_arg_ref;
        CHECK((*env)->GetArrayLength(env, bitcoin_signature_arg) == 64);
        (*env)->GetByteArrayRegion(env, bitcoin_signature_arg, 0, 64, bitcoin_signature_arg_ref.compact_form);
-       LDKAnnouncementSignatures ret_var = AnnouncementSignatures_new(channel_id_arg_ref, short_channel_id_arg, node_signature_arg_ref, bitcoin_signature_arg_ref);
+       LDKAnnouncementSignatures ret_var = AnnouncementSignatures_new(channel_id_arg_conv, short_channel_id_arg, node_signature_arg_ref, bitcoin_signature_arg_ref);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -53612,6 +57592,107 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_
        UnsignedNodeAnnouncement_set_addresses(&this_ptr_conv, val_constr);
 }
 
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1excess_1address_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKUnsignedNodeAnnouncement this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = UnsignedNodeAnnouncement_get_excess_address_data(&this_ptr_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1excess_1address_1data(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKUnsignedNodeAnnouncement this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z val_ref;
+       val_ref.datalen = (*env)->GetArrayLength(env, val);
+       val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, val, 0, val_ref.datalen, val_ref.data);
+       UnsignedNodeAnnouncement_set_excess_address_data(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1excess_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKUnsignedNodeAnnouncement this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = UnsignedNodeAnnouncement_get_excess_data(&this_ptr_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1excess_1data(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKUnsignedNodeAnnouncement this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z val_ref;
+       val_ref.datalen = (*env)->GetArrayLength(env, val);
+       val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, val, 0, val_ref.datalen, val_ref.data);
+       UnsignedNodeAnnouncement_set_excess_data(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1new(JNIEnv *env, jclass clz, int64_t features_arg, int32_t timestamp_arg, int64_t node_id_arg, int8_tArray rgb_arg, int64_t alias_arg, int64_tArray addresses_arg, int8_tArray excess_address_data_arg, int8_tArray excess_data_arg) {
+       LDKNodeFeatures features_arg_conv;
+       features_arg_conv.inner = untag_ptr(features_arg);
+       features_arg_conv.is_owned = ptr_is_owned(features_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(features_arg_conv);
+       features_arg_conv = NodeFeatures_clone(&features_arg_conv);
+       LDKNodeId node_id_arg_conv;
+       node_id_arg_conv.inner = untag_ptr(node_id_arg);
+       node_id_arg_conv.is_owned = ptr_is_owned(node_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(node_id_arg_conv);
+       node_id_arg_conv = NodeId_clone(&node_id_arg_conv);
+       LDKThreeBytes rgb_arg_ref;
+       CHECK((*env)->GetArrayLength(env, rgb_arg) == 3);
+       (*env)->GetByteArrayRegion(env, rgb_arg, 0, 3, rgb_arg_ref.data);
+       LDKNodeAlias alias_arg_conv;
+       alias_arg_conv.inner = untag_ptr(alias_arg);
+       alias_arg_conv.is_owned = ptr_is_owned(alias_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(alias_arg_conv);
+       alias_arg_conv = NodeAlias_clone(&alias_arg_conv);
+       LDKCVec_SocketAddressZ addresses_arg_constr;
+       addresses_arg_constr.datalen = (*env)->GetArrayLength(env, addresses_arg);
+       if (addresses_arg_constr.datalen > 0)
+               addresses_arg_constr.data = MALLOC(addresses_arg_constr.datalen * sizeof(LDKSocketAddress), "LDKCVec_SocketAddressZ Elements");
+       else
+               addresses_arg_constr.data = NULL;
+       int64_t* addresses_arg_vals = (*env)->GetLongArrayElements (env, addresses_arg, NULL);
+       for (size_t p = 0; p < addresses_arg_constr.datalen; p++) {
+               int64_t addresses_arg_conv_15 = addresses_arg_vals[p];
+               void* addresses_arg_conv_15_ptr = untag_ptr(addresses_arg_conv_15);
+               CHECK_ACCESS(addresses_arg_conv_15_ptr);
+               LDKSocketAddress addresses_arg_conv_15_conv = *(LDKSocketAddress*)(addresses_arg_conv_15_ptr);
+               addresses_arg_constr.data[p] = addresses_arg_conv_15_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, addresses_arg, addresses_arg_vals, 0);
+       LDKCVec_u8Z excess_address_data_arg_ref;
+       excess_address_data_arg_ref.datalen = (*env)->GetArrayLength(env, excess_address_data_arg);
+       excess_address_data_arg_ref.data = MALLOC(excess_address_data_arg_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, excess_address_data_arg, 0, excess_address_data_arg_ref.datalen, excess_address_data_arg_ref.data);
+       LDKCVec_u8Z excess_data_arg_ref;
+       excess_data_arg_ref.datalen = (*env)->GetArrayLength(env, excess_data_arg);
+       excess_data_arg_ref.data = MALLOC(excess_data_arg_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, excess_data_arg, 0, excess_data_arg_ref.datalen, excess_data_arg_ref.data);
+       LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_new(features_arg_conv, timestamp_arg, node_id_arg_conv, rgb_arg_ref, alias_arg_conv, addresses_arg_constr, excess_address_data_arg_ref, excess_data_arg_ref);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
 static inline uint64_t UnsignedNodeAnnouncement_clone_ptr(LDKUnsignedNodeAnnouncement *NONNULL_PTR arg) {
        LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_clone(arg);
        int64_t ret_ref = 0;
@@ -56304,6 +60385,191 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OnionPacket_1eq(JNIEnv *en
        return ret_conv;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKTrampolineOnionPacket this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       TrampolineOnionPacket_free(this_obj_conv);
+}
+
+JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1version(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKTrampolineOnionPacket this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int8_t ret_conv = TrampolineOnionPacket_get_version(&this_ptr_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1version(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) {
+       LDKTrampolineOnionPacket this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       TrampolineOnionPacket_set_version(&this_ptr_conv, val);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1public_1key(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKTrampolineOnionPacket this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, TrampolineOnionPacket_get_public_key(&this_ptr_conv).compressed_form);
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1public_1key(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKTrampolineOnionPacket this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKPublicKey val_ref;
+       CHECK((*env)->GetArrayLength(env, val) == 33);
+       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
+       TrampolineOnionPacket_set_public_key(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1hop_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKTrampolineOnionPacket this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = TrampolineOnionPacket_get_hop_data(&this_ptr_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1hop_1data(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKTrampolineOnionPacket this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z val_ref;
+       val_ref.datalen = (*env)->GetArrayLength(env, val);
+       val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, val, 0, val_ref.datalen, val_ref.data);
+       TrampolineOnionPacket_set_hop_data(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1hmac(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKTrampolineOnionPacket this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TrampolineOnionPacket_get_hmac(&this_ptr_conv));
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1hmac(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKTrampolineOnionPacket this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKThirtyTwoBytes val_ref;
+       CHECK((*env)->GetArrayLength(env, val) == 32);
+       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+       TrampolineOnionPacket_set_hmac(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1new(JNIEnv *env, jclass clz, int8_t version_arg, int8_tArray public_key_arg, int8_tArray hop_data_arg, int8_tArray hmac_arg) {
+       LDKPublicKey public_key_arg_ref;
+       CHECK((*env)->GetArrayLength(env, public_key_arg) == 33);
+       (*env)->GetByteArrayRegion(env, public_key_arg, 0, 33, public_key_arg_ref.compressed_form);
+       LDKCVec_u8Z hop_data_arg_ref;
+       hop_data_arg_ref.datalen = (*env)->GetArrayLength(env, hop_data_arg);
+       hop_data_arg_ref.data = MALLOC(hop_data_arg_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, hop_data_arg, 0, hop_data_arg_ref.datalen, hop_data_arg_ref.data);
+       LDKThirtyTwoBytes hmac_arg_ref;
+       CHECK((*env)->GetArrayLength(env, hmac_arg) == 32);
+       (*env)->GetByteArrayRegion(env, hmac_arg, 0, 32, hmac_arg_ref.data);
+       LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_new(version_arg, public_key_arg_ref, hop_data_arg_ref, hmac_arg_ref);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline uint64_t TrampolineOnionPacket_clone_ptr(LDKTrampolineOnionPacket *NONNULL_PTR arg) {
+       LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKTrampolineOnionPacket arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = TrampolineOnionPacket_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKTrampolineOnionPacket orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKTrampolineOnionPacket o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv.is_owned = false;
+       int64_t ret_conv = TrampolineOnionPacket_hash(&o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKTrampolineOnionPacket a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKTrampolineOnionPacket b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = TrampolineOnionPacket_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKTrampolineOnionPacket obj_conv;
+       obj_conv.inner = untag_ptr(obj);
+       obj_conv.is_owned = ptr_is_owned(obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = TrampolineOnionPacket_write(&obj_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKAcceptChannel obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -57821,6 +62087,127 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1free(JNIEnv
        SocketDescriptor_free(this_ptr_conv);
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKPeerDetails this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       PeerDetails_free(this_obj_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1counterparty_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKPeerDetails this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, PeerDetails_get_counterparty_node_id(&this_ptr_conv).compressed_form);
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1counterparty_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKPeerDetails this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKPublicKey val_ref;
+       CHECK((*env)->GetArrayLength(env, val) == 33);
+       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
+       PeerDetails_set_counterparty_node_id(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1socket_1address(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKPeerDetails this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCOption_SocketAddressZ *ret_copy = MALLOC(sizeof(LDKCOption_SocketAddressZ), "LDKCOption_SocketAddressZ");
+       *ret_copy = PeerDetails_get_socket_address(&this_ptr_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1socket_1address(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKPeerDetails this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       void* val_ptr = untag_ptr(val);
+       CHECK_ACCESS(val_ptr);
+       LDKCOption_SocketAddressZ val_conv = *(LDKCOption_SocketAddressZ*)(val_ptr);
+       val_conv = COption_SocketAddressZ_clone((LDKCOption_SocketAddressZ*)untag_ptr(val));
+       PeerDetails_set_socket_address(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1init_1features(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKPeerDetails this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKInitFeatures ret_var = PeerDetails_get_init_features(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1init_1features(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKPeerDetails this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKInitFeatures val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = InitFeatures_clone(&val_conv);
+       PeerDetails_set_init_features(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1is_1inbound_1connection(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKPeerDetails this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       jboolean ret_conv = PeerDetails_get_is_inbound_connection(&this_ptr_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1is_1inbound_1connection(JNIEnv *env, jclass clz, int64_t this_ptr, jboolean val) {
+       LDKPeerDetails this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       PeerDetails_set_is_inbound_connection(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerDetails_1new(JNIEnv *env, jclass clz, int8_tArray counterparty_node_id_arg, int64_t socket_address_arg, int64_t init_features_arg, jboolean is_inbound_connection_arg) {
+       LDKPublicKey counterparty_node_id_arg_ref;
+       CHECK((*env)->GetArrayLength(env, counterparty_node_id_arg) == 33);
+       (*env)->GetByteArrayRegion(env, counterparty_node_id_arg, 0, 33, counterparty_node_id_arg_ref.compressed_form);
+       void* socket_address_arg_ptr = untag_ptr(socket_address_arg);
+       CHECK_ACCESS(socket_address_arg_ptr);
+       LDKCOption_SocketAddressZ socket_address_arg_conv = *(LDKCOption_SocketAddressZ*)(socket_address_arg_ptr);
+       LDKInitFeatures init_features_arg_conv;
+       init_features_arg_conv.inner = untag_ptr(init_features_arg);
+       init_features_arg_conv.is_owned = ptr_is_owned(init_features_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(init_features_arg_conv);
+       init_features_arg_conv = InitFeatures_clone(&init_features_arg_conv);
+       LDKPeerDetails ret_var = PeerDetails_new(counterparty_node_id_arg_ref, socket_address_arg_conv, init_features_arg_conv, is_inbound_connection_arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKPeerHandleError this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -57907,26 +62294,44 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerManager_1new(JNIEnv *en
        return ret_ref;
 }
 
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_PeerManager_1get_1peer_1node_1ids(JNIEnv *env, jclass clz, int64_t this_arg) {
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_PeerManager_1list_1peers(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKPeerManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ ret_var = PeerManager_get_peer_node_ids(&this_arg_conv);
+       LDKCVec_PeerDetailsZ ret_var = PeerManager_list_peers(&this_arg_conv);
        int64_tArray ret_arr = NULL;
        ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
        int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t r = 0; r < ret_var.datalen; r++) {
-               LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv_43_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ");
-               *ret_conv_43_conv = ret_var.data[r];
-               ret_arr_ptr[r] = tag_ptr(ret_conv_43_conv, true);
+       for (size_t n = 0; n < ret_var.datalen; n++) {
+               LDKPeerDetails ret_conv_13_var = ret_var.data[n];
+               int64_t ret_conv_13_ref = 0;
+               CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_13_var);
+               ret_conv_13_ref = tag_ptr(ret_conv_13_var.inner, ret_conv_13_var.is_owned);
+               ret_arr_ptr[n] = ret_conv_13_ref;
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
        return ret_arr;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerManager_1peer_1by_1node_1id(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id) {
+       LDKPeerManager this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKPeerDetails ret_var = PeerManager_peer_by_node_id(&this_arg_conv, their_node_id_ref);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerManager_1new_1outbound_1connection(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t descriptor, int64_t remote_network_address) {
        LDKPeerManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -63755,6 +68160,120 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1requires_1ke
        return ret_conv;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1set_1trampoline_1routing_1optional(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInitFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       InitFeatures_set_trampoline_routing_optional(&this_arg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1set_1trampoline_1routing_1required(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInitFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       InitFeatures_set_trampoline_routing_required(&this_arg_conv);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InitFeatures_1supports_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInitFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       jboolean ret_conv = InitFeatures_supports_trampoline_routing(&this_arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1set_1trampoline_1routing_1optional(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKNodeFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       NodeFeatures_set_trampoline_routing_optional(&this_arg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1set_1trampoline_1routing_1required(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKNodeFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       NodeFeatures_set_trampoline_routing_required(&this_arg_conv);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1supports_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKNodeFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       jboolean ret_conv = NodeFeatures_supports_trampoline_routing(&this_arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1set_1trampoline_1routing_1optional(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKBolt11InvoiceFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       Bolt11InvoiceFeatures_set_trampoline_routing_optional(&this_arg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1set_1trampoline_1routing_1required(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKBolt11InvoiceFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       Bolt11InvoiceFeatures_set_trampoline_routing_required(&this_arg_conv);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1supports_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKBolt11InvoiceFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       jboolean ret_conv = Bolt11InvoiceFeatures_supports_trampoline_routing(&this_arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InitFeatures_1requires_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInitFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       jboolean ret_conv = InitFeatures_requires_trampoline_routing(&this_arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1requires_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKNodeFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       jboolean ret_conv = NodeFeatures_requires_trampoline_routing(&this_arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1requires_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKBolt11InvoiceFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       jboolean ret_conv = Bolt11InvoiceFeatures_requires_trampoline_routing(&this_arg_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ShutdownScript_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKShutdownScript this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -63980,6 +68499,222 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ShutdownScript_1is_1compat
        return ret_conv;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelId_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKChannelId this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       ChannelId_free(this_obj_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelId_1get_1a(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKChannelId this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelId_get_a(&this_ptr_conv));
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelId_1set_1a(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKChannelId this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKThirtyTwoBytes val_ref;
+       CHECK((*env)->GetArrayLength(env, val) == 32);
+       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+       ChannelId_set_a(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1new(JNIEnv *env, jclass clz, int8_tArray a_arg) {
+       LDKThirtyTwoBytes a_arg_ref;
+       CHECK((*env)->GetArrayLength(env, a_arg) == 32);
+       (*env)->GetByteArrayRegion(env, a_arg, 0, 32, a_arg_ref.data);
+       LDKChannelId ret_var = ChannelId_new(a_arg_ref);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline uint64_t ChannelId_clone_ptr(LDKChannelId *NONNULL_PTR arg) {
+       LDKChannelId ret_var = ChannelId_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKChannelId arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = ChannelId_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelId orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKChannelId ret_var = ChannelId_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelId_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKChannelId a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelId b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelId_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKChannelId o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv.is_owned = false;
+       int64_t ret_conv = ChannelId_hash(&o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1v1_1from_1funding_1txid(JNIEnv *env, jclass clz, int8_tArray txid, int16_t output_index) {
+       uint8_t txid_arr[32];
+       CHECK((*env)->GetArrayLength(env, txid) == 32);
+       (*env)->GetByteArrayRegion(env, txid, 0, 32, txid_arr);
+       uint8_t (*txid_ref)[32] = &txid_arr;
+       LDKChannelId ret_var = ChannelId_v1_from_funding_txid(txid_ref, output_index);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1v1_1from_1funding_1outpoint(JNIEnv *env, jclass clz, int64_t outpoint) {
+       LDKOutPoint outpoint_conv;
+       outpoint_conv.inner = untag_ptr(outpoint);
+       outpoint_conv.is_owned = ptr_is_owned(outpoint);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_conv);
+       outpoint_conv = OutPoint_clone(&outpoint_conv);
+       LDKChannelId ret_var = ChannelId_v1_from_funding_outpoint(outpoint_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1temporary_1from_1entropy_1source(JNIEnv *env, jclass clz, int64_t entropy_source) {
+       void* entropy_source_ptr = untag_ptr(entropy_source);
+       if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
+       LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+       LDKChannelId ret_var = ChannelId_temporary_from_entropy_source(entropy_source_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1from_1bytes(JNIEnv *env, jclass clz, int8_tArray data) {
+       LDKThirtyTwoBytes data_ref;
+       CHECK((*env)->GetArrayLength(env, data) == 32);
+       (*env)->GetByteArrayRegion(env, data, 0, 32, data_ref.data);
+       LDKChannelId ret_var = ChannelId_from_bytes(data_ref);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1new_1zero(JNIEnv *env, jclass clz) {
+       LDKChannelId ret_var = ChannelId_new_zero();
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelId_1is_1zero(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKChannelId this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       jboolean ret_conv = ChannelId_is_zero(&this_arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1v2_1from_1revocation_1basepoints(JNIEnv *env, jclass clz, int64_t ours, int64_t theirs) {
+       LDKRevocationBasepoint ours_conv;
+       ours_conv.inner = untag_ptr(ours);
+       ours_conv.is_owned = ptr_is_owned(ours);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ours_conv);
+       ours_conv.is_owned = false;
+       LDKRevocationBasepoint theirs_conv;
+       theirs_conv.inner = untag_ptr(theirs);
+       theirs_conv.is_owned = ptr_is_owned(theirs);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(theirs_conv);
+       theirs_conv.is_owned = false;
+       LDKChannelId ret_var = ChannelId_v2_from_revocation_basepoints(&ours_conv, &theirs_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1temporary_1v2_1from_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t our_revocation_basepoint) {
+       LDKRevocationBasepoint our_revocation_basepoint_conv;
+       our_revocation_basepoint_conv.inner = untag_ptr(our_revocation_basepoint);
+       our_revocation_basepoint_conv.is_owned = ptr_is_owned(our_revocation_basepoint);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(our_revocation_basepoint_conv);
+       our_revocation_basepoint_conv.is_owned = false;
+       LDKChannelId ret_var = ChannelId_temporary_v2_from_revocation_basepoint(&our_revocation_basepoint_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelId_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKChannelId obj_conv;
+       obj_conv.inner = untag_ptr(obj);
+       obj_conv.is_owned = ptr_is_owned(obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = ChannelId_write(&obj_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ");
+       *ret_conv = ChannelId_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Retry_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -64499,6 +69234,413 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Type_1free(JNIEnv *env, jclass
        Type_free(this_ptr_conv);
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferId_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKOfferId this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       OfferId_free(this_obj_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OfferId_1get_1a(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKOfferId this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OfferId_get_a(&this_ptr_conv));
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferId_1set_1a(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKOfferId this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKThirtyTwoBytes val_ref;
+       CHECK((*env)->GetArrayLength(env, val) == 32);
+       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+       OfferId_set_a(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1new(JNIEnv *env, jclass clz, int8_tArray a_arg) {
+       LDKThirtyTwoBytes a_arg_ref;
+       CHECK((*env)->GetArrayLength(env, a_arg) == 32);
+       (*env)->GetByteArrayRegion(env, a_arg, 0, 32, a_arg_ref.data);
+       LDKOfferId ret_var = OfferId_new(a_arg_ref);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline uint64_t OfferId_clone_ptr(LDKOfferId *NONNULL_PTR arg) {
+       LDKOfferId ret_var = OfferId_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKOfferId arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = OfferId_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKOfferId orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKOfferId ret_var = OfferId_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OfferId_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKOfferId a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKOfferId b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = OfferId_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OfferId_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKOfferId obj_conv;
+       obj_conv.inner = untag_ptr(obj);
+       obj_conv.is_owned = ptr_is_owned(obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = OfferId_write(&obj_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ");
+       *ret_conv = OfferId_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKOfferWithExplicitMetadataBuilder this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       OfferWithExplicitMetadataBuilder_free(this_obj_conv);
+}
+
+static inline uint64_t OfferWithExplicitMetadataBuilder_clone_ptr(LDKOfferWithExplicitMetadataBuilder *NONNULL_PTR arg) {
+       LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKOfferWithExplicitMetadataBuilder arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = OfferWithExplicitMetadataBuilder_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKOfferWithExplicitMetadataBuilder orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKOfferWithDerivedMetadataBuilder this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       OfferWithDerivedMetadataBuilder_free(this_obj_conv);
+}
+
+static inline uint64_t OfferWithDerivedMetadataBuilder_clone_ptr(LDKOfferWithDerivedMetadataBuilder *NONNULL_PTR arg) {
+       LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKOfferWithDerivedMetadataBuilder arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = OfferWithDerivedMetadataBuilder_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKOfferWithDerivedMetadataBuilder orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1new(JNIEnv *env, jclass clz, int8_tArray signing_pubkey) {
+       LDKPublicKey signing_pubkey_ref;
+       CHECK((*env)->GetArrayLength(env, signing_pubkey) == 33);
+       (*env)->GetByteArrayRegion(env, signing_pubkey, 0, 33, signing_pubkey_ref.compressed_form);
+       LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_new(signing_pubkey_ref);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1metadata(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray metadata) {
+       LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+       LDKCVec_u8Z metadata_ref;
+       metadata_ref.datalen = (*env)->GetArrayLength(env, metadata);
+       metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, metadata, 0, metadata_ref.datalen, metadata_ref.data);
+       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       *ret_conv = OfferWithExplicitMetadataBuilder_metadata(this_arg_conv, metadata_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) {
+       LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+       LDKNetwork network_conv = LDKNetwork_from_java(env, network);
+       OfferWithExplicitMetadataBuilder_chain(this_arg_conv, network_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) {
+       LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+       OfferWithExplicitMetadataBuilder_amount_msats(this_arg_conv, amount_msats);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1absolute_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int64_t absolute_expiry) {
+       LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+       OfferWithExplicitMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1description(JNIEnv *env, jclass clz, int64_t this_arg, jstring description) {
+       LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+       LDKStr description_conv = java_to_owned_str(env, description);
+       OfferWithExplicitMetadataBuilder_description(this_arg_conv, description_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1issuer(JNIEnv *env, jclass clz, int64_t this_arg, jstring issuer) {
+       LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+       LDKStr issuer_conv = java_to_owned_str(env, issuer);
+       OfferWithExplicitMetadataBuilder_issuer(this_arg_conv, issuer_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1path(JNIEnv *env, jclass clz, int64_t this_arg, int64_t path) {
+       LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+       LDKBlindedPath path_conv;
+       path_conv.inner = untag_ptr(path);
+       path_conv.is_owned = ptr_is_owned(path);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
+       path_conv = BlindedPath_clone(&path_conv);
+       OfferWithExplicitMetadataBuilder_path(this_arg_conv, path_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1supported_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) {
+       LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+       void* quantity_ptr = untag_ptr(quantity);
+       CHECK_ACCESS(quantity_ptr);
+       LDKQuantity quantity_conv = *(LDKQuantity*)(quantity_ptr);
+       quantity_conv = Quantity_clone((LDKQuantity*)untag_ptr(quantity));
+       OfferWithExplicitMetadataBuilder_supported_quantity(this_arg_conv, quantity_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+       LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+       *ret_conv = OfferWithExplicitMetadataBuilder_build(this_arg_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1deriving_1signing_1pubkey(JNIEnv *env, jclass clz, int8_tArray node_id, int64_t expanded_key, int64_t entropy_source) {
+       LDKPublicKey node_id_ref;
+       CHECK((*env)->GetArrayLength(env, node_id) == 33);
+       (*env)->GetByteArrayRegion(env, node_id, 0, 33, node_id_ref.compressed_form);
+       LDKExpandedKey expanded_key_conv;
+       expanded_key_conv.inner = untag_ptr(expanded_key);
+       expanded_key_conv.is_owned = ptr_is_owned(expanded_key);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv);
+       expanded_key_conv.is_owned = false;
+       void* entropy_source_ptr = untag_ptr(entropy_source);
+       CHECK_ACCESS(entropy_source_ptr);
+       LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+       if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+       }
+       LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(node_id_ref, &expanded_key_conv, entropy_source_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) {
+       LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       LDKNetwork network_conv = LDKNetwork_from_java(env, network);
+       OfferWithDerivedMetadataBuilder_chain(this_arg_conv, network_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) {
+       LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       OfferWithDerivedMetadataBuilder_amount_msats(this_arg_conv, amount_msats);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1absolute_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int64_t absolute_expiry) {
+       LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       OfferWithDerivedMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1description(JNIEnv *env, jclass clz, int64_t this_arg, jstring description) {
+       LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       LDKStr description_conv = java_to_owned_str(env, description);
+       OfferWithDerivedMetadataBuilder_description(this_arg_conv, description_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1issuer(JNIEnv *env, jclass clz, int64_t this_arg, jstring issuer) {
+       LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       LDKStr issuer_conv = java_to_owned_str(env, issuer);
+       OfferWithDerivedMetadataBuilder_issuer(this_arg_conv, issuer_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1path(JNIEnv *env, jclass clz, int64_t this_arg, int64_t path) {
+       LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       LDKBlindedPath path_conv;
+       path_conv.inner = untag_ptr(path);
+       path_conv.is_owned = ptr_is_owned(path);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
+       path_conv = BlindedPath_clone(&path_conv);
+       OfferWithDerivedMetadataBuilder_path(this_arg_conv, path_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1supported_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) {
+       LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       void* quantity_ptr = untag_ptr(quantity);
+       CHECK_ACCESS(quantity_ptr);
+       LDKQuantity quantity_conv = *(LDKQuantity*)(quantity_ptr);
+       quantity_conv = Quantity_clone((LDKQuantity*)untag_ptr(quantity));
+       OfferWithDerivedMetadataBuilder_supported_quantity(this_arg_conv, quantity_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+       *ret_conv = OfferWithDerivedMetadataBuilder_build(this_arg_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Offer_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKOffer this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -64575,10 +69717,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1amount(JNIEnv *env,
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKAmount ret_var = Offer_amount(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+       *ret_copy = Offer_amount(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -64661,10 +69802,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1supported_1quantity(
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKQuantity ret_var = Offer_supported_quantity(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+       *ret_copy = Offer_supported_quantity(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -64679,6 +69819,19 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Offer_1signing_1pubkey(
        return ret_arr;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1id(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKOffer this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKOfferId ret_var = Offer_id(&this_arg_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Offer_1supports_1chain(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray chain) {
        LDKOffer this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -64732,6 +69885,89 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Offer_1expects_1quantity(J
        return ret_conv;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice_1deriving_1payer_1id(JNIEnv *env, jclass clz, int64_t this_arg, int64_t expanded_key, int64_t entropy_source, int8_tArray payment_id) {
+       LDKOffer this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKExpandedKey expanded_key_conv;
+       expanded_key_conv.inner = untag_ptr(expanded_key);
+       expanded_key_conv.is_owned = ptr_is_owned(expanded_key);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv);
+       expanded_key_conv.is_owned = false;
+       void* entropy_source_ptr = untag_ptr(entropy_source);
+       CHECK_ACCESS(entropy_source_ptr);
+       LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+       if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+       }
+       LDKThirtyTwoBytes payment_id_ref;
+       CHECK((*env)->GetArrayLength(env, payment_id) == 32);
+       (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data);
+       LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ");
+       *ret_conv = Offer_request_invoice_deriving_payer_id(&this_arg_conv, &expanded_key_conv, entropy_source_conv, payment_id_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice_1deriving_1metadata(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray payer_id, int64_t expanded_key, int64_t entropy_source, int8_tArray payment_id) {
+       LDKOffer this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKPublicKey payer_id_ref;
+       CHECK((*env)->GetArrayLength(env, payer_id) == 33);
+       (*env)->GetByteArrayRegion(env, payer_id, 0, 33, payer_id_ref.compressed_form);
+       LDKExpandedKey expanded_key_conv;
+       expanded_key_conv.inner = untag_ptr(expanded_key);
+       expanded_key_conv.is_owned = ptr_is_owned(expanded_key);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv);
+       expanded_key_conv.is_owned = false;
+       void* entropy_source_ptr = untag_ptr(entropy_source);
+       CHECK_ACCESS(entropy_source_ptr);
+       LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+       if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+       }
+       LDKThirtyTwoBytes payment_id_ref;
+       CHECK((*env)->GetArrayLength(env, payment_id) == 32);
+       (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data);
+       LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ");
+       *ret_conv = Offer_request_invoice_deriving_metadata(&this_arg_conv, payer_id_ref, &expanded_key_conv, entropy_source_conv, payment_id_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray metadata, int8_tArray payer_id) {
+       LDKOffer this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKCVec_u8Z metadata_ref;
+       metadata_ref.datalen = (*env)->GetArrayLength(env, metadata);
+       metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, metadata, 0, metadata_ref.datalen, metadata_ref.data);
+       LDKPublicKey payer_id_ref;
+       CHECK((*env)->GetArrayLength(env, payer_id) == 33);
+       (*env)->GetByteArrayRegion(env, payer_id, 0, 33, payer_id_ref.compressed_form);
+       LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ");
+       *ret_conv = Offer_request_invoice(&this_arg_conv, metadata_ref, payer_id_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKOffer o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv.is_owned = false;
+       int64_t ret_conv = Offer_hash(&o_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Offer_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKOffer obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -64745,95 +69981,316 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Offer_1write(JNIEnv *en
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Amount_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
-       LDKAmount this_obj_conv;
-       this_obj_conv.inner = untag_ptr(this_obj);
-       this_obj_conv.is_owned = ptr_is_owned(this_obj);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
-       Amount_free(this_obj_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Amount_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKAmount this_ptr_conv = *(LDKAmount*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       Amount_free(this_ptr_conv);
 }
 
 static inline uint64_t Amount_clone_ptr(LDKAmount *NONNULL_PTR arg) {
-       LDKAmount ret_var = Amount_clone(arg);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount");
+       *ret_copy = Amount_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKAmount arg_conv;
-       arg_conv.inner = untag_ptr(arg);
-       arg_conv.is_owned = ptr_is_owned(arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
-       arg_conv.is_owned = false;
-       int64_t ret_conv = Amount_clone_ptr(&arg_conv);
+       LDKAmount* arg_conv = (LDKAmount*)untag_ptr(arg);
+       int64_t ret_conv = Amount_clone_ptr(arg_conv);
        return ret_conv;
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKAmount orig_conv;
-       orig_conv.inner = untag_ptr(orig);
-       orig_conv.is_owned = ptr_is_owned(orig);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
-       orig_conv.is_owned = false;
-       LDKAmount ret_var = Amount_clone(&orig_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKAmount* orig_conv = (LDKAmount*)untag_ptr(orig);
+       LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount");
+       *ret_copy = Amount_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1bitcoin(JNIEnv *env, jclass clz, int64_t amount_msats) {
+       LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount");
+       *ret_copy = Amount_bitcoin(amount_msats);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1currency(JNIEnv *env, jclass clz, int8_tArray iso4217_code, int64_t amount) {
+       LDKThreeBytes iso4217_code_ref;
+       CHECK((*env)->GetArrayLength(env, iso4217_code) == 3);
+       (*env)->GetByteArrayRegion(env, iso4217_code, 0, 3, iso4217_code_ref.data);
+       LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount");
+       *ret_copy = Amount_currency(iso4217_code_ref, amount);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Quantity_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
-       LDKQuantity this_obj_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Quantity_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKQuantity this_ptr_conv = *(LDKQuantity*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       Quantity_free(this_ptr_conv);
+}
+
+static inline uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg) {
+       LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+       *ret_copy = Quantity_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKQuantity* arg_conv = (LDKQuantity*)untag_ptr(arg);
+       int64_t ret_conv = Quantity_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKQuantity* orig_conv = (LDKQuantity*)untag_ptr(orig);
+       LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+       *ret_copy = Quantity_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1bounded(JNIEnv *env, jclass clz, int64_t a) {
+       LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+       *ret_copy = Quantity_bounded(a);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1unbounded(JNIEnv *env, jclass clz) {
+       LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+       *ret_copy = Quantity_unbounded();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1one(JNIEnv *env, jclass clz) {
+       LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+       *ret_copy = Quantity_one();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1from_1str(JNIEnv *env, jclass clz, jstring s) {
+       LDKStr s_conv = java_to_owned_str(env, s);
+       LDKCResult_OfferBolt12ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12ParseErrorZ), "LDKCResult_OfferBolt12ParseErrorZ");
+       *ret_conv = Offer_from_str(s_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKInvoiceWithExplicitSigningPubkeyBuilder this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
        this_obj_conv.is_owned = ptr_is_owned(this_obj);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
-       Quantity_free(this_obj_conv);
+       InvoiceWithExplicitSigningPubkeyBuilder_free(this_obj_conv);
 }
 
-static inline uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg) {
-       LDKQuantity ret_var = Quantity_clone(arg);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKInvoiceWithDerivedSigningPubkeyBuilder this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       InvoiceWithDerivedSigningPubkeyBuilder_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+       
+       LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ");
+       *ret_conv = InvoiceWithExplicitSigningPubkeyBuilder_build(this_arg_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1relative_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int32_t relative_expiry_secs) {
+       LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+       
+       InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(this_arg_conv, relative_expiry_secs);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v0_1p2wsh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray script_hash) {
+       LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+       
+       uint8_t script_hash_arr[32];
+       CHECK((*env)->GetArrayLength(env, script_hash) == 32);
+       (*env)->GetByteArrayRegion(env, script_hash, 0, 32, script_hash_arr);
+       uint8_t (*script_hash_ref)[32] = &script_hash_arr;
+       InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg_conv, script_hash_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v0_1p2wpkh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray pubkey_hash) {
+       LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+       
+       uint8_t pubkey_hash_arr[20];
+       CHECK((*env)->GetArrayLength(env, pubkey_hash) == 20);
+       (*env)->GetByteArrayRegion(env, pubkey_hash, 0, 20, pubkey_hash_arr);
+       uint8_t (*pubkey_hash_ref)[20] = &pubkey_hash_arr;
+       InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg_conv, pubkey_hash_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v1_1p2tr_1tweaked(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray utput_key) {
+       LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+       
+       LDKTweakedPublicKey utput_key_ref;
+       CHECK((*env)->GetArrayLength(env, utput_key) == 32);
+       (*env)->GetByteArrayRegion(env, utput_key, 0, 32, utput_key_ref.x_coordinate);
+       InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg_conv, utput_key_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1allow_1mpp(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+       
+       InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(this_arg_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1build_1and_1sign(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+       
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
+       *ret_conv = InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(this_arg_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1relative_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int32_t relative_expiry_secs) {
+       LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+       
+       InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(this_arg_conv, relative_expiry_secs);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v0_1p2wsh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray script_hash) {
+       LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+       
+       uint8_t script_hash_arr[32];
+       CHECK((*env)->GetArrayLength(env, script_hash) == 32);
+       (*env)->GetByteArrayRegion(env, script_hash, 0, 32, script_hash_arr);
+       uint8_t (*script_hash_ref)[32] = &script_hash_arr;
+       InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg_conv, script_hash_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v0_1p2wpkh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray pubkey_hash) {
+       LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+       
+       uint8_t pubkey_hash_arr[20];
+       CHECK((*env)->GetArrayLength(env, pubkey_hash) == 20);
+       (*env)->GetByteArrayRegion(env, pubkey_hash, 0, 20, pubkey_hash_arr);
+       uint8_t (*pubkey_hash_ref)[20] = &pubkey_hash_arr;
+       InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg_conv, pubkey_hash_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v1_1p2tr_1tweaked(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray utput_key) {
+       LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+       
+       LDKTweakedPublicKey utput_key_ref;
+       CHECK((*env)->GetArrayLength(env, utput_key) == 32);
+       (*env)->GetByteArrayRegion(env, utput_key, 0, 32, utput_key_ref.x_coordinate);
+       InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg_conv, utput_key_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1allow_1mpp(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+       
+       InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(this_arg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKUnsignedBolt12Invoice this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       UnsignedBolt12Invoice_free(this_obj_conv);
+}
+
+static inline uint64_t UnsignedBolt12Invoice_clone_ptr(LDKUnsignedBolt12Invoice *NONNULL_PTR arg) {
+       LDKUnsignedBolt12Invoice ret_var = UnsignedBolt12Invoice_clone(arg);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKQuantity arg_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKUnsignedBolt12Invoice arg_conv;
        arg_conv.inner = untag_ptr(arg);
        arg_conv.is_owned = ptr_is_owned(arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
        arg_conv.is_owned = false;
-       int64_t ret_conv = Quantity_clone_ptr(&arg_conv);
+       int64_t ret_conv = UnsignedBolt12Invoice_clone_ptr(&arg_conv);
        return ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKQuantity orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUnsignedBolt12Invoice orig_conv;
        orig_conv.inner = untag_ptr(orig);
        orig_conv.is_owned = ptr_is_owned(orig);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
        orig_conv.is_owned = false;
-       LDKQuantity ret_var = Quantity_clone(&orig_conv);
+       LDKUnsignedBolt12Invoice ret_var = UnsignedBolt12Invoice_clone(&orig_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1from_1str(JNIEnv *env, jclass clz, jstring s) {
-       LDKStr s_conv = java_to_owned_str(env, s);
-       LDKCResult_OfferBolt12ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12ParseErrorZ), "LDKCResult_OfferBolt12ParseErrorZ");
-       *ret_conv = Offer_from_str(s_conv);
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
-       LDKUnsignedBolt12Invoice this_obj_conv;
-       this_obj_conv.inner = untag_ptr(this_obj);
-       this_obj_conv.is_owned = ptr_is_owned(this_obj);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
-       UnsignedBolt12Invoice_free(this_obj_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignBolt12InvoiceFn_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKSignBolt12InvoiceFn this_ptr_conv = *(LDKSignBolt12InvoiceFn*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       SignBolt12InvoiceFn_free(this_ptr_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1tagged_1hash(JNIEnv *env, jclass clz, int64_t this_arg) {
@@ -64928,10 +70385,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1amou
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKAmount ret_var = UnsignedBolt12Invoice_amount(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+       *ret_copy = UnsignedBolt12Invoice_amount(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -65014,10 +70470,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1supp
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKQuantity ret_var = UnsignedBolt12Invoice_supported_quantity(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+       *ret_copy = UnsignedBolt12Invoice_supported_quantity(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -65198,10 +70653,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1amount(JNIEn
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKAmount ret_var = Bolt12Invoice_amount(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+       *ret_copy = Bolt12Invoice_amount(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -65284,10 +70738,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1supported_1q
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKQuantity ret_var = Bolt12Invoice_supported_quantity(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+       *ret_copy = Bolt12Invoice_supported_quantity(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -65465,6 +70918,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1verify(JNIEn
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKBolt12Invoice o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv.is_owned = false;
+       int64_t ret_conv = Bolt12Invoice_hash(&o_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKUnsignedBolt12Invoice obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -65948,6 +71411,142 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceError_1read(JNIEnv *
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKInvoiceRequestWithExplicitPayerIdBuilder this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       InvoiceRequestWithExplicitPayerIdBuilder_free(this_obj_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKInvoiceRequestWithDerivedPayerIdBuilder this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       InvoiceRequestWithDerivedPayerIdBuilder_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+       
+       LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
+       *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_build(this_arg_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) {
+       LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+       
+       LDKNetwork network_conv = LDKNetwork_from_java(env, network);
+       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_chain(this_arg_conv, network_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) {
+       LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+       
+       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(this_arg_conv, amount_msats);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) {
+       LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+       
+       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_quantity(this_arg_conv, quantity);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1payer_1note(JNIEnv *env, jclass clz, int64_t this_arg, jstring payer_note) {
+       LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+       
+       LDKStr payer_note_conv = java_to_owned_str(env, payer_note);
+       InvoiceRequestWithExplicitPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1build_1and_1sign(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+       
+       LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ");
+       *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(this_arg_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) {
+       LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+       
+       LDKNetwork network_conv = LDKNetwork_from_java(env, network);
+       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_chain(this_arg_conv, network_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) {
+       LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+       
+       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(this_arg_conv, amount_msats);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) {
+       LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+       
+       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_quantity(this_arg_conv, quantity);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1payer_1note(JNIEnv *env, jclass clz, int64_t this_arg, jstring payer_note) {
+       LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+       
+       LDKStr payer_note_conv = java_to_owned_str(env, payer_note);
+       InvoiceRequestWithDerivedPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKUnsignedInvoiceRequest this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -65956,6 +71555,45 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1free(J
        UnsignedInvoiceRequest_free(this_obj_conv);
 }
 
+static inline uint64_t UnsignedInvoiceRequest_clone_ptr(LDKUnsignedInvoiceRequest *NONNULL_PTR arg) {
+       LDKUnsignedInvoiceRequest ret_var = UnsignedInvoiceRequest_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKUnsignedInvoiceRequest arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = UnsignedInvoiceRequest_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUnsignedInvoiceRequest orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKUnsignedInvoiceRequest ret_var = UnsignedInvoiceRequest_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignInvoiceRequestFn_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKSignInvoiceRequestFn this_ptr_conv = *(LDKSignInvoiceRequestFn*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       SignInvoiceRequestFn_free(this_ptr_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1tagged_1hash(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKUnsignedInvoiceRequest this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -66015,6 +71653,33 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1free(J
        VerifiedInvoiceRequest_free(this_obj_conv);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1get_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKVerifiedInvoiceRequest this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKOfferId ret_var = VerifiedInvoiceRequest_get_offer_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1set_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKVerifiedInvoiceRequest this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKOfferId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = OfferId_clone(&val_conv);
+       VerifiedInvoiceRequest_set_offer_id(&this_ptr_conv, val_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1get_1keys(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKVerifiedInvoiceRequest this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
@@ -66108,10 +71773,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1amo
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKAmount ret_var = UnsignedInvoiceRequest_amount(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+       *ret_copy = UnsignedInvoiceRequest_amount(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -66194,10 +71858,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1sup
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKQuantity ret_var = UnsignedInvoiceRequest_supported_quantity(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+       *ret_copy = UnsignedInvoiceRequest_supported_quantity(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -66334,10 +71997,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1amount(JNIE
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKAmount ret_var = InvoiceRequest_amount(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+       *ret_copy = InvoiceRequest_amount(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -66420,10 +72082,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1supported_1
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKQuantity ret_var = InvoiceRequest_supported_quantity(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+       *ret_copy = InvoiceRequest_supported_quantity(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -66522,15 +72183,64 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1payer_1note
        return ret_ref;
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1signature(JNIEnv *env, jclass clz, int64_t this_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1respond_1with(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) {
        LDKInvoiceRequest this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, InvoiceRequest_signature(&this_arg_conv).compact_form);
-       return ret_arr;
+       LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+       payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+       if (payment_paths_constr.datalen > 0)
+               payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+       else
+               payment_paths_constr.data = NULL;
+       int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+       for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+               int64_t payment_paths_conv_37 = payment_paths_vals[l];
+               void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+               CHECK_ACCESS(payment_paths_conv_37_ptr);
+               LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+               payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+               payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+       LDKThirtyTwoBytes payment_hash_ref;
+       CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+       (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+       LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+       *ret_conv = InvoiceRequest_respond_with(&this_arg_conv, payment_paths_constr, payment_hash_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1respond_1with_1no_1std(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) {
+       LDKInvoiceRequest this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+       payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+       if (payment_paths_constr.datalen > 0)
+               payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+       else
+               payment_paths_constr.data = NULL;
+       int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+       for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+               int64_t payment_paths_conv_37 = payment_paths_vals[l];
+               void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+               CHECK_ACCESS(payment_paths_conv_37_ptr);
+               LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+               payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+               payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+       LDKThirtyTwoBytes payment_hash_ref;
+       CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+       (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+       LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+       *ret_conv = InvoiceRequest_respond_with_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at);
+       return tag_ptr(ret_conv, true);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1verify(JNIEnv *env, jclass clz, int64_t this_arg, int64_t key) {
@@ -66549,6 +72259,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1verify(JNIE
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1signature(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInvoiceRequest this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, InvoiceRequest_signature(&this_arg_conv).compact_form);
+       return ret_arr;
+}
+
 JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1chains(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKVerifiedInvoiceRequest this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -66587,10 +72308,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1amo
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKAmount ret_var = VerifiedInvoiceRequest_amount(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+       *ret_copy = VerifiedInvoiceRequest_amount(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -66673,10 +72393,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1sup
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKQuantity ret_var = VerifiedInvoiceRequest_supported_quantity(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+       *ret_copy = VerifiedInvoiceRequest_supported_quantity(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -66775,6 +72494,126 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1pay
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1with(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) {
+       LDKVerifiedInvoiceRequest this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+       payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+       if (payment_paths_constr.datalen > 0)
+               payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+       else
+               payment_paths_constr.data = NULL;
+       int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+       for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+               int64_t payment_paths_conv_37 = payment_paths_vals[l];
+               void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+               CHECK_ACCESS(payment_paths_conv_37_ptr);
+               LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+               payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+               payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+       LDKThirtyTwoBytes payment_hash_ref;
+       CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+       (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+       LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+       *ret_conv = VerifiedInvoiceRequest_respond_with(&this_arg_conv, payment_paths_constr, payment_hash_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1with_1no_1std(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) {
+       LDKVerifiedInvoiceRequest this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+       payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+       if (payment_paths_constr.datalen > 0)
+               payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+       else
+               payment_paths_constr.data = NULL;
+       int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+       for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+               int64_t payment_paths_conv_37 = payment_paths_vals[l];
+               void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+               CHECK_ACCESS(payment_paths_conv_37_ptr);
+               LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+               payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+               payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+       LDKThirtyTwoBytes payment_hash_ref;
+       CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+       (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+       LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+       *ret_conv = VerifiedInvoiceRequest_respond_with_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1using_1derived_1keys(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) {
+       LDKVerifiedInvoiceRequest this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+       payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+       if (payment_paths_constr.datalen > 0)
+               payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+       else
+               payment_paths_constr.data = NULL;
+       int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+       for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+               int64_t payment_paths_conv_37 = payment_paths_vals[l];
+               void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+               CHECK_ACCESS(payment_paths_conv_37_ptr);
+               LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+               payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+               payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+       LDKThirtyTwoBytes payment_hash_ref;
+       CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+       (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+       LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ");
+       *ret_conv = VerifiedInvoiceRequest_respond_using_derived_keys(&this_arg_conv, payment_paths_constr, payment_hash_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1using_1derived_1keys_1no_1std(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) {
+       LDKVerifiedInvoiceRequest this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+       payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+       if (payment_paths_constr.datalen > 0)
+               payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+       else
+               payment_paths_constr.data = NULL;
+       int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+       for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+               int64_t payment_paths_conv_37 = payment_paths_vals[l];
+               void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+               CHECK_ACCESS(payment_paths_conv_37_ptr);
+               LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+               payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+               payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+       LDKThirtyTwoBytes payment_hash_ref;
+       CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+       (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+       LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ");
+       *ret_conv = VerifiedInvoiceRequest_respond_using_derived_keys_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKUnsignedInvoiceRequest obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -66801,6 +72640,177 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1write(J
        return ret_arr;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKInvoiceRequestFields this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       InvoiceRequestFields_free(this_obj_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1payer_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKInvoiceRequestFields this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, InvoiceRequestFields_get_payer_id(&this_ptr_conv).compressed_form);
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1payer_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKInvoiceRequestFields this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKPublicKey val_ref;
+       CHECK((*env)->GetArrayLength(env, val) == 33);
+       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
+       InvoiceRequestFields_set_payer_id(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1quantity(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKInvoiceRequestFields this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+       *ret_copy = InvoiceRequestFields_get_quantity(&this_ptr_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1quantity(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKInvoiceRequestFields this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       void* val_ptr = untag_ptr(val);
+       CHECK_ACCESS(val_ptr);
+       LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(val_ptr);
+       val_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(val));
+       InvoiceRequestFields_set_quantity(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1payer_1note_1truncated(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKInvoiceRequestFields this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKUntrustedString ret_var = InvoiceRequestFields_get_payer_note_truncated(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1payer_1note_1truncated(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKInvoiceRequestFields this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKUntrustedString val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = UntrustedString_clone(&val_conv);
+       InvoiceRequestFields_set_payer_note_truncated(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1new(JNIEnv *env, jclass clz, int8_tArray payer_id_arg, int64_t quantity_arg, int64_t payer_note_truncated_arg) {
+       LDKPublicKey payer_id_arg_ref;
+       CHECK((*env)->GetArrayLength(env, payer_id_arg) == 33);
+       (*env)->GetByteArrayRegion(env, payer_id_arg, 0, 33, payer_id_arg_ref.compressed_form);
+       void* quantity_arg_ptr = untag_ptr(quantity_arg);
+       CHECK_ACCESS(quantity_arg_ptr);
+       LDKCOption_u64Z quantity_arg_conv = *(LDKCOption_u64Z*)(quantity_arg_ptr);
+       quantity_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(quantity_arg));
+       LDKUntrustedString payer_note_truncated_arg_conv;
+       payer_note_truncated_arg_conv.inner = untag_ptr(payer_note_truncated_arg);
+       payer_note_truncated_arg_conv.is_owned = ptr_is_owned(payer_note_truncated_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(payer_note_truncated_arg_conv);
+       payer_note_truncated_arg_conv = UntrustedString_clone(&payer_note_truncated_arg_conv);
+       LDKInvoiceRequestFields ret_var = InvoiceRequestFields_new(payer_id_arg_ref, quantity_arg_conv, payer_note_truncated_arg_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline uint64_t InvoiceRequestFields_clone_ptr(LDKInvoiceRequestFields *NONNULL_PTR arg) {
+       LDKInvoiceRequestFields ret_var = InvoiceRequestFields_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKInvoiceRequestFields arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = InvoiceRequestFields_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKInvoiceRequestFields orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKInvoiceRequestFields ret_var = InvoiceRequestFields_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKInvoiceRequestFields a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKInvoiceRequestFields b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = InvoiceRequestFields_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKInvoiceRequestFields obj_conv;
+       obj_conv.inner = untag_ptr(obj);
+       obj_conv.is_owned = ptr_is_owned(obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = InvoiceRequestFields_write(&obj_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ");
+       *ret_conv = InvoiceRequestFields_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TaggedHash_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKTaggedHash this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -66873,6 +72883,50 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TaggedHash_1merkle_1roo
        return ret_arr;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignError_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKSignError this_ptr_conv = *(LDKSignError*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       SignError_free(this_ptr_conv);
+}
+
+static inline uint64_t SignError_clone_ptr(LDKSignError *NONNULL_PTR arg) {
+       LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError");
+       *ret_copy = SignError_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKSignError* arg_conv = (LDKSignError*)untag_ptr(arg);
+       int64_t ret_conv = SignError_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKSignError* orig_conv = (LDKSignError*)untag_ptr(orig);
+       LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError");
+       *ret_copy = SignError_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1signing(JNIEnv *env, jclass clz) {
+       LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError");
+       *ret_copy = SignError_signing();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1verification(JNIEnv *env, jclass clz, jclass a) {
+       LDKSecp256k1Error a_conv = LDKSecp256k1Error_from_java(env, a);
+       LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError");
+       *ret_copy = SignError_verification(a_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12ParseError_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKBolt12ParseError this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -67032,6 +73086,11 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1missing
        return ret_conv;
 }
 
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1unexpected_1paths(JNIEnv *env, jclass clz) {
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, Bolt12SemanticError_unexpected_paths());
+       return ret_conv;
+}
+
 JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1invalid_1pay_1info(JNIEnv *env, jclass clz) {
        jclass ret_conv = LDKBolt12SemanticError_to_java(env, Bolt12SemanticError_invalid_pay_info());
        return ret_conv;
@@ -67052,6 +73111,164 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1missing
        return ret_conv;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKRefundMaybeWithDerivedMetadataBuilder this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       RefundMaybeWithDerivedMetadataBuilder_free(this_obj_conv);
+}
+
+static inline uint64_t RefundMaybeWithDerivedMetadataBuilder_clone_ptr(LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR arg) {
+       LDKRefundMaybeWithDerivedMetadataBuilder ret_var = RefundMaybeWithDerivedMetadataBuilder_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKRefundMaybeWithDerivedMetadataBuilder arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = RefundMaybeWithDerivedMetadataBuilder_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKRefundMaybeWithDerivedMetadataBuilder orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKRefundMaybeWithDerivedMetadataBuilder ret_var = RefundMaybeWithDerivedMetadataBuilder_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1new(JNIEnv *env, jclass clz, int8_tArray metadata, int8_tArray payer_id, int64_t amount_msats) {
+       LDKCVec_u8Z metadata_ref;
+       metadata_ref.datalen = (*env)->GetArrayLength(env, metadata);
+       metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, metadata, 0, metadata_ref.datalen, metadata_ref.data);
+       LDKPublicKey payer_id_ref;
+       CHECK((*env)->GetArrayLength(env, payer_id) == 33);
+       (*env)->GetByteArrayRegion(env, payer_id, 0, 33, payer_id_ref.compressed_form);
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = RefundMaybeWithDerivedMetadataBuilder_new(metadata_ref, payer_id_ref, amount_msats);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1deriving_1payer_1id(JNIEnv *env, jclass clz, int8_tArray node_id, int64_t expanded_key, int64_t entropy_source, int64_t amount_msats, int8_tArray payment_id) {
+       LDKPublicKey node_id_ref;
+       CHECK((*env)->GetArrayLength(env, node_id) == 33);
+       (*env)->GetByteArrayRegion(env, node_id, 0, 33, node_id_ref.compressed_form);
+       LDKExpandedKey expanded_key_conv;
+       expanded_key_conv.inner = untag_ptr(expanded_key);
+       expanded_key_conv.is_owned = ptr_is_owned(expanded_key);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv);
+       expanded_key_conv.is_owned = false;
+       void* entropy_source_ptr = untag_ptr(entropy_source);
+       CHECK_ACCESS(entropy_source_ptr);
+       LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+       if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+       }
+       LDKThirtyTwoBytes payment_id_ref;
+       CHECK((*env)->GetArrayLength(env, payment_id) == 32);
+       (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data);
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(node_id_ref, &expanded_key_conv, entropy_source_conv, amount_msats, payment_id_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1description(JNIEnv *env, jclass clz, int64_t this_arg, jstring description) {
+       LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       LDKStr description_conv = java_to_owned_str(env, description);
+       RefundMaybeWithDerivedMetadataBuilder_description(this_arg_conv, description_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1absolute_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int64_t absolute_expiry) {
+       LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1issuer(JNIEnv *env, jclass clz, int64_t this_arg, jstring issuer) {
+       LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       LDKStr issuer_conv = java_to_owned_str(env, issuer);
+       RefundMaybeWithDerivedMetadataBuilder_issuer(this_arg_conv, issuer_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1path(JNIEnv *env, jclass clz, int64_t this_arg, int64_t path) {
+       LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       LDKBlindedPath path_conv;
+       path_conv.inner = untag_ptr(path);
+       path_conv.is_owned = ptr_is_owned(path);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
+       path_conv = BlindedPath_clone(&path_conv);
+       RefundMaybeWithDerivedMetadataBuilder_path(this_arg_conv, path_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) {
+       LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       LDKNetwork network_conv = LDKNetwork_from_java(env, network);
+       RefundMaybeWithDerivedMetadataBuilder_chain(this_arg_conv, network_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) {
+       LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       RefundMaybeWithDerivedMetadataBuilder_quantity(this_arg_conv, quantity);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1payer_1note(JNIEnv *env, jclass clz, int64_t this_arg, jstring payer_note) {
+       LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       LDKStr payer_note_conv = java_to_owned_str(env, payer_note);
+       RefundMaybeWithDerivedMetadataBuilder_payer_note(this_arg_conv, payer_note_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ");
+       *ret_conv = RefundMaybeWithDerivedMetadataBuilder_build(this_arg_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Refund_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKRefund this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -67252,6 +73469,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Refund_1payer_1note(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Refund_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKRefund o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv.is_owned = false;
+       int64_t ret_conv = Refund_hash(&o_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Refund_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKRefund obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -67483,6 +73710,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeId_1from_1pubkey(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeId_1from_1slice(JNIEnv *env, jclass clz, int8_tArray bytes) {
+       LDKu8slice bytes_ref;
+       bytes_ref.datalen = (*env)->GetArrayLength(env, bytes);
+       bytes_ref.data = (*env)->GetByteArrayElements (env, bytes, NULL);
+       LDKCResult_NodeIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeIdDecodeErrorZ), "LDKCResult_NodeIdDecodeErrorZ");
+       *ret_conv = NodeId_from_slice(bytes_ref);
+       (*env)->ReleaseByteArrayElements(env, bytes, (int8_t*)bytes_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeId_1as_1slice(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKNodeId this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -68356,6 +74593,32 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1effect
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1source(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKDirectedChannelInfo this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKNodeId ret_var = DirectedChannelInfo_source(&this_arg_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1target(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKDirectedChannelInfo this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKNodeId ret_var = DirectedChannelInfo_target(&this_arg_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EffectiveCapacity_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -69076,6 +75339,16 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeInfo_1eq(JNIEnv *env,
        return ret_conv;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeInfo_1is_1tor_1only(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKNodeInfo this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       jboolean ret_conv = NodeInfo_is_tor_only(&this_arg_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeInfo_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKNodeInfo obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -73230,7 +79503,34 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor
        DelayedPaymentOutputDescriptor_set_channel_value_satoshis(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1new(JNIEnv *env, jclass clz, int64_t outpoint_arg, int8_tArray per_commitment_point_arg, int16_t to_self_delay_arg, int64_t output_arg, int64_t revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1channel_1transaction_1parameters(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKChannelTransactionParameters ret_var = DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1channel_1transaction_1parameters(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKChannelTransactionParameters val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelTransactionParameters_clone(&val_conv);
+       DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1new(JNIEnv *env, jclass clz, int64_t outpoint_arg, int8_tArray per_commitment_point_arg, int16_t to_self_delay_arg, int64_t output_arg, int64_t revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg, int64_t channel_transaction_parameters_arg) {
        LDKOutPoint outpoint_arg_conv;
        outpoint_arg_conv.inner = untag_ptr(outpoint_arg);
        outpoint_arg_conv.is_owned = ptr_is_owned(outpoint_arg);
@@ -73251,7 +79551,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescrip
        LDKThirtyTwoBytes channel_keys_id_arg_ref;
        CHECK((*env)->GetArrayLength(env, channel_keys_id_arg) == 32);
        (*env)->GetByteArrayRegion(env, channel_keys_id_arg, 0, 32, channel_keys_id_arg_ref.data);
-       LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_new(outpoint_arg_conv, per_commitment_point_arg_ref, to_self_delay_arg, output_arg_conv, revocation_pubkey_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg);
+       LDKChannelTransactionParameters channel_transaction_parameters_arg_conv;
+       channel_transaction_parameters_arg_conv.inner = untag_ptr(channel_transaction_parameters_arg);
+       channel_transaction_parameters_arg_conv.is_owned = ptr_is_owned(channel_transaction_parameters_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_transaction_parameters_arg_conv);
+       channel_transaction_parameters_arg_conv = ChannelTransactionParameters_clone(&channel_transaction_parameters_arg_conv);
+       LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_new(outpoint_arg_conv, per_commitment_point_arg_ref, to_self_delay_arg, output_arg_conv, revocation_pubkey_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg, channel_transaction_parameters_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -73935,6 +80240,29 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1set_1channel_1
        HTLCDescriptor_set_channel_derivation_parameters(&this_ptr_conv, val_conv);
 }
 
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1get_1commitment_1txid(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKHTLCDescriptor this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *HTLCDescriptor_get_commitment_txid(&this_ptr_conv));
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1set_1commitment_1txid(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKHTLCDescriptor this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKThirtyTwoBytes val_ref;
+       CHECK((*env)->GetArrayLength(env, val) == 32);
+       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+       HTLCDescriptor_set_commitment_txid(&this_ptr_conv, val_ref);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1get_1per_1commitment_1number(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKHTLCDescriptor this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
@@ -74071,6 +80399,37 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1set_1counterpa
        HTLCDescriptor_set_counterparty_sig(&this_ptr_conv, val_ref);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1new(JNIEnv *env, jclass clz, int64_t channel_derivation_parameters_arg, int8_tArray commitment_txid_arg, int64_t per_commitment_number_arg, int8_tArray per_commitment_point_arg, int32_t feerate_per_kw_arg, int64_t htlc_arg, int64_t preimage_arg, int8_tArray counterparty_sig_arg) {
+       LDKChannelDerivationParameters channel_derivation_parameters_arg_conv;
+       channel_derivation_parameters_arg_conv.inner = untag_ptr(channel_derivation_parameters_arg);
+       channel_derivation_parameters_arg_conv.is_owned = ptr_is_owned(channel_derivation_parameters_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_derivation_parameters_arg_conv);
+       channel_derivation_parameters_arg_conv = ChannelDerivationParameters_clone(&channel_derivation_parameters_arg_conv);
+       LDKThirtyTwoBytes commitment_txid_arg_ref;
+       CHECK((*env)->GetArrayLength(env, commitment_txid_arg) == 32);
+       (*env)->GetByteArrayRegion(env, commitment_txid_arg, 0, 32, commitment_txid_arg_ref.data);
+       LDKPublicKey per_commitment_point_arg_ref;
+       CHECK((*env)->GetArrayLength(env, per_commitment_point_arg) == 33);
+       (*env)->GetByteArrayRegion(env, per_commitment_point_arg, 0, 33, per_commitment_point_arg_ref.compressed_form);
+       LDKHTLCOutputInCommitment htlc_arg_conv;
+       htlc_arg_conv.inner = untag_ptr(htlc_arg);
+       htlc_arg_conv.is_owned = ptr_is_owned(htlc_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(htlc_arg_conv);
+       htlc_arg_conv = HTLCOutputInCommitment_clone(&htlc_arg_conv);
+       void* preimage_arg_ptr = untag_ptr(preimage_arg);
+       CHECK_ACCESS(preimage_arg_ptr);
+       LDKCOption_ThirtyTwoBytesZ preimage_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(preimage_arg_ptr);
+       preimage_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(preimage_arg));
+       LDKECDSASignature counterparty_sig_arg_ref;
+       CHECK((*env)->GetArrayLength(env, counterparty_sig_arg) == 64);
+       (*env)->GetByteArrayRegion(env, counterparty_sig_arg, 0, 64, counterparty_sig_arg_ref.compact_form);
+       LDKHTLCDescriptor ret_var = HTLCDescriptor_new(channel_derivation_parameters_arg_conv, commitment_txid_arg_ref, per_commitment_number_arg, per_commitment_point_arg_ref, feerate_per_kw_arg, htlc_arg_conv, preimage_arg_conv, counterparty_sig_arg_ref);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
 static inline uint64_t HTLCDescriptor_clone_ptr(LDKHTLCDescriptor *NONNULL_PTR arg) {
        LDKHTLCDescriptor ret_var = HTLCDescriptor_clone(arg);
        int64_t ret_ref = 0;
@@ -74275,6 +80634,15 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeSigner_1free(JNIEnv *env,
        NodeSigner_free(this_ptr_conv);
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSpender_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKOutputSpender this_ptr_conv = *(LDKOutputSpender*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       OutputSpender_free(this_ptr_conv);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignerProvider_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -74284,6 +80652,15 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignerProvider_1free(JNIEnv *e
        SignerProvider_free(this_ptr_conv);
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChangeDestinationSource_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKChangeDestinationSource this_ptr_conv = *(LDKChangeDestinationSource*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       ChangeDestinationSource_free(this_ptr_conv);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKInMemorySigner this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -74775,76 +81152,36 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1sign_1spendabl
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1spend_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1EntropySource(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKKeysManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKCVec_SpendableOutputDescriptorZ descriptors_constr;
-       descriptors_constr.datalen = (*env)->GetArrayLength(env, descriptors);
-       if (descriptors_constr.datalen > 0)
-               descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
-       else
-               descriptors_constr.data = NULL;
-       int64_t* descriptors_vals = (*env)->GetLongArrayElements (env, descriptors, NULL);
-       for (size_t b = 0; b < descriptors_constr.datalen; b++) {
-               int64_t descriptors_conv_27 = descriptors_vals[b];
-               void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27);
-               CHECK_ACCESS(descriptors_conv_27_ptr);
-               LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr);
-               descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27));
-               descriptors_constr.data[b] = descriptors_conv_27_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, descriptors, descriptors_vals, 0);
-       LDKCVec_TxOutZ outputs_constr;
-       outputs_constr.datalen = (*env)->GetArrayLength(env, outputs);
-       if (outputs_constr.datalen > 0)
-               outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements");
-       else
-               outputs_constr.data = NULL;
-       int64_t* outputs_vals = (*env)->GetLongArrayElements (env, outputs, NULL);
-       for (size_t h = 0; h < outputs_constr.datalen; h++) {
-               int64_t outputs_conv_7 = outputs_vals[h];
-               void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7);
-               CHECK_ACCESS(outputs_conv_7_ptr);
-               LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr);
-               outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7));
-               outputs_constr.data[h] = outputs_conv_7_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0);
-       LDKCVec_u8Z change_destination_script_ref;
-       change_destination_script_ref.datalen = (*env)->GetArrayLength(env, change_destination_script);
-       change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes");
-       (*env)->GetByteArrayRegion(env, change_destination_script, 0, change_destination_script_ref.datalen, change_destination_script_ref.data);
-       void* locktime_ptr = untag_ptr(locktime);
-       CHECK_ACCESS(locktime_ptr);
-       LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr);
-       locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime));
-       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
-       *ret_conv = KeysManager_spend_spendable_outputs(&this_arg_conv, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv);
-       return tag_ptr(ret_conv, true);
+       LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource");
+       *ret_ret = KeysManager_as_EntropySource(&this_arg_conv);
+       return tag_ptr(ret_ret, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1EntropySource(JNIEnv *env, jclass clz, int64_t this_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1NodeSigner(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKKeysManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource");
-       *ret_ret = KeysManager_as_EntropySource(&this_arg_conv);
+       LDKNodeSigner* ret_ret = MALLOC(sizeof(LDKNodeSigner), "LDKNodeSigner");
+       *ret_ret = KeysManager_as_NodeSigner(&this_arg_conv);
        return tag_ptr(ret_ret, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1NodeSigner(JNIEnv *env, jclass clz, int64_t this_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1OutputSpender(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKKeysManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKNodeSigner* ret_ret = MALLOC(sizeof(LDKNodeSigner), "LDKNodeSigner");
-       *ret_ret = KeysManager_as_NodeSigner(&this_arg_conv);
+       LDKOutputSpender* ret_ret = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender");
+       *ret_ret = KeysManager_as_OutputSpender(&this_arg_conv);
        return tag_ptr(ret_ret, true);
 }
 
@@ -74889,6 +81226,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1Nod
        return tag_ptr(ret_ret, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1OutputSpender(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKPhantomKeysManager this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKOutputSpender* ret_ret = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender");
+       *ret_ret = PhantomKeysManager_as_OutputSpender(&this_arg_conv);
+       return tag_ptr(ret_ret, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1SignerProvider(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKPhantomKeysManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -74916,57 +81264,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1new(JNI
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1spend_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) {
-       LDKPhantomKeysManager this_arg_conv;
-       this_arg_conv.inner = untag_ptr(this_arg);
-       this_arg_conv.is_owned = ptr_is_owned(this_arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
-       this_arg_conv.is_owned = false;
-       LDKCVec_SpendableOutputDescriptorZ descriptors_constr;
-       descriptors_constr.datalen = (*env)->GetArrayLength(env, descriptors);
-       if (descriptors_constr.datalen > 0)
-               descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
-       else
-               descriptors_constr.data = NULL;
-       int64_t* descriptors_vals = (*env)->GetLongArrayElements (env, descriptors, NULL);
-       for (size_t b = 0; b < descriptors_constr.datalen; b++) {
-               int64_t descriptors_conv_27 = descriptors_vals[b];
-               void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27);
-               CHECK_ACCESS(descriptors_conv_27_ptr);
-               LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr);
-               descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27));
-               descriptors_constr.data[b] = descriptors_conv_27_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, descriptors, descriptors_vals, 0);
-       LDKCVec_TxOutZ outputs_constr;
-       outputs_constr.datalen = (*env)->GetArrayLength(env, outputs);
-       if (outputs_constr.datalen > 0)
-               outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements");
-       else
-               outputs_constr.data = NULL;
-       int64_t* outputs_vals = (*env)->GetLongArrayElements (env, outputs, NULL);
-       for (size_t h = 0; h < outputs_constr.datalen; h++) {
-               int64_t outputs_conv_7 = outputs_vals[h];
-               void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7);
-               CHECK_ACCESS(outputs_conv_7_ptr);
-               LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr);
-               outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7));
-               outputs_constr.data[h] = outputs_conv_7_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0);
-       LDKCVec_u8Z change_destination_script_ref;
-       change_destination_script_ref.datalen = (*env)->GetArrayLength(env, change_destination_script);
-       change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes");
-       (*env)->GetByteArrayRegion(env, change_destination_script, 0, change_destination_script_ref.datalen, change_destination_script_ref.data);
-       void* locktime_ptr = untag_ptr(locktime);
-       CHECK_ACCESS(locktime_ptr);
-       LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr);
-       locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime));
-       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
-       *ret_conv = PhantomKeysManager_spend_spendable_outputs(&this_arg_conv, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv);
-       return tag_ptr(ret_conv, true);
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1derive_1channel_1keys(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_value_satoshis, int8_tArray params) {
        LDKPhantomKeysManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -75006,6 +81303,36 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1get
        return ret_arr;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RandomBytes_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKRandomBytes this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       RandomBytes_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RandomBytes_1new(JNIEnv *env, jclass clz, int8_tArray seed) {
+       LDKThirtyTwoBytes seed_ref;
+       CHECK((*env)->GetArrayLength(env, seed) == 32);
+       (*env)->GetByteArrayRegion(env, seed, 0, 32, seed_ref.data);
+       LDKRandomBytes ret_var = RandomBytes_new(seed_ref);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RandomBytes_1as_1EntropySource(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKRandomBytes this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource");
+       *ret_ret = RandomBytes_as_EntropySource(&this_arg_conv);
+       return tag_ptr(ret_ret, true);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EcdsaChannelSigner_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -75322,6 +81649,29 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Destination_1blinded_1path(
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Destination_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKDestination* o_conv = (LDKDestination*)untag_ptr(o);
+       int64_t ret_conv = Destination_hash(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Destination_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKDestination* a_conv = (LDKDestination*)untag_ptr(a);
+       LDKDestination* b_conv = (LDKDestination*)untag_ptr(b);
+       jboolean ret_conv = Destination_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Destination_1resolve(JNIEnv *env, jclass clz, int64_t this_arg, int64_t network_graph) {
+       LDKDestination* this_arg_conv = (LDKDestination*)untag_ptr(this_arg);
+       LDKReadOnlyNetworkGraph network_graph_conv;
+       network_graph_conv.inner = untag_ptr(network_graph);
+       network_graph_conv.is_owned = ptr_is_owned(network_graph);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv);
+       network_graph_conv.is_owned = false;
+       Destination_resolve(this_arg_conv, &network_graph_conv);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SendSuccess_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -75368,6 +81718,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendSuccess_1buffered_1awai
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendSuccess_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKSendSuccess* o_conv = (LDKSendSuccess*)untag_ptr(o);
+       int64_t ret_conv = SendSuccess_hash(o_conv);
+       return ret_conv;
+}
+
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_SendSuccess_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
        LDKSendSuccess* a_conv = (LDKSendSuccess*)untag_ptr(a);
        LDKSendSuccess* b_conv = (LDKSendSuccess*)untag_ptr(b);
@@ -75464,6 +81820,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1get_1node_1id_1f
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1unresolved_1introduction_1node(JNIEnv *env, jclass clz) {
+       LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
+       *ret_copy = SendError_unresolved_introduction_node();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1blinded_1path_1advance_1failed(JNIEnv *env, jclass clz) {
        LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
        *ret_copy = SendError_blinded_path_advance_failed();
@@ -75471,6 +81834,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1blinded_1path_1a
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKSendError* o_conv = (LDKSendError*)untag_ptr(o);
+       int64_t ret_conv = SendError_hash(o_conv);
+       return ret_conv;
+}
+
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_SendError_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
        LDKSendError* a_conv = (LDKSendError*)untag_ptr(a);
        LDKSendError* b_conv = (LDKSendError*)untag_ptr(b);
@@ -75516,17 +81885,18 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1clone(JNIEnv *
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1forward(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
-       LDKPublicKey a_ref;
-       CHECK((*env)->GetArrayLength(env, a) == 33);
-       (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1forward(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       void* a_ptr = untag_ptr(a);
+       CHECK_ACCESS(a_ptr);
+       LDKNextMessageHop a_conv = *(LDKNextMessageHop*)(a_ptr);
+       a_conv = NextMessageHop_clone((LDKNextMessageHop*)untag_ptr(a));
        LDKOnionMessage b_conv;
        b_conv.inner = untag_ptr(b);
        b_conv.is_owned = ptr_is_owned(b);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
        b_conv = OnionMessage_clone(&b_conv);
        LDKPeeledOnion *ret_copy = MALLOC(sizeof(LDKPeeledOnion), "LDKPeeledOnion");
-       *ret_copy = PeeledOnion_forward(a_ref, b_conv);
+       *ret_copy = PeeledOnion_forward(a_conv, b_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -75550,13 +81920,53 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1receive(JNIEnv
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1onion_1message(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t path, int64_t contents, int64_t reply_path) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1onion_1message_1resolving_1destination(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t node_id_lookup, int64_t network_graph, int64_t path, int64_t contents, int64_t reply_path) {
+       void* entropy_source_ptr = untag_ptr(entropy_source);
+       if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
+       LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+       void* node_signer_ptr = untag_ptr(node_signer);
+       if (ptr_is_owned(node_signer)) { CHECK_ACCESS(node_signer_ptr); }
+       LDKNodeSigner* node_signer_conv = (LDKNodeSigner*)node_signer_ptr;
+       void* node_id_lookup_ptr = untag_ptr(node_id_lookup);
+       if (ptr_is_owned(node_id_lookup)) { CHECK_ACCESS(node_id_lookup_ptr); }
+       LDKNodeIdLookUp* node_id_lookup_conv = (LDKNodeIdLookUp*)node_id_lookup_ptr;
+       LDKReadOnlyNetworkGraph network_graph_conv;
+       network_graph_conv.inner = untag_ptr(network_graph);
+       network_graph_conv.is_owned = ptr_is_owned(network_graph);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv);
+       network_graph_conv.is_owned = false;
+       LDKOnionMessagePath path_conv;
+       path_conv.inner = untag_ptr(path);
+       path_conv.is_owned = ptr_is_owned(path);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
+       path_conv = OnionMessagePath_clone(&path_conv);
+       void* contents_ptr = untag_ptr(contents);
+       CHECK_ACCESS(contents_ptr);
+       LDKOnionMessageContents contents_conv = *(LDKOnionMessageContents*)(contents_ptr);
+       if (contents_conv.free == LDKOnionMessageContents_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKOnionMessageContents_JCalls_cloned(&contents_conv);
+       }
+       LDKBlindedPath reply_path_conv;
+       reply_path_conv.inner = untag_ptr(reply_path);
+       reply_path_conv.is_owned = ptr_is_owned(reply_path);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv);
+       reply_path_conv = BlindedPath_clone(&reply_path_conv);
+       LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ");
+       *ret_conv = create_onion_message_resolving_destination(entropy_source_conv, node_signer_conv, node_id_lookup_conv, &network_graph_conv, path_conv, contents_conv, reply_path_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1onion_1message(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t node_id_lookup, int64_t path, int64_t contents, int64_t reply_path) {
        void* entropy_source_ptr = untag_ptr(entropy_source);
        if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
        LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
        void* node_signer_ptr = untag_ptr(node_signer);
        if (ptr_is_owned(node_signer)) { CHECK_ACCESS(node_signer_ptr); }
        LDKNodeSigner* node_signer_conv = (LDKNodeSigner*)node_signer_ptr;
+       void* node_id_lookup_ptr = untag_ptr(node_id_lookup);
+       if (ptr_is_owned(node_id_lookup)) { CHECK_ACCESS(node_id_lookup_ptr); }
+       LDKNodeIdLookUp* node_id_lookup_conv = (LDKNodeIdLookUp*)node_id_lookup_ptr;
        LDKOnionMessagePath path_conv;
        path_conv.inner = untag_ptr(path);
        path_conv.is_owned = ptr_is_owned(path);
@@ -75575,7 +81985,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1onion_1message(JNIE
        CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv);
        reply_path_conv = BlindedPath_clone(&reply_path_conv);
        LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ");
-       *ret_conv = create_onion_message(entropy_source_conv, node_signer_conv, path_conv, contents_conv, reply_path_conv);
+       *ret_conv = create_onion_message(entropy_source_conv, node_signer_conv, node_id_lookup_conv, path_conv, contents_conv, reply_path_conv);
        return tag_ptr(ret_conv, true);
 }
 
@@ -75611,7 +82021,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_peel_1onion_1message(JNIEnv
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t logger, int64_t message_router, int64_t offers_handler, int64_t custom_handler) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t logger, int64_t node_id_lookup, int64_t message_router, int64_t offers_handler, int64_t custom_handler) {
        void* entropy_source_ptr = untag_ptr(entropy_source);
        CHECK_ACCESS(entropy_source_ptr);
        LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
@@ -75633,6 +82043,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKLogger_JCalls_cloned(&logger_conv);
        }
+       void* node_id_lookup_ptr = untag_ptr(node_id_lookup);
+       CHECK_ACCESS(node_id_lookup_ptr);
+       LDKNodeIdLookUp node_id_lookup_conv = *(LDKNodeIdLookUp*)(node_id_lookup_ptr);
+       if (node_id_lookup_conv.free == LDKNodeIdLookUp_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKNodeIdLookUp_JCalls_cloned(&node_id_lookup_conv);
+       }
        void* message_router_ptr = untag_ptr(message_router);
        CHECK_ACCESS(message_router_ptr);
        LDKMessageRouter message_router_conv = *(LDKMessageRouter*)(message_router_ptr);
@@ -75654,7 +82071,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKCustomOnionMessageHandler_JCalls_cloned(&custom_handler_conv);
        }
-       LDKOnionMessenger ret_var = OnionMessenger_new(entropy_source_conv, node_signer_conv, logger_conv, message_router_conv, offers_handler_conv, custom_handler_conv);
+       LDKOnionMessenger ret_var = OnionMessenger_new(entropy_source_conv, node_signer_conv, logger_conv, node_id_lookup_conv, message_router_conv, offers_handler_conv, custom_handler_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -76093,6 +82510,65 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OnionMessageContents_1free(JNI
        OnionMessageContents_free(this_ptr_conv);
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKNextMessageHop this_ptr_conv = *(LDKNextMessageHop*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       NextMessageHop_free(this_ptr_conv);
+}
+
+static inline uint64_t NextMessageHop_clone_ptr(LDKNextMessageHop *NONNULL_PTR arg) {
+       LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop");
+       *ret_copy = NextMessageHop_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKNextMessageHop* arg_conv = (LDKNextMessageHop*)untag_ptr(arg);
+       int64_t ret_conv = NextMessageHop_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKNextMessageHop* orig_conv = (LDKNextMessageHop*)untag_ptr(orig);
+       LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop");
+       *ret_copy = NextMessageHop_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1node_1id(JNIEnv *env, jclass clz, int8_tArray a) {
+       LDKPublicKey a_ref;
+       CHECK((*env)->GetArrayLength(env, a) == 33);
+       (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form);
+       LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop");
+       *ret_copy = NextMessageHop_node_id(a_ref);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1short_1channel_1id(JNIEnv *env, jclass clz, int64_t a) {
+       LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop");
+       *ret_copy = NextMessageHop_short_channel_id(a);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKNextMessageHop* o_conv = (LDKNextMessageHop*)untag_ptr(o);
+       int64_t ret_conv = NextMessageHop_hash(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKNextMessageHop* a_conv = (LDKNextMessageHop*)untag_ptr(a);
+       LDKNextMessageHop* b_conv = (LDKNextMessageHop*)untag_ptr(b);
+       jboolean ret_conv = NextMessageHop_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKBlindedPath this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -76101,27 +82577,29 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1free(JNIEnv *env,
        BlindedPath_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1introduction_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1introduction_1node(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKBlindedPath this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, BlindedPath_get_introduction_node_id(&this_ptr_conv).compressed_form);
-       return ret_arr;
+       LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode");
+       *ret_copy = BlindedPath_get_introduction_node(&this_ptr_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1introduction_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1introduction_1node(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKBlindedPath this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       BlindedPath_set_introduction_node_id(&this_ptr_conv, val_ref);
+       void* val_ptr = untag_ptr(val);
+       CHECK_ACCESS(val_ptr);
+       LDKIntroductionNode val_conv = *(LDKIntroductionNode*)(val_ptr);
+       val_conv = IntroductionNode_clone((LDKIntroductionNode*)untag_ptr(val));
+       BlindedPath_set_introduction_node(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1blinding_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -76195,10 +82673,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1blinded_1hop
        BlindedPath_set_blinded_hops(&this_ptr_conv, val_constr);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new(JNIEnv *env, jclass clz, int8_tArray introduction_node_id_arg, int8_tArray blinding_point_arg, int64_tArray blinded_hops_arg) {
-       LDKPublicKey introduction_node_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, introduction_node_id_arg) == 33);
-       (*env)->GetByteArrayRegion(env, introduction_node_id_arg, 0, 33, introduction_node_id_arg_ref.compressed_form);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new(JNIEnv *env, jclass clz, int64_t introduction_node_arg, int8_tArray blinding_point_arg, int64_tArray blinded_hops_arg) {
+       void* introduction_node_arg_ptr = untag_ptr(introduction_node_arg);
+       CHECK_ACCESS(introduction_node_arg_ptr);
+       LDKIntroductionNode introduction_node_arg_conv = *(LDKIntroductionNode*)(introduction_node_arg_ptr);
+       introduction_node_arg_conv = IntroductionNode_clone((LDKIntroductionNode*)untag_ptr(introduction_node_arg));
        LDKPublicKey blinding_point_arg_ref;
        CHECK((*env)->GetArrayLength(env, blinding_point_arg) == 33);
        (*env)->GetByteArrayRegion(env, blinding_point_arg, 0, 33, blinding_point_arg_ref.compressed_form);
@@ -76219,7 +82698,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new(JNIEnv *en
                blinded_hops_arg_constr.data[m] = blinded_hops_arg_conv_12_conv;
        }
        (*env)->ReleaseLongArrayElements(env, blinded_hops_arg, blinded_hops_arg_vals, 0);
-       LDKBlindedPath ret_var = BlindedPath_new(introduction_node_id_arg_ref, blinding_point_arg_ref, blinded_hops_arg_constr);
+       LDKBlindedPath ret_var = BlindedPath_new(introduction_node_arg_conv, blinding_point_arg_ref, blinded_hops_arg_constr);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -76281,6 +82760,131 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_BlindedPath_1eq(JNIEnv *en
        return ret_conv;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKIntroductionNode this_ptr_conv = *(LDKIntroductionNode*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       IntroductionNode_free(this_ptr_conv);
+}
+
+static inline uint64_t IntroductionNode_clone_ptr(LDKIntroductionNode *NONNULL_PTR arg) {
+       LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode");
+       *ret_copy = IntroductionNode_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKIntroductionNode* arg_conv = (LDKIntroductionNode*)untag_ptr(arg);
+       int64_t ret_conv = IntroductionNode_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKIntroductionNode* orig_conv = (LDKIntroductionNode*)untag_ptr(orig);
+       LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode");
+       *ret_copy = IntroductionNode_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1node_1id(JNIEnv *env, jclass clz, int8_tArray a) {
+       LDKPublicKey a_ref;
+       CHECK((*env)->GetArrayLength(env, a) == 33);
+       (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form);
+       LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode");
+       *ret_copy = IntroductionNode_node_id(a_ref);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1directed_1short_1channel_1id(JNIEnv *env, jclass clz, jclass a, int64_t b) {
+       LDKDirection a_conv = LDKDirection_from_java(env, a);
+       LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode");
+       *ret_copy = IntroductionNode_directed_short_channel_id(a_conv, b);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKIntroductionNode* o_conv = (LDKIntroductionNode*)untag_ptr(o);
+       int64_t ret_conv = IntroductionNode_hash(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKIntroductionNode* a_conv = (LDKIntroductionNode*)untag_ptr(a);
+       LDKIntroductionNode* b_conv = (LDKIntroductionNode*)untag_ptr(b);
+       jboolean ret_conv = IntroductionNode_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Direction_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKDirection* orig_conv = (LDKDirection*)untag_ptr(orig);
+       jclass ret_conv = LDKDirection_to_java(env, Direction_clone(orig_conv));
+       return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Direction_1node_1one(JNIEnv *env, jclass clz) {
+       jclass ret_conv = LDKDirection_to_java(env, Direction_node_one());
+       return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Direction_1node_1two(JNIEnv *env, jclass clz) {
+       jclass ret_conv = LDKDirection_to_java(env, Direction_node_two());
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Direction_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKDirection* o_conv = (LDKDirection*)untag_ptr(o);
+       int64_t ret_conv = Direction_hash(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Direction_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKDirection* a_conv = (LDKDirection*)untag_ptr(a);
+       LDKDirection* b_conv = (LDKDirection*)untag_ptr(b);
+       jboolean ret_conv = Direction_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeIdLookUp_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKNodeIdLookUp this_ptr_conv = *(LDKNodeIdLookUp*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       NodeIdLookUp_free(this_ptr_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKEmptyNodeIdLookUp this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       EmptyNodeIdLookUp_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1new(JNIEnv *env, jclass clz) {
+       LDKEmptyNodeIdLookUp ret_var = EmptyNodeIdLookUp_new();
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1as_1NodeIdLookUp(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKEmptyNodeIdLookUp this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKNodeIdLookUp* ret_ret = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp");
+       *ret_ret = EmptyNodeIdLookUp_as_NodeIdLookUp(&this_arg_conv);
+       return tag_ptr(ret_ret, true);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedHop_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKBlindedHop this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -76413,8 +83017,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1one_1hop_1for_
        CHECK((*env)->GetArrayLength(env, recipient_node_id) == 33);
        (*env)->GetByteArrayRegion(env, recipient_node_id, 0, 33, recipient_node_id_ref.compressed_form);
        void* entropy_source_ptr = untag_ptr(entropy_source);
-       if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
-       LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+       CHECK_ACCESS(entropy_source_ptr);
+       LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+       if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+       }
        LDKCResult_BlindedPathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedPathNoneZ), "LDKCResult_BlindedPathNoneZ");
        *ret_conv = BlindedPath_one_hop_for_message(recipient_node_id_ref, entropy_source_conv);
        return tag_ptr(ret_conv, true);
@@ -76435,14 +83043,18 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1mess
                node_pks_constr.data[i] = node_pks_conv_8_ref;
        }
        void* entropy_source_ptr = untag_ptr(entropy_source);
-       if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
-       LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+       CHECK_ACCESS(entropy_source_ptr);
+       LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+       if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+       }
        LDKCResult_BlindedPathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedPathNoneZ), "LDKCResult_BlindedPathNoneZ");
        *ret_conv = BlindedPath_new_for_message(node_pks_constr, entropy_source_conv);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1one_1hop_1for_1payment(JNIEnv *env, jclass clz, int8_tArray payee_node_id, int64_t payee_tlvs, int64_t entropy_source) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1one_1hop_1for_1payment(JNIEnv *env, jclass clz, int8_tArray payee_node_id, int64_t payee_tlvs, int16_t min_final_cltv_expiry_delta, int64_t entropy_source) {
        LDKPublicKey payee_node_id_ref;
        CHECK((*env)->GetArrayLength(env, payee_node_id) == 33);
        (*env)->GetByteArrayRegion(env, payee_node_id, 0, 33, payee_node_id_ref.compressed_form);
@@ -76452,14 +83064,18 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1one_1hop_1for_
        CHECK_INNER_FIELD_ACCESS_OR_NULL(payee_tlvs_conv);
        payee_tlvs_conv = ReceiveTlvs_clone(&payee_tlvs_conv);
        void* entropy_source_ptr = untag_ptr(entropy_source);
-       if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
-       LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+       CHECK_ACCESS(entropy_source_ptr);
+       LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+       if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+       }
        LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ), "LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ");
-       *ret_conv = BlindedPath_one_hop_for_payment(payee_node_id_ref, payee_tlvs_conv, entropy_source_conv);
+       *ret_conv = BlindedPath_one_hop_for_payment(payee_node_id_ref, payee_tlvs_conv, min_final_cltv_expiry_delta, entropy_source_conv);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1payment(JNIEnv *env, jclass clz, int64_tArray intermediate_nodes, int8_tArray payee_node_id, int64_t payee_tlvs, int64_t htlc_maximum_msat, int64_t entropy_source) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1payment(JNIEnv *env, jclass clz, int64_tArray intermediate_nodes, int8_tArray payee_node_id, int64_t payee_tlvs, int64_t htlc_maximum_msat, int16_t min_final_cltv_expiry_delta, int64_t entropy_source) {
        LDKCVec_ForwardNodeZ intermediate_nodes_constr;
        intermediate_nodes_constr.datalen = (*env)->GetArrayLength(env, intermediate_nodes);
        if (intermediate_nodes_constr.datalen > 0)
@@ -76486,13 +83102,35 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1paym
        CHECK_INNER_FIELD_ACCESS_OR_NULL(payee_tlvs_conv);
        payee_tlvs_conv = ReceiveTlvs_clone(&payee_tlvs_conv);
        void* entropy_source_ptr = untag_ptr(entropy_source);
-       if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
-       LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+       CHECK_ACCESS(entropy_source_ptr);
+       LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+       if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+       }
        LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ), "LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ");
-       *ret_conv = BlindedPath_new_for_payment(intermediate_nodes_constr, payee_node_id_ref, payee_tlvs_conv, htlc_maximum_msat, entropy_source_conv);
+       *ret_conv = BlindedPath_new_for_payment(intermediate_nodes_constr, payee_node_id_ref, payee_tlvs_conv, htlc_maximum_msat, min_final_cltv_expiry_delta, entropy_source_conv);
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1public_1introduction_1node_1id(JNIEnv *env, jclass clz, int64_t this_arg, int64_t network_graph) {
+       LDKBlindedPath this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKReadOnlyNetworkGraph network_graph_conv;
+       network_graph_conv.inner = untag_ptr(network_graph);
+       network_graph_conv.is_owned = ptr_is_owned(network_graph);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv);
+       network_graph_conv.is_owned = false;
+       LDKNodeId ret_var = BlindedPath_public_introduction_node_id(&this_arg_conv, &network_graph_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BlindedPath_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKBlindedPath obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -76881,7 +83519,32 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1set_1payment_1con
        ReceiveTlvs_set_payment_constraints(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1new(JNIEnv *env, jclass clz, int8_tArray payment_secret_arg, int64_t payment_constraints_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1get_1payment_1context(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKReceiveTlvs this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+       *ret_copy = ReceiveTlvs_get_payment_context(&this_ptr_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1set_1payment_1context(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKReceiveTlvs this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       void* val_ptr = untag_ptr(val);
+       CHECK_ACCESS(val_ptr);
+       LDKPaymentContext val_conv = *(LDKPaymentContext*)(val_ptr);
+       val_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(val));
+       ReceiveTlvs_set_payment_context(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1new(JNIEnv *env, jclass clz, int8_tArray payment_secret_arg, int64_t payment_constraints_arg, int64_t payment_context_arg) {
        LDKThirtyTwoBytes payment_secret_arg_ref;
        CHECK((*env)->GetArrayLength(env, payment_secret_arg) == 32);
        (*env)->GetByteArrayRegion(env, payment_secret_arg, 0, 32, payment_secret_arg_ref.data);
@@ -76890,7 +83553,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1new(JNIEnv *en
        payment_constraints_arg_conv.is_owned = ptr_is_owned(payment_constraints_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_constraints_arg_conv);
        payment_constraints_arg_conv = PaymentConstraints_clone(&payment_constraints_arg_conv);
-       LDKReceiveTlvs ret_var = ReceiveTlvs_new(payment_secret_arg_ref, payment_constraints_arg_conv);
+       void* payment_context_arg_ptr = untag_ptr(payment_context_arg);
+       CHECK_ACCESS(payment_context_arg_ptr);
+       LDKPaymentContext payment_context_arg_conv = *(LDKPaymentContext*)(payment_context_arg_ptr);
+       payment_context_arg_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(payment_context_arg));
+       LDKReceiveTlvs ret_var = ReceiveTlvs_new(payment_secret_arg_ref, payment_constraints_arg_conv, payment_context_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -77114,6 +83781,317 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentConstraints_1clone(J
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentContext_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKPaymentContext this_ptr_conv = *(LDKPaymentContext*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       PaymentContext_free(this_ptr_conv);
+}
+
+static inline uint64_t PaymentContext_clone_ptr(LDKPaymentContext *NONNULL_PTR arg) {
+       LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+       *ret_copy = PaymentContext_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKPaymentContext* arg_conv = (LDKPaymentContext*)untag_ptr(arg);
+       int64_t ret_conv = PaymentContext_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKPaymentContext* orig_conv = (LDKPaymentContext*)untag_ptr(orig);
+       LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+       *ret_copy = PaymentContext_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1unknown(JNIEnv *env, jclass clz, int64_t a) {
+       LDKUnknownPaymentContext a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv = UnknownPaymentContext_clone(&a_conv);
+       LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+       *ret_copy = PaymentContext_unknown(a_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1bolt12_1offer(JNIEnv *env, jclass clz, int64_t a) {
+       LDKBolt12OfferContext a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv = Bolt12OfferContext_clone(&a_conv);
+       LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+       *ret_copy = PaymentContext_bolt12_offer(a_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1bolt12_1refund(JNIEnv *env, jclass clz, int64_t a) {
+       LDKBolt12RefundContext a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv = Bolt12RefundContext_clone(&a_conv);
+       LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+       *ret_copy = PaymentContext_bolt12_refund(a_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PaymentContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKPaymentContext* a_conv = (LDKPaymentContext*)untag_ptr(a);
+       LDKPaymentContext* b_conv = (LDKPaymentContext*)untag_ptr(b);
+       jboolean ret_conv = PaymentContext_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKUnknownPaymentContext this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       UnknownPaymentContext_free(this_obj_conv);
+}
+
+static inline uint64_t UnknownPaymentContext_clone_ptr(LDKUnknownPaymentContext *NONNULL_PTR arg) {
+       LDKUnknownPaymentContext ret_var = UnknownPaymentContext_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKUnknownPaymentContext arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = UnknownPaymentContext_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUnknownPaymentContext orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKUnknownPaymentContext ret_var = UnknownPaymentContext_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKUnknownPaymentContext a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUnknownPaymentContext b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UnknownPaymentContext_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKBolt12OfferContext this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       Bolt12OfferContext_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1get_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKBolt12OfferContext this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKOfferId ret_var = Bolt12OfferContext_get_offer_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1set_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKBolt12OfferContext this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKOfferId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = OfferId_clone(&val_conv);
+       Bolt12OfferContext_set_offer_id(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1get_1invoice_1request(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKBolt12OfferContext this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKInvoiceRequestFields ret_var = Bolt12OfferContext_get_invoice_request(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1set_1invoice_1request(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKBolt12OfferContext this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKInvoiceRequestFields val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = InvoiceRequestFields_clone(&val_conv);
+       Bolt12OfferContext_set_invoice_request(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1new(JNIEnv *env, jclass clz, int64_t offer_id_arg, int64_t invoice_request_arg) {
+       LDKOfferId offer_id_arg_conv;
+       offer_id_arg_conv.inner = untag_ptr(offer_id_arg);
+       offer_id_arg_conv.is_owned = ptr_is_owned(offer_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(offer_id_arg_conv);
+       offer_id_arg_conv = OfferId_clone(&offer_id_arg_conv);
+       LDKInvoiceRequestFields invoice_request_arg_conv;
+       invoice_request_arg_conv.inner = untag_ptr(invoice_request_arg);
+       invoice_request_arg_conv.is_owned = ptr_is_owned(invoice_request_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_arg_conv);
+       invoice_request_arg_conv = InvoiceRequestFields_clone(&invoice_request_arg_conv);
+       LDKBolt12OfferContext ret_var = Bolt12OfferContext_new(offer_id_arg_conv, invoice_request_arg_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline uint64_t Bolt12OfferContext_clone_ptr(LDKBolt12OfferContext *NONNULL_PTR arg) {
+       LDKBolt12OfferContext ret_var = Bolt12OfferContext_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKBolt12OfferContext arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = Bolt12OfferContext_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKBolt12OfferContext orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKBolt12OfferContext ret_var = Bolt12OfferContext_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKBolt12OfferContext a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKBolt12OfferContext b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Bolt12OfferContext_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKBolt12RefundContext this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       Bolt12RefundContext_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1new(JNIEnv *env, jclass clz) {
+       LDKBolt12RefundContext ret_var = Bolt12RefundContext_new();
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline uint64_t Bolt12RefundContext_clone_ptr(LDKBolt12RefundContext *NONNULL_PTR arg) {
+       LDKBolt12RefundContext ret_var = Bolt12RefundContext_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKBolt12RefundContext arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = Bolt12RefundContext_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKBolt12RefundContext orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKBolt12RefundContext ret_var = Bolt12RefundContext_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKBolt12RefundContext a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKBolt12RefundContext b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Bolt12RefundContext_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ForwardTlvs_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKForwardTlvs obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -77186,6 +84164,94 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentConstraints_1read(JN
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_PaymentContext_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKPaymentContext* obj_conv = (LDKPaymentContext*)untag_ptr(obj);
+       LDKCVec_u8Z ret_var = PaymentContext_write(obj_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ");
+       *ret_conv = PaymentContext_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKUnknownPaymentContext obj_conv;
+       obj_conv.inner = untag_ptr(obj);
+       obj_conv.is_owned = ptr_is_owned(obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = UnknownPaymentContext_write(&obj_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ");
+       *ret_conv = UnknownPaymentContext_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKBolt12OfferContext obj_conv;
+       obj_conv.inner = untag_ptr(obj);
+       obj_conv.is_owned = ptr_is_owned(obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = Bolt12OfferContext_write(&obj_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ");
+       *ret_conv = Bolt12OfferContext_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKBolt12RefundContext obj_conv;
+       obj_conv.inner = untag_ptr(obj);
+       obj_conv.is_owned = ptr_is_owned(obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = Bolt12RefundContext_write(&obj_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ");
+       *ret_conv = Bolt12RefundContext_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -77215,7 +84281,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1clone(JNIEn
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1invoice_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt11_1invoice_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret) {
+       void* payment_preimage_ptr = untag_ptr(payment_preimage);
+       CHECK_ACCESS(payment_preimage_ptr);
+       LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr);
+       payment_preimage_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_preimage));
+       LDKThirtyTwoBytes payment_secret_ref;
+       CHECK((*env)->GetArrayLength(env, payment_secret) == 32);
+       (*env)->GetByteArrayRegion(env, payment_secret, 0, 32, payment_secret_ref.data);
+       LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose");
+       *ret_copy = PaymentPurpose_bolt11_invoice_payment(payment_preimage_conv, payment_secret_ref);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt12_1offer_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret, int64_t payment_context) {
        void* payment_preimage_ptr = untag_ptr(payment_preimage);
        CHECK_ACCESS(payment_preimage_ptr);
        LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr);
@@ -77223,8 +84303,32 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1invoice_1pa
        LDKThirtyTwoBytes payment_secret_ref;
        CHECK((*env)->GetArrayLength(env, payment_secret) == 32);
        (*env)->GetByteArrayRegion(env, payment_secret, 0, 32, payment_secret_ref.data);
+       LDKBolt12OfferContext payment_context_conv;
+       payment_context_conv.inner = untag_ptr(payment_context);
+       payment_context_conv.is_owned = ptr_is_owned(payment_context);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_conv);
+       payment_context_conv = Bolt12OfferContext_clone(&payment_context_conv);
        LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose");
-       *ret_copy = PaymentPurpose_invoice_payment(payment_preimage_conv, payment_secret_ref);
+       *ret_copy = PaymentPurpose_bolt12_offer_payment(payment_preimage_conv, payment_secret_ref, payment_context_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt12_1refund_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret, int64_t payment_context) {
+       void* payment_preimage_ptr = untag_ptr(payment_preimage);
+       CHECK_ACCESS(payment_preimage_ptr);
+       LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr);
+       payment_preimage_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_preimage));
+       LDKThirtyTwoBytes payment_secret_ref;
+       CHECK((*env)->GetArrayLength(env, payment_secret) == 32);
+       (*env)->GetByteArrayRegion(env, payment_secret, 0, 32, payment_secret_ref.data);
+       LDKBolt12RefundContext payment_context_conv;
+       payment_context_conv.inner = untag_ptr(payment_context);
+       payment_context_conv.is_owned = ptr_is_owned(payment_context);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_conv);
+       payment_context_conv = Bolt12RefundContext_clone(&payment_context_conv);
+       LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose");
+       *ret_copy = PaymentPurpose_bolt12_refund_payment(payment_preimage_conv, payment_secret_ref, payment_context_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -77281,27 +84385,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1free(JNIEnv *env,
        ClaimedHTLC_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKClaimedHTLC this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ClaimedHTLC_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = ClaimedHTLC_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKClaimedHTLC this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       ClaimedHTLC_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       ClaimedHTLC_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1user_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -77384,14 +84492,16 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1set_1counterparty
        ClaimedHTLC_set_counterparty_skimmed_fee_msat(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray user_channel_id_arg, int32_t cltv_expiry_arg, int64_t value_msat_arg, int64_t counterparty_skimmed_fee_msat_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray user_channel_id_arg, int32_t cltv_expiry_arg, int64_t value_msat_arg, int64_t counterparty_skimmed_fee_msat_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKU128 user_channel_id_arg_ref;
        CHECK((*env)->GetArrayLength(env, user_channel_id_arg) == 16);
        (*env)->GetByteArrayRegion(env, user_channel_id_arg, 0, 16, user_channel_id_arg_ref.le_bytes);
-       LDKClaimedHTLC ret_var = ClaimedHTLC_new(channel_id_arg_ref, user_channel_id_arg_ref, cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg);
+       LDKClaimedHTLC ret_var = ClaimedHTLC_new(channel_id_arg_conv, user_channel_id_arg_ref, cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -77591,9 +84701,23 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1holder_1forc
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1cooperative_1closure(JNIEnv *env, jclass clz) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1legacy_1cooperative_1closure(JNIEnv *env, jclass clz) {
+       LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason");
+       *ret_copy = ClosureReason_legacy_cooperative_closure();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1counterparty_1initiated_1cooperative_1closure(JNIEnv *env, jclass clz) {
        LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason");
-       *ret_copy = ClosureReason_cooperative_closure();
+       *ret_copy = ClosureReason_counterparty_initiated_cooperative_closure();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1locally_1initiated_1cooperative_1closure(JNIEnv *env, jclass clz) {
+       LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason");
+       *ret_copy = ClosureReason_locally_initiated_cooperative_closure();
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -77648,6 +84772,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1funding_1bat
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1htlcs_1timed_1out(JNIEnv *env, jclass clz) {
+       LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason");
+       *ret_copy = ClosureReason_htlcs_timed_out();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ClosureReason_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
        LDKClosureReason* a_conv = (LDKClosureReason*)untag_ptr(a);
        LDKClosureReason* b_conv = (LDKClosureReason*)untag_ptr(b);
@@ -77703,15 +84834,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1clone(JNIE
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1next_1hop_1channel(JNIEnv *env, jclass clz, int8_tArray node_id, int8_tArray channel_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1next_1hop_1channel(JNIEnv *env, jclass clz, int8_tArray node_id, int64_t channel_id) {
        LDKPublicKey node_id_ref;
        CHECK((*env)->GetArrayLength(env, node_id) == 33);
        (*env)->GetByteArrayRegion(env, node_id, 0, 33, node_id_ref.compressed_form);
-       LDKThirtyTwoBytes channel_id_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data);
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv = ChannelId_clone(&channel_id_conv);
        LDKHTLCDestination *ret_copy = MALLOC(sizeof(LDKHTLCDestination), "LDKHTLCDestination");
-       *ret_copy = HTLCDestination_next_hop_channel(node_id_ref, channel_id_ref);
+       *ret_copy = HTLCDestination_next_hop_channel(node_id_ref, channel_id_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -77730,6 +84863,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1invalid_1f
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1invalid_1onion(JNIEnv *env, jclass clz) {
+       LDKHTLCDestination *ret_copy = MALLOC(sizeof(LDKHTLCDestination), "LDKHTLCDestination");
+       *ret_copy = HTLCDestination_invalid_onion();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1failed_1payment(JNIEnv *env, jclass clz, int8_tArray payment_hash) {
        LDKThirtyTwoBytes payment_hash_ref;
        CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
@@ -77857,10 +84997,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1clone(JNIEnv *env, j
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1funding_1generation_1ready(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int64_t channel_value_satoshis, int8_tArray output_script, int8_tArray user_channel_id) {
-       LDKThirtyTwoBytes temporary_channel_id_ref;
-       CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1funding_1generation_1ready(JNIEnv *env, jclass clz, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t channel_value_satoshis, int8_tArray output_script, int8_tArray user_channel_id) {
+       LDKChannelId temporary_channel_id_conv;
+       temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+       temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+       temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv);
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
@@ -77872,7 +85014,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1funding_1generation_
        CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
        (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
        LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
-       *ret_copy = Event_funding_generation_ready(temporary_channel_id_ref, counterparty_node_id_ref, channel_value_satoshis, output_script_ref, user_channel_id_ref);
+       *ret_copy = Event_funding_generation_ready(temporary_channel_id_conv, counterparty_node_id_ref, channel_value_satoshis, output_script_ref, user_channel_id_ref);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -77893,10 +85035,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1payment_1claimable(J
        CHECK_ACCESS(purpose_ptr);
        LDKPaymentPurpose purpose_conv = *(LDKPaymentPurpose*)(purpose_ptr);
        purpose_conv = PaymentPurpose_clone((LDKPaymentPurpose*)untag_ptr(purpose));
-       void* via_channel_id_ptr = untag_ptr(via_channel_id);
-       CHECK_ACCESS(via_channel_id_ptr);
-       LDKCOption_ThirtyTwoBytesZ via_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(via_channel_id_ptr);
-       via_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(via_channel_id));
+       LDKChannelId via_channel_id_conv;
+       via_channel_id_conv.inner = untag_ptr(via_channel_id);
+       via_channel_id_conv.is_owned = ptr_is_owned(via_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(via_channel_id_conv);
+       via_channel_id_conv = ChannelId_clone(&via_channel_id_conv);
        void* via_user_channel_id_ptr = untag_ptr(via_user_channel_id);
        CHECK_ACCESS(via_user_channel_id_ptr);
        LDKCOption_U128Z via_user_channel_id_conv = *(LDKCOption_U128Z*)(via_user_channel_id_ptr);
@@ -78145,50 +85288,68 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1spendable_1outputs(J
                outputs_constr.data[b] = outputs_conv_27_conv;
        }
        (*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0);
-       void* channel_id_ptr = untag_ptr(channel_id);
-       CHECK_ACCESS(channel_id_ptr);
-       LDKCOption_ThirtyTwoBytesZ channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(channel_id_ptr);
-       channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(channel_id));
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv = ChannelId_clone(&channel_id_conv);
        LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
        *ret_copy = Event_spendable_outputs(outputs_constr, channel_id_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1payment_1forwarded(JNIEnv *env, jclass clz, int64_t prev_channel_id, int64_t next_channel_id, int64_t fee_earned_msat, jboolean claim_from_onchain_tx, int64_t outbound_amount_forwarded_msat) {
-       void* prev_channel_id_ptr = untag_ptr(prev_channel_id);
-       CHECK_ACCESS(prev_channel_id_ptr);
-       LDKCOption_ThirtyTwoBytesZ prev_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(prev_channel_id_ptr);
-       prev_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(prev_channel_id));
-       void* next_channel_id_ptr = untag_ptr(next_channel_id);
-       CHECK_ACCESS(next_channel_id_ptr);
-       LDKCOption_ThirtyTwoBytesZ next_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(next_channel_id_ptr);
-       next_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(next_channel_id));
-       void* fee_earned_msat_ptr = untag_ptr(fee_earned_msat);
-       CHECK_ACCESS(fee_earned_msat_ptr);
-       LDKCOption_u64Z fee_earned_msat_conv = *(LDKCOption_u64Z*)(fee_earned_msat_ptr);
-       fee_earned_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(fee_earned_msat));
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1payment_1forwarded(JNIEnv *env, jclass clz, int64_t prev_channel_id, int64_t next_channel_id, int64_t prev_user_channel_id, int64_t next_user_channel_id, int64_t total_fee_earned_msat, int64_t skimmed_fee_msat, jboolean claim_from_onchain_tx, int64_t outbound_amount_forwarded_msat) {
+       LDKChannelId prev_channel_id_conv;
+       prev_channel_id_conv.inner = untag_ptr(prev_channel_id);
+       prev_channel_id_conv.is_owned = ptr_is_owned(prev_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_conv);
+       prev_channel_id_conv = ChannelId_clone(&prev_channel_id_conv);
+       LDKChannelId next_channel_id_conv;
+       next_channel_id_conv.inner = untag_ptr(next_channel_id);
+       next_channel_id_conv.is_owned = ptr_is_owned(next_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(next_channel_id_conv);
+       next_channel_id_conv = ChannelId_clone(&next_channel_id_conv);
+       void* prev_user_channel_id_ptr = untag_ptr(prev_user_channel_id);
+       CHECK_ACCESS(prev_user_channel_id_ptr);
+       LDKCOption_U128Z prev_user_channel_id_conv = *(LDKCOption_U128Z*)(prev_user_channel_id_ptr);
+       prev_user_channel_id_conv = COption_U128Z_clone((LDKCOption_U128Z*)untag_ptr(prev_user_channel_id));
+       void* next_user_channel_id_ptr = untag_ptr(next_user_channel_id);
+       CHECK_ACCESS(next_user_channel_id_ptr);
+       LDKCOption_U128Z next_user_channel_id_conv = *(LDKCOption_U128Z*)(next_user_channel_id_ptr);
+       next_user_channel_id_conv = COption_U128Z_clone((LDKCOption_U128Z*)untag_ptr(next_user_channel_id));
+       void* total_fee_earned_msat_ptr = untag_ptr(total_fee_earned_msat);
+       CHECK_ACCESS(total_fee_earned_msat_ptr);
+       LDKCOption_u64Z total_fee_earned_msat_conv = *(LDKCOption_u64Z*)(total_fee_earned_msat_ptr);
+       total_fee_earned_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(total_fee_earned_msat));
+       void* skimmed_fee_msat_ptr = untag_ptr(skimmed_fee_msat);
+       CHECK_ACCESS(skimmed_fee_msat_ptr);
+       LDKCOption_u64Z skimmed_fee_msat_conv = *(LDKCOption_u64Z*)(skimmed_fee_msat_ptr);
+       skimmed_fee_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(skimmed_fee_msat));
        void* outbound_amount_forwarded_msat_ptr = untag_ptr(outbound_amount_forwarded_msat);
        CHECK_ACCESS(outbound_amount_forwarded_msat_ptr);
        LDKCOption_u64Z outbound_amount_forwarded_msat_conv = *(LDKCOption_u64Z*)(outbound_amount_forwarded_msat_ptr);
        outbound_amount_forwarded_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(outbound_amount_forwarded_msat));
        LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
-       *ret_copy = Event_payment_forwarded(prev_channel_id_conv, next_channel_id_conv, fee_earned_msat_conv, claim_from_onchain_tx, outbound_amount_forwarded_msat_conv);
+       *ret_copy = Event_payment_forwarded(prev_channel_id_conv, next_channel_id_conv, prev_user_channel_id_conv, next_user_channel_id_conv, total_fee_earned_msat_conv, skimmed_fee_msat_conv, claim_from_onchain_tx, outbound_amount_forwarded_msat_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1pending(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray user_channel_id, int64_t former_temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_txo) {
-       LDKThirtyTwoBytes channel_id_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1pending(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray user_channel_id, int64_t former_temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_txo, int64_t channel_type) {
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv = ChannelId_clone(&channel_id_conv);
        LDKU128 user_channel_id_ref;
        CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
        (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
-       void* former_temporary_channel_id_ptr = untag_ptr(former_temporary_channel_id);
-       CHECK_ACCESS(former_temporary_channel_id_ptr);
-       LDKCOption_ThirtyTwoBytesZ former_temporary_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(former_temporary_channel_id_ptr);
-       former_temporary_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(former_temporary_channel_id));
+       LDKChannelId former_temporary_channel_id_conv;
+       former_temporary_channel_id_conv.inner = untag_ptr(former_temporary_channel_id);
+       former_temporary_channel_id_conv.is_owned = ptr_is_owned(former_temporary_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(former_temporary_channel_id_conv);
+       former_temporary_channel_id_conv = ChannelId_clone(&former_temporary_channel_id_conv);
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
@@ -78197,16 +85358,23 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1pending(JNI
        funding_txo_conv.is_owned = ptr_is_owned(funding_txo);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv);
        funding_txo_conv = OutPoint_clone(&funding_txo_conv);
+       LDKChannelTypeFeatures channel_type_conv;
+       channel_type_conv.inner = untag_ptr(channel_type);
+       channel_type_conv.is_owned = ptr_is_owned(channel_type);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv);
+       channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv);
        LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
-       *ret_copy = Event_channel_pending(channel_id_ref, user_channel_id_ref, former_temporary_channel_id_conv, counterparty_node_id_ref, funding_txo_conv);
+       *ret_copy = Event_channel_pending(channel_id_conv, user_channel_id_ref, former_temporary_channel_id_conv, counterparty_node_id_ref, funding_txo_conv, channel_type_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1ready(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray user_channel_id, int8_tArray counterparty_node_id, int64_t channel_type) {
-       LDKThirtyTwoBytes channel_id_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1ready(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray user_channel_id, int8_tArray counterparty_node_id, int64_t channel_type) {
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv = ChannelId_clone(&channel_id_conv);
        LDKU128 user_channel_id_ref;
        CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
        (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
@@ -78219,15 +85387,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1ready(JNIEn
        CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv);
        channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv);
        LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
-       *ret_copy = Event_channel_ready(channel_id_ref, user_channel_id_ref, counterparty_node_id_ref, channel_type_conv);
+       *ret_copy = Event_channel_ready(channel_id_conv, user_channel_id_ref, counterparty_node_id_ref, channel_type_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1closed(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray user_channel_id, int64_t reason, int8_tArray counterparty_node_id, int64_t channel_capacity_sats, int64_t channel_funding_txo) {
-       LDKThirtyTwoBytes channel_id_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1closed(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray user_channel_id, int64_t reason, int8_tArray counterparty_node_id, int64_t channel_capacity_sats, int64_t channel_funding_txo) {
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv = ChannelId_clone(&channel_id_conv);
        LDKU128 user_channel_id_ref;
        CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
        (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
@@ -78248,30 +85418,34 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1closed(JNIE
        CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_txo_conv);
        channel_funding_txo_conv = OutPoint_clone(&channel_funding_txo_conv);
        LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
-       *ret_copy = Event_channel_closed(channel_id_ref, user_channel_id_ref, reason_conv, counterparty_node_id_ref, channel_capacity_sats_conv, channel_funding_txo_conv);
+       *ret_copy = Event_channel_closed(channel_id_conv, user_channel_id_ref, reason_conv, counterparty_node_id_ref, channel_capacity_sats_conv, channel_funding_txo_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1discard_1funding(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray transaction) {
-       LDKThirtyTwoBytes channel_id_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1discard_1funding(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray transaction) {
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv = ChannelId_clone(&channel_id_conv);
        LDKTransaction transaction_ref;
        transaction_ref.datalen = (*env)->GetArrayLength(env, transaction);
        transaction_ref.data = MALLOC(transaction_ref.datalen, "LDKTransaction Bytes");
        (*env)->GetByteArrayRegion(env, transaction, 0, transaction_ref.datalen, transaction_ref.data);
        transaction_ref.data_is_owned = true;
        LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
-       *ret_copy = Event_discard_funding(channel_id_ref, transaction_ref);
+       *ret_copy = Event_discard_funding(channel_id_conv, transaction_ref);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1open_1channel_1request(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t push_msat, int64_t channel_type) {
-       LDKThirtyTwoBytes temporary_channel_id_ref;
-       CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1open_1channel_1request(JNIEnv *env, jclass clz, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t push_msat, int64_t channel_type) {
+       LDKChannelId temporary_channel_id_conv;
+       temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+       temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+       temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv);
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
@@ -78281,21 +85455,23 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1open_1channel_1reque
        CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv);
        channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv);
        LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
-       *ret_copy = Event_open_channel_request(temporary_channel_id_ref, counterparty_node_id_ref, funding_satoshis, push_msat, channel_type_conv);
+       *ret_copy = Event_open_channel_request(temporary_channel_id_conv, counterparty_node_id_ref, funding_satoshis, push_msat, channel_type_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1htlchandling_1failed(JNIEnv *env, jclass clz, int8_tArray prev_channel_id, int64_t failed_next_destination) {
-       LDKThirtyTwoBytes prev_channel_id_ref;
-       CHECK((*env)->GetArrayLength(env, prev_channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, prev_channel_id, 0, 32, prev_channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1htlchandling_1failed(JNIEnv *env, jclass clz, int64_t prev_channel_id, int64_t failed_next_destination) {
+       LDKChannelId prev_channel_id_conv;
+       prev_channel_id_conv.inner = untag_ptr(prev_channel_id);
+       prev_channel_id_conv.is_owned = ptr_is_owned(prev_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_conv);
+       prev_channel_id_conv = ChannelId_clone(&prev_channel_id_conv);
        void* failed_next_destination_ptr = untag_ptr(failed_next_destination);
        CHECK_ACCESS(failed_next_destination_ptr);
        LDKHTLCDestination failed_next_destination_conv = *(LDKHTLCDestination*)(failed_next_destination_ptr);
        failed_next_destination_conv = HTLCDestination_clone((LDKHTLCDestination*)untag_ptr(failed_next_destination));
        LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
-       *ret_copy = Event_htlchandling_failed(prev_channel_id_ref, failed_next_destination_conv);
+       *ret_copy = Event_htlchandling_failed(prev_channel_id_conv, failed_next_destination_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -79152,7 +86328,15 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1clone
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1channel_1close(JNIEnv *env, jclass clz, int8_tArray claim_id, int32_t package_target_feerate_sat_per_1000_weight, int8_tArray commitment_tx, int64_t commitment_tx_fee_satoshis, int64_t anchor_descriptor, int64_tArray pending_htlcs) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1channel_1close(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray counterparty_node_id, int8_tArray claim_id, int32_t package_target_feerate_sat_per_1000_weight, int8_tArray commitment_tx, int64_t commitment_tx_fee_satoshis, int64_t anchor_descriptor, int64_tArray pending_htlcs) {
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv = ChannelId_clone(&channel_id_conv);
+       LDKPublicKey counterparty_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
        LDKThirtyTwoBytes claim_id_ref;
        CHECK((*env)->GetArrayLength(env, claim_id) == 32);
        (*env)->GetByteArrayRegion(env, claim_id, 0, 32, claim_id_ref.data);
@@ -79184,12 +86368,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1chann
        }
        (*env)->ReleaseLongArrayElements(env, pending_htlcs, pending_htlcs_vals, 0);
        LDKBumpTransactionEvent *ret_copy = MALLOC(sizeof(LDKBumpTransactionEvent), "LDKBumpTransactionEvent");
-       *ret_copy = BumpTransactionEvent_channel_close(claim_id_ref, package_target_feerate_sat_per_1000_weight, commitment_tx_ref, commitment_tx_fee_satoshis, anchor_descriptor_conv, pending_htlcs_constr);
+       *ret_copy = BumpTransactionEvent_channel_close(channel_id_conv, counterparty_node_id_ref, claim_id_ref, package_target_feerate_sat_per_1000_weight, commitment_tx_ref, commitment_tx_fee_satoshis, anchor_descriptor_conv, pending_htlcs_constr);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1htlcresolution(JNIEnv *env, jclass clz, int8_tArray claim_id, int32_t target_feerate_sat_per_1000_weight, int64_tArray htlc_descriptors, int32_t tx_lock_time) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1htlcresolution(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray counterparty_node_id, int8_tArray claim_id, int32_t target_feerate_sat_per_1000_weight, int64_tArray htlc_descriptors, int32_t tx_lock_time) {
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv = ChannelId_clone(&channel_id_conv);
+       LDKPublicKey counterparty_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
        LDKThirtyTwoBytes claim_id_ref;
        CHECK((*env)->GetArrayLength(env, claim_id) == 32);
        (*env)->GetByteArrayRegion(env, claim_id, 0, 32, claim_id_ref.data);
@@ -79211,7 +86403,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1htlcr
        }
        (*env)->ReleaseLongArrayElements(env, htlc_descriptors, htlc_descriptors_vals, 0);
        LDKBumpTransactionEvent *ret_copy = MALLOC(sizeof(LDKBumpTransactionEvent), "LDKBumpTransactionEvent");
-       *ret_copy = BumpTransactionEvent_htlcresolution(claim_id_ref, target_feerate_sat_per_1000_weight, htlc_descriptors_constr, tx_lock_time);
+       *ret_copy = BumpTransactionEvent_htlcresolution(channel_id_conv, counterparty_node_id_ref, claim_id_ref, target_feerate_sat_per_1000_weight, htlc_descriptors_constr, tx_lock_time);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -81657,6 +88849,17 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1recover_
        return ret_arr;
 }
 
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1get_1payee_1pub_1key(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKBolt11Invoice this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, Bolt11Invoice_get_payee_pub_key(&this_arg_conv).compressed_form);
+       return ret_arr;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1expires_1at(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKBolt11Invoice this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
index 219d2bd9677350b3bca8f69ee9fbacd0f8687bae..cf58ecb45b8ccbb49e63bddf6b99af3aa2f36f93 100644 (file)
@@ -389,10 +389,11 @@ static inline LDKBolt12SemanticError LDKBolt12SemanticError_from_java(JNIEnv *en
                case 20: return LDKBolt12SemanticError_MissingPayerId;
                case 21: return LDKBolt12SemanticError_DuplicatePaymentId;
                case 22: return LDKBolt12SemanticError_MissingPaths;
-               case 23: return LDKBolt12SemanticError_InvalidPayInfo;
-               case 24: return LDKBolt12SemanticError_MissingCreationTime;
-               case 25: return LDKBolt12SemanticError_MissingPaymentHash;
-               case 26: return LDKBolt12SemanticError_MissingSignature;
+               case 23: return LDKBolt12SemanticError_UnexpectedPaths;
+               case 24: return LDKBolt12SemanticError_InvalidPayInfo;
+               case 25: return LDKBolt12SemanticError_MissingCreationTime;
+               case 26: return LDKBolt12SemanticError_MissingPaymentHash;
+               case 27: return LDKBolt12SemanticError_MissingSignature;
        }
        (*env)->FatalError(env, "A call to Bolt12SemanticError.ordinal() from rust returned an invalid value.");
        abort(); // Unreachable, but will let the compiler know we don't return here
@@ -421,6 +422,7 @@ static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingPayerMetadata
 static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingPayerId = NULL;
 static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_DuplicatePaymentId = NULL;
 static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths = NULL;
+static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths = NULL;
 static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo = NULL;
 static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingCreationTime = NULL;
 static jfieldID Bolt12SemanticError_LDKBolt12SemanticError_MissingPaymentHash = NULL;
@@ -474,6 +476,8 @@ JNIEXPORT void JNICALL Java_org_ldk_enums_Bolt12SemanticError_init (JNIEnv *env,
        CHECK(Bolt12SemanticError_LDKBolt12SemanticError_DuplicatePaymentId != NULL);
        Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_MissingPaths", "Lorg/ldk/enums/Bolt12SemanticError;");
        CHECK(Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths != NULL);
+       Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_UnexpectedPaths", "Lorg/ldk/enums/Bolt12SemanticError;");
+       CHECK(Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths != NULL);
        Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_InvalidPayInfo", "Lorg/ldk/enums/Bolt12SemanticError;");
        CHECK(Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo != NULL);
        Bolt12SemanticError_LDKBolt12SemanticError_MissingCreationTime = (*env)->GetStaticFieldID(env, Bolt12SemanticError_class, "LDKBolt12SemanticError_MissingCreationTime", "Lorg/ldk/enums/Bolt12SemanticError;");
@@ -531,6 +535,8 @@ static inline jclass LDKBolt12SemanticError_to_java(JNIEnv *env, LDKBolt12Semant
                        return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_DuplicatePaymentId);
                case LDKBolt12SemanticError_MissingPaths:
                        return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_MissingPaths);
+               case LDKBolt12SemanticError_UnexpectedPaths:
+                       return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_UnexpectedPaths);
                case LDKBolt12SemanticError_InvalidPayInfo:
                        return (*env)->GetStaticObjectField(env, Bolt12SemanticError_class, Bolt12SemanticError_LDKBolt12SemanticError_InvalidPayInfo);
                case LDKBolt12SemanticError_MissingCreationTime:
@@ -682,6 +688,7 @@ static inline LDKConfirmationTarget LDKConfirmationTarget_from_java(JNIEnv *env,
                case 3: return LDKConfirmationTarget_AnchorChannelFee;
                case 4: return LDKConfirmationTarget_NonAnchorChannelFee;
                case 5: return LDKConfirmationTarget_ChannelCloseMinimum;
+               case 6: return LDKConfirmationTarget_OutputSpendingFee;
        }
        (*env)->FatalError(env, "A call to ConfirmationTarget.ordinal() from rust returned an invalid value.");
        abort(); // Unreachable, but will let the compiler know we don't return here
@@ -693,6 +700,7 @@ static jfieldID ConfirmationTarget_LDKConfirmationTarget_MinAllowedNonAnchorChan
 static jfieldID ConfirmationTarget_LDKConfirmationTarget_AnchorChannelFee = NULL;
 static jfieldID ConfirmationTarget_LDKConfirmationTarget_NonAnchorChannelFee = NULL;
 static jfieldID ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum = NULL;
+static jfieldID ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee = NULL;
 JNIEXPORT void JNICALL Java_org_ldk_enums_ConfirmationTarget_init (JNIEnv *env, jclass clz) {
        ConfirmationTarget_class = (*env)->NewGlobalRef(env, clz);
        CHECK(ConfirmationTarget_class != NULL);
@@ -708,6 +716,8 @@ JNIEXPORT void JNICALL Java_org_ldk_enums_ConfirmationTarget_init (JNIEnv *env,
        CHECK(ConfirmationTarget_LDKConfirmationTarget_NonAnchorChannelFee != NULL);
        ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum = (*env)->GetStaticFieldID(env, ConfirmationTarget_class, "LDKConfirmationTarget_ChannelCloseMinimum", "Lorg/ldk/enums/ConfirmationTarget;");
        CHECK(ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum != NULL);
+       ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee = (*env)->GetStaticFieldID(env, ConfirmationTarget_class, "LDKConfirmationTarget_OutputSpendingFee", "Lorg/ldk/enums/ConfirmationTarget;");
+       CHECK(ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee != NULL);
 }
 static inline jclass LDKConfirmationTarget_to_java(JNIEnv *env, LDKConfirmationTarget val) {
        switch (val) {
@@ -723,6 +733,8 @@ static inline jclass LDKConfirmationTarget_to_java(JNIEnv *env, LDKConfirmationT
                        return (*env)->GetStaticObjectField(env, ConfirmationTarget_class, ConfirmationTarget_LDKConfirmationTarget_NonAnchorChannelFee);
                case LDKConfirmationTarget_ChannelCloseMinimum:
                        return (*env)->GetStaticObjectField(env, ConfirmationTarget_class, ConfirmationTarget_LDKConfirmationTarget_ChannelCloseMinimum);
+               case LDKConfirmationTarget_OutputSpendingFee:
+                       return (*env)->GetStaticObjectField(env, ConfirmationTarget_class, ConfirmationTarget_LDKConfirmationTarget_OutputSpendingFee);
                default: abort();
        }
 }
@@ -837,6 +849,40 @@ static inline jclass LDKCurrency_to_java(JNIEnv *env, LDKCurrency val) {
        }
 }
 
+static inline LDKDirection LDKDirection_from_java(JNIEnv *env, jclass clz) {
+       jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to Direction.ordinal() from rust threw an exception.");
+       }
+       switch (ord) {
+               case 0: return LDKDirection_NodeOne;
+               case 1: return LDKDirection_NodeTwo;
+       }
+       (*env)->FatalError(env, "A call to Direction.ordinal() from rust returned an invalid value.");
+       abort(); // Unreachable, but will let the compiler know we don't return here
+}
+static jclass Direction_class = NULL;
+static jfieldID Direction_LDKDirection_NodeOne = NULL;
+static jfieldID Direction_LDKDirection_NodeTwo = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_enums_Direction_init (JNIEnv *env, jclass clz) {
+       Direction_class = (*env)->NewGlobalRef(env, clz);
+       CHECK(Direction_class != NULL);
+       Direction_LDKDirection_NodeOne = (*env)->GetStaticFieldID(env, Direction_class, "LDKDirection_NodeOne", "Lorg/ldk/enums/Direction;");
+       CHECK(Direction_LDKDirection_NodeOne != NULL);
+       Direction_LDKDirection_NodeTwo = (*env)->GetStaticFieldID(env, Direction_class, "LDKDirection_NodeTwo", "Lorg/ldk/enums/Direction;");
+       CHECK(Direction_LDKDirection_NodeTwo != NULL);
+}
+static inline jclass LDKDirection_to_java(JNIEnv *env, LDKDirection val) {
+       switch (val) {
+               case LDKDirection_NodeOne:
+                       return (*env)->GetStaticObjectField(env, Direction_class, Direction_LDKDirection_NodeOne);
+               case LDKDirection_NodeTwo:
+                       return (*env)->GetStaticObjectField(env, Direction_class, Direction_LDKDirection_NodeTwo);
+               default: abort();
+       }
+}
+
 static inline LDKHTLCClaim LDKHTLCClaim_from_java(JNIEnv *env, jclass clz) {
        jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
@@ -1343,6 +1389,46 @@ static inline jclass LDKSecp256k1Error_to_java(JNIEnv *env, LDKSecp256k1Error va
        }
 }
 
+static inline LDKShortChannelIdError LDKShortChannelIdError_from_java(JNIEnv *env, jclass clz) {
+       jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to ShortChannelIdError.ordinal() from rust threw an exception.");
+       }
+       switch (ord) {
+               case 0: return LDKShortChannelIdError_BlockOverflow;
+               case 1: return LDKShortChannelIdError_TxIndexOverflow;
+               case 2: return LDKShortChannelIdError_VoutIndexOverflow;
+       }
+       (*env)->FatalError(env, "A call to ShortChannelIdError.ordinal() from rust returned an invalid value.");
+       abort(); // Unreachable, but will let the compiler know we don't return here
+}
+static jclass ShortChannelIdError_class = NULL;
+static jfieldID ShortChannelIdError_LDKShortChannelIdError_BlockOverflow = NULL;
+static jfieldID ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow = NULL;
+static jfieldID ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_enums_ShortChannelIdError_init (JNIEnv *env, jclass clz) {
+       ShortChannelIdError_class = (*env)->NewGlobalRef(env, clz);
+       CHECK(ShortChannelIdError_class != NULL);
+       ShortChannelIdError_LDKShortChannelIdError_BlockOverflow = (*env)->GetStaticFieldID(env, ShortChannelIdError_class, "LDKShortChannelIdError_BlockOverflow", "Lorg/ldk/enums/ShortChannelIdError;");
+       CHECK(ShortChannelIdError_LDKShortChannelIdError_BlockOverflow != NULL);
+       ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow = (*env)->GetStaticFieldID(env, ShortChannelIdError_class, "LDKShortChannelIdError_TxIndexOverflow", "Lorg/ldk/enums/ShortChannelIdError;");
+       CHECK(ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow != NULL);
+       ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow = (*env)->GetStaticFieldID(env, ShortChannelIdError_class, "LDKShortChannelIdError_VoutIndexOverflow", "Lorg/ldk/enums/ShortChannelIdError;");
+       CHECK(ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow != NULL);
+}
+static inline jclass LDKShortChannelIdError_to_java(JNIEnv *env, LDKShortChannelIdError val) {
+       switch (val) {
+               case LDKShortChannelIdError_BlockOverflow:
+                       return (*env)->GetStaticObjectField(env, ShortChannelIdError_class, ShortChannelIdError_LDKShortChannelIdError_BlockOverflow);
+               case LDKShortChannelIdError_TxIndexOverflow:
+                       return (*env)->GetStaticObjectField(env, ShortChannelIdError_class, ShortChannelIdError_LDKShortChannelIdError_TxIndexOverflow);
+               case LDKShortChannelIdError_VoutIndexOverflow:
+                       return (*env)->GetStaticObjectField(env, ShortChannelIdError_class, ShortChannelIdError_LDKShortChannelIdError_VoutIndexOverflow);
+               default: abort();
+       }
+}
+
 static inline LDKSiPrefix LDKSiPrefix_from_java(JNIEnv *env, jclass clz) {
        jint ord = (*env)->CallIntMethod(env, clz, ordinal_meth);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
@@ -1575,6 +1661,54 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKBech32Error_1ref_1from_1
                default: abort();
        }
 }
+static inline struct LDKRefundMaybeWithDerivedMetadataBuilder CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKRefundMaybeWithDerivedMetadataBuilder ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKRefundMaybeWithDerivedMetadataBuilder ret_var = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
+static inline struct LDKRefund CResult_RefundBolt12SemanticErrorZ_get_ok(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKRefund ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_RefundBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKRefund ret_var = CResult_RefundBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_RefundBolt12SemanticErrorZ_get_err(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_RefundBolt12SemanticErrorZ* owner_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_RefundBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
 static jclass LDKCOption_u64Z_Some_class = NULL;
 static jmethodID LDKCOption_u64Z_Some_meth = NULL;
 static jclass LDKCOption_u64Z_None_class = NULL;
@@ -1683,6 +1817,8 @@ static jclass LDKDecodeError_Io_class = NULL;
 static jmethodID LDKDecodeError_Io_meth = NULL;
 static jclass LDKDecodeError_UnsupportedCompression_class = NULL;
 static jmethodID LDKDecodeError_UnsupportedCompression_meth = NULL;
+static jclass LDKDecodeError_DangerousValue_class = NULL;
+static jmethodID LDKDecodeError_DangerousValue_meth = NULL;
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKDecodeError_init (JNIEnv *env, jclass clz) {
        LDKDecodeError_UnknownVersion_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$UnknownVersion"));
@@ -1719,6 +1855,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKDecodeError_init (JNIE
        CHECK(LDKDecodeError_UnsupportedCompression_class != NULL);
        LDKDecodeError_UnsupportedCompression_meth = (*env)->GetMethodID(env, LDKDecodeError_UnsupportedCompression_class, "<init>", "()V");
        CHECK(LDKDecodeError_UnsupportedCompression_meth != NULL);
+       LDKDecodeError_DangerousValue_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKDecodeError$DangerousValue"));
+       CHECK(LDKDecodeError_DangerousValue_class != NULL);
+       LDKDecodeError_DangerousValue_meth = (*env)->GetMethodID(env, LDKDecodeError_DangerousValue_class, "<init>", "()V");
+       CHECK(LDKDecodeError_DangerousValue_meth != NULL);
 }
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKDecodeError_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
        LDKDecodeError *obj = (LDKDecodeError*)untag_ptr(ptr);
@@ -1745,6 +1886,9 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKDecodeError_1ref_1from_1
                case LDKDecodeError_UnsupportedCompression: {
                        return (*env)->NewObject(env, LDKDecodeError_UnsupportedCompression_class, LDKDecodeError_UnsupportedCompression_meth);
                }
+               case LDKDecodeError_DangerousValue: {
+                       return (*env)->NewObject(env, LDKDecodeError_DangerousValue_class, LDKDecodeError_DangerousValue_meth);
+               }
                default: abort();
        }
 }
@@ -2026,6 +2170,74 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RecipientOnionFieldsN
        CResult_RecipientOnionFieldsNoneZ_get_err(owner_conv);
 }
 
+static inline struct LDKUnsignedBolt12Invoice CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKUnsignedBolt12Invoice ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKUnsignedBolt12Invoice ret_var = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
+static inline struct LDKBolt12Invoice CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKBolt12Invoice ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKBolt12Invoice ret_var = CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
+static inline struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return *owner->contents.result;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_SchnorrSignatureNoneZ_get_ok(owner_conv).compact_form);
+       return ret_arr;
+}
+
+static inline void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return *owner->contents.err;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner);
+       CResult_SchnorrSignatureNoneZ_get_err(owner_conv);
+}
+
 static inline LDKCVec_ThirtyTwoBytesZ CVec_ThirtyTwoBytesZ_clone(const LDKCVec_ThirtyTwoBytesZ *orig) {
        LDKCVec_ThirtyTwoBytesZ ret = { .data = MALLOC(sizeof(LDKThirtyTwoBytes) * orig->datalen, "LDKCVec_ThirtyTwoBytesZ clone bytes"), .datalen = orig->datalen };
        for (size_t i = 0; i < ret.datalen; i++) {
@@ -2071,6 +2283,135 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1CVec_1ThirtyTwo
                default: abort();
        }
 }
+static jclass LDKAmount_Bitcoin_class = NULL;
+static jmethodID LDKAmount_Bitcoin_meth = NULL;
+static jclass LDKAmount_Currency_class = NULL;
+static jmethodID LDKAmount_Currency_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKAmount_init (JNIEnv *env, jclass clz) {
+       LDKAmount_Bitcoin_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKAmount$Bitcoin"));
+       CHECK(LDKAmount_Bitcoin_class != NULL);
+       LDKAmount_Bitcoin_meth = (*env)->GetMethodID(env, LDKAmount_Bitcoin_class, "<init>", "(J)V");
+       CHECK(LDKAmount_Bitcoin_meth != NULL);
+       LDKAmount_Currency_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKAmount$Currency"));
+       CHECK(LDKAmount_Currency_class != NULL);
+       LDKAmount_Currency_meth = (*env)->GetMethodID(env, LDKAmount_Currency_class, "<init>", "([BJ)V");
+       CHECK(LDKAmount_Currency_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKAmount_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKAmount *obj = (LDKAmount*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKAmount_Bitcoin: {
+                       int64_t amount_msats_conv = obj->bitcoin.amount_msats;
+                       return (*env)->NewObject(env, LDKAmount_Bitcoin_class, LDKAmount_Bitcoin_meth, amount_msats_conv);
+               }
+               case LDKAmount_Currency: {
+                       int8_tArray iso4217_code_arr = (*env)->NewByteArray(env, 3);
+                       (*env)->SetByteArrayRegion(env, iso4217_code_arr, 0, 3, obj->currency.iso4217_code.data);
+                       int64_t amount_conv = obj->currency.amount;
+                       return (*env)->NewObject(env, LDKAmount_Currency_class, LDKAmount_Currency_meth, iso4217_code_arr, amount_conv);
+               }
+               default: abort();
+       }
+}
+static jclass LDKCOption_AmountZ_Some_class = NULL;
+static jmethodID LDKCOption_AmountZ_Some_meth = NULL;
+static jclass LDKCOption_AmountZ_None_class = NULL;
+static jmethodID LDKCOption_AmountZ_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1AmountZ_init (JNIEnv *env, jclass clz) {
+       LDKCOption_AmountZ_Some_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_AmountZ$Some"));
+       CHECK(LDKCOption_AmountZ_Some_class != NULL);
+       LDKCOption_AmountZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_AmountZ_Some_class, "<init>", "(J)V");
+       CHECK(LDKCOption_AmountZ_Some_meth != NULL);
+       LDKCOption_AmountZ_None_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_AmountZ$None"));
+       CHECK(LDKCOption_AmountZ_None_class != NULL);
+       LDKCOption_AmountZ_None_meth = (*env)->GetMethodID(env, LDKCOption_AmountZ_None_class, "<init>", "()V");
+       CHECK(LDKCOption_AmountZ_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1AmountZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKCOption_AmountZ *obj = (LDKCOption_AmountZ*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKCOption_AmountZ_Some: {
+                       int64_t some_ref = tag_ptr(&obj->some, false);
+                       return (*env)->NewObject(env, LDKCOption_AmountZ_Some_class, LDKCOption_AmountZ_Some_meth, some_ref);
+               }
+               case LDKCOption_AmountZ_None: {
+                       return (*env)->NewObject(env, LDKCOption_AmountZ_None_class, LDKCOption_AmountZ_None_meth);
+               }
+               default: abort();
+       }
+}
+static jclass LDKQuantity_Bounded_class = NULL;
+static jmethodID LDKQuantity_Bounded_meth = NULL;
+static jclass LDKQuantity_Unbounded_class = NULL;
+static jmethodID LDKQuantity_Unbounded_meth = NULL;
+static jclass LDKQuantity_One_class = NULL;
+static jmethodID LDKQuantity_One_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKQuantity_init (JNIEnv *env, jclass clz) {
+       LDKQuantity_Bounded_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKQuantity$Bounded"));
+       CHECK(LDKQuantity_Bounded_class != NULL);
+       LDKQuantity_Bounded_meth = (*env)->GetMethodID(env, LDKQuantity_Bounded_class, "<init>", "(J)V");
+       CHECK(LDKQuantity_Bounded_meth != NULL);
+       LDKQuantity_Unbounded_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKQuantity$Unbounded"));
+       CHECK(LDKQuantity_Unbounded_class != NULL);
+       LDKQuantity_Unbounded_meth = (*env)->GetMethodID(env, LDKQuantity_Unbounded_class, "<init>", "()V");
+       CHECK(LDKQuantity_Unbounded_meth != NULL);
+       LDKQuantity_One_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKQuantity$One"));
+       CHECK(LDKQuantity_One_class != NULL);
+       LDKQuantity_One_meth = (*env)->GetMethodID(env, LDKQuantity_One_class, "<init>", "()V");
+       CHECK(LDKQuantity_One_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKQuantity_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKQuantity *obj = (LDKQuantity*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKQuantity_Bounded: {
+                       int64_t bounded_conv = obj->bounded;
+                       return (*env)->NewObject(env, LDKQuantity_Bounded_class, LDKQuantity_Bounded_meth, bounded_conv);
+               }
+               case LDKQuantity_Unbounded: {
+                       return (*env)->NewObject(env, LDKQuantity_Unbounded_class, LDKQuantity_Unbounded_meth);
+               }
+               case LDKQuantity_One: {
+                       return (*env)->NewObject(env, LDKQuantity_One_class, LDKQuantity_One_meth);
+               }
+               default: abort();
+       }
+}
+static jclass LDKCOption_QuantityZ_Some_class = NULL;
+static jmethodID LDKCOption_QuantityZ_Some_meth = NULL;
+static jclass LDKCOption_QuantityZ_None_class = NULL;
+static jmethodID LDKCOption_QuantityZ_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1QuantityZ_init (JNIEnv *env, jclass clz) {
+       LDKCOption_QuantityZ_Some_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_QuantityZ$Some"));
+       CHECK(LDKCOption_QuantityZ_Some_class != NULL);
+       LDKCOption_QuantityZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_QuantityZ_Some_class, "<init>", "(J)V");
+       CHECK(LDKCOption_QuantityZ_Some_meth != NULL);
+       LDKCOption_QuantityZ_None_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_QuantityZ$None"));
+       CHECK(LDKCOption_QuantityZ_None_class != NULL);
+       LDKCOption_QuantityZ_None_meth = (*env)->GetMethodID(env, LDKCOption_QuantityZ_None_class, "<init>", "()V");
+       CHECK(LDKCOption_QuantityZ_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1QuantityZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKCOption_QuantityZ *obj = (LDKCOption_QuantityZ*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKCOption_QuantityZ_Some: {
+                       int64_t some_ref = tag_ptr(&obj->some, false);
+                       return (*env)->NewObject(env, LDKCOption_QuantityZ_Some_class, LDKCOption_QuantityZ_Some_meth, some_ref);
+               }
+               case LDKCOption_QuantityZ_None: {
+                       return (*env)->NewObject(env, LDKCOption_QuantityZ_None_class, LDKCOption_QuantityZ_None_meth);
+               }
+               default: abort();
+       }
+}
 static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesNoneZ_get_ok(LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR owner){
 CHECK(owner->result_ok);
        return ThirtyTwoBytes_clone(&*owner->contents.result);
@@ -2469,44 +2810,45 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RecoverableSignatureN
        CResult_RecoverableSignatureNoneZ_get_err(owner_conv);
 }
 
-static inline struct LDKSchnorrSignature CResult_SchnorrSignatureNoneZ_get_ok(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){
+static inline struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){
 CHECK(owner->result_ok);
        return *owner->contents.result;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner);
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner);
        int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_SchnorrSignatureNoneZ_get_ok(owner_conv).compact_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_ECDSASignatureNoneZ_get_ok(owner_conv).compact_form);
        return ret_arr;
 }
 
-static inline void CResult_SchnorrSignatureNoneZ_get_err(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR owner){
+static inline void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){
 CHECK(!owner->result_ok);
        return *owner->contents.err;
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_SchnorrSignatureNoneZ* owner_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(owner);
-       CResult_SchnorrSignatureNoneZ_get_err(owner_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner);
+       CResult_ECDSASignatureNoneZ_get_err(owner_conv);
 }
 
-static inline struct LDKECDSASignature CResult_ECDSASignatureNoneZ_get_ok(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){
+static inline struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){
 CHECK(owner->result_ok);
        return *owner->contents.result;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner);
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CResult_ECDSASignatureNoneZ_get_ok(owner_conv).compact_form);
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner);
+       LDKTransaction ret_var = CResult_TransactionNoneZ_get_ok(owner_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
        return ret_arr;
 }
 
-static inline void CResult_ECDSASignatureNoneZ_get_err(LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR owner){
+static inline void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){
 CHECK(!owner->result_ok);
        return *owner->contents.err;
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_ECDSASignatureNoneZ* owner_conv = (LDKCResult_ECDSASignatureNoneZ*)untag_ptr(owner);
-       CResult_ECDSASignatureNoneZ_get_err(owner_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner);
+       CResult_TransactionNoneZ_get_err(owner_conv);
 }
 
 static inline struct LDKECDSASignature C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_get_a(LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR owner){
@@ -3760,27 +4102,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDeco
        return ret_ref;
 }
 
-static inline struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
-       return *owner->contents.result;
-}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner);
-       LDKTransaction ret_var = CResult_TransactionNoneZ_get_ok(owner_conv);
-       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
-       return ret_arr;
-}
-
-static inline void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
-       return *owner->contents.err;
-}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_TransactionNoneZ* owner_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(owner);
-       CResult_TransactionNoneZ_get_err(owner_conv);
-}
-
 static jclass LDKCandidateRouteHop_FirstHop_class = NULL;
 static jmethodID LDKCandidateRouteHop_FirstHop_meth = NULL;
 static jclass LDKCandidateRouteHop_PublicHop_class = NULL;
@@ -5164,6 +5485,32 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScore
        return ret_ref;
 }
 
+static inline struct LDKBestBlock CResult_BestBlockDecodeErrorZ_get_ok(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner){
+       LDKBestBlock ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_BestBlockDecodeErrorZ* owner_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(owner);
+       LDKBestBlock ret_var = CResult_BestBlockDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_BestBlockDecodeErrorZ_get_err(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_BestBlockDecodeErrorZ* owner_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_BestBlockDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 static inline uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner){
        return owner->a;
 }
@@ -5247,8 +5594,154 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateS
        CResult_ChannelMonitorUpdateStatusNoneZ_get_err(owner_conv);
 }
 
+static jclass LDKClosureReason_CounterpartyForceClosed_class = NULL;
+static jmethodID LDKClosureReason_CounterpartyForceClosed_meth = NULL;
+static jclass LDKClosureReason_HolderForceClosed_class = NULL;
+static jmethodID LDKClosureReason_HolderForceClosed_meth = NULL;
+static jclass LDKClosureReason_LegacyCooperativeClosure_class = NULL;
+static jmethodID LDKClosureReason_LegacyCooperativeClosure_meth = NULL;
+static jclass LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class = NULL;
+static jmethodID LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth = NULL;
+static jclass LDKClosureReason_LocallyInitiatedCooperativeClosure_class = NULL;
+static jmethodID LDKClosureReason_LocallyInitiatedCooperativeClosure_meth = NULL;
+static jclass LDKClosureReason_CommitmentTxConfirmed_class = NULL;
+static jmethodID LDKClosureReason_CommitmentTxConfirmed_meth = NULL;
+static jclass LDKClosureReason_FundingTimedOut_class = NULL;
+static jmethodID LDKClosureReason_FundingTimedOut_meth = NULL;
+static jclass LDKClosureReason_ProcessingError_class = NULL;
+static jmethodID LDKClosureReason_ProcessingError_meth = NULL;
+static jclass LDKClosureReason_DisconnectedPeer_class = NULL;
+static jmethodID LDKClosureReason_DisconnectedPeer_meth = NULL;
+static jclass LDKClosureReason_OutdatedChannelManager_class = NULL;
+static jmethodID LDKClosureReason_OutdatedChannelManager_meth = NULL;
+static jclass LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class = NULL;
+static jmethodID LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = NULL;
+static jclass LDKClosureReason_FundingBatchClosure_class = NULL;
+static jmethodID LDKClosureReason_FundingBatchClosure_meth = NULL;
+static jclass LDKClosureReason_HTLCsTimedOut_class = NULL;
+static jmethodID LDKClosureReason_HTLCsTimedOut_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKClosureReason_init (JNIEnv *env, jclass clz) {
+       LDKClosureReason_CounterpartyForceClosed_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyForceClosed"));
+       CHECK(LDKClosureReason_CounterpartyForceClosed_class != NULL);
+       LDKClosureReason_CounterpartyForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyForceClosed_class, "<init>", "(J)V");
+       CHECK(LDKClosureReason_CounterpartyForceClosed_meth != NULL);
+       LDKClosureReason_HolderForceClosed_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$HolderForceClosed"));
+       CHECK(LDKClosureReason_HolderForceClosed_class != NULL);
+       LDKClosureReason_HolderForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_HolderForceClosed_class, "<init>", "()V");
+       CHECK(LDKClosureReason_HolderForceClosed_meth != NULL);
+       LDKClosureReason_LegacyCooperativeClosure_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$LegacyCooperativeClosure"));
+       CHECK(LDKClosureReason_LegacyCooperativeClosure_class != NULL);
+       LDKClosureReason_LegacyCooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_LegacyCooperativeClosure_class, "<init>", "()V");
+       CHECK(LDKClosureReason_LegacyCooperativeClosure_meth != NULL);
+       LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyInitiatedCooperativeClosure"));
+       CHECK(LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class != NULL);
+       LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class, "<init>", "()V");
+       CHECK(LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth != NULL);
+       LDKClosureReason_LocallyInitiatedCooperativeClosure_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$LocallyInitiatedCooperativeClosure"));
+       CHECK(LDKClosureReason_LocallyInitiatedCooperativeClosure_class != NULL);
+       LDKClosureReason_LocallyInitiatedCooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_LocallyInitiatedCooperativeClosure_class, "<init>", "()V");
+       CHECK(LDKClosureReason_LocallyInitiatedCooperativeClosure_meth != NULL);
+       LDKClosureReason_CommitmentTxConfirmed_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CommitmentTxConfirmed"));
+       CHECK(LDKClosureReason_CommitmentTxConfirmed_class != NULL);
+       LDKClosureReason_CommitmentTxConfirmed_meth = (*env)->GetMethodID(env, LDKClosureReason_CommitmentTxConfirmed_class, "<init>", "()V");
+       CHECK(LDKClosureReason_CommitmentTxConfirmed_meth != NULL);
+       LDKClosureReason_FundingTimedOut_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingTimedOut"));
+       CHECK(LDKClosureReason_FundingTimedOut_class != NULL);
+       LDKClosureReason_FundingTimedOut_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingTimedOut_class, "<init>", "()V");
+       CHECK(LDKClosureReason_FundingTimedOut_meth != NULL);
+       LDKClosureReason_ProcessingError_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$ProcessingError"));
+       CHECK(LDKClosureReason_ProcessingError_class != NULL);
+       LDKClosureReason_ProcessingError_meth = (*env)->GetMethodID(env, LDKClosureReason_ProcessingError_class, "<init>", "(Ljava/lang/String;)V");
+       CHECK(LDKClosureReason_ProcessingError_meth != NULL);
+       LDKClosureReason_DisconnectedPeer_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$DisconnectedPeer"));
+       CHECK(LDKClosureReason_DisconnectedPeer_class != NULL);
+       LDKClosureReason_DisconnectedPeer_meth = (*env)->GetMethodID(env, LDKClosureReason_DisconnectedPeer_class, "<init>", "()V");
+       CHECK(LDKClosureReason_DisconnectedPeer_meth != NULL);
+       LDKClosureReason_OutdatedChannelManager_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$OutdatedChannelManager"));
+       CHECK(LDKClosureReason_OutdatedChannelManager_class != NULL);
+       LDKClosureReason_OutdatedChannelManager_meth = (*env)->GetMethodID(env, LDKClosureReason_OutdatedChannelManager_class, "<init>", "()V");
+       CHECK(LDKClosureReason_OutdatedChannelManager_meth != NULL);
+       LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyCoopClosedUnfundedChannel"));
+       CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class != NULL);
+       LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, "<init>", "()V");
+       CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth != NULL);
+       LDKClosureReason_FundingBatchClosure_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingBatchClosure"));
+       CHECK(LDKClosureReason_FundingBatchClosure_class != NULL);
+       LDKClosureReason_FundingBatchClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingBatchClosure_class, "<init>", "()V");
+       CHECK(LDKClosureReason_FundingBatchClosure_meth != NULL);
+       LDKClosureReason_HTLCsTimedOut_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$HTLCsTimedOut"));
+       CHECK(LDKClosureReason_HTLCsTimedOut_class != NULL);
+       LDKClosureReason_HTLCsTimedOut_meth = (*env)->GetMethodID(env, LDKClosureReason_HTLCsTimedOut_class, "<init>", "()V");
+       CHECK(LDKClosureReason_HTLCsTimedOut_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKClosureReason_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKClosureReason_CounterpartyForceClosed: {
+                       LDKUntrustedString peer_msg_var = obj->counterparty_force_closed.peer_msg;
+                       int64_t peer_msg_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(peer_msg_var);
+                       peer_msg_ref = tag_ptr(peer_msg_var.inner, false);
+                       return (*env)->NewObject(env, LDKClosureReason_CounterpartyForceClosed_class, LDKClosureReason_CounterpartyForceClosed_meth, peer_msg_ref);
+               }
+               case LDKClosureReason_HolderForceClosed: {
+                       return (*env)->NewObject(env, LDKClosureReason_HolderForceClosed_class, LDKClosureReason_HolderForceClosed_meth);
+               }
+               case LDKClosureReason_LegacyCooperativeClosure: {
+                       return (*env)->NewObject(env, LDKClosureReason_LegacyCooperativeClosure_class, LDKClosureReason_LegacyCooperativeClosure_meth);
+               }
+               case LDKClosureReason_CounterpartyInitiatedCooperativeClosure: {
+                       return (*env)->NewObject(env, LDKClosureReason_CounterpartyInitiatedCooperativeClosure_class, LDKClosureReason_CounterpartyInitiatedCooperativeClosure_meth);
+               }
+               case LDKClosureReason_LocallyInitiatedCooperativeClosure: {
+                       return (*env)->NewObject(env, LDKClosureReason_LocallyInitiatedCooperativeClosure_class, LDKClosureReason_LocallyInitiatedCooperativeClosure_meth);
+               }
+               case LDKClosureReason_CommitmentTxConfirmed: {
+                       return (*env)->NewObject(env, LDKClosureReason_CommitmentTxConfirmed_class, LDKClosureReason_CommitmentTxConfirmed_meth);
+               }
+               case LDKClosureReason_FundingTimedOut: {
+                       return (*env)->NewObject(env, LDKClosureReason_FundingTimedOut_class, LDKClosureReason_FundingTimedOut_meth);
+               }
+               case LDKClosureReason_ProcessingError: {
+                       LDKStr err_str = obj->processing_error.err;
+                       jstring err_conv = str_ref_to_java(env, err_str.chars, err_str.len);
+                       return (*env)->NewObject(env, LDKClosureReason_ProcessingError_class, LDKClosureReason_ProcessingError_meth, err_conv);
+               }
+               case LDKClosureReason_DisconnectedPeer: {
+                       return (*env)->NewObject(env, LDKClosureReason_DisconnectedPeer_class, LDKClosureReason_DisconnectedPeer_meth);
+               }
+               case LDKClosureReason_OutdatedChannelManager: {
+                       return (*env)->NewObject(env, LDKClosureReason_OutdatedChannelManager_class, LDKClosureReason_OutdatedChannelManager_meth);
+               }
+               case LDKClosureReason_CounterpartyCoopClosedUnfundedChannel: {
+                       return (*env)->NewObject(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth);
+               }
+               case LDKClosureReason_FundingBatchClosure: {
+                       return (*env)->NewObject(env, LDKClosureReason_FundingBatchClosure_class, LDKClosureReason_FundingBatchClosure_meth);
+               }
+               case LDKClosureReason_HTLCsTimedOut: {
+                       return (*env)->NewObject(env, LDKClosureReason_HTLCsTimedOut_class, LDKClosureReason_HTLCsTimedOut_meth);
+               }
+               default: abort();
+       }
+}
 static jclass LDKMonitorEvent_HTLCEvent_class = NULL;
 static jmethodID LDKMonitorEvent_HTLCEvent_meth = NULL;
+static jclass LDKMonitorEvent_HolderForceClosedWithInfo_class = NULL;
+static jmethodID LDKMonitorEvent_HolderForceClosedWithInfo_meth = NULL;
 static jclass LDKMonitorEvent_HolderForceClosed_class = NULL;
 static jmethodID LDKMonitorEvent_HolderForceClosed_meth = NULL;
 static jclass LDKMonitorEvent_Completed_class = NULL;
@@ -5259,6 +5752,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKMonitorEvent_init (JNI
        CHECK(LDKMonitorEvent_HTLCEvent_class != NULL);
        LDKMonitorEvent_HTLCEvent_meth = (*env)->GetMethodID(env, LDKMonitorEvent_HTLCEvent_class, "<init>", "(J)V");
        CHECK(LDKMonitorEvent_HTLCEvent_meth != NULL);
+       LDKMonitorEvent_HolderForceClosedWithInfo_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$HolderForceClosedWithInfo"));
+       CHECK(LDKMonitorEvent_HolderForceClosedWithInfo_class != NULL);
+       LDKMonitorEvent_HolderForceClosedWithInfo_meth = (*env)->GetMethodID(env, LDKMonitorEvent_HolderForceClosedWithInfo_class, "<init>", "(JJJ)V");
+       CHECK(LDKMonitorEvent_HolderForceClosedWithInfo_meth != NULL);
        LDKMonitorEvent_HolderForceClosed_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$HolderForceClosed"));
        CHECK(LDKMonitorEvent_HolderForceClosed_class != NULL);
@@ -5267,7 +5765,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKMonitorEvent_init (JNI
        LDKMonitorEvent_Completed_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKMonitorEvent$Completed"));
        CHECK(LDKMonitorEvent_Completed_class != NULL);
-       LDKMonitorEvent_Completed_meth = (*env)->GetMethodID(env, LDKMonitorEvent_Completed_class, "<init>", "(JJ)V");
+       LDKMonitorEvent_Completed_meth = (*env)->GetMethodID(env, LDKMonitorEvent_Completed_class, "<init>", "(JJJ)V");
        CHECK(LDKMonitorEvent_Completed_meth != NULL);
 }
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMonitorEvent_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
@@ -5280,6 +5778,18 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMonitorEvent_1ref_1from_
                        htlc_event_ref = tag_ptr(htlc_event_var.inner, false);
                        return (*env)->NewObject(env, LDKMonitorEvent_HTLCEvent_class, LDKMonitorEvent_HTLCEvent_meth, htlc_event_ref);
                }
+               case LDKMonitorEvent_HolderForceClosedWithInfo: {
+                       int64_t reason_ref = tag_ptr(&obj->holder_force_closed_with_info.reason, false);
+                       LDKOutPoint outpoint_var = obj->holder_force_closed_with_info.outpoint;
+                       int64_t outpoint_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_var);
+                       outpoint_ref = tag_ptr(outpoint_var.inner, false);
+                       LDKChannelId channel_id_var = obj->holder_force_closed_with_info.channel_id;
+                       int64_t channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+                       channel_id_ref = tag_ptr(channel_id_var.inner, false);
+                       return (*env)->NewObject(env, LDKMonitorEvent_HolderForceClosedWithInfo_class, LDKMonitorEvent_HolderForceClosedWithInfo_meth, reason_ref, outpoint_ref, channel_id_ref);
+               }
                case LDKMonitorEvent_HolderForceClosed: {
                        LDKOutPoint holder_force_closed_var = obj->holder_force_closed;
                        int64_t holder_force_closed_ref = 0;
@@ -5292,8 +5802,12 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMonitorEvent_1ref_1from_
                        int64_t funding_txo_ref = 0;
                        CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_var);
                        funding_txo_ref = tag_ptr(funding_txo_var.inner, false);
+                       LDKChannelId channel_id_var = obj->completed.channel_id;
+                       int64_t channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+                       channel_id_ref = tag_ptr(channel_id_var.inner, false);
                        int64_t monitor_update_id_conv = obj->completed.monitor_update_id;
-                       return (*env)->NewObject(env, LDKMonitorEvent_Completed_class, LDKMonitorEvent_Completed_meth, funding_txo_ref, monitor_update_id_conv);
+                       return (*env)->NewObject(env, LDKMonitorEvent_Completed_class, LDKMonitorEvent_Completed_meth, funding_txo_ref, channel_id_ref, monitor_update_id_conv);
                }
                default: abort();
        }
@@ -5305,26 +5819,40 @@ static inline LDKCVec_MonitorEventZ CVec_MonitorEventZ_clone(const LDKCVec_Monit
        }
        return ret;
 }
-static inline struct LDKOutPoint C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
+static inline struct LDKOutPoint C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
        LDKOutPoint ret = owner->a;
        ret.is_owned = false;
        return ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
-       LDKOutPoint ret_var = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
+       LDKOutPoint ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a(owner_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
 
-static inline struct LDKCVec_MonitorEventZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
-       return CVec_MonitorEventZ_clone(&owner->b);
+static inline struct LDKChannelId C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
+       LDKChannelId ret = owner->b;
+       ret.is_owned = false;
+       return ret;
 }
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
-       LDKCVec_MonitorEventZ ret_var = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
+       LDKChannelId ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKCVec_MonitorEventZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
+       return CVec_MonitorEventZ_clone(&owner->c);
+}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
+       LDKCVec_MonitorEventZ ret_var = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(owner_conv);
        int64_tArray ret_arr = NULL;
        ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
        int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
@@ -5339,20 +5867,20 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_
        return ret_arr;
 }
 
-static inline struct LDKPublicKey C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
-       return owner->c;
+static inline struct LDKPublicKey C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner){
+       return owner->d;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1d(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* owner_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(owner);
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(owner_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(owner_conv).compressed_form);
        return ret_arr;
 }
 
-static inline LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_clone(const LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ *orig) {
-       LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ) * orig->datalen, "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ clone bytes"), .datalen = orig->datalen };
+static inline LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_clone(const LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ *orig) {
+       LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ) * orig->datalen, "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ clone bytes"), .datalen = orig->datalen };
        for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(&orig->data[i]);
+               ret.data[i] = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(&orig->data[i]);
        }
        return ret;
 }
@@ -5538,6 +6066,123 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTypeFeature
        return ret_ref;
 }
 
+static inline struct LDKOfferId CResult_OfferIdDecodeErrorZ_get_ok(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner){
+       LDKOfferId ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_OfferIdDecodeErrorZ* owner_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(owner);
+       LDKOfferId ret_var = CResult_OfferIdDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_OfferIdDecodeErrorZ_get_err(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_OfferIdDecodeErrorZ* owner_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_OfferIdDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return *owner->contents.result;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner);
+       CResult_NoneBolt12SemanticErrorZ_get_ok(owner_conv);
+}
+
+static inline enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_NoneBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
+static inline struct LDKOffer CResult_OfferBolt12SemanticErrorZ_get_ok(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKOffer ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_OfferBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKOffer ret_var = CResult_OfferBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_OfferBolt12SemanticErrorZ_get_err(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_OfferBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_OfferBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
+static inline struct LDKInvoiceRequestWithDerivedPayerIdBuilder CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKInvoiceRequestWithDerivedPayerIdBuilder ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKInvoiceRequestWithDerivedPayerIdBuilder ret_var = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
+static inline struct LDKInvoiceRequestWithExplicitPayerIdBuilder CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKInvoiceRequestWithExplicitPayerIdBuilder ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKInvoiceRequestWithExplicitPayerIdBuilder ret_var = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
 static inline struct LDKOffer CResult_OfferBolt12ParseErrorZ_get_ok(LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR owner){
        LDKOffer ret = *owner->contents.result;
        ret.is_owned = false;
@@ -5566,27 +6211,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseEr
        return ret_ref;
 }
 
-static inline struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
-       return *owner->contents.result;
-}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner);
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CResult_PublicKeySecp256k1ErrorZ_get_ok(owner_conv).compressed_form);
-       return ret_arr;
-}
-
-static inline enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
-       return *owner->contents.err;
-}
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner);
-       jclass ret_conv = LDKSecp256k1Error_to_java(env, CResult_PublicKeySecp256k1ErrorZ_get_err(owner_conv));
-       return ret_conv;
-}
-
 static inline struct LDKNodeId CResult_NodeIdDecodeErrorZ_get_ok(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner){
        LDKNodeId ret = *owner->contents.result;
        ret.is_owned = false;
@@ -5613,6 +6237,27 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ
        return ret_ref;
 }
 
+static inline struct LDKPublicKey CResult_PublicKeySecp256k1ErrorZ_get_ok(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return *owner->contents.result;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CResult_PublicKeySecp256k1ErrorZ_get_ok(owner_conv).compressed_form);
+       return ret_arr;
+}
+
+static inline enum LDKSecp256k1Error CResult_PublicKeySecp256k1ErrorZ_get_err(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return *owner->contents.err;
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_PublicKeySecp256k1ErrorZ* owner_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKSecp256k1Error_to_java(env, CResult_PublicKeySecp256k1ErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
 static jclass LDKNetworkUpdate_ChannelUpdateMessage_class = NULL;
 static jmethodID LDKNetworkUpdate_ChannelUpdateMessage_meth = NULL;
 static jclass LDKNetworkUpdate_ChannelFailure_class = NULL;
@@ -7003,6 +7648,26 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1CVec_1SocketAdd
                default: abort();
        }
 }
+static inline uint64_t CResult_u64ShortChannelIdErrorZ_get_ok(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return *owner->contents.result;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_u64ShortChannelIdErrorZ* owner_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(owner);
+       int64_t ret_conv = CResult_u64ShortChannelIdErrorZ_get_ok(owner_conv);
+       return ret_conv;
+}
+
+static inline enum LDKShortChannelIdError CResult_u64ShortChannelIdErrorZ_get_err(LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return ShortChannelIdError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_u64ShortChannelIdErrorZ* owner_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKShortChannelIdError_to_java(env, CResult_u64ShortChannelIdErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
 static inline struct LDKPendingHTLCInfo CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR owner){
        LDKPendingHTLCInfo ret = *owner->contents.result;
        ret.is_owned = false;
@@ -7142,6 +7807,85 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1UtxoZNoneZ_1get
        CResult_CVec_UtxoZNoneZ_get_err(owner_conv);
 }
 
+static jclass LDKPaymentContext_Unknown_class = NULL;
+static jmethodID LDKPaymentContext_Unknown_meth = NULL;
+static jclass LDKPaymentContext_Bolt12Offer_class = NULL;
+static jmethodID LDKPaymentContext_Bolt12Offer_meth = NULL;
+static jclass LDKPaymentContext_Bolt12Refund_class = NULL;
+static jmethodID LDKPaymentContext_Bolt12Refund_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPaymentContext_init (JNIEnv *env, jclass clz) {
+       LDKPaymentContext_Unknown_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentContext$Unknown"));
+       CHECK(LDKPaymentContext_Unknown_class != NULL);
+       LDKPaymentContext_Unknown_meth = (*env)->GetMethodID(env, LDKPaymentContext_Unknown_class, "<init>", "(J)V");
+       CHECK(LDKPaymentContext_Unknown_meth != NULL);
+       LDKPaymentContext_Bolt12Offer_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentContext$Bolt12Offer"));
+       CHECK(LDKPaymentContext_Bolt12Offer_class != NULL);
+       LDKPaymentContext_Bolt12Offer_meth = (*env)->GetMethodID(env, LDKPaymentContext_Bolt12Offer_class, "<init>", "(J)V");
+       CHECK(LDKPaymentContext_Bolt12Offer_meth != NULL);
+       LDKPaymentContext_Bolt12Refund_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentContext$Bolt12Refund"));
+       CHECK(LDKPaymentContext_Bolt12Refund_class != NULL);
+       LDKPaymentContext_Bolt12Refund_meth = (*env)->GetMethodID(env, LDKPaymentContext_Bolt12Refund_class, "<init>", "(J)V");
+       CHECK(LDKPaymentContext_Bolt12Refund_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPaymentContext_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKPaymentContext_Unknown: {
+                       LDKUnknownPaymentContext unknown_var = obj->unknown;
+                       int64_t unknown_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(unknown_var);
+                       unknown_ref = tag_ptr(unknown_var.inner, false);
+                       return (*env)->NewObject(env, LDKPaymentContext_Unknown_class, LDKPaymentContext_Unknown_meth, unknown_ref);
+               }
+               case LDKPaymentContext_Bolt12Offer: {
+                       LDKBolt12OfferContext bolt12_offer_var = obj->bolt12_offer;
+                       int64_t bolt12_offer_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(bolt12_offer_var);
+                       bolt12_offer_ref = tag_ptr(bolt12_offer_var.inner, false);
+                       return (*env)->NewObject(env, LDKPaymentContext_Bolt12Offer_class, LDKPaymentContext_Bolt12Offer_meth, bolt12_offer_ref);
+               }
+               case LDKPaymentContext_Bolt12Refund: {
+                       LDKBolt12RefundContext bolt12_refund_var = obj->bolt12_refund;
+                       int64_t bolt12_refund_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(bolt12_refund_var);
+                       bolt12_refund_ref = tag_ptr(bolt12_refund_var.inner, false);
+                       return (*env)->NewObject(env, LDKPaymentContext_Bolt12Refund_class, LDKPaymentContext_Bolt12Refund_meth, bolt12_refund_ref);
+               }
+               default: abort();
+       }
+}
+static jclass LDKCOption_PaymentContextZ_Some_class = NULL;
+static jmethodID LDKCOption_PaymentContextZ_Some_meth = NULL;
+static jclass LDKCOption_PaymentContextZ_None_class = NULL;
+static jmethodID LDKCOption_PaymentContextZ_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1PaymentContextZ_init (JNIEnv *env, jclass clz) {
+       LDKCOption_PaymentContextZ_Some_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_PaymentContextZ$Some"));
+       CHECK(LDKCOption_PaymentContextZ_Some_class != NULL);
+       LDKCOption_PaymentContextZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_PaymentContextZ_Some_class, "<init>", "(J)V");
+       CHECK(LDKCOption_PaymentContextZ_Some_meth != NULL);
+       LDKCOption_PaymentContextZ_None_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_PaymentContextZ$None"));
+       CHECK(LDKCOption_PaymentContextZ_None_class != NULL);
+       LDKCOption_PaymentContextZ_None_meth = (*env)->GetMethodID(env, LDKCOption_PaymentContextZ_None_class, "<init>", "()V");
+       CHECK(LDKCOption_PaymentContextZ_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1PaymentContextZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKCOption_PaymentContextZ *obj = (LDKCOption_PaymentContextZ*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKCOption_PaymentContextZ_Some: {
+                       int64_t some_ref = tag_ptr(&obj->some, false);
+                       return (*env)->NewObject(env, LDKCOption_PaymentContextZ_Some_class, LDKCOption_PaymentContextZ_Some_meth, some_ref);
+               }
+               case LDKCOption_PaymentContextZ_None: {
+                       return (*env)->NewObject(env, LDKCOption_PaymentContextZ_None_class, LDKCOption_PaymentContextZ_None_meth);
+               }
+               default: abort();
+       }
+}
 static inline uint64_t C2Tuple_u64u16Z_get_a(LDKC2Tuple_u64u16Z *NONNULL_PTR owner){
        return owner->a;
 }
@@ -7220,25 +7964,28 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1ChannelShutdown
                default: abort();
        }
 }
-static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
-       return ThirtyTwoBytes_clone(&*owner->contents.result);
+static inline struct LDKChannelId CResult_ChannelIdAPIErrorZ_get_ok(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner){
+       LDKChannelId ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner);
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner_conv).data);
-       return ret_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_ChannelIdAPIErrorZ* owner_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(owner);
+       LDKChannelId ret_var = CResult_ChannelIdAPIErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-static inline struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){
+static inline struct LDKAPIError CResult_ChannelIdAPIErrorZ_get_err(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner){
 CHECK(!owner->result_ok);
        return APIError_clone(&*owner->contents.err);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_ChannelIdAPIErrorZ* owner_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(owner);
        LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError");
-       *ret_copy = CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner_conv);
+       *ret_copy = CResult_ChannelIdAPIErrorZ_get_err(owner_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -7603,33 +8350,68 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1Thi
        return ret_ref;
 }
 
-static inline struct LDKThirtyTwoBytes C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner){
-       return ThirtyTwoBytes_clone(&owner->a);
+static inline struct LDKChannelId C2Tuple_ChannelIdPublicKeyZ_get_a(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner){
+       LDKChannelId ret = owner->a;
+       ret.is_owned = false;
+       return ret;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* owner_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(owner);
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a(owner_conv).data);
-       return ret_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC2Tuple_ChannelIdPublicKeyZ* owner_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(owner);
+       LDKChannelId ret_var = C2Tuple_ChannelIdPublicKeyZ_get_a(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-static inline struct LDKPublicKey C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR owner){
+static inline struct LDKPublicKey C2Tuple_ChannelIdPublicKeyZ_get_b(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner){
        return owner->b;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* owner_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(owner);
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC2Tuple_ChannelIdPublicKeyZ* owner_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(owner);
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b(owner_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C2Tuple_ChannelIdPublicKeyZ_get_b(owner_conv).compressed_form);
        return ret_arr;
 }
 
-static inline LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_clone(const LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ *orig) {
-       LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ) * orig->datalen, "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ clone bytes"), .datalen = orig->datalen };
+static inline LDKCVec_C2Tuple_ChannelIdPublicKeyZZ CVec_C2Tuple_ChannelIdPublicKeyZZ_clone(const LDKCVec_C2Tuple_ChannelIdPublicKeyZZ *orig) {
+       LDKCVec_C2Tuple_ChannelIdPublicKeyZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ) * orig->datalen, "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = C2Tuple_ChannelIdPublicKeyZ_clone(&orig->data[i]);
+       }
+       return ret;
+}
+static inline LDKCVec_ChannelIdZ CVec_ChannelIdZ_clone(const LDKCVec_ChannelIdZ *orig) {
+       LDKCVec_ChannelIdZ ret = { .data = MALLOC(sizeof(LDKChannelId) * orig->datalen, "LDKCVec_ChannelIdZ clone bytes"), .datalen = orig->datalen };
        for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(&orig->data[i]);
+               ret.data[i] = ChannelId_clone(&orig->data[i]);
        }
        return ret;
 }
+static inline struct LDKOfferWithDerivedMetadataBuilder CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKOfferWithDerivedMetadataBuilder ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKOfferWithDerivedMetadataBuilder ret_var = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
 static jclass LDKCOption_StrZ_Some_class = NULL;
 static jmethodID LDKCOption_StrZ_Some_meth = NULL;
 static jclass LDKCOption_StrZ_None_class = NULL;
@@ -7660,25 +8442,6 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1StrZ_1ref_1from
                default: abort();
        }
 }
-static inline void CResult_NoneBolt12SemanticErrorZ_get_ok(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
-       return *owner->contents.result;
-}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner);
-       CResult_NoneBolt12SemanticErrorZ_get_ok(owner_conv);
-}
-
-static inline enum LDKBolt12SemanticError CResult_NoneBolt12SemanticErrorZ_get_err(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
-       return Bolt12SemanticError_clone(&*owner->contents.err);
-}
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_NoneBolt12SemanticErrorZ* owner_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(owner);
-       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_NoneBolt12SemanticErrorZ_get_err(owner_conv));
-       return ret_conv;
-}
-
 static inline struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_ok(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR owner){
 CHECK(owner->result_ok);
        return C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_clone(&*owner->contents.result);
@@ -7699,6 +8462,29 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoByt
        CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_get_err(owner_conv);
 }
 
+static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesAPIErrorZ_get_ok(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return ThirtyTwoBytes_clone(&*owner->contents.result);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, CResult_ThirtyTwoBytesAPIErrorZ_get_ok(owner_conv).data);
+       return ret_arr;
+}
+
+static inline struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return APIError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_ThirtyTwoBytesAPIErrorZ* owner_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(owner);
+       LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError");
+       *ret_copy = CResult_ThirtyTwoBytesAPIErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 static jclass LDKOffersMessage_InvoiceRequest_class = NULL;
 static jmethodID LDKOffersMessage_InvoiceRequest_meth = NULL;
 static jclass LDKOffersMessage_Invoice_class = NULL;
@@ -8000,12 +8786,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPendingHTLCRouting_ini
        LDKPendingHTLCRouting_Receive_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPendingHTLCRouting$Receive"));
        CHECK(LDKPendingHTLCRouting_Receive_class != NULL);
-       LDKPendingHTLCRouting_Receive_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_Receive_class, "<init>", "(JJI[B[JZ)V");
+       LDKPendingHTLCRouting_Receive_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_Receive_class, "<init>", "(JJJI[B[JZ)V");
        CHECK(LDKPendingHTLCRouting_Receive_meth != NULL);
        LDKPendingHTLCRouting_ReceiveKeysend_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPendingHTLCRouting$ReceiveKeysend"));
        CHECK(LDKPendingHTLCRouting_ReceiveKeysend_class != NULL);
-       LDKPendingHTLCRouting_ReceiveKeysend_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_ReceiveKeysend_class, "<init>", "(J[BJI[J)V");
+       LDKPendingHTLCRouting_ReceiveKeysend_meth = (*env)->GetMethodID(env, LDKPendingHTLCRouting_ReceiveKeysend_class, "<init>", "(J[BJI[JZ)V");
        CHECK(LDKPendingHTLCRouting_ReceiveKeysend_meth != NULL);
 }
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPendingHTLCRouting_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
@@ -8029,6 +8815,7 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPendingHTLCRouting_1ref_
                        CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_data_var);
                        payment_data_ref = tag_ptr(payment_data_var.inner, false);
                        int64_t payment_metadata_ref = tag_ptr(&obj->receive.payment_metadata, false);
+                       int64_t payment_context_ref = tag_ptr(&obj->receive.payment_context, false);
                        int32_t incoming_cltv_expiry_conv = obj->receive.incoming_cltv_expiry;
                        int8_tArray phantom_shared_secret_arr = (*env)->NewByteArray(env, 32);
                        (*env)->SetByteArrayRegion(env, phantom_shared_secret_arr, 0, 32, obj->receive.phantom_shared_secret.data);
@@ -8044,7 +8831,7 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPendingHTLCRouting_1ref_
                        }
                        (*env)->ReleasePrimitiveArrayCritical(env, custom_tlvs_arr, custom_tlvs_arr_ptr, 0);
                        jboolean requires_blinded_error_conv = obj->receive.requires_blinded_error;
-                       return (*env)->NewObject(env, LDKPendingHTLCRouting_Receive_class, LDKPendingHTLCRouting_Receive_meth, payment_data_ref, payment_metadata_ref, incoming_cltv_expiry_conv, phantom_shared_secret_arr, custom_tlvs_arr, requires_blinded_error_conv);
+                       return (*env)->NewObject(env, LDKPendingHTLCRouting_Receive_class, LDKPendingHTLCRouting_Receive_meth, payment_data_ref, payment_metadata_ref, payment_context_ref, incoming_cltv_expiry_conv, phantom_shared_secret_arr, custom_tlvs_arr, requires_blinded_error_conv);
                }
                case LDKPendingHTLCRouting_ReceiveKeysend: {
                        LDKFinalOnionHopData payment_data_var = obj->receive_keysend.payment_data;
@@ -8066,7 +8853,8 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPendingHTLCRouting_1ref_
                                custom_tlvs_arr_ptr[x] = tag_ptr(custom_tlvs_conv_23_conv, true);
                        }
                        (*env)->ReleasePrimitiveArrayCritical(env, custom_tlvs_arr, custom_tlvs_arr_ptr, 0);
-                       return (*env)->NewObject(env, LDKPendingHTLCRouting_ReceiveKeysend_class, LDKPendingHTLCRouting_ReceiveKeysend_meth, payment_data_ref, payment_preimage_arr, payment_metadata_ref, incoming_cltv_expiry_conv, custom_tlvs_arr);
+                       jboolean requires_blinded_error_conv = obj->receive_keysend.requires_blinded_error;
+                       return (*env)->NewObject(env, LDKPendingHTLCRouting_ReceiveKeysend_class, LDKPendingHTLCRouting_ReceiveKeysend_meth, payment_data_ref, payment_preimage_arr, payment_metadata_ref, incoming_cltv_expiry_conv, custom_tlvs_arr, requires_blinded_error_conv);
                }
                default: abort();
        }
@@ -8261,7 +9049,7 @@ LDKChannelMonitorUpdateStatus update_channel_LDKWatch_jcall(const void* this_arg
        }
        return ret_conv;
 }
-LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) {
+LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) {
        LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
        JNIEnv *env;
        jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -8277,20 +9065,20 @@ LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ release_pending_monitor_ev
                (*env)->ExceptionDescribe(env);
                (*env)->FatalError(env, "A call to release_pending_monitor_events in LDKWatch from rust threw an exception.");
        }
-       LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_constr;
+       LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret_constr;
        ret_constr.datalen = (*env)->GetArrayLength(env, ret);
        if (ret_constr.datalen > 0)
-               ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Elements");
+               ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Elements");
        else
                ret_constr.data = NULL;
        int64_t* ret_vals = (*env)->GetLongArrayElements (env, ret, NULL);
-       for (size_t x = 0; x < ret_constr.datalen; x++) {
-               int64_t ret_conv_49 = ret_vals[x];
-               void* ret_conv_49_ptr = untag_ptr(ret_conv_49);
-               CHECK_ACCESS(ret_conv_49_ptr);
-               LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ ret_conv_49_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(ret_conv_49_ptr);
-               FREE(untag_ptr(ret_conv_49));
-               ret_constr.data[x] = ret_conv_49_conv;
+       for (size_t f = 0; f < ret_constr.datalen; f++) {
+               int64_t ret_conv_57 = ret_vals[f];
+               void* ret_conv_57_ptr = untag_ptr(ret_conv_57);
+               CHECK_ACCESS(ret_conv_57_ptr);
+               LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ ret_conv_57_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(ret_conv_57_ptr);
+               FREE(untag_ptr(ret_conv_57));
+               ret_constr.data[f] = ret_conv_57_conv;
        }
        (*env)->ReleaseLongArrayElements(env, ret, ret_vals, 0);
        if (get_jenv_res == JNI_EDETACHED) {
@@ -8371,14 +9159,14 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_Watch_1release_1pendin
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKWatch* this_arg_conv = (LDKWatch*)this_arg_ptr;
-       LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg);
+       LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg);
        int64_tArray ret_arr = NULL;
        ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
        int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t x = 0; x < ret_var.datalen; x++) {
-               LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv_49_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ");
-               *ret_conv_49_conv = ret_var.data[x];
-               ret_arr_ptr[x] = tag_ptr(ret_conv_49_conv, true);
+       for (size_t f = 0; f < ret_var.datalen; f++) {
+               LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv_57_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ");
+               *ret_conv_57_conv = ret_var.data[f];
+               ret_arr_ptr[f] = tag_ptr(ret_conv_57_conv, true);
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
@@ -8781,7 +9569,7 @@ LDKCResult_SchnorrSignatureNoneZ sign_bolt12_invoice_request_LDKNodeSigner_jcall
        }
        LDKUnsignedInvoiceRequest invoice_request_var = *invoice_request;
        int64_t invoice_request_ref = 0;
-       // WARNING: we may need a move here but no clone is available for LDKUnsignedInvoiceRequest
+       invoice_request_var = UnsignedInvoiceRequest_clone(&invoice_request_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_var);
        invoice_request_ref = tag_ptr(invoice_request_var.inner, invoice_request_var.is_owned);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
@@ -8811,7 +9599,7 @@ LDKCResult_SchnorrSignatureNoneZ sign_bolt12_invoice_LDKNodeSigner_jcall(const v
        }
        LDKUnsignedBolt12Invoice invoice_var = *invoice;
        int64_t invoice_ref = 0;
-       // WARNING: we may need a move here but no clone is available for LDKUnsignedBolt12Invoice
+       invoice_var = UnsignedBolt12Invoice_clone(&invoice_var);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_var);
        invoice_ref = tag_ptr(invoice_var.inner, invoice_var.is_owned);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
@@ -11040,34 +11828,6 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1SocketAddressZ_
                default: abort();
        }
 }
-static inline struct LDKPublicKey C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner){
-       return owner->a;
-}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* owner_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(owner);
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a(owner_conv).compressed_form);
-       return ret_arr;
-}
-
-static inline struct LDKCOption_SocketAddressZ C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR owner){
-       return COption_SocketAddressZ_clone(&owner->b);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* owner_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(owner);
-       LDKCOption_SocketAddressZ *ret_copy = MALLOC(sizeof(LDKCOption_SocketAddressZ), "LDKCOption_SocketAddressZ");
-       *ret_copy = C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b(owner_conv);
-       int64_t ret_ref = tag_ptr(ret_copy, true);
-       return ret_ref;
-}
-
-static inline LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_clone(const LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ *orig) {
-       LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ) * orig->datalen, "LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(&orig->data[i]);
-       }
-       return ret;
-}
 static inline struct LDKCVec_u8Z CResult_CVec_u8ZPeerHandleErrorZ_get_ok(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner){
 CHECK(owner->result_ok);
        return CVec_u8Z_clone(&*owner->contents.result);
@@ -11308,6 +12068,54 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoB
        return ret_conv;
 }
 
+static inline struct LDKUnsignedInvoiceRequest CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKUnsignedInvoiceRequest ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKUnsignedInvoiceRequest ret_var = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
+static inline struct LDKInvoiceRequest CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKInvoiceRequest ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKInvoiceRequest ret_var = CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
 static jclass LDKCOption_SecretKeyZ_Some_class = NULL;
 static jmethodID LDKCOption_SecretKeyZ_Some_meth = NULL;
 static jclass LDKCOption_SecretKeyZ_None_class = NULL;
@@ -11338,6 +12146,30 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1SecretKeyZ_1ref
                default: abort();
        }
 }
+static inline struct LDKInvoiceWithExplicitSigningPubkeyBuilder CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKInvoiceWithExplicitSigningPubkeyBuilder ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKInvoiceWithExplicitSigningPubkeyBuilder ret_var = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
 static inline struct LDKVerifiedInvoiceRequest CResult_VerifiedInvoiceRequestNoneZ_get_ok(LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR owner){
        LDKVerifiedInvoiceRequest ret = *owner->contents.result;
        ret.is_owned = false;
@@ -11361,6 +12193,56 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceReques
        CResult_VerifiedInvoiceRequestNoneZ_get_err(owner_conv);
 }
 
+static inline struct LDKInvoiceWithDerivedSigningPubkeyBuilder CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+       LDKInvoiceWithDerivedSigningPubkeyBuilder ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       LDKInvoiceWithDerivedSigningPubkeyBuilder ret_var = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline enum LDKBolt12SemanticError CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return Bolt12SemanticError_clone(&*owner->contents.err);
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+       return ret_conv;
+}
+
+static inline struct LDKInvoiceRequestFields CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner){
+       LDKInvoiceRequestFields ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceRequestFieldsDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(owner);
+       LDKInvoiceRequestFields ret_var = CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_InvoiceRequestFieldsDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 static inline LDKCVec_WitnessZ CVec_WitnessZ_clone(const LDKCVec_WitnessZ *orig) {
        LDKCVec_WitnessZ ret = { .data = MALLOC(sizeof(LDKWitness) * orig->datalen, "LDKCVec_WitnessZ clone bytes"), .datalen = orig->datalen };
        for (size_t i = 0; i < ret.datalen; i++) {
@@ -11368,6 +12250,36 @@ static inline LDKCVec_WitnessZ CVec_WitnessZ_clone(const LDKCVec_WitnessZ *orig)
        }
        return ret;
 }
+static jclass LDKCOption_ECDSASignatureZ_Some_class = NULL;
+static jmethodID LDKCOption_ECDSASignatureZ_Some_meth = NULL;
+static jclass LDKCOption_ECDSASignatureZ_None_class = NULL;
+static jmethodID LDKCOption_ECDSASignatureZ_None_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1ECDSASignatureZ_init (JNIEnv *env, jclass clz) {
+       LDKCOption_ECDSASignatureZ_Some_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_ECDSASignatureZ$Some"));
+       CHECK(LDKCOption_ECDSASignatureZ_Some_class != NULL);
+       LDKCOption_ECDSASignatureZ_Some_meth = (*env)->GetMethodID(env, LDKCOption_ECDSASignatureZ_Some_class, "<init>", "([B)V");
+       CHECK(LDKCOption_ECDSASignatureZ_Some_meth != NULL);
+       LDKCOption_ECDSASignatureZ_None_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKCOption_ECDSASignatureZ$None"));
+       CHECK(LDKCOption_ECDSASignatureZ_None_class != NULL);
+       LDKCOption_ECDSASignatureZ_None_meth = (*env)->GetMethodID(env, LDKCOption_ECDSASignatureZ_None_class, "<init>", "()V");
+       CHECK(LDKCOption_ECDSASignatureZ_None_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1ECDSASignatureZ_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKCOption_ECDSASignatureZ *obj = (LDKCOption_ECDSASignatureZ*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKCOption_ECDSASignatureZ_Some: {
+                       int8_tArray some_arr = (*env)->NewByteArray(env, 64);
+                       (*env)->SetByteArrayRegion(env, some_arr, 0, 64, obj->some.compact_form);
+                       return (*env)->NewObject(env, LDKCOption_ECDSASignatureZ_Some_class, LDKCOption_ECDSASignatureZ_Some_meth, some_arr);
+               }
+               case LDKCOption_ECDSASignatureZ_None: {
+                       return (*env)->NewObject(env, LDKCOption_ECDSASignatureZ_None_class, LDKCOption_ECDSASignatureZ_None_meth);
+               }
+               default: abort();
+       }
+}
 static jclass LDKCOption_i64Z_Some_class = NULL;
 static jmethodID LDKCOption_i64Z_Some_meth = NULL;
 static jclass LDKCOption_i64Z_None_class = NULL;
@@ -12859,13 +13771,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt11InvoiceSignO
        return ret_ref;
 }
 
-static inline LDKCVec_FutureZ CVec_FutureZ_clone(const LDKCVec_FutureZ *orig) {
-       LDKCVec_FutureZ ret = { .data = MALLOC(sizeof(LDKFuture) * orig->datalen, "LDKCVec_FutureZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = Future_clone(&orig->data[i]);
-       }
-       return ret;
-}
 static inline struct LDKOffersMessage CResult_OffersMessageDecodeErrorZ_get_ok(LDKCResult_OffersMessageDecodeErrorZ *NONNULL_PTR owner){
 CHECK(owner->result_ok);
        return OffersMessage_clone(&*owner->contents.result);
@@ -13310,16 +14215,30 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownScriptInva
        return ret_ref;
 }
 
-static jclass LDKPaymentPurpose_InvoicePayment_class = NULL;
-static jmethodID LDKPaymentPurpose_InvoicePayment_meth = NULL;
+static jclass LDKPaymentPurpose_Bolt11InvoicePayment_class = NULL;
+static jmethodID LDKPaymentPurpose_Bolt11InvoicePayment_meth = NULL;
+static jclass LDKPaymentPurpose_Bolt12OfferPayment_class = NULL;
+static jmethodID LDKPaymentPurpose_Bolt12OfferPayment_meth = NULL;
+static jclass LDKPaymentPurpose_Bolt12RefundPayment_class = NULL;
+static jmethodID LDKPaymentPurpose_Bolt12RefundPayment_meth = NULL;
 static jclass LDKPaymentPurpose_SpontaneousPayment_class = NULL;
 static jmethodID LDKPaymentPurpose_SpontaneousPayment_meth = NULL;
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPaymentPurpose_init (JNIEnv *env, jclass clz) {
-       LDKPaymentPurpose_InvoicePayment_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$InvoicePayment"));
-       CHECK(LDKPaymentPurpose_InvoicePayment_class != NULL);
-       LDKPaymentPurpose_InvoicePayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_InvoicePayment_class, "<init>", "(J[B)V");
-       CHECK(LDKPaymentPurpose_InvoicePayment_meth != NULL);
+       LDKPaymentPurpose_Bolt11InvoicePayment_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$Bolt11InvoicePayment"));
+       CHECK(LDKPaymentPurpose_Bolt11InvoicePayment_class != NULL);
+       LDKPaymentPurpose_Bolt11InvoicePayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_Bolt11InvoicePayment_class, "<init>", "(J[B)V");
+       CHECK(LDKPaymentPurpose_Bolt11InvoicePayment_meth != NULL);
+       LDKPaymentPurpose_Bolt12OfferPayment_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$Bolt12OfferPayment"));
+       CHECK(LDKPaymentPurpose_Bolt12OfferPayment_class != NULL);
+       LDKPaymentPurpose_Bolt12OfferPayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_Bolt12OfferPayment_class, "<init>", "(J[BJ)V");
+       CHECK(LDKPaymentPurpose_Bolt12OfferPayment_meth != NULL);
+       LDKPaymentPurpose_Bolt12RefundPayment_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$Bolt12RefundPayment"));
+       CHECK(LDKPaymentPurpose_Bolt12RefundPayment_class != NULL);
+       LDKPaymentPurpose_Bolt12RefundPayment_meth = (*env)->GetMethodID(env, LDKPaymentPurpose_Bolt12RefundPayment_class, "<init>", "(J[BJ)V");
+       CHECK(LDKPaymentPurpose_Bolt12RefundPayment_meth != NULL);
        LDKPaymentPurpose_SpontaneousPayment_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPaymentPurpose$SpontaneousPayment"));
        CHECK(LDKPaymentPurpose_SpontaneousPayment_class != NULL);
@@ -13329,11 +14248,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPaymentPurpose_init (J
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPaymentPurpose_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
        LDKPaymentPurpose *obj = (LDKPaymentPurpose*)untag_ptr(ptr);
        switch(obj->tag) {
-               case LDKPaymentPurpose_InvoicePayment: {
-                       int64_t payment_preimage_ref = tag_ptr(&obj->invoice_payment.payment_preimage, false);
+               case LDKPaymentPurpose_Bolt11InvoicePayment: {
+                       int64_t payment_preimage_ref = tag_ptr(&obj->bolt11_invoice_payment.payment_preimage, false);
+                       int8_tArray payment_secret_arr = (*env)->NewByteArray(env, 32);
+                       (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->bolt11_invoice_payment.payment_secret.data);
+                       return (*env)->NewObject(env, LDKPaymentPurpose_Bolt11InvoicePayment_class, LDKPaymentPurpose_Bolt11InvoicePayment_meth, payment_preimage_ref, payment_secret_arr);
+               }
+               case LDKPaymentPurpose_Bolt12OfferPayment: {
+                       int64_t payment_preimage_ref = tag_ptr(&obj->bolt12_offer_payment.payment_preimage, false);
                        int8_tArray payment_secret_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->invoice_payment.payment_secret.data);
-                       return (*env)->NewObject(env, LDKPaymentPurpose_InvoicePayment_class, LDKPaymentPurpose_InvoicePayment_meth, payment_preimage_ref, payment_secret_arr);
+                       (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->bolt12_offer_payment.payment_secret.data);
+                       LDKBolt12OfferContext payment_context_var = obj->bolt12_offer_payment.payment_context;
+                       int64_t payment_context_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_var);
+                       payment_context_ref = tag_ptr(payment_context_var.inner, false);
+                       return (*env)->NewObject(env, LDKPaymentPurpose_Bolt12OfferPayment_class, LDKPaymentPurpose_Bolt12OfferPayment_meth, payment_preimage_ref, payment_secret_arr, payment_context_ref);
+               }
+               case LDKPaymentPurpose_Bolt12RefundPayment: {
+                       int64_t payment_preimage_ref = tag_ptr(&obj->bolt12_refund_payment.payment_preimage, false);
+                       int8_tArray payment_secret_arr = (*env)->NewByteArray(env, 32);
+                       (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->bolt12_refund_payment.payment_secret.data);
+                       LDKBolt12RefundContext payment_context_var = obj->bolt12_refund_payment.payment_context;
+                       int64_t payment_context_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_var);
+                       payment_context_ref = tag_ptr(payment_context_var.inner, false);
+                       return (*env)->NewObject(env, LDKPaymentPurpose_Bolt12RefundPayment_class, LDKPaymentPurpose_Bolt12RefundPayment_meth, payment_preimage_ref, payment_secret_arr, payment_context_ref);
                }
                case LDKPaymentPurpose_SpontaneousPayment: {
                        int8_tArray spontaneous_payment_arr = (*env)->NewByteArray(env, 32);
@@ -13476,120 +14415,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1PathFailu
        return ret_ref;
 }
 
-static jclass LDKClosureReason_CounterpartyForceClosed_class = NULL;
-static jmethodID LDKClosureReason_CounterpartyForceClosed_meth = NULL;
-static jclass LDKClosureReason_HolderForceClosed_class = NULL;
-static jmethodID LDKClosureReason_HolderForceClosed_meth = NULL;
-static jclass LDKClosureReason_CooperativeClosure_class = NULL;
-static jmethodID LDKClosureReason_CooperativeClosure_meth = NULL;
-static jclass LDKClosureReason_CommitmentTxConfirmed_class = NULL;
-static jmethodID LDKClosureReason_CommitmentTxConfirmed_meth = NULL;
-static jclass LDKClosureReason_FundingTimedOut_class = NULL;
-static jmethodID LDKClosureReason_FundingTimedOut_meth = NULL;
-static jclass LDKClosureReason_ProcessingError_class = NULL;
-static jmethodID LDKClosureReason_ProcessingError_meth = NULL;
-static jclass LDKClosureReason_DisconnectedPeer_class = NULL;
-static jmethodID LDKClosureReason_DisconnectedPeer_meth = NULL;
-static jclass LDKClosureReason_OutdatedChannelManager_class = NULL;
-static jmethodID LDKClosureReason_OutdatedChannelManager_meth = NULL;
-static jclass LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class = NULL;
-static jmethodID LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = NULL;
-static jclass LDKClosureReason_FundingBatchClosure_class = NULL;
-static jmethodID LDKClosureReason_FundingBatchClosure_meth = NULL;
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKClosureReason_init (JNIEnv *env, jclass clz) {
-       LDKClosureReason_CounterpartyForceClosed_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyForceClosed"));
-       CHECK(LDKClosureReason_CounterpartyForceClosed_class != NULL);
-       LDKClosureReason_CounterpartyForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyForceClosed_class, "<init>", "(J)V");
-       CHECK(LDKClosureReason_CounterpartyForceClosed_meth != NULL);
-       LDKClosureReason_HolderForceClosed_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$HolderForceClosed"));
-       CHECK(LDKClosureReason_HolderForceClosed_class != NULL);
-       LDKClosureReason_HolderForceClosed_meth = (*env)->GetMethodID(env, LDKClosureReason_HolderForceClosed_class, "<init>", "()V");
-       CHECK(LDKClosureReason_HolderForceClosed_meth != NULL);
-       LDKClosureReason_CooperativeClosure_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CooperativeClosure"));
-       CHECK(LDKClosureReason_CooperativeClosure_class != NULL);
-       LDKClosureReason_CooperativeClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_CooperativeClosure_class, "<init>", "()V");
-       CHECK(LDKClosureReason_CooperativeClosure_meth != NULL);
-       LDKClosureReason_CommitmentTxConfirmed_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CommitmentTxConfirmed"));
-       CHECK(LDKClosureReason_CommitmentTxConfirmed_class != NULL);
-       LDKClosureReason_CommitmentTxConfirmed_meth = (*env)->GetMethodID(env, LDKClosureReason_CommitmentTxConfirmed_class, "<init>", "()V");
-       CHECK(LDKClosureReason_CommitmentTxConfirmed_meth != NULL);
-       LDKClosureReason_FundingTimedOut_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingTimedOut"));
-       CHECK(LDKClosureReason_FundingTimedOut_class != NULL);
-       LDKClosureReason_FundingTimedOut_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingTimedOut_class, "<init>", "()V");
-       CHECK(LDKClosureReason_FundingTimedOut_meth != NULL);
-       LDKClosureReason_ProcessingError_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$ProcessingError"));
-       CHECK(LDKClosureReason_ProcessingError_class != NULL);
-       LDKClosureReason_ProcessingError_meth = (*env)->GetMethodID(env, LDKClosureReason_ProcessingError_class, "<init>", "(Ljava/lang/String;)V");
-       CHECK(LDKClosureReason_ProcessingError_meth != NULL);
-       LDKClosureReason_DisconnectedPeer_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$DisconnectedPeer"));
-       CHECK(LDKClosureReason_DisconnectedPeer_class != NULL);
-       LDKClosureReason_DisconnectedPeer_meth = (*env)->GetMethodID(env, LDKClosureReason_DisconnectedPeer_class, "<init>", "()V");
-       CHECK(LDKClosureReason_DisconnectedPeer_meth != NULL);
-       LDKClosureReason_OutdatedChannelManager_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$OutdatedChannelManager"));
-       CHECK(LDKClosureReason_OutdatedChannelManager_class != NULL);
-       LDKClosureReason_OutdatedChannelManager_meth = (*env)->GetMethodID(env, LDKClosureReason_OutdatedChannelManager_class, "<init>", "()V");
-       CHECK(LDKClosureReason_OutdatedChannelManager_meth != NULL);
-       LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$CounterpartyCoopClosedUnfundedChannel"));
-       CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class != NULL);
-       LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth = (*env)->GetMethodID(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, "<init>", "()V");
-       CHECK(LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth != NULL);
-       LDKClosureReason_FundingBatchClosure_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKClosureReason$FundingBatchClosure"));
-       CHECK(LDKClosureReason_FundingBatchClosure_class != NULL);
-       LDKClosureReason_FundingBatchClosure_meth = (*env)->GetMethodID(env, LDKClosureReason_FundingBatchClosure_class, "<init>", "()V");
-       CHECK(LDKClosureReason_FundingBatchClosure_meth != NULL);
-}
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKClosureReason_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKClosureReason *obj = (LDKClosureReason*)untag_ptr(ptr);
-       switch(obj->tag) {
-               case LDKClosureReason_CounterpartyForceClosed: {
-                       LDKUntrustedString peer_msg_var = obj->counterparty_force_closed.peer_msg;
-                       int64_t peer_msg_ref = 0;
-                       CHECK_INNER_FIELD_ACCESS_OR_NULL(peer_msg_var);
-                       peer_msg_ref = tag_ptr(peer_msg_var.inner, false);
-                       return (*env)->NewObject(env, LDKClosureReason_CounterpartyForceClosed_class, LDKClosureReason_CounterpartyForceClosed_meth, peer_msg_ref);
-               }
-               case LDKClosureReason_HolderForceClosed: {
-                       return (*env)->NewObject(env, LDKClosureReason_HolderForceClosed_class, LDKClosureReason_HolderForceClosed_meth);
-               }
-               case LDKClosureReason_CooperativeClosure: {
-                       return (*env)->NewObject(env, LDKClosureReason_CooperativeClosure_class, LDKClosureReason_CooperativeClosure_meth);
-               }
-               case LDKClosureReason_CommitmentTxConfirmed: {
-                       return (*env)->NewObject(env, LDKClosureReason_CommitmentTxConfirmed_class, LDKClosureReason_CommitmentTxConfirmed_meth);
-               }
-               case LDKClosureReason_FundingTimedOut: {
-                       return (*env)->NewObject(env, LDKClosureReason_FundingTimedOut_class, LDKClosureReason_FundingTimedOut_meth);
-               }
-               case LDKClosureReason_ProcessingError: {
-                       LDKStr err_str = obj->processing_error.err;
-                       jstring err_conv = str_ref_to_java(env, err_str.chars, err_str.len);
-                       return (*env)->NewObject(env, LDKClosureReason_ProcessingError_class, LDKClosureReason_ProcessingError_meth, err_conv);
-               }
-               case LDKClosureReason_DisconnectedPeer: {
-                       return (*env)->NewObject(env, LDKClosureReason_DisconnectedPeer_class, LDKClosureReason_DisconnectedPeer_meth);
-               }
-               case LDKClosureReason_OutdatedChannelManager: {
-                       return (*env)->NewObject(env, LDKClosureReason_OutdatedChannelManager_class, LDKClosureReason_OutdatedChannelManager_meth);
-               }
-               case LDKClosureReason_CounterpartyCoopClosedUnfundedChannel: {
-                       return (*env)->NewObject(env, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_class, LDKClosureReason_CounterpartyCoopClosedUnfundedChannel_meth);
-               }
-               case LDKClosureReason_FundingBatchClosure: {
-                       return (*env)->NewObject(env, LDKClosureReason_FundingBatchClosure_class, LDKClosureReason_FundingBatchClosure_meth);
-               }
-               default: abort();
-       }
-}
 static jclass LDKCOption_ClosureReasonZ_Some_class = NULL;
 static jmethodID LDKCOption_ClosureReasonZ_Some_meth = NULL;
 static jclass LDKCOption_ClosureReasonZ_None_class = NULL;
@@ -13649,13 +14474,15 @@ static jclass LDKHTLCDestination_UnknownNextHop_class = NULL;
 static jmethodID LDKHTLCDestination_UnknownNextHop_meth = NULL;
 static jclass LDKHTLCDestination_InvalidForward_class = NULL;
 static jmethodID LDKHTLCDestination_InvalidForward_meth = NULL;
+static jclass LDKHTLCDestination_InvalidOnion_class = NULL;
+static jmethodID LDKHTLCDestination_InvalidOnion_meth = NULL;
 static jclass LDKHTLCDestination_FailedPayment_class = NULL;
 static jmethodID LDKHTLCDestination_FailedPayment_meth = NULL;
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKHTLCDestination_init (JNIEnv *env, jclass clz) {
        LDKHTLCDestination_NextHopChannel_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$NextHopChannel"));
        CHECK(LDKHTLCDestination_NextHopChannel_class != NULL);
-       LDKHTLCDestination_NextHopChannel_meth = (*env)->GetMethodID(env, LDKHTLCDestination_NextHopChannel_class, "<init>", "([B[B)V");
+       LDKHTLCDestination_NextHopChannel_meth = (*env)->GetMethodID(env, LDKHTLCDestination_NextHopChannel_class, "<init>", "([BJ)V");
        CHECK(LDKHTLCDestination_NextHopChannel_meth != NULL);
        LDKHTLCDestination_UnknownNextHop_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$UnknownNextHop"));
@@ -13667,6 +14494,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKHTLCDestination_init (
        CHECK(LDKHTLCDestination_InvalidForward_class != NULL);
        LDKHTLCDestination_InvalidForward_meth = (*env)->GetMethodID(env, LDKHTLCDestination_InvalidForward_class, "<init>", "(J)V");
        CHECK(LDKHTLCDestination_InvalidForward_meth != NULL);
+       LDKHTLCDestination_InvalidOnion_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$InvalidOnion"));
+       CHECK(LDKHTLCDestination_InvalidOnion_class != NULL);
+       LDKHTLCDestination_InvalidOnion_meth = (*env)->GetMethodID(env, LDKHTLCDestination_InvalidOnion_class, "<init>", "()V");
+       CHECK(LDKHTLCDestination_InvalidOnion_meth != NULL);
        LDKHTLCDestination_FailedPayment_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKHTLCDestination$FailedPayment"));
        CHECK(LDKHTLCDestination_FailedPayment_class != NULL);
@@ -13679,9 +14511,11 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKHTLCDestination_1ref_1fr
                case LDKHTLCDestination_NextHopChannel: {
                        int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
                        (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->next_hop_channel.node_id.compressed_form);
-                       int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->next_hop_channel.channel_id.data);
-                       return (*env)->NewObject(env, LDKHTLCDestination_NextHopChannel_class, LDKHTLCDestination_NextHopChannel_meth, node_id_arr, channel_id_arr);
+                       LDKChannelId channel_id_var = obj->next_hop_channel.channel_id;
+                       int64_t channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+                       channel_id_ref = tag_ptr(channel_id_var.inner, false);
+                       return (*env)->NewObject(env, LDKHTLCDestination_NextHopChannel_class, LDKHTLCDestination_NextHopChannel_meth, node_id_arr, channel_id_ref);
                }
                case LDKHTLCDestination_UnknownNextHop: {
                        int64_t requested_forward_scid_conv = obj->unknown_next_hop.requested_forward_scid;
@@ -13691,6 +14525,9 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKHTLCDestination_1ref_1fr
                        int64_t requested_forward_scid_conv = obj->invalid_forward.requested_forward_scid;
                        return (*env)->NewObject(env, LDKHTLCDestination_InvalidForward_class, LDKHTLCDestination_InvalidForward_meth, requested_forward_scid_conv);
                }
+               case LDKHTLCDestination_InvalidOnion: {
+                       return (*env)->NewObject(env, LDKHTLCDestination_InvalidOnion_class, LDKHTLCDestination_InvalidOnion_meth);
+               }
                case LDKHTLCDestination_FailedPayment: {
                        int8_tArray payment_hash_arr = (*env)->NewByteArray(env, 32);
                        (*env)->SetByteArrayRegion(env, payment_hash_arr, 0, 32, obj->failed_payment.payment_hash.data);
@@ -13848,18 +14685,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKBumpTransactionEvent_i
        LDKBumpTransactionEvent_ChannelClose_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKBumpTransactionEvent$ChannelClose"));
        CHECK(LDKBumpTransactionEvent_ChannelClose_class != NULL);
-       LDKBumpTransactionEvent_ChannelClose_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_ChannelClose_class, "<init>", "([BI[BJJ[J)V");
+       LDKBumpTransactionEvent_ChannelClose_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_ChannelClose_class, "<init>", "(J[B[BI[BJJ[J)V");
        CHECK(LDKBumpTransactionEvent_ChannelClose_meth != NULL);
        LDKBumpTransactionEvent_HTLCResolution_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKBumpTransactionEvent$HTLCResolution"));
        CHECK(LDKBumpTransactionEvent_HTLCResolution_class != NULL);
-       LDKBumpTransactionEvent_HTLCResolution_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_HTLCResolution_class, "<init>", "([BI[JI)V");
+       LDKBumpTransactionEvent_HTLCResolution_meth = (*env)->GetMethodID(env, LDKBumpTransactionEvent_HTLCResolution_class, "<init>", "(J[B[BI[JI)V");
        CHECK(LDKBumpTransactionEvent_HTLCResolution_meth != NULL);
 }
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKBumpTransactionEvent_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
        LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr);
        switch(obj->tag) {
                case LDKBumpTransactionEvent_ChannelClose: {
+                       LDKChannelId channel_id_var = obj->channel_close.channel_id;
+                       int64_t channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+                       channel_id_ref = tag_ptr(channel_id_var.inner, false);
+                       int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
+                       (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->channel_close.counterparty_node_id.compressed_form);
                        int8_tArray claim_id_arr = (*env)->NewByteArray(env, 32);
                        (*env)->SetByteArrayRegion(env, claim_id_arr, 0, 32, obj->channel_close.claim_id.data);
                        int32_t package_target_feerate_sat_per_1000_weight_conv = obj->channel_close.package_target_feerate_sat_per_1000_weight;
@@ -13883,9 +14726,15 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKBumpTransactionEvent_1re
                                pending_htlcs_arr_ptr[y] = pending_htlcs_conv_24_ref;
                        }
                        (*env)->ReleasePrimitiveArrayCritical(env, pending_htlcs_arr, pending_htlcs_arr_ptr, 0);
-                       return (*env)->NewObject(env, LDKBumpTransactionEvent_ChannelClose_class, LDKBumpTransactionEvent_ChannelClose_meth, claim_id_arr, package_target_feerate_sat_per_1000_weight_conv, commitment_tx_arr, commitment_tx_fee_satoshis_conv, anchor_descriptor_ref, pending_htlcs_arr);
+                       return (*env)->NewObject(env, LDKBumpTransactionEvent_ChannelClose_class, LDKBumpTransactionEvent_ChannelClose_meth, channel_id_ref, counterparty_node_id_arr, claim_id_arr, package_target_feerate_sat_per_1000_weight_conv, commitment_tx_arr, commitment_tx_fee_satoshis_conv, anchor_descriptor_ref, pending_htlcs_arr);
                }
                case LDKBumpTransactionEvent_HTLCResolution: {
+                       LDKChannelId channel_id_var = obj->htlc_resolution.channel_id;
+                       int64_t channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+                       channel_id_ref = tag_ptr(channel_id_var.inner, false);
+                       int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
+                       (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->htlc_resolution.counterparty_node_id.compressed_form);
                        int8_tArray claim_id_arr = (*env)->NewByteArray(env, 32);
                        (*env)->SetByteArrayRegion(env, claim_id_arr, 0, 32, obj->htlc_resolution.claim_id.data);
                        int32_t target_feerate_sat_per_1000_weight_conv = obj->htlc_resolution.target_feerate_sat_per_1000_weight;
@@ -13902,7 +14751,7 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKBumpTransactionEvent_1re
                        }
                        (*env)->ReleasePrimitiveArrayCritical(env, htlc_descriptors_arr, htlc_descriptors_arr_ptr, 0);
                        int32_t tx_lock_time_conv = obj->htlc_resolution.tx_lock_time;
-                       return (*env)->NewObject(env, LDKBumpTransactionEvent_HTLCResolution_class, LDKBumpTransactionEvent_HTLCResolution_meth, claim_id_arr, target_feerate_sat_per_1000_weight_conv, htlc_descriptors_arr, tx_lock_time_conv);
+                       return (*env)->NewObject(env, LDKBumpTransactionEvent_HTLCResolution_class, LDKBumpTransactionEvent_HTLCResolution_meth, channel_id_ref, counterparty_node_id_arr, claim_id_arr, target_feerate_sat_per_1000_weight_conv, htlc_descriptors_arr, tx_lock_time_conv);
                }
                default: abort();
        }
@@ -13955,7 +14804,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKEvent_init (JNIEnv *en
        LDKEvent_FundingGenerationReady_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$FundingGenerationReady"));
        CHECK(LDKEvent_FundingGenerationReady_class != NULL);
-       LDKEvent_FundingGenerationReady_meth = (*env)->GetMethodID(env, LDKEvent_FundingGenerationReady_class, "<init>", "([B[BJ[B[B)V");
+       LDKEvent_FundingGenerationReady_meth = (*env)->GetMethodID(env, LDKEvent_FundingGenerationReady_class, "<init>", "(J[BJ[B[B)V");
        CHECK(LDKEvent_FundingGenerationReady_meth != NULL);
        LDKEvent_PaymentClaimable_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$PaymentClaimable"));
@@ -14025,37 +14874,37 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKEvent_init (JNIEnv *en
        LDKEvent_PaymentForwarded_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$PaymentForwarded"));
        CHECK(LDKEvent_PaymentForwarded_class != NULL);
-       LDKEvent_PaymentForwarded_meth = (*env)->GetMethodID(env, LDKEvent_PaymentForwarded_class, "<init>", "(JJJZJ)V");
+       LDKEvent_PaymentForwarded_meth = (*env)->GetMethodID(env, LDKEvent_PaymentForwarded_class, "<init>", "(JJJJJJZJ)V");
        CHECK(LDKEvent_PaymentForwarded_meth != NULL);
        LDKEvent_ChannelPending_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$ChannelPending"));
        CHECK(LDKEvent_ChannelPending_class != NULL);
-       LDKEvent_ChannelPending_meth = (*env)->GetMethodID(env, LDKEvent_ChannelPending_class, "<init>", "([B[BJ[BJ)V");
+       LDKEvent_ChannelPending_meth = (*env)->GetMethodID(env, LDKEvent_ChannelPending_class, "<init>", "(J[BJ[BJJ)V");
        CHECK(LDKEvent_ChannelPending_meth != NULL);
        LDKEvent_ChannelReady_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$ChannelReady"));
        CHECK(LDKEvent_ChannelReady_class != NULL);
-       LDKEvent_ChannelReady_meth = (*env)->GetMethodID(env, LDKEvent_ChannelReady_class, "<init>", "([B[B[BJ)V");
+       LDKEvent_ChannelReady_meth = (*env)->GetMethodID(env, LDKEvent_ChannelReady_class, "<init>", "(J[B[BJ)V");
        CHECK(LDKEvent_ChannelReady_meth != NULL);
        LDKEvent_ChannelClosed_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$ChannelClosed"));
        CHECK(LDKEvent_ChannelClosed_class != NULL);
-       LDKEvent_ChannelClosed_meth = (*env)->GetMethodID(env, LDKEvent_ChannelClosed_class, "<init>", "([B[BJ[BJJ)V");
+       LDKEvent_ChannelClosed_meth = (*env)->GetMethodID(env, LDKEvent_ChannelClosed_class, "<init>", "(J[BJ[BJJ)V");
        CHECK(LDKEvent_ChannelClosed_meth != NULL);
        LDKEvent_DiscardFunding_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$DiscardFunding"));
        CHECK(LDKEvent_DiscardFunding_class != NULL);
-       LDKEvent_DiscardFunding_meth = (*env)->GetMethodID(env, LDKEvent_DiscardFunding_class, "<init>", "([B[B)V");
+       LDKEvent_DiscardFunding_meth = (*env)->GetMethodID(env, LDKEvent_DiscardFunding_class, "<init>", "(J[B)V");
        CHECK(LDKEvent_DiscardFunding_meth != NULL);
        LDKEvent_OpenChannelRequest_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$OpenChannelRequest"));
        CHECK(LDKEvent_OpenChannelRequest_class != NULL);
-       LDKEvent_OpenChannelRequest_meth = (*env)->GetMethodID(env, LDKEvent_OpenChannelRequest_class, "<init>", "([B[BJJJ)V");
+       LDKEvent_OpenChannelRequest_meth = (*env)->GetMethodID(env, LDKEvent_OpenChannelRequest_class, "<init>", "(J[BJJJ)V");
        CHECK(LDKEvent_OpenChannelRequest_meth != NULL);
        LDKEvent_HTLCHandlingFailed_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$HTLCHandlingFailed"));
        CHECK(LDKEvent_HTLCHandlingFailed_class != NULL);
-       LDKEvent_HTLCHandlingFailed_meth = (*env)->GetMethodID(env, LDKEvent_HTLCHandlingFailed_class, "<init>", "([BJ)V");
+       LDKEvent_HTLCHandlingFailed_meth = (*env)->GetMethodID(env, LDKEvent_HTLCHandlingFailed_class, "<init>", "(JJ)V");
        CHECK(LDKEvent_HTLCHandlingFailed_meth != NULL);
        LDKEvent_BumpTransaction_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKEvent$BumpTransaction"));
@@ -14067,8 +14916,10 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN
        LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
        switch(obj->tag) {
                case LDKEvent_FundingGenerationReady: {
-                       int8_tArray temporary_channel_id_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, temporary_channel_id_arr, 0, 32, obj->funding_generation_ready.temporary_channel_id.data);
+                       LDKChannelId temporary_channel_id_var = obj->funding_generation_ready.temporary_channel_id;
+                       int64_t temporary_channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_var);
+                       temporary_channel_id_ref = tag_ptr(temporary_channel_id_var.inner, false);
                        int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
                        (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->funding_generation_ready.counterparty_node_id.compressed_form);
                        int64_t channel_value_satoshis_conv = obj->funding_generation_ready.channel_value_satoshis;
@@ -14077,7 +14928,7 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN
                        (*env)->SetByteArrayRegion(env, output_script_arr, 0, output_script_var.datalen, output_script_var.data);
                        int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16);
                        (*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->funding_generation_ready.user_channel_id.le_bytes);
-                       return (*env)->NewObject(env, LDKEvent_FundingGenerationReady_class, LDKEvent_FundingGenerationReady_meth, temporary_channel_id_arr, counterparty_node_id_arr, channel_value_satoshis_conv, output_script_arr, user_channel_id_arr);
+                       return (*env)->NewObject(env, LDKEvent_FundingGenerationReady_class, LDKEvent_FundingGenerationReady_meth, temporary_channel_id_ref, counterparty_node_id_arr, channel_value_satoshis_conv, output_script_arr, user_channel_id_arr);
                }
                case LDKEvent_PaymentClaimable: {
                        int8_tArray receiver_node_id_arr = (*env)->NewByteArray(env, 33);
@@ -14091,7 +14942,10 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN
                        int64_t amount_msat_conv = obj->payment_claimable.amount_msat;
                        int64_t counterparty_skimmed_fee_msat_conv = obj->payment_claimable.counterparty_skimmed_fee_msat;
                        int64_t purpose_ref = tag_ptr(&obj->payment_claimable.purpose, false);
-                       int64_t via_channel_id_ref = tag_ptr(&obj->payment_claimable.via_channel_id, false);
+                       LDKChannelId via_channel_id_var = obj->payment_claimable.via_channel_id;
+                       int64_t via_channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(via_channel_id_var);
+                       via_channel_id_ref = tag_ptr(via_channel_id_var.inner, false);
                        int64_t via_user_channel_id_ref = tag_ptr(&obj->payment_claimable.via_user_channel_id, false);
                        int64_t claim_deadline_ref = tag_ptr(&obj->payment_claimable.claim_deadline, false);
                        return (*env)->NewObject(env, LDKEvent_PaymentClaimable_class, LDKEvent_PaymentClaimable_meth, receiver_node_id_arr, payment_hash_arr, onion_fields_ref, amount_msat_conv, counterparty_skimmed_fee_msat_conv, purpose_ref, via_channel_id_ref, via_user_channel_id_ref, claim_deadline_ref);
@@ -14224,34 +15078,57 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN
                                outputs_arr_ptr[b] = outputs_conv_27_ref;
                        }
                        (*env)->ReleasePrimitiveArrayCritical(env, outputs_arr, outputs_arr_ptr, 0);
-                       int64_t channel_id_ref = tag_ptr(&obj->spendable_outputs.channel_id, false);
+                       LDKChannelId channel_id_var = obj->spendable_outputs.channel_id;
+                       int64_t channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+                       channel_id_ref = tag_ptr(channel_id_var.inner, false);
                        return (*env)->NewObject(env, LDKEvent_SpendableOutputs_class, LDKEvent_SpendableOutputs_meth, outputs_arr, channel_id_ref);
                }
                case LDKEvent_PaymentForwarded: {
-                       int64_t prev_channel_id_ref = tag_ptr(&obj->payment_forwarded.prev_channel_id, false);
-                       int64_t next_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_channel_id, false);
-                       int64_t fee_earned_msat_ref = tag_ptr(&obj->payment_forwarded.fee_earned_msat, false);
+                       LDKChannelId prev_channel_id_var = obj->payment_forwarded.prev_channel_id;
+                       int64_t prev_channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_var);
+                       prev_channel_id_ref = tag_ptr(prev_channel_id_var.inner, false);
+                       LDKChannelId next_channel_id_var = obj->payment_forwarded.next_channel_id;
+                       int64_t next_channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(next_channel_id_var);
+                       next_channel_id_ref = tag_ptr(next_channel_id_var.inner, false);
+                       int64_t prev_user_channel_id_ref = tag_ptr(&obj->payment_forwarded.prev_user_channel_id, false);
+                       int64_t next_user_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_user_channel_id, false);
+                       int64_t total_fee_earned_msat_ref = tag_ptr(&obj->payment_forwarded.total_fee_earned_msat, false);
+                       int64_t skimmed_fee_msat_ref = tag_ptr(&obj->payment_forwarded.skimmed_fee_msat, false);
                        jboolean claim_from_onchain_tx_conv = obj->payment_forwarded.claim_from_onchain_tx;
                        int64_t outbound_amount_forwarded_msat_ref = tag_ptr(&obj->payment_forwarded.outbound_amount_forwarded_msat, false);
-                       return (*env)->NewObject(env, LDKEvent_PaymentForwarded_class, LDKEvent_PaymentForwarded_meth, prev_channel_id_ref, next_channel_id_ref, fee_earned_msat_ref, claim_from_onchain_tx_conv, outbound_amount_forwarded_msat_ref);
+                       return (*env)->NewObject(env, LDKEvent_PaymentForwarded_class, LDKEvent_PaymentForwarded_meth, prev_channel_id_ref, next_channel_id_ref, prev_user_channel_id_ref, next_user_channel_id_ref, total_fee_earned_msat_ref, skimmed_fee_msat_ref, claim_from_onchain_tx_conv, outbound_amount_forwarded_msat_ref);
                }
                case LDKEvent_ChannelPending: {
-                       int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->channel_pending.channel_id.data);
+                       LDKChannelId channel_id_var = obj->channel_pending.channel_id;
+                       int64_t channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+                       channel_id_ref = tag_ptr(channel_id_var.inner, false);
                        int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16);
                        (*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->channel_pending.user_channel_id.le_bytes);
-                       int64_t former_temporary_channel_id_ref = tag_ptr(&obj->channel_pending.former_temporary_channel_id, false);
+                       LDKChannelId former_temporary_channel_id_var = obj->channel_pending.former_temporary_channel_id;
+                       int64_t former_temporary_channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(former_temporary_channel_id_var);
+                       former_temporary_channel_id_ref = tag_ptr(former_temporary_channel_id_var.inner, false);
                        int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
                        (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->channel_pending.counterparty_node_id.compressed_form);
                        LDKOutPoint funding_txo_var = obj->channel_pending.funding_txo;
                        int64_t funding_txo_ref = 0;
                        CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_var);
                        funding_txo_ref = tag_ptr(funding_txo_var.inner, false);
-                       return (*env)->NewObject(env, LDKEvent_ChannelPending_class, LDKEvent_ChannelPending_meth, channel_id_arr, user_channel_id_arr, former_temporary_channel_id_ref, counterparty_node_id_arr, funding_txo_ref);
+                       LDKChannelTypeFeatures channel_type_var = obj->channel_pending.channel_type;
+                       int64_t channel_type_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var);
+                       channel_type_ref = tag_ptr(channel_type_var.inner, false);
+                       return (*env)->NewObject(env, LDKEvent_ChannelPending_class, LDKEvent_ChannelPending_meth, channel_id_ref, user_channel_id_arr, former_temporary_channel_id_ref, counterparty_node_id_arr, funding_txo_ref, channel_type_ref);
                }
                case LDKEvent_ChannelReady: {
-                       int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->channel_ready.channel_id.data);
+                       LDKChannelId channel_id_var = obj->channel_ready.channel_id;
+                       int64_t channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+                       channel_id_ref = tag_ptr(channel_id_var.inner, false);
                        int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16);
                        (*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->channel_ready.user_channel_id.le_bytes);
                        int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
@@ -14260,11 +15137,13 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN
                        int64_t channel_type_ref = 0;
                        CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var);
                        channel_type_ref = tag_ptr(channel_type_var.inner, false);
-                       return (*env)->NewObject(env, LDKEvent_ChannelReady_class, LDKEvent_ChannelReady_meth, channel_id_arr, user_channel_id_arr, counterparty_node_id_arr, channel_type_ref);
+                       return (*env)->NewObject(env, LDKEvent_ChannelReady_class, LDKEvent_ChannelReady_meth, channel_id_ref, user_channel_id_arr, counterparty_node_id_arr, channel_type_ref);
                }
                case LDKEvent_ChannelClosed: {
-                       int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->channel_closed.channel_id.data);
+                       LDKChannelId channel_id_var = obj->channel_closed.channel_id;
+                       int64_t channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+                       channel_id_ref = tag_ptr(channel_id_var.inner, false);
                        int8_tArray user_channel_id_arr = (*env)->NewByteArray(env, 16);
                        (*env)->SetByteArrayRegion(env, user_channel_id_arr, 0, 16, obj->channel_closed.user_channel_id.le_bytes);
                        int64_t reason_ref = tag_ptr(&obj->channel_closed.reason, false);
@@ -14275,19 +15154,23 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN
                        int64_t channel_funding_txo_ref = 0;
                        CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_txo_var);
                        channel_funding_txo_ref = tag_ptr(channel_funding_txo_var.inner, false);
-                       return (*env)->NewObject(env, LDKEvent_ChannelClosed_class, LDKEvent_ChannelClosed_meth, channel_id_arr, user_channel_id_arr, reason_ref, counterparty_node_id_arr, channel_capacity_sats_ref, channel_funding_txo_ref);
+                       return (*env)->NewObject(env, LDKEvent_ChannelClosed_class, LDKEvent_ChannelClosed_meth, channel_id_ref, user_channel_id_arr, reason_ref, counterparty_node_id_arr, channel_capacity_sats_ref, channel_funding_txo_ref);
                }
                case LDKEvent_DiscardFunding: {
-                       int8_tArray channel_id_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, channel_id_arr, 0, 32, obj->discard_funding.channel_id.data);
+                       LDKChannelId channel_id_var = obj->discard_funding.channel_id;
+                       int64_t channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
+                       channel_id_ref = tag_ptr(channel_id_var.inner, false);
                        LDKTransaction transaction_var = obj->discard_funding.transaction;
                        int8_tArray transaction_arr = (*env)->NewByteArray(env, transaction_var.datalen);
                        (*env)->SetByteArrayRegion(env, transaction_arr, 0, transaction_var.datalen, transaction_var.data);
-                       return (*env)->NewObject(env, LDKEvent_DiscardFunding_class, LDKEvent_DiscardFunding_meth, channel_id_arr, transaction_arr);
+                       return (*env)->NewObject(env, LDKEvent_DiscardFunding_class, LDKEvent_DiscardFunding_meth, channel_id_ref, transaction_arr);
                }
                case LDKEvent_OpenChannelRequest: {
-                       int8_tArray temporary_channel_id_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, temporary_channel_id_arr, 0, 32, obj->open_channel_request.temporary_channel_id.data);
+                       LDKChannelId temporary_channel_id_var = obj->open_channel_request.temporary_channel_id;
+                       int64_t temporary_channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_var);
+                       temporary_channel_id_ref = tag_ptr(temporary_channel_id_var.inner, false);
                        int8_tArray counterparty_node_id_arr = (*env)->NewByteArray(env, 33);
                        (*env)->SetByteArrayRegion(env, counterparty_node_id_arr, 0, 33, obj->open_channel_request.counterparty_node_id.compressed_form);
                        int64_t funding_satoshis_conv = obj->open_channel_request.funding_satoshis;
@@ -14296,13 +15179,15 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JN
                        int64_t channel_type_ref = 0;
                        CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_var);
                        channel_type_ref = tag_ptr(channel_type_var.inner, false);
-                       return (*env)->NewObject(env, LDKEvent_OpenChannelRequest_class, LDKEvent_OpenChannelRequest_meth, temporary_channel_id_arr, counterparty_node_id_arr, funding_satoshis_conv, push_msat_conv, channel_type_ref);
+                       return (*env)->NewObject(env, LDKEvent_OpenChannelRequest_class, LDKEvent_OpenChannelRequest_meth, temporary_channel_id_ref, counterparty_node_id_arr, funding_satoshis_conv, push_msat_conv, channel_type_ref);
                }
                case LDKEvent_HTLCHandlingFailed: {
-                       int8_tArray prev_channel_id_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, prev_channel_id_arr, 0, 32, obj->htlc_handling_failed.prev_channel_id.data);
+                       LDKChannelId prev_channel_id_var = obj->htlc_handling_failed.prev_channel_id;
+                       int64_t prev_channel_id_ref = 0;
+                       CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_var);
+                       prev_channel_id_ref = tag_ptr(prev_channel_id_var.inner, false);
                        int64_t failed_next_destination_ref = tag_ptr(&obj->htlc_handling_failed.failed_next_destination, false);
-                       return (*env)->NewObject(env, LDKEvent_HTLCHandlingFailed_class, LDKEvent_HTLCHandlingFailed_meth, prev_channel_id_arr, failed_next_destination_ref);
+                       return (*env)->NewObject(env, LDKEvent_HTLCHandlingFailed_class, LDKEvent_HTLCHandlingFailed_meth, prev_channel_id_ref, failed_next_destination_ref);
                }
                case LDKEvent_BumpTransaction: {
                        int64_t bump_transaction_ref = tag_ptr(&obj->bump_transaction, false);
@@ -14999,6 +15884,32 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UntrustedStringDec
        return ret_ref;
 }
 
+static inline struct LDKChannelId CResult_ChannelIdDecodeErrorZ_get_ok(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner){
+       LDKChannelId ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_ChannelIdDecodeErrorZ* owner_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(owner);
+       LDKChannelId ret_var = CResult_ChannelIdDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_ChannelIdDecodeErrorZ_get_err(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_ChannelIdDecodeErrorZ* owner_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_ChannelIdDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 static inline struct LDKThirtyTwoBytes C2Tuple__u832u16Z_get_a(LDKC2Tuple__u832u16Z *NONNULL_PTR owner){
        return ThirtyTwoBytes_clone(&owner->a);
 }
@@ -15070,62 +15981,106 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentConstraints
        return ret_ref;
 }
 
-static inline struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
-       return ThirtyTwoBytes_clone(&owner->a);
+static inline struct LDKPaymentContext CResult_PaymentContextDecodeErrorZ_get_ok(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return PaymentContext_clone(&*owner->contents.result);
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(owner_conv).data);
-       return ret_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_PaymentContextDecodeErrorZ* owner_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(owner);
+       LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+       *ret_copy = CResult_PaymentContextDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
 }
 
-static inline struct LDKRecipientOnionFields C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
-       LDKRecipientOnionFields ret = owner->b;
+static inline struct LDKDecodeError CResult_PaymentContextDecodeErrorZ_get_err(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_PaymentContextDecodeErrorZ* owner_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_PaymentContextDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKUnknownPaymentContext CResult_UnknownPaymentContextDecodeErrorZ_get_ok(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner){
+       LDKUnknownPaymentContext ret = *owner->contents.result;
        ret.is_owned = false;
        return ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
-       LDKRecipientOnionFields ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_UnknownPaymentContextDecodeErrorZ* owner_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(owner);
+       LDKUnknownPaymentContext ret_var = CResult_UnknownPaymentContextDecodeErrorZ_get_ok(owner_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
 
-static inline struct LDKRouteParameters C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
-       LDKRouteParameters ret = owner->c;
+static inline struct LDKDecodeError CResult_UnknownPaymentContextDecodeErrorZ_get_err(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_UnknownPaymentContextDecodeErrorZ* owner_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_UnknownPaymentContextDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKBolt12OfferContext CResult_Bolt12OfferContextDecodeErrorZ_get_ok(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner){
+       LDKBolt12OfferContext ret = *owner->contents.result;
        ret.is_owned = false;
        return ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
-       LDKRouteParameters ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_Bolt12OfferContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(owner);
+       LDKBolt12OfferContext ret_var = CResult_Bolt12OfferContextDecodeErrorZ_get_ok(owner_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
 
-static inline struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
-       return C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(&*owner->contents.result);
+static inline struct LDKDecodeError CResult_Bolt12OfferContextDecodeErrorZ_get_err(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner);
-       LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ");
-       *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(owner_conv);
-       return tag_ptr(ret_conv, true);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_Bolt12OfferContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_Bolt12OfferContextDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
 }
 
-static inline void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){
+static inline struct LDKBolt12RefundContext CResult_Bolt12RefundContextDecodeErrorZ_get_ok(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner){
+       LDKBolt12RefundContext ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_Bolt12RefundContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(owner);
+       LDKBolt12RefundContext ret_var = CResult_Bolt12RefundContextDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_Bolt12RefundContextDecodeErrorZ_get_err(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR owner){
 CHECK(!owner->result_ok);
-       return *owner->contents.err;
+       return DecodeError_clone(&*owner->contents.err);
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner);
-       CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_Bolt12RefundContextDecodeErrorZ* owner_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_Bolt12RefundContextDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
 }
 
 static inline struct LDKStr CResult_StrSecp256k1ErrorZ_get_ok(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR owner){
@@ -15149,6 +16104,64 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_
        return ret_conv;
 }
 
+static inline struct LDKThirtyTwoBytes C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
+       return ThirtyTwoBytes_clone(&owner->a);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a(owner_conv).data);
+       return ret_arr;
+}
+
+static inline struct LDKRecipientOnionFields C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
+       LDKRecipientOnionFields ret = owner->b;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
+       LDKRecipientOnionFields ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKRouteParameters C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR owner){
+       LDKRouteParameters ret = owner->c;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1c(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* owner_conv = (LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ*)untag_ptr(owner);
+       LDKRouteParameters ret_var = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(&*owner->contents.result);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner);
+       LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ");
+       *ret_conv = CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok(owner_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+static inline void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return *owner->contents.err;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* owner_conv = (LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ*)untag_ptr(owner);
+       CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err(owner_conv);
+}
+
 static inline struct LDKPublicKey C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR owner){
        return owner->a;
 }
@@ -15200,6 +16213,8 @@ static jclass LDKSendError_BufferFull_class = NULL;
 static jmethodID LDKSendError_BufferFull_meth = NULL;
 static jclass LDKSendError_GetNodeIdFailed_class = NULL;
 static jmethodID LDKSendError_GetNodeIdFailed_meth = NULL;
+static jclass LDKSendError_UnresolvedIntroductionNode_class = NULL;
+static jmethodID LDKSendError_UnresolvedIntroductionNode_meth = NULL;
 static jclass LDKSendError_BlindedPathAdvanceFailed_class = NULL;
 static jmethodID LDKSendError_BlindedPathAdvanceFailed_meth = NULL;
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSendError_init (JNIEnv *env, jclass clz) {
@@ -15243,6 +16258,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSendError_init (JNIEnv
        CHECK(LDKSendError_GetNodeIdFailed_class != NULL);
        LDKSendError_GetNodeIdFailed_meth = (*env)->GetMethodID(env, LDKSendError_GetNodeIdFailed_class, "<init>", "()V");
        CHECK(LDKSendError_GetNodeIdFailed_meth != NULL);
+       LDKSendError_UnresolvedIntroductionNode_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSendError$UnresolvedIntroductionNode"));
+       CHECK(LDKSendError_UnresolvedIntroductionNode_class != NULL);
+       LDKSendError_UnresolvedIntroductionNode_meth = (*env)->GetMethodID(env, LDKSendError_UnresolvedIntroductionNode_class, "<init>", "()V");
+       CHECK(LDKSendError_UnresolvedIntroductionNode_meth != NULL);
        LDKSendError_BlindedPathAdvanceFailed_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSendError$BlindedPathAdvanceFailed"));
        CHECK(LDKSendError_BlindedPathAdvanceFailed_class != NULL);
@@ -15279,6 +16299,9 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSendError_1ref_1from_1pt
                case LDKSendError_GetNodeIdFailed: {
                        return (*env)->NewObject(env, LDKSendError_GetNodeIdFailed_class, LDKSendError_GetNodeIdFailed_meth);
                }
+               case LDKSendError_UnresolvedIntroductionNode: {
+                       return (*env)->NewObject(env, LDKSendError_UnresolvedIntroductionNode_class, LDKSendError_UnresolvedIntroductionNode_meth);
+               }
                case LDKSendError_BlindedPathAdvanceFailed: {
                        return (*env)->NewObject(env, LDKSendError_BlindedPathAdvanceFailed_class, LDKSendError_BlindedPathAdvanceFailed_meth);
                }
@@ -15308,6 +16331,37 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKey
        return ret_ref;
 }
 
+static jclass LDKNextMessageHop_NodeId_class = NULL;
+static jmethodID LDKNextMessageHop_NodeId_meth = NULL;
+static jclass LDKNextMessageHop_ShortChannelId_class = NULL;
+static jmethodID LDKNextMessageHop_ShortChannelId_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKNextMessageHop_init (JNIEnv *env, jclass clz) {
+       LDKNextMessageHop_NodeId_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKNextMessageHop$NodeId"));
+       CHECK(LDKNextMessageHop_NodeId_class != NULL);
+       LDKNextMessageHop_NodeId_meth = (*env)->GetMethodID(env, LDKNextMessageHop_NodeId_class, "<init>", "([B)V");
+       CHECK(LDKNextMessageHop_NodeId_meth != NULL);
+       LDKNextMessageHop_ShortChannelId_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKNextMessageHop$ShortChannelId"));
+       CHECK(LDKNextMessageHop_ShortChannelId_class != NULL);
+       LDKNextMessageHop_ShortChannelId_meth = (*env)->GetMethodID(env, LDKNextMessageHop_ShortChannelId_class, "<init>", "(J)V");
+       CHECK(LDKNextMessageHop_ShortChannelId_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKNextMessageHop_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKNextMessageHop *obj = (LDKNextMessageHop*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKNextMessageHop_NodeId: {
+                       int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
+                       (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->node_id.compressed_form);
+                       return (*env)->NewObject(env, LDKNextMessageHop_NodeId_class, LDKNextMessageHop_NodeId_meth, node_id_arr);
+               }
+               case LDKNextMessageHop_ShortChannelId: {
+                       int64_t short_channel_id_conv = obj->short_channel_id;
+                       return (*env)->NewObject(env, LDKNextMessageHop_ShortChannelId_class, LDKNextMessageHop_ShortChannelId_meth, short_channel_id_conv);
+               }
+               default: abort();
+       }
+}
 static jclass LDKParsedOnionMessageContents_Offers_class = NULL;
 static jmethodID LDKParsedOnionMessageContents_Offers_meth = NULL;
 static jclass LDKParsedOnionMessageContents_Custom_class = NULL;
@@ -15347,7 +16401,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPeeledOnion_init (JNIE
        LDKPeeledOnion_Forward_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPeeledOnion$Forward"));
        CHECK(LDKPeeledOnion_Forward_class != NULL);
-       LDKPeeledOnion_Forward_meth = (*env)->GetMethodID(env, LDKPeeledOnion_Forward_class, "<init>", "([BJ)V");
+       LDKPeeledOnion_Forward_meth = (*env)->GetMethodID(env, LDKPeeledOnion_Forward_class, "<init>", "(JJ)V");
        CHECK(LDKPeeledOnion_Forward_meth != NULL);
        LDKPeeledOnion_Receive_class =
                (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKPeeledOnion$Receive"));
@@ -15359,13 +16413,12 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPeeledOnion_1ref_1from_1
        LDKPeeledOnion *obj = (LDKPeeledOnion*)untag_ptr(ptr);
        switch(obj->tag) {
                case LDKPeeledOnion_Forward: {
-                       int8_tArray _0_arr = (*env)->NewByteArray(env, 33);
-                       (*env)->SetByteArrayRegion(env, _0_arr, 0, 33, obj->forward._0.compressed_form);
+                       int64_t _0_ref = tag_ptr(&obj->forward._0, false);
                        LDKOnionMessage _1_var = obj->forward._1;
                        int64_t _1_ref = 0;
                        CHECK_INNER_FIELD_ACCESS_OR_NULL(_1_var);
                        _1_ref = tag_ptr(_1_var.inner, false);
-                       return (*env)->NewObject(env, LDKPeeledOnion_Forward_class, LDKPeeledOnion_Forward_meth, _0_arr, _1_ref);
+                       return (*env)->NewObject(env, LDKPeeledOnion_Forward_class, LDKPeeledOnion_Forward_meth, _0_ref, _1_ref);
                }
                case LDKPeeledOnion_Receive: {
                        int64_t _0_ref = tag_ptr(&obj->receive._0, false);
@@ -15583,158 +16636,106 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceErrorDecode
        return ret_ref;
 }
 
-static inline struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){
-       LDKDelayedPaymentBasepoint ret = *owner->contents.result;
+static inline struct LDKTrackedSpendableOutput CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner){
+       LDKTrackedSpendableOutput ret = *owner->contents.result;
        ret.is_owned = false;
        return ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner);
-       LDKDelayedPaymentBasepoint ret_var = CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_TrackedSpendableOutputDecodeErrorZ* owner_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(owner);
+       LDKTrackedSpendableOutput ret_var = CResult_TrackedSpendableOutputDecodeErrorZ_get_ok(owner_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
 
-static inline struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){
+static inline struct LDKDecodeError CResult_TrackedSpendableOutputDecodeErrorZ_get_err(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR owner){
 CHECK(!owner->result_ok);
        return DecodeError_clone(&*owner->contents.err);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_TrackedSpendableOutputDecodeErrorZ* owner_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(owner);
        LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
-       *ret_copy = CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = tag_ptr(ret_copy, true);
-       return ret_ref;
-}
-
-static inline struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){
-       LDKDelayedPaymentKey ret = *owner->contents.result;
-       ret.is_owned = false;
-       return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner);
-       LDKDelayedPaymentKey ret_var = CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
-static inline struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
-       return DecodeError_clone(&*owner->contents.err);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
-       *ret_copy = CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = tag_ptr(ret_copy, true);
-       return ret_ref;
-}
-
-static inline struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){
-       LDKHtlcBasepoint ret = *owner->contents.result;
-       ret.is_owned = false;
-       return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner);
-       LDKHtlcBasepoint ret_var = CResult_HtlcBasepointDecodeErrorZ_get_ok(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
-static inline struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
-       return DecodeError_clone(&*owner->contents.err);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
-       *ret_copy = CResult_HtlcBasepointDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = tag_ptr(ret_copy, true);
-       return ret_ref;
-}
-
-static inline struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){
-       LDKHtlcKey ret = *owner->contents.result;
-       ret.is_owned = false;
-       return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner);
-       LDKHtlcKey ret_var = CResult_HtlcKeyDecodeErrorZ_get_ok(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
-static inline struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
-       return DecodeError_clone(&*owner->contents.err);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
-       *ret_copy = CResult_HtlcKeyDecodeErrorZ_get_err(owner_conv);
-       int64_t ret_ref = tag_ptr(ret_copy, true);
-       return ret_ref;
-}
-
-static inline struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){
-       LDKRevocationBasepoint ret = *owner->contents.result;
-       ret.is_owned = false;
-       return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner);
-       LDKRevocationBasepoint ret_var = CResult_RevocationBasepointDecodeErrorZ_get_ok(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
+       *ret_copy = CResult_TrackedSpendableOutputDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static jclass LDKOutputSpendStatus_PendingInitialBroadcast_class = NULL;
+static jmethodID LDKOutputSpendStatus_PendingInitialBroadcast_meth = NULL;
+static jclass LDKOutputSpendStatus_PendingFirstConfirmation_class = NULL;
+static jmethodID LDKOutputSpendStatus_PendingFirstConfirmation_meth = NULL;
+static jclass LDKOutputSpendStatus_PendingThresholdConfirmations_class = NULL;
+static jmethodID LDKOutputSpendStatus_PendingThresholdConfirmations_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKOutputSpendStatus_init (JNIEnv *env, jclass clz) {
+       LDKOutputSpendStatus_PendingInitialBroadcast_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKOutputSpendStatus$PendingInitialBroadcast"));
+       CHECK(LDKOutputSpendStatus_PendingInitialBroadcast_class != NULL);
+       LDKOutputSpendStatus_PendingInitialBroadcast_meth = (*env)->GetMethodID(env, LDKOutputSpendStatus_PendingInitialBroadcast_class, "<init>", "(J)V");
+       CHECK(LDKOutputSpendStatus_PendingInitialBroadcast_meth != NULL);
+       LDKOutputSpendStatus_PendingFirstConfirmation_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKOutputSpendStatus$PendingFirstConfirmation"));
+       CHECK(LDKOutputSpendStatus_PendingFirstConfirmation_class != NULL);
+       LDKOutputSpendStatus_PendingFirstConfirmation_meth = (*env)->GetMethodID(env, LDKOutputSpendStatus_PendingFirstConfirmation_class, "<init>", "([BI[B)V");
+       CHECK(LDKOutputSpendStatus_PendingFirstConfirmation_meth != NULL);
+       LDKOutputSpendStatus_PendingThresholdConfirmations_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKOutputSpendStatus$PendingThresholdConfirmations"));
+       CHECK(LDKOutputSpendStatus_PendingThresholdConfirmations_class != NULL);
+       LDKOutputSpendStatus_PendingThresholdConfirmations_meth = (*env)->GetMethodID(env, LDKOutputSpendStatus_PendingThresholdConfirmations_class, "<init>", "([BI[BI[B)V");
+       CHECK(LDKOutputSpendStatus_PendingThresholdConfirmations_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKOutputSpendStatus_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKOutputSpendStatus *obj = (LDKOutputSpendStatus*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKOutputSpendStatus_PendingInitialBroadcast: {
+                       int64_t delayed_until_height_ref = tag_ptr(&obj->pending_initial_broadcast.delayed_until_height, false);
+                       return (*env)->NewObject(env, LDKOutputSpendStatus_PendingInitialBroadcast_class, LDKOutputSpendStatus_PendingInitialBroadcast_meth, delayed_until_height_ref);
+               }
+               case LDKOutputSpendStatus_PendingFirstConfirmation: {
+                       int8_tArray first_broadcast_hash_arr = (*env)->NewByteArray(env, 32);
+                       (*env)->SetByteArrayRegion(env, first_broadcast_hash_arr, 0, 32, obj->pending_first_confirmation.first_broadcast_hash.data);
+                       int32_t latest_broadcast_height_conv = obj->pending_first_confirmation.latest_broadcast_height;
+                       LDKTransaction latest_spending_tx_var = obj->pending_first_confirmation.latest_spending_tx;
+                       int8_tArray latest_spending_tx_arr = (*env)->NewByteArray(env, latest_spending_tx_var.datalen);
+                       (*env)->SetByteArrayRegion(env, latest_spending_tx_arr, 0, latest_spending_tx_var.datalen, latest_spending_tx_var.data);
+                       return (*env)->NewObject(env, LDKOutputSpendStatus_PendingFirstConfirmation_class, LDKOutputSpendStatus_PendingFirstConfirmation_meth, first_broadcast_hash_arr, latest_broadcast_height_conv, latest_spending_tx_arr);
+               }
+               case LDKOutputSpendStatus_PendingThresholdConfirmations: {
+                       int8_tArray first_broadcast_hash_arr = (*env)->NewByteArray(env, 32);
+                       (*env)->SetByteArrayRegion(env, first_broadcast_hash_arr, 0, 32, obj->pending_threshold_confirmations.first_broadcast_hash.data);
+                       int32_t latest_broadcast_height_conv = obj->pending_threshold_confirmations.latest_broadcast_height;
+                       LDKTransaction latest_spending_tx_var = obj->pending_threshold_confirmations.latest_spending_tx;
+                       int8_tArray latest_spending_tx_arr = (*env)->NewByteArray(env, latest_spending_tx_var.datalen);
+                       (*env)->SetByteArrayRegion(env, latest_spending_tx_arr, 0, latest_spending_tx_var.datalen, latest_spending_tx_var.data);
+                       int32_t confirmation_height_conv = obj->pending_threshold_confirmations.confirmation_height;
+                       int8_tArray confirmation_hash_arr = (*env)->NewByteArray(env, 32);
+                       (*env)->SetByteArrayRegion(env, confirmation_hash_arr, 0, 32, obj->pending_threshold_confirmations.confirmation_hash.data);
+                       return (*env)->NewObject(env, LDKOutputSpendStatus_PendingThresholdConfirmations_class, LDKOutputSpendStatus_PendingThresholdConfirmations_meth, first_broadcast_hash_arr, latest_broadcast_height_conv, latest_spending_tx_arr, confirmation_height_conv, confirmation_hash_arr);
+               }
+               default: abort();
+       }
 }
-
-static inline struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
-       return DecodeError_clone(&*owner->contents.err);
+static inline struct LDKOutputSpendStatus CResult_OutputSpendStatusDecodeErrorZ_get_ok(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return OutputSpendStatus_clone(&*owner->contents.result);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner);
-       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
-       *ret_copy = CResult_RevocationBasepointDecodeErrorZ_get_err(owner_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_OutputSpendStatusDecodeErrorZ* owner_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(owner);
+       LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+       *ret_copy = CResult_OutputSpendStatusDecodeErrorZ_get_ok(owner_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-static inline struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){
-       LDKRevocationKey ret = *owner->contents.result;
-       ret.is_owned = false;
-       return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner);
-       LDKRevocationKey ret_var = CResult_RevocationKeyDecodeErrorZ_get_ok(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
-static inline struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){
+static inline struct LDKDecodeError CResult_OutputSpendStatusDecodeErrorZ_get_err(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR owner){
 CHECK(!owner->result_ok);
        return DecodeError_clone(&*owner->contents.err);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_OutputSpendStatusDecodeErrorZ* owner_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(owner);
        LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
-       *ret_copy = CResult_RevocationKeyDecodeErrorZ_get_err(owner_conv);
+       *ret_copy = CResult_OutputSpendStatusDecodeErrorZ_get_err(owner_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -15903,85 +16904,96 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1FilterZ_1ref_1f
                default: abort();
        }
 }
-static inline struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){
-       LDKLockedChannelMonitor ret = *owner->contents.result;
-       ret.is_owned = false;
-       return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner);
-       LDKLockedChannelMonitor ret_var = CResult_LockedChannelMonitorNoneZ_get_ok(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
-static inline void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
-       return *owner->contents.err;
-}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner);
-       CResult_LockedChannelMonitorNoneZ_get_err(owner_conv);
-}
-
-static inline LDKCVec_OutPointZ CVec_OutPointZ_clone(const LDKCVec_OutPointZ *orig) {
-       LDKCVec_OutPointZ ret = { .data = MALLOC(sizeof(LDKOutPoint) * orig->datalen, "LDKCVec_OutPointZ clone bytes"), .datalen = orig->datalen };
+static inline LDKCVec_TrackedSpendableOutputZ CVec_TrackedSpendableOutputZ_clone(const LDKCVec_TrackedSpendableOutputZ *orig) {
+       LDKCVec_TrackedSpendableOutputZ ret = { .data = MALLOC(sizeof(LDKTrackedSpendableOutput) * orig->datalen, "LDKCVec_TrackedSpendableOutputZ clone bytes"), .datalen = orig->datalen };
        for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = OutPoint_clone(&orig->data[i]);
+               ret.data[i] = TrackedSpendableOutput_clone(&orig->data[i]);
        }
        return ret;
 }
-static inline LDKCVec_MonitorUpdateIdZ CVec_MonitorUpdateIdZ_clone(const LDKCVec_MonitorUpdateIdZ *orig) {
-       LDKCVec_MonitorUpdateIdZ ret = { .data = MALLOC(sizeof(LDKMonitorUpdateId) * orig->datalen, "LDKCVec_MonitorUpdateIdZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = MonitorUpdateId_clone(&orig->data[i]);
+typedef struct LDKChangeDestinationSource_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID get_change_destination_script_meth;
+} LDKChangeDestinationSource_JCalls;
+static void LDKChangeDestinationSource_JCalls_free(void* this_arg) {
+       LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+               } else {
+                       DO_ASSERT(get_jenv_res == JNI_OK);
+               }
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+               }
+               FREE(j_calls);
        }
-       return ret;
 }
-static inline struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){
-       LDKOutPoint ret = owner->a;
-       ret.is_owned = false;
-       return ret;
+LDKCResult_CVec_u8ZNoneZ get_change_destination_script_LDKChangeDestinationSource_jcall(const void* this_arg) {
+       LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->get_change_destination_script_meth);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to get_change_destination_script in LDKChangeDestinationSource from rust threw an exception.");
+       }
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_CVec_u8ZNoneZ ret_conv = *(LDKCResult_CVec_u8ZNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+       return ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner);
-       LDKOutPoint ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
+static void LDKChangeDestinationSource_JCalls_cloned(LDKChangeDestinationSource* new_obj) {
+       LDKChangeDestinationSource_JCalls *j_calls = (LDKChangeDestinationSource_JCalls*) new_obj->this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
 }
+static inline LDKChangeDestinationSource LDKChangeDestinationSource_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKChangeDestinationSource_JCalls *calls = MALLOC(sizeof(LDKChangeDestinationSource_JCalls), "LDKChangeDestinationSource_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->get_change_destination_script_meth = (*env)->GetMethodID(env, c, "get_change_destination_script", "()J");
+       CHECK(calls->get_change_destination_script_meth != NULL);
 
-static inline struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){
-       return CVec_MonitorUpdateIdZ_clone(&owner->b);
+       LDKChangeDestinationSource ret = {
+               .this_arg = (void*) calls,
+               .get_change_destination_script = get_change_destination_script_LDKChangeDestinationSource_jcall,
+               .free = LDKChangeDestinationSource_JCalls_free,
+       };
+       return ret;
 }
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
-       LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner);
-       LDKCVec_MonitorUpdateIdZ ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner_conv);
-       int64_tArray ret_arr = NULL;
-       ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
-       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t r = 0; r < ret_var.datalen; r++) {
-               LDKMonitorUpdateId ret_conv_17_var = ret_var.data[r];
-               int64_t ret_conv_17_ref = 0;
-               CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_17_var);
-               ret_conv_17_ref = tag_ptr(ret_conv_17_var.inner, ret_conv_17_var.is_owned);
-               ret_arr_ptr[r] = ret_conv_17_ref;
-       }
-       (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
-       FREE(ret_var.data);
-       return ret_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKChangeDestinationSource_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKChangeDestinationSource *res_ptr = MALLOC(sizeof(LDKChangeDestinationSource), "LDKChangeDestinationSource");
+       *res_ptr = LDKChangeDestinationSource_init(env, clz, o);
+       return tag_ptr(res_ptr, true);
 }
-
-static inline LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ CVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ_clone(const LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ *orig) {
-       LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone(&orig->data[i]);
-       }
-       return ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChangeDestinationSource_1get_1change_1destination_1script(JNIEnv *env, jclass clz, int64_t this_arg) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKChangeDestinationSource* this_arg_conv = (LDKChangeDestinationSource*)this_arg_ptr;
+       LDKCResult_CVec_u8ZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZNoneZ), "LDKCResult_CVec_u8ZNoneZ");
+       *ret_conv = (this_arg_conv->get_change_destination_script)(this_arg_conv->this_arg);
+       return tag_ptr(ret_conv, true);
 }
+
 typedef struct LDKKVStore_JCalls {
        atomic_size_t refcnt;
        JavaVM *vm;
@@ -16231,6 +17243,499 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KVStore_1list(JNIEnv *env,
        return tag_ptr(ret_conv, true);
 }
 
+typedef struct LDKOutputSpender_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID spend_spendable_outputs_meth;
+} LDKOutputSpender_JCalls;
+static void LDKOutputSpender_JCalls_free(void* this_arg) {
+       LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+               } else {
+                       DO_ASSERT(get_jenv_res == JNI_OK);
+               }
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+               }
+               FREE(j_calls);
+       }
+}
+LDKCResult_TransactionNoneZ spend_spendable_outputs_LDKOutputSpender_jcall(const void* this_arg, LDKCVec_SpendableOutputDescriptorZ descriptors, LDKCVec_TxOutZ outputs, LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, LDKCOption_u32Z locktime) {
+       LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       LDKCVec_SpendableOutputDescriptorZ descriptors_var = descriptors;
+       int64_tArray descriptors_arr = NULL;
+       descriptors_arr = (*env)->NewLongArray(env, descriptors_var.datalen);
+       int64_t *descriptors_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, descriptors_arr, NULL);
+       for (size_t b = 0; b < descriptors_var.datalen; b++) {
+               LDKSpendableOutputDescriptor *descriptors_conv_27_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor");
+               *descriptors_conv_27_copy = descriptors_var.data[b];
+               int64_t descriptors_conv_27_ref = tag_ptr(descriptors_conv_27_copy, true);
+               descriptors_arr_ptr[b] = descriptors_conv_27_ref;
+       }
+       (*env)->ReleasePrimitiveArrayCritical(env, descriptors_arr, descriptors_arr_ptr, 0);
+       FREE(descriptors_var.data);
+       LDKCVec_TxOutZ outputs_var = outputs;
+       int64_tArray outputs_arr = NULL;
+       outputs_arr = (*env)->NewLongArray(env, outputs_var.datalen);
+       int64_t *outputs_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, outputs_arr, NULL);
+       for (size_t h = 0; h < outputs_var.datalen; h++) {
+               LDKTxOut* outputs_conv_7_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+               *outputs_conv_7_ref = outputs_var.data[h];
+               outputs_arr_ptr[h] = tag_ptr(outputs_conv_7_ref, true);
+       }
+       (*env)->ReleasePrimitiveArrayCritical(env, outputs_arr, outputs_arr_ptr, 0);
+       FREE(outputs_var.data);
+       LDKCVec_u8Z change_destination_script_var = change_destination_script;
+       int8_tArray change_destination_script_arr = (*env)->NewByteArray(env, change_destination_script_var.datalen);
+       (*env)->SetByteArrayRegion(env, change_destination_script_arr, 0, change_destination_script_var.datalen, change_destination_script_var.data);
+       CVec_u8Z_free(change_destination_script_var);
+       int32_t feerate_sat_per_1000_weight_conv = feerate_sat_per_1000_weight;
+       LDKCOption_u32Z *locktime_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z");
+       *locktime_copy = locktime;
+       int64_t locktime_ref = tag_ptr(locktime_copy, true);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->spend_spendable_outputs_meth, descriptors_arr, outputs_arr, change_destination_script_arr, feerate_sat_per_1000_weight_conv, locktime_ref);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to spend_spendable_outputs in LDKOutputSpender from rust threw an exception.");
+       }
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+       return ret_conv;
+}
+static void LDKOutputSpender_JCalls_cloned(LDKOutputSpender* new_obj) {
+       LDKOutputSpender_JCalls *j_calls = (LDKOutputSpender_JCalls*) new_obj->this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKOutputSpender LDKOutputSpender_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKOutputSpender_JCalls *calls = MALLOC(sizeof(LDKOutputSpender_JCalls), "LDKOutputSpender_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->spend_spendable_outputs_meth = (*env)->GetMethodID(env, c, "spend_spendable_outputs", "([J[J[BIJ)J");
+       CHECK(calls->spend_spendable_outputs_meth != NULL);
+
+       LDKOutputSpender ret = {
+               .this_arg = (void*) calls,
+               .spend_spendable_outputs = spend_spendable_outputs_LDKOutputSpender_jcall,
+               .free = LDKOutputSpender_JCalls_free,
+       };
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKOutputSpender_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKOutputSpender *res_ptr = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender");
+       *res_ptr = LDKOutputSpender_init(env, clz, o);
+       return tag_ptr(res_ptr, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpender_1spend_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKOutputSpender* this_arg_conv = (LDKOutputSpender*)this_arg_ptr;
+       LDKCVec_SpendableOutputDescriptorZ descriptors_constr;
+       descriptors_constr.datalen = (*env)->GetArrayLength(env, descriptors);
+       if (descriptors_constr.datalen > 0)
+               descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
+       else
+               descriptors_constr.data = NULL;
+       int64_t* descriptors_vals = (*env)->GetLongArrayElements (env, descriptors, NULL);
+       for (size_t b = 0; b < descriptors_constr.datalen; b++) {
+               int64_t descriptors_conv_27 = descriptors_vals[b];
+               void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27);
+               CHECK_ACCESS(descriptors_conv_27_ptr);
+               LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr);
+               descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27));
+               descriptors_constr.data[b] = descriptors_conv_27_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, descriptors, descriptors_vals, 0);
+       LDKCVec_TxOutZ outputs_constr;
+       outputs_constr.datalen = (*env)->GetArrayLength(env, outputs);
+       if (outputs_constr.datalen > 0)
+               outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements");
+       else
+               outputs_constr.data = NULL;
+       int64_t* outputs_vals = (*env)->GetLongArrayElements (env, outputs, NULL);
+       for (size_t h = 0; h < outputs_constr.datalen; h++) {
+               int64_t outputs_conv_7 = outputs_vals[h];
+               void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7);
+               CHECK_ACCESS(outputs_conv_7_ptr);
+               LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr);
+               outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7));
+               outputs_constr.data[h] = outputs_conv_7_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0);
+       LDKCVec_u8Z change_destination_script_ref;
+       change_destination_script_ref.datalen = (*env)->GetArrayLength(env, change_destination_script);
+       change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, change_destination_script, 0, change_destination_script_ref.datalen, change_destination_script_ref.data);
+       void* locktime_ptr = untag_ptr(locktime);
+       CHECK_ACCESS(locktime_ptr);
+       LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr);
+       locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime));
+       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
+       *ret_conv = (this_arg_conv->spend_spendable_outputs)(this_arg_conv->this_arg, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+static inline struct LDKOutputSweeper CResult_OutputSweeperDecodeErrorZ_get_ok(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner){
+       LDKOutputSweeper ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_OutputSweeperDecodeErrorZ* owner_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(owner);
+       LDKOutputSweeper ret_var = CResult_OutputSweeperDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_OutputSweeperDecodeErrorZ_get_err(LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_OutputSweeperDecodeErrorZ* owner_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_OutputSweeperDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKBestBlock C2Tuple_BestBlockOutputSweeperZ_get_a(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner){
+       LDKBestBlock ret = owner->a;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC2Tuple_BestBlockOutputSweeperZ* owner_conv = (LDKC2Tuple_BestBlockOutputSweeperZ*)untag_ptr(owner);
+       LDKBestBlock ret_var = C2Tuple_BestBlockOutputSweeperZ_get_a(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKOutputSweeper C2Tuple_BestBlockOutputSweeperZ_get_b(LDKC2Tuple_BestBlockOutputSweeperZ *NONNULL_PTR owner){
+       LDKOutputSweeper ret = owner->b;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC2Tuple_BestBlockOutputSweeperZ* owner_conv = (LDKC2Tuple_BestBlockOutputSweeperZ*)untag_ptr(owner);
+       LDKOutputSweeper ret_var = C2Tuple_BestBlockOutputSweeperZ_get_b(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKC2Tuple_BestBlockOutputSweeperZ *CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+       return &*owner->contents.result;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(owner);
+       int64_t ret_ret = tag_ptr(CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok(owner_conv), false);
+       return ret_ret;
+}
+
+static inline struct LDKDecodeError CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* owner_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKDelayedPaymentBasepoint CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){
+       LDKDelayedPaymentBasepoint ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner);
+       LDKDelayedPaymentBasepoint ret_var = CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_DelayedPaymentBasepointDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentBasepointDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_DelayedPaymentBasepointDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKDelayedPaymentKey CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){
+       LDKDelayedPaymentKey ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner);
+       LDKDelayedPaymentKey ret_var = CResult_DelayedPaymentKeyDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_DelayedPaymentKeyDecodeErrorZ_get_err(LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_DelayedPaymentKeyDecodeErrorZ* owner_conv = (LDKCResult_DelayedPaymentKeyDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_DelayedPaymentKeyDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKHtlcBasepoint CResult_HtlcBasepointDecodeErrorZ_get_ok(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){
+       LDKHtlcBasepoint ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner);
+       LDKHtlcBasepoint ret_var = CResult_HtlcBasepointDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_HtlcBasepointDecodeErrorZ_get_err(LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_HtlcBasepointDecodeErrorZ* owner_conv = (LDKCResult_HtlcBasepointDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_HtlcBasepointDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKHtlcKey CResult_HtlcKeyDecodeErrorZ_get_ok(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){
+       LDKHtlcKey ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner);
+       LDKHtlcKey ret_var = CResult_HtlcKeyDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_HtlcKeyDecodeErrorZ_get_err(LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_HtlcKeyDecodeErrorZ* owner_conv = (LDKCResult_HtlcKeyDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_HtlcKeyDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKRevocationBasepoint CResult_RevocationBasepointDecodeErrorZ_get_ok(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){
+       LDKRevocationBasepoint ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner);
+       LDKRevocationBasepoint ret_var = CResult_RevocationBasepointDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_RevocationBasepointDecodeErrorZ_get_err(LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_RevocationBasepointDecodeErrorZ* owner_conv = (LDKCResult_RevocationBasepointDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RevocationBasepointDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKRevocationKey CResult_RevocationKeyDecodeErrorZ_get_ok(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){
+       LDKRevocationKey ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner);
+       LDKRevocationKey ret_var = CResult_RevocationKeyDecodeErrorZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_RevocationKeyDecodeErrorZ_get_err(LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return DecodeError_clone(&*owner->contents.err);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_RevocationKeyDecodeErrorZ* owner_conv = (LDKCResult_RevocationKeyDecodeErrorZ*)untag_ptr(owner);
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = CResult_RevocationKeyDecodeErrorZ_get_err(owner_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+static inline struct LDKLockedChannelMonitor CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){
+       LDKLockedChannelMonitor ret = *owner->contents.result;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner);
+       LDKLockedChannelMonitor ret_var = CResult_LockedChannelMonitorNoneZ_get_ok(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+       return *owner->contents.err;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKCResult_LockedChannelMonitorNoneZ* owner_conv = (LDKCResult_LockedChannelMonitorNoneZ*)untag_ptr(owner);
+       CResult_LockedChannelMonitorNoneZ_get_err(owner_conv);
+}
+
+static inline struct LDKOutPoint C2Tuple_OutPointChannelIdZ_get_a(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner){
+       LDKOutPoint ret = owner->a;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC2Tuple_OutPointChannelIdZ* owner_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(owner);
+       LDKOutPoint ret_var = C2Tuple_OutPointChannelIdZ_get_a(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKChannelId C2Tuple_OutPointChannelIdZ_get_b(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR owner){
+       LDKChannelId ret = owner->b;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC2Tuple_OutPointChannelIdZ* owner_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(owner);
+       LDKChannelId ret_var = C2Tuple_OutPointChannelIdZ_get_b(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline LDKCVec_C2Tuple_OutPointChannelIdZZ CVec_C2Tuple_OutPointChannelIdZZ_clone(const LDKCVec_C2Tuple_OutPointChannelIdZZ *orig) {
+       LDKCVec_C2Tuple_OutPointChannelIdZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointChannelIdZZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = C2Tuple_OutPointChannelIdZ_clone(&orig->data[i]);
+       }
+       return ret;
+}
+static inline LDKCVec_MonitorUpdateIdZ CVec_MonitorUpdateIdZ_clone(const LDKCVec_MonitorUpdateIdZ *orig) {
+       LDKCVec_MonitorUpdateIdZ ret = { .data = MALLOC(sizeof(LDKMonitorUpdateId) * orig->datalen, "LDKCVec_MonitorUpdateIdZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = MonitorUpdateId_clone(&orig->data[i]);
+       }
+       return ret;
+}
+static inline struct LDKOutPoint C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){
+       LDKOutPoint ret = owner->a;
+       ret.is_owned = false;
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1a(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner);
+       LDKOutPoint ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a(owner_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline struct LDKCVec_MonitorUpdateIdZ C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *NONNULL_PTR owner){
+       return CVec_MonitorUpdateIdZ_clone(&owner->b);
+}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1b(JNIEnv *env, jclass clz, int64_t owner) {
+       LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ* owner_conv = (LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ*)untag_ptr(owner);
+       LDKCVec_MonitorUpdateIdZ ret_var = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b(owner_conv);
+       int64_tArray ret_arr = NULL;
+       ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+       for (size_t r = 0; r < ret_var.datalen; r++) {
+               LDKMonitorUpdateId ret_conv_17_var = ret_var.data[r];
+               int64_t ret_conv_17_ref = 0;
+               CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_17_var);
+               ret_conv_17_ref = tag_ptr(ret_conv_17_var.inner, ret_conv_17_var.is_owned);
+               ret_arr_ptr[r] = ret_conv_17_ref;
+       }
+       (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+       FREE(ret_var.data);
+       return ret_arr;
+}
+
+static inline LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ CVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ_clone(const LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ *orig) {
+       LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ) * orig->datalen, "LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = C2Tuple_OutPointCVec_MonitorUpdateIdZZ_clone(&orig->data[i]);
+       }
+       return ret;
+}
 typedef struct LDKPersister_JCalls {
        atomic_size_t refcnt;
        JavaVM *vm;
@@ -16421,6 +17926,7 @@ typedef struct LDKPersist_JCalls {
        jweak o;
        jmethodID persist_new_channel_meth;
        jmethodID update_persisted_channel_meth;
+       jmethodID archive_persisted_channel_meth;
 } LDKPersist_JCalls;
 static void LDKPersist_JCalls_free(void* this_arg) {
        LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
@@ -16439,7 +17945,7 @@ static void LDKPersist_JCalls_free(void* this_arg) {
                FREE(j_calls);
        }
 }
-LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
+LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
        LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
        JNIEnv *env;
        jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -16448,10 +17954,10 @@ LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* t
        } else {
                DO_ASSERT(get_jenv_res == JNI_OK);
        }
-       LDKOutPoint channel_id_var = channel_id;
-       int64_t channel_id_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
-       channel_id_ref = tag_ptr(channel_id_var.inner, channel_id_var.is_owned);
+       LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint;
+       int64_t channel_funding_outpoint_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var);
+       channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned);
        LDKChannelMonitor data_var = *data;
        int64_t data_ref = 0;
        data_var = ChannelMonitor_clone(&data_var);
@@ -16463,7 +17969,7 @@ LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* t
        update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->persist_new_channel_meth, channel_id_ref, data_ref, update_id_ref);
+       jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->persist_new_channel_meth, channel_funding_outpoint_ref, data_ref, update_id_ref);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
                (*env)->ExceptionDescribe(env);
                (*env)->FatalError(env, "A call to persist_new_channel in LDKPersist from rust threw an exception.");
@@ -16474,7 +17980,7 @@ LDKChannelMonitorUpdateStatus persist_new_channel_LDKPersist_jcall(const void* t
        }
        return ret_conv;
 }
-LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_id, LDKChannelMonitorUpdate update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
+LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint, LDKChannelMonitorUpdate update, const LDKChannelMonitor * data, LDKMonitorUpdateId update_id) {
        LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
        JNIEnv *env;
        jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -16483,10 +17989,10 @@ LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const vo
        } else {
                DO_ASSERT(get_jenv_res == JNI_OK);
        }
-       LDKOutPoint channel_id_var = channel_id;
-       int64_t channel_id_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_var);
-       channel_id_ref = tag_ptr(channel_id_var.inner, channel_id_var.is_owned);
+       LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint;
+       int64_t channel_funding_outpoint_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var);
+       channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned);
        LDKChannelMonitorUpdate update_var = update;
        int64_t update_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_var);
@@ -16502,7 +18008,7 @@ LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const vo
        update_id_ref = tag_ptr(update_id_var.inner, update_id_var.is_owned);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->update_persisted_channel_meth, channel_id_ref, update_ref, data_ref, update_id_ref);
+       jclass ret = (*env)->CallObjectMethod(env, obj, j_calls->update_persisted_channel_meth, channel_funding_outpoint_ref, update_ref, data_ref, update_id_ref);
        if (UNLIKELY((*env)->ExceptionCheck(env))) {
                (*env)->ExceptionDescribe(env);
                (*env)->FatalError(env, "A call to update_persisted_channel in LDKPersist from rust threw an exception.");
@@ -16513,6 +18019,30 @@ LDKChannelMonitorUpdateStatus update_persisted_channel_LDKPersist_jcall(const vo
        }
        return ret_conv;
 }
+void archive_persisted_channel_LDKPersist_jcall(const void* this_arg, LDKOutPoint channel_funding_outpoint) {
+       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       LDKOutPoint channel_funding_outpoint_var = channel_funding_outpoint;
+       int64_t channel_funding_outpoint_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_var);
+       channel_funding_outpoint_ref = tag_ptr(channel_funding_outpoint_var.inner, channel_funding_outpoint_var.is_owned);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       (*env)->CallVoidMethod(env, obj, j_calls->archive_persisted_channel_meth, channel_funding_outpoint_ref);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to archive_persisted_channel in LDKPersist from rust threw an exception.");
+       }
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+}
 static void LDKPersist_JCalls_cloned(LDKPersist* new_obj) {
        LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) new_obj->this_arg;
        atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
@@ -16528,11 +18058,14 @@ static inline LDKPersist LDKPersist_init (JNIEnv *env, jclass clz, jobject o) {
        CHECK(calls->persist_new_channel_meth != NULL);
        calls->update_persisted_channel_meth = (*env)->GetMethodID(env, c, "update_persisted_channel", "(JJJJ)Lorg/ldk/enums/ChannelMonitorUpdateStatus;");
        CHECK(calls->update_persisted_channel_meth != NULL);
+       calls->archive_persisted_channel_meth = (*env)->GetMethodID(env, c, "archive_persisted_channel", "(J)V");
+       CHECK(calls->archive_persisted_channel_meth != NULL);
 
        LDKPersist ret = {
                .this_arg = (void*) calls,
                .persist_new_channel = persist_new_channel_LDKPersist_jcall,
                .update_persisted_channel = update_persisted_channel_LDKPersist_jcall,
+               .archive_persisted_channel = archive_persisted_channel_LDKPersist_jcall,
                .free = LDKPersist_JCalls_free,
        };
        return ret;
@@ -16542,15 +18075,15 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKPersist_1new(JNIEnv *env
        *res_ptr = LDKPersist_init(env, clz, o);
        return tag_ptr(res_ptr, true);
 }
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int64_t data, int64_t update_id) {
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_funding_outpoint, int64_t data, int64_t update_id) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
-       LDKOutPoint channel_id_conv;
-       channel_id_conv.inner = untag_ptr(channel_id);
-       channel_id_conv.is_owned = ptr_is_owned(channel_id);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
-       channel_id_conv = OutPoint_clone(&channel_id_conv);
+       LDKOutPoint channel_funding_outpoint_conv;
+       channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint);
+       channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv);
+       channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv);
        LDKChannelMonitor data_conv;
        data_conv.inner = untag_ptr(data);
        data_conv.is_owned = ptr_is_owned(data);
@@ -16561,19 +18094,19 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1chann
        update_id_conv.is_owned = ptr_is_owned(update_id);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv);
        update_id_conv = MonitorUpdateId_clone(&update_id_conv);
-       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_id_conv, &data_conv, update_id_conv));
+       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv, &data_conv, update_id_conv));
        return ret_conv;
 }
 
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int64_t update, int64_t data, int64_t update_id) {
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_funding_outpoint, int64_t update, int64_t data, int64_t update_id) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
        LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
-       LDKOutPoint channel_id_conv;
-       channel_id_conv.inner = untag_ptr(channel_id);
-       channel_id_conv.is_owned = ptr_is_owned(channel_id);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
-       channel_id_conv = OutPoint_clone(&channel_id_conv);
+       LDKOutPoint channel_funding_outpoint_conv;
+       channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint);
+       channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv);
+       channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv);
        LDKChannelMonitorUpdate update_conv;
        update_conv.inner = untag_ptr(update);
        update_conv.is_owned = ptr_is_owned(update);
@@ -16589,84 +18122,20 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1
        update_id_conv.is_owned = ptr_is_owned(update_id);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(update_id_conv);
        update_id_conv = MonitorUpdateId_clone(&update_id_conv);
-       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_id_conv, update_conv, &data_conv, update_id_conv));
+       jclass ret_conv = LDKChannelMonitorUpdateStatus_to_java(env, (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv, update_conv, &data_conv, update_id_conv));
        return ret_conv;
 }
 
-typedef struct LDKFutureCallback_JCalls {
-       atomic_size_t refcnt;
-       JavaVM *vm;
-       jweak o;
-       jmethodID call_meth;
-} LDKFutureCallback_JCalls;
-static void LDKFutureCallback_JCalls_free(void* this_arg) {
-       LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               JNIEnv *env;
-               jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
-               if (get_jenv_res == JNI_EDETACHED) {
-                       DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
-               } else {
-                       DO_ASSERT(get_jenv_res == JNI_OK);
-               }
-               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
-               if (get_jenv_res == JNI_EDETACHED) {
-                       DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
-               }
-               FREE(j_calls);
-       }
-}
-void call_LDKFutureCallback_jcall(const void* this_arg) {
-       LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg;
-       JNIEnv *env;
-       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
-       if (get_jenv_res == JNI_EDETACHED) {
-               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
-       } else {
-               DO_ASSERT(get_jenv_res == JNI_OK);
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       (*env)->CallVoidMethod(env, obj, j_calls->call_meth);
-       if (UNLIKELY((*env)->ExceptionCheck(env))) {
-               (*env)->ExceptionDescribe(env);
-               (*env)->FatalError(env, "A call to call in LDKFutureCallback from rust threw an exception.");
-       }
-       if (get_jenv_res == JNI_EDETACHED) {
-               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
-       }
-}
-static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) {
-       LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-}
-static inline LDKFutureCallback LDKFutureCallback_init (JNIEnv *env, jclass clz, jobject o) {
-       jclass c = (*env)->GetObjectClass(env, o);
-       CHECK(c != NULL);
-       LDKFutureCallback_JCalls *calls = MALLOC(sizeof(LDKFutureCallback_JCalls), "LDKFutureCallback_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
-       calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->call_meth = (*env)->GetMethodID(env, c, "call", "()V");
-       CHECK(calls->call_meth != NULL);
-
-       LDKFutureCallback ret = {
-               .this_arg = (void*) calls,
-               .call = call_LDKFutureCallback_jcall,
-               .free = LDKFutureCallback_JCalls_free,
-       };
-       return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKFutureCallback_1new(JNIEnv *env, jclass clz, jobject o) {
-       LDKFutureCallback *res_ptr = MALLOC(sizeof(LDKFutureCallback), "LDKFutureCallback");
-       *res_ptr = LDKFutureCallback_init(env, clz, o);
-       return tag_ptr(res_ptr, true);
-}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1call(JNIEnv *env, jclass clz, int64_t this_arg) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Persist_1archive_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_funding_outpoint) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
-       LDKFutureCallback* this_arg_conv = (LDKFutureCallback*)this_arg_ptr;
-       (this_arg_conv->call)(this_arg_conv->this_arg);
+       LDKPersist* this_arg_conv = (LDKPersist*)this_arg_ptr;
+       LDKOutPoint channel_funding_outpoint_conv;
+       channel_funding_outpoint_conv.inner = untag_ptr(channel_funding_outpoint);
+       channel_funding_outpoint_conv.is_owned = ptr_is_owned(channel_funding_outpoint);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_outpoint_conv);
+       channel_funding_outpoint_conv = OutPoint_clone(&channel_funding_outpoint_conv);
+       (this_arg_conv->archive_persisted_channel)(this_arg_conv->this_arg, channel_funding_outpoint_conv);
 }
 
 typedef struct LDKListen_JCalls {
@@ -17100,14 +18569,44 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_Confirm_1get_1relevant
        return ret_arr;
 }
 
-typedef struct LDKEventHandler_JCalls {
+static jclass LDKSpendingDelay_Relative_class = NULL;
+static jmethodID LDKSpendingDelay_Relative_meth = NULL;
+static jclass LDKSpendingDelay_Absolute_class = NULL;
+static jmethodID LDKSpendingDelay_Absolute_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSpendingDelay_init (JNIEnv *env, jclass clz) {
+       LDKSpendingDelay_Relative_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSpendingDelay$Relative"));
+       CHECK(LDKSpendingDelay_Relative_class != NULL);
+       LDKSpendingDelay_Relative_meth = (*env)->GetMethodID(env, LDKSpendingDelay_Relative_class, "<init>", "(I)V");
+       CHECK(LDKSpendingDelay_Relative_meth != NULL);
+       LDKSpendingDelay_Absolute_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSpendingDelay$Absolute"));
+       CHECK(LDKSpendingDelay_Absolute_class != NULL);
+       LDKSpendingDelay_Absolute_meth = (*env)->GetMethodID(env, LDKSpendingDelay_Absolute_class, "<init>", "(I)V");
+       CHECK(LDKSpendingDelay_Absolute_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSpendingDelay_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKSpendingDelay *obj = (LDKSpendingDelay*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKSpendingDelay_Relative: {
+                       int32_t num_blocks_conv = obj->relative.num_blocks;
+                       return (*env)->NewObject(env, LDKSpendingDelay_Relative_class, LDKSpendingDelay_Relative_meth, num_blocks_conv);
+               }
+               case LDKSpendingDelay_Absolute: {
+                       int32_t height_conv = obj->absolute.height;
+                       return (*env)->NewObject(env, LDKSpendingDelay_Absolute_class, LDKSpendingDelay_Absolute_meth, height_conv);
+               }
+               default: abort();
+       }
+}
+typedef struct LDKFutureCallback_JCalls {
        atomic_size_t refcnt;
        JavaVM *vm;
        jweak o;
-       jmethodID handle_event_meth;
-} LDKEventHandler_JCalls;
-static void LDKEventHandler_JCalls_free(void* this_arg) {
-       LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) this_arg;
+       jmethodID call_meth;
+} LDKFutureCallback_JCalls;
+static void LDKFutureCallback_JCalls_free(void* this_arg) {
+       LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg;
        if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
                JNIEnv *env;
                jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -17123,7 +18622,83 @@ static void LDKEventHandler_JCalls_free(void* this_arg) {
                FREE(j_calls);
        }
 }
-void handle_event_LDKEventHandler_jcall(const void* this_arg, LDKEvent event) {
+void call_LDKFutureCallback_jcall(const void* this_arg) {
+       LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       (*env)->CallVoidMethod(env, obj, j_calls->call_meth);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to call in LDKFutureCallback from rust threw an exception.");
+       }
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+}
+static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) {
+       LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKFutureCallback LDKFutureCallback_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKFutureCallback_JCalls *calls = MALLOC(sizeof(LDKFutureCallback_JCalls), "LDKFutureCallback_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->call_meth = (*env)->GetMethodID(env, c, "call", "()V");
+       CHECK(calls->call_meth != NULL);
+
+       LDKFutureCallback ret = {
+               .this_arg = (void*) calls,
+               .call = call_LDKFutureCallback_jcall,
+               .free = LDKFutureCallback_JCalls_free,
+       };
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKFutureCallback_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKFutureCallback *res_ptr = MALLOC(sizeof(LDKFutureCallback), "LDKFutureCallback");
+       *res_ptr = LDKFutureCallback_init(env, clz, o);
+       return tag_ptr(res_ptr, true);
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1call(JNIEnv *env, jclass clz, int64_t this_arg) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKFutureCallback* this_arg_conv = (LDKFutureCallback*)this_arg_ptr;
+       (this_arg_conv->call)(this_arg_conv->this_arg);
+}
+
+typedef struct LDKEventHandler_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID handle_event_meth;
+} LDKEventHandler_JCalls;
+static void LDKEventHandler_JCalls_free(void* this_arg) {
+       LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+               } else {
+                       DO_ASSERT(get_jenv_res == JNI_OK);
+               }
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+               }
+               FREE(j_calls);
+       }
+}
+void handle_event_LDKEventHandler_jcall(const void* this_arg, LDKEvent event) {
        LDKEventHandler_JCalls *j_calls = (LDKEventHandler_JCalls*) this_arg;
        JNIEnv *env;
        jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
@@ -17437,9 +19012,6 @@ typedef struct LDKChannelMessageHandler_JCalls {
        jmethodID handle_shutdown_meth;
        jmethodID handle_closing_signed_meth;
        jmethodID handle_stfu_meth;
-       jmethodID handle_splice_meth;
-       jmethodID handle_splice_ack_meth;
-       jmethodID handle_splice_locked_meth;
        jmethodID handle_tx_add_input_meth;
        jmethodID handle_tx_add_output_meth;
        jmethodID handle_tx_remove_input_meth;
@@ -17753,87 +19325,6 @@ void handle_stfu_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicK
                DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
        }
 }
-void handle_splice_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSplice * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
-       if (get_jenv_res == JNI_EDETACHED) {
-               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
-       } else {
-               DO_ASSERT(get_jenv_res == JNI_OK);
-       }
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKSplice msg_var = *msg;
-       int64_t msg_ref = 0;
-       msg_var = Splice_clone(&msg_var);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
-       msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       (*env)->CallVoidMethod(env, obj, j_calls->handle_splice_meth, their_node_id_arr, msg_ref);
-       if (UNLIKELY((*env)->ExceptionCheck(env))) {
-               (*env)->ExceptionDescribe(env);
-               (*env)->FatalError(env, "A call to handle_splice in LDKChannelMessageHandler from rust threw an exception.");
-       }
-       if (get_jenv_res == JNI_EDETACHED) {
-               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
-       }
-}
-void handle_splice_ack_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSpliceAck * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
-       if (get_jenv_res == JNI_EDETACHED) {
-               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
-       } else {
-               DO_ASSERT(get_jenv_res == JNI_OK);
-       }
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKSpliceAck msg_var = *msg;
-       int64_t msg_ref = 0;
-       msg_var = SpliceAck_clone(&msg_var);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
-       msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       (*env)->CallVoidMethod(env, obj, j_calls->handle_splice_ack_meth, their_node_id_arr, msg_ref);
-       if (UNLIKELY((*env)->ExceptionCheck(env))) {
-               (*env)->ExceptionDescribe(env);
-               (*env)->FatalError(env, "A call to handle_splice_ack in LDKChannelMessageHandler from rust threw an exception.");
-       }
-       if (get_jenv_res == JNI_EDETACHED) {
-               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
-       }
-}
-void handle_splice_locked_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKSpliceLocked * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
-       if (get_jenv_res == JNI_EDETACHED) {
-               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
-       } else {
-               DO_ASSERT(get_jenv_res == JNI_OK);
-       }
-       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
-       LDKSpliceLocked msg_var = *msg;
-       int64_t msg_ref = 0;
-       msg_var = SpliceLocked_clone(&msg_var);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
-       msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       (*env)->CallVoidMethod(env, obj, j_calls->handle_splice_locked_meth, their_node_id_arr, msg_ref);
-       if (UNLIKELY((*env)->ExceptionCheck(env))) {
-               (*env)->ExceptionDescribe(env);
-               (*env)->FatalError(env, "A call to handle_splice_locked in LDKChannelMessageHandler from rust threw an exception.");
-       }
-       if (get_jenv_res == JNI_EDETACHED) {
-               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
-       }
-}
 void handle_tx_add_input_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxAddInput * msg) {
        LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
        JNIEnv *env;
@@ -18538,12 +20029,6 @@ static inline LDKChannelMessageHandler LDKChannelMessageHandler_init (JNIEnv *en
        CHECK(calls->handle_closing_signed_meth != NULL);
        calls->handle_stfu_meth = (*env)->GetMethodID(env, c, "handle_stfu", "([BJ)V");
        CHECK(calls->handle_stfu_meth != NULL);
-       calls->handle_splice_meth = (*env)->GetMethodID(env, c, "handle_splice", "([BJ)V");
-       CHECK(calls->handle_splice_meth != NULL);
-       calls->handle_splice_ack_meth = (*env)->GetMethodID(env, c, "handle_splice_ack", "([BJ)V");
-       CHECK(calls->handle_splice_ack_meth != NULL);
-       calls->handle_splice_locked_meth = (*env)->GetMethodID(env, c, "handle_splice_locked", "([BJ)V");
-       CHECK(calls->handle_splice_locked_meth != NULL);
        calls->handle_tx_add_input_meth = (*env)->GetMethodID(env, c, "handle_tx_add_input", "([BJ)V");
        CHECK(calls->handle_tx_add_input_meth != NULL);
        calls->handle_tx_add_output_meth = (*env)->GetMethodID(env, c, "handle_tx_add_output", "([BJ)V");
@@ -18607,9 +20092,6 @@ static inline LDKChannelMessageHandler LDKChannelMessageHandler_init (JNIEnv *en
                .handle_shutdown = handle_shutdown_LDKChannelMessageHandler_jcall,
                .handle_closing_signed = handle_closing_signed_LDKChannelMessageHandler_jcall,
                .handle_stfu = handle_stfu_LDKChannelMessageHandler_jcall,
-               .handle_splice = handle_splice_LDKChannelMessageHandler_jcall,
-               .handle_splice_ack = handle_splice_ack_LDKChannelMessageHandler_jcall,
-               .handle_splice_locked = handle_splice_locked_LDKChannelMessageHandler_jcall,
                .handle_tx_add_input = handle_tx_add_input_LDKChannelMessageHandler_jcall,
                .handle_tx_add_output = handle_tx_add_output_LDKChannelMessageHandler_jcall,
                .handle_tx_remove_input = handle_tx_remove_input_LDKChannelMessageHandler_jcall,
@@ -18800,51 +20282,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_
        (this_arg_conv->handle_stfu)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       void* this_arg_ptr = untag_ptr(this_arg);
-       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKSplice msg_conv;
-       msg_conv.inner = untag_ptr(msg);
-       msg_conv.is_owned = ptr_is_owned(msg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_splice)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice_1ack(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       void* this_arg_ptr = untag_ptr(this_arg);
-       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKSpliceAck msg_conv;
-       msg_conv.inner = untag_ptr(msg);
-       msg_conv.is_owned = ptr_is_owned(msg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_splice_ack)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice_1locked(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       void* this_arg_ptr = untag_ptr(this_arg);
-       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg_ptr;
-       LDKPublicKey their_node_id_ref;
-       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
-       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
-       LDKSpliceLocked msg_conv;
-       msg_conv.inner = untag_ptr(msg);
-       msg_conv.is_owned = ptr_is_owned(msg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_conv);
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_splice_locked)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
-}
-
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1tx_1add_1input(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
        void* this_arg_ptr = untag_ptr(this_arg);
        if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
@@ -19357,6 +20794,89 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_OffersMessageHandler_1
        return ret_arr;
 }
 
+typedef struct LDKNodeIdLookUp_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID next_node_id_meth;
+} LDKNodeIdLookUp_JCalls;
+static void LDKNodeIdLookUp_JCalls_free(void* this_arg) {
+       LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+               } else {
+                       DO_ASSERT(get_jenv_res == JNI_OK);
+               }
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+               }
+               FREE(j_calls);
+       }
+}
+LDKPublicKey next_node_id_LDKNodeIdLookUp_jcall(const void* this_arg, uint64_t short_channel_id) {
+       LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       int64_t short_channel_id_conv = short_channel_id;
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       int8_tArray ret = (*env)->CallObjectMethod(env, obj, j_calls->next_node_id_meth, short_channel_id_conv);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to next_node_id in LDKNodeIdLookUp from rust threw an exception.");
+       }
+       LDKPublicKey ret_ref;
+       CHECK((*env)->GetArrayLength(env, ret) == 33);
+       (*env)->GetByteArrayRegion(env, ret, 0, 33, ret_ref.compressed_form);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+       return ret_ref;
+}
+static void LDKNodeIdLookUp_JCalls_cloned(LDKNodeIdLookUp* new_obj) {
+       LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) new_obj->this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKNodeIdLookUp LDKNodeIdLookUp_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKNodeIdLookUp_JCalls *calls = MALLOC(sizeof(LDKNodeIdLookUp_JCalls), "LDKNodeIdLookUp_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->next_node_id_meth = (*env)->GetMethodID(env, c, "next_node_id", "(J)[B");
+       CHECK(calls->next_node_id_meth != NULL);
+
+       LDKNodeIdLookUp ret = {
+               .this_arg = (void*) calls,
+               .next_node_id = next_node_id_LDKNodeIdLookUp_jcall,
+               .free = LDKNodeIdLookUp_JCalls_free,
+       };
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKNodeIdLookUp_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKNodeIdLookUp *res_ptr = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp");
+       *res_ptr = LDKNodeIdLookUp_init(env, clz, o);
+       return tag_ptr(res_ptr, true);
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeIdLookUp_1next_1node_1id(JNIEnv *env, jclass clz, int64_t this_arg, int64_t short_channel_id) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKNodeIdLookUp* this_arg_conv = (LDKNodeIdLookUp*)this_arg_ptr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, (this_arg_conv->next_node_id)(this_arg_conv->this_arg, short_channel_id).compressed_form);
+       return ret_arr;
+}
+
 typedef struct LDKRoutingMessageHandler_JCalls {
        atomic_size_t refcnt;
        JavaVM *vm;
@@ -21140,6 +22660,221 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1hash(JNIE
        return ret_conv;
 }
 
+typedef struct LDKSignBolt12InvoiceFn_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID sign_invoice_meth;
+} LDKSignBolt12InvoiceFn_JCalls;
+static void LDKSignBolt12InvoiceFn_JCalls_free(void* this_arg) {
+       LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+               } else {
+                       DO_ASSERT(get_jenv_res == JNI_OK);
+               }
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+               }
+               FREE(j_calls);
+       }
+}
+LDKCResult_SchnorrSignatureNoneZ sign_invoice_LDKSignBolt12InvoiceFn_jcall(const void* this_arg, const LDKUnsignedBolt12Invoice * message) {
+       LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       LDKUnsignedBolt12Invoice message_var = *message;
+       int64_t message_ref = 0;
+       message_var = UnsignedBolt12Invoice_clone(&message_var);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var);
+       message_ref = tag_ptr(message_var.inner, message_var.is_owned);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->sign_invoice_meth, message_ref);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to sign_invoice in LDKSignBolt12InvoiceFn from rust threw an exception.");
+       }
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+       return ret_conv;
+}
+static void LDKSignBolt12InvoiceFn_JCalls_cloned(LDKSignBolt12InvoiceFn* new_obj) {
+       LDKSignBolt12InvoiceFn_JCalls *j_calls = (LDKSignBolt12InvoiceFn_JCalls*) new_obj->this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKSignBolt12InvoiceFn LDKSignBolt12InvoiceFn_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKSignBolt12InvoiceFn_JCalls *calls = MALLOC(sizeof(LDKSignBolt12InvoiceFn_JCalls), "LDKSignBolt12InvoiceFn_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->sign_invoice_meth = (*env)->GetMethodID(env, c, "sign_invoice", "(J)J");
+       CHECK(calls->sign_invoice_meth != NULL);
+
+       LDKSignBolt12InvoiceFn ret = {
+               .this_arg = (void*) calls,
+               .sign_invoice = sign_invoice_LDKSignBolt12InvoiceFn_jcall,
+               .free = LDKSignBolt12InvoiceFn_JCalls_free,
+       };
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKSignBolt12InvoiceFn_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKSignBolt12InvoiceFn *res_ptr = MALLOC(sizeof(LDKSignBolt12InvoiceFn), "LDKSignBolt12InvoiceFn");
+       *res_ptr = LDKSignBolt12InvoiceFn_init(env, clz, o);
+       return tag_ptr(res_ptr, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignBolt12InvoiceFn_1sign_1invoice(JNIEnv *env, jclass clz, int64_t this_arg, int64_t message) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKSignBolt12InvoiceFn* this_arg_conv = (LDKSignBolt12InvoiceFn*)this_arg_ptr;
+       LDKUnsignedBolt12Invoice message_conv;
+       message_conv.inner = untag_ptr(message);
+       message_conv.is_owned = ptr_is_owned(message);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(message_conv);
+       message_conv.is_owned = false;
+       LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+       *ret_conv = (this_arg_conv->sign_invoice)(this_arg_conv->this_arg, &message_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+typedef struct LDKSignInvoiceRequestFn_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID sign_invoice_request_meth;
+} LDKSignInvoiceRequestFn_JCalls;
+static void LDKSignInvoiceRequestFn_JCalls_free(void* this_arg) {
+       LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+               } else {
+                       DO_ASSERT(get_jenv_res == JNI_OK);
+               }
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               if (get_jenv_res == JNI_EDETACHED) {
+                       DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+               }
+               FREE(j_calls);
+       }
+}
+LDKCResult_SchnorrSignatureNoneZ sign_invoice_request_LDKSignInvoiceRequestFn_jcall(const void* this_arg, const LDKUnsignedInvoiceRequest * message) {
+       LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) this_arg;
+       JNIEnv *env;
+       jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->AttachCurrentThread(j_calls->vm, (void**)&env, NULL) == JNI_OK);
+       } else {
+               DO_ASSERT(get_jenv_res == JNI_OK);
+       }
+       LDKUnsignedInvoiceRequest message_var = *message;
+       int64_t message_ref = 0;
+       message_var = UnsignedInvoiceRequest_clone(&message_var);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var);
+       message_ref = tag_ptr(message_var.inner, message_var.is_owned);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       uint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->sign_invoice_request_meth, message_ref);
+       if (UNLIKELY((*env)->ExceptionCheck(env))) {
+               (*env)->ExceptionDescribe(env);
+               (*env)->FatalError(env, "A call to sign_invoice_request in LDKSignInvoiceRequestFn from rust threw an exception.");
+       }
+       void* ret_ptr = untag_ptr(ret);
+       CHECK_ACCESS(ret_ptr);
+       LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr);
+       FREE(untag_ptr(ret));
+       if (get_jenv_res == JNI_EDETACHED) {
+               DO_ASSERT((*j_calls->vm)->DetachCurrentThread(j_calls->vm) == JNI_OK);
+       }
+       return ret_conv;
+}
+static void LDKSignInvoiceRequestFn_JCalls_cloned(LDKSignInvoiceRequestFn* new_obj) {
+       LDKSignInvoiceRequestFn_JCalls *j_calls = (LDKSignInvoiceRequestFn_JCalls*) new_obj->this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKSignInvoiceRequestFn LDKSignInvoiceRequestFn_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKSignInvoiceRequestFn_JCalls *calls = MALLOC(sizeof(LDKSignInvoiceRequestFn_JCalls), "LDKSignInvoiceRequestFn_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->sign_invoice_request_meth = (*env)->GetMethodID(env, c, "sign_invoice_request", "(J)J");
+       CHECK(calls->sign_invoice_request_meth != NULL);
+
+       LDKSignInvoiceRequestFn ret = {
+               .this_arg = (void*) calls,
+               .sign_invoice_request = sign_invoice_request_LDKSignInvoiceRequestFn_jcall,
+               .free = LDKSignInvoiceRequestFn_JCalls_free,
+       };
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKSignInvoiceRequestFn_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKSignInvoiceRequestFn *res_ptr = MALLOC(sizeof(LDKSignInvoiceRequestFn), "LDKSignInvoiceRequestFn");
+       *res_ptr = LDKSignInvoiceRequestFn_init(env, clz, o);
+       return tag_ptr(res_ptr, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignInvoiceRequestFn_1sign_1invoice_1request(JNIEnv *env, jclass clz, int64_t this_arg, int64_t message) {
+       void* this_arg_ptr = untag_ptr(this_arg);
+       if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+       LDKSignInvoiceRequestFn* this_arg_conv = (LDKSignInvoiceRequestFn*)this_arg_ptr;
+       LDKUnsignedInvoiceRequest message_conv;
+       message_conv.inner = untag_ptr(message);
+       message_conv.is_owned = ptr_is_owned(message);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(message_conv);
+       message_conv.is_owned = false;
+       LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+       *ret_conv = (this_arg_conv->sign_invoice_request)(this_arg_conv->this_arg, &message_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+static jclass LDKSignError_Signing_class = NULL;
+static jmethodID LDKSignError_Signing_meth = NULL;
+static jclass LDKSignError_Verification_class = NULL;
+static jmethodID LDKSignError_Verification_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSignError_init (JNIEnv *env, jclass clz) {
+       LDKSignError_Signing_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSignError$Signing"));
+       CHECK(LDKSignError_Signing_class != NULL);
+       LDKSignError_Signing_meth = (*env)->GetMethodID(env, LDKSignError_Signing_class, "<init>", "()V");
+       CHECK(LDKSignError_Signing_meth != NULL);
+       LDKSignError_Verification_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKSignError$Verification"));
+       CHECK(LDKSignError_Verification_class != NULL);
+       LDKSignError_Verification_meth = (*env)->GetMethodID(env, LDKSignError_Verification_class, "<init>", "(Lorg/ldk/enums/Secp256k1Error;)V");
+       CHECK(LDKSignError_Verification_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSignError_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKSignError *obj = (LDKSignError*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKSignError_Signing: {
+                       return (*env)->NewObject(env, LDKSignError_Signing_class, LDKSignError_Signing_meth);
+               }
+               case LDKSignError_Verification: {
+                       jclass verification_conv = LDKSecp256k1Error_to_java(env, obj->verification);
+                       return (*env)->NewObject(env, LDKSignError_Verification_class, LDKSignError_Verification_meth, verification_conv);
+               }
+               default: abort();
+       }
+}
 static jclass LDKEffectiveCapacity_ExactLiquidity_class = NULL;
 static jmethodID LDKEffectiveCapacity_ExactLiquidity_meth = NULL;
 static jclass LDKEffectiveCapacity_AdvertisedMaxHTLC_class = NULL;
@@ -21376,6 +23111,38 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Score_1write(JNIEnv *en
        return ret_arr;
 }
 
+static jclass LDKIntroductionNode_NodeId_class = NULL;
+static jmethodID LDKIntroductionNode_NodeId_meth = NULL;
+static jclass LDKIntroductionNode_DirectedShortChannelId_class = NULL;
+static jmethodID LDKIntroductionNode_DirectedShortChannelId_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKIntroductionNode_init (JNIEnv *env, jclass clz) {
+       LDKIntroductionNode_NodeId_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKIntroductionNode$NodeId"));
+       CHECK(LDKIntroductionNode_NodeId_class != NULL);
+       LDKIntroductionNode_NodeId_meth = (*env)->GetMethodID(env, LDKIntroductionNode_NodeId_class, "<init>", "([B)V");
+       CHECK(LDKIntroductionNode_NodeId_meth != NULL);
+       LDKIntroductionNode_DirectedShortChannelId_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "org/ldk/impl/bindings$LDKIntroductionNode$DirectedShortChannelId"));
+       CHECK(LDKIntroductionNode_DirectedShortChannelId_class != NULL);
+       LDKIntroductionNode_DirectedShortChannelId_meth = (*env)->GetMethodID(env, LDKIntroductionNode_DirectedShortChannelId_class, "<init>", "(Lorg/ldk/enums/Direction;J)V");
+       CHECK(LDKIntroductionNode_DirectedShortChannelId_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKIntroductionNode_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKIntroductionNode *obj = (LDKIntroductionNode*)untag_ptr(ptr);
+       switch(obj->tag) {
+               case LDKIntroductionNode_NodeId: {
+                       int8_tArray node_id_arr = (*env)->NewByteArray(env, 33);
+                       (*env)->SetByteArrayRegion(env, node_id_arr, 0, 33, obj->node_id.compressed_form);
+                       return (*env)->NewObject(env, LDKIntroductionNode_NodeId_class, LDKIntroductionNode_NodeId_meth, node_id_arr);
+               }
+               case LDKIntroductionNode_DirectedShortChannelId: {
+                       jclass _0_conv = LDKDirection_to_java(env, obj->directed_short_channel_id._0);
+                       int64_t _1_conv = obj->directed_short_channel_id._1;
+                       return (*env)->NewObject(env, LDKIntroductionNode_DirectedShortChannelId_class, LDKIntroductionNode_DirectedShortChannelId_meth, _0_conv, _1_conv);
+               }
+               default: abort();
+       }
+}
 typedef struct LDKCoinSelectionSource_JCalls {
        atomic_size_t refcnt;
        JavaVM *vm;
@@ -21920,6 +23687,24 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1new(JNIEnv
        return tag_ptr(ret_ref, true);
 }
 
+static inline uint64_t BigEndianScalar_clone_ptr(LDKBigEndianScalar *NONNULL_PTR arg) {
+       LDKBigEndianScalar* ret_ref = MALLOC(sizeof(LDKBigEndianScalar), "LDKBigEndianScalar");
+       *ret_ref = BigEndianScalar_clone(arg);
+       return tag_ptr(ret_ref, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKBigEndianScalar* arg_conv = (LDKBigEndianScalar*)untag_ptr(arg);
+       int64_t ret_conv = BigEndianScalar_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKBigEndianScalar* orig_conv = (LDKBigEndianScalar*)untag_ptr(orig);
+       LDKBigEndianScalar* ret_ref = MALLOC(sizeof(LDKBigEndianScalar), "LDKBigEndianScalar");
+       *ret_ref = BigEndianScalar_clone(orig_conv);
+       return tag_ptr(ret_ref, true);
+}
+
 static inline uint64_t Bech32Error_clone_ptr(LDKBech32Error *NONNULL_PTR arg) {
        LDKBech32Error *ret_copy = MALLOC(sizeof(LDKBech32Error), "LDKBech32Error");
        *ret_copy = Bech32Error_clone(arg);
@@ -22086,6 +23871,116 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Str_1free(JNIEnv *env, jclass
        Str_free(dummy);
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free(JNIEnv *env, jclass clz, int8_tArray _res) {
+       LDKCVec_u8Z _res_ref;
+       _res_ref.datalen = (*env)->GetArrayLength(env, _res);
+       _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, _res, 0, _res_ref.datalen, _res_ref.data);
+       CVec_u8Z_free(_res_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKRefundMaybeWithDerivedMetadataBuilder o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&o_conv);
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg) {
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* arg_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* orig_conv = (LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(orig);
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKRefund o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = Refund_clone(&o_conv);
+       LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ");
+       *ret_conv = CResult_RefundBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ");
+       *ret_conv = CResult_RefundBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_RefundBolt12SemanticErrorZ* o_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_RefundBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_RefundBolt12SemanticErrorZ _res_conv = *(LDKCResult_RefundBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_RefundBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_RefundBolt12SemanticErrorZ_clone_ptr(LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR arg) {
+       LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ");
+       *ret_conv = CResult_RefundBolt12SemanticErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_RefundBolt12SemanticErrorZ* arg_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_RefundBolt12SemanticErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_RefundBolt12SemanticErrorZ* orig_conv = (LDKCResult_RefundBolt12SemanticErrorZ*)untag_ptr(orig);
+       LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ");
+       *ret_conv = CResult_RefundBolt12SemanticErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1u64Z_1some(JNIEnv *env, jclass clz, int64_t o) {
        LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
        *ret_copy = COption_u64Z_some(o);
@@ -22392,14 +24287,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ThirtyTwoBytesZ_1c
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free(JNIEnv *env, jclass clz, int8_tArray _res) {
-       LDKCVec_u8Z _res_ref;
-       _res_ref.datalen = (*env)->GetArrayLength(env, _res);
-       _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes");
-       (*env)->GetByteArrayRegion(env, _res, 0, _res_ref.datalen, _res_ref.data);
-       CVec_u8Z_free(_res_ref);
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1u8ZZ_1some(JNIEnv *env, jclass clz, int8_tArray o) {
        LDKCVec_u8Z o_ref;
        o_ref.datalen = (*env)->GetArrayLength(env, o);
@@ -22608,6 +24495,156 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RecipientOnionFiel
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKUnsignedBolt12Invoice o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = UnsignedBolt12Invoice_clone(&o_conv);
+       LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ");
+       *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ");
+       *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* o_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ _res_conv = *(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg) {
+       LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ");
+       *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* arg_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* orig_conv = (LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(orig);
+       LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ");
+       *ret_conv = CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKBolt12Invoice o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = Bolt12Invoice_clone(&o_conv);
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
+       *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
+       *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* o_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ _res_conv = *(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR arg) {
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
+       *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* arg_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* orig_conv = (LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ*)untag_ptr(orig);
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
+       *ret_conv = CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
+       LDKSchnorrSignature o_ref;
+       CHECK((*env)->GetArrayLength(env, o) == 64);
+       (*env)->GetByteArrayRegion(env, o, 0, 64, o_ref.compact_form);
+       LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+       *ret_conv = CResult_SchnorrSignatureNoneZ_ok(o_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1err(JNIEnv *env, jclass clz) {
+       LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+       *ret_conv = CResult_SchnorrSignatureNoneZ_err();
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_SchnorrSignatureNoneZ* o_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_SchnorrSignatureNoneZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_SchnorrSignatureNoneZ _res_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_SchnorrSignatureNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg) {
+       LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+       *ret_conv = CResult_SchnorrSignatureNoneZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_SchnorrSignatureNoneZ* arg_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_SchnorrSignatureNoneZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_SchnorrSignatureNoneZ* orig_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(orig);
+       LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
+       *ret_conv = CResult_SchnorrSignatureNoneZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ThirtyTwoBytesZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
        LDKCVec_ThirtyTwoBytesZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
@@ -22681,6 +24718,100 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1ThirtyTwoByt
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1some(JNIEnv *env, jclass clz, int64_t o) {
+       void* o_ptr = untag_ptr(o);
+       CHECK_ACCESS(o_ptr);
+       LDKAmount o_conv = *(LDKAmount*)(o_ptr);
+       o_conv = Amount_clone((LDKAmount*)untag_ptr(o));
+       LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+       *ret_copy = COption_AmountZ_some(o_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1none(JNIEnv *env, jclass clz) {
+       LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+       *ret_copy = COption_AmountZ_none();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCOption_AmountZ _res_conv = *(LDKCOption_AmountZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       COption_AmountZ_free(_res_conv);
+}
+
+static inline uint64_t COption_AmountZ_clone_ptr(LDKCOption_AmountZ *NONNULL_PTR arg) {
+       LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+       *ret_copy = COption_AmountZ_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCOption_AmountZ* arg_conv = (LDKCOption_AmountZ*)untag_ptr(arg);
+       int64_t ret_conv = COption_AmountZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCOption_AmountZ* orig_conv = (LDKCOption_AmountZ*)untag_ptr(orig);
+       LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+       *ret_copy = COption_AmountZ_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1some(JNIEnv *env, jclass clz, int64_t o) {
+       void* o_ptr = untag_ptr(o);
+       CHECK_ACCESS(o_ptr);
+       LDKQuantity o_conv = *(LDKQuantity*)(o_ptr);
+       o_conv = Quantity_clone((LDKQuantity*)untag_ptr(o));
+       LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+       *ret_copy = COption_QuantityZ_some(o_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1none(JNIEnv *env, jclass clz) {
+       LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+       *ret_copy = COption_QuantityZ_none();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCOption_QuantityZ _res_conv = *(LDKCOption_QuantityZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       COption_QuantityZ_free(_res_conv);
+}
+
+static inline uint64_t COption_QuantityZ_clone_ptr(LDKCOption_QuantityZ *NONNULL_PTR arg) {
+       LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+       *ret_copy = COption_QuantityZ_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCOption_QuantityZ* arg_conv = (LDKCOption_QuantityZ*)untag_ptr(arg);
+       int64_t ret_conv = COption_QuantityZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCOption_QuantityZ* orig_conv = (LDKCOption_QuantityZ*)untag_ptr(orig);
+       LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+       *ret_copy = COption_QuantityZ_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
        LDKThirtyTwoBytes o_ref;
        CHECK((*env)->GetArrayLength(env, o) == 32);
@@ -23318,7 +25449,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1BigEndianScalarZ_1
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
        LDKBigEndianScalar o_conv = *(LDKBigEndianScalar*)(o_ptr);
-       // WARNING: we may need a move here but no clone is available for LDKBigEndianScalar
+       o_conv = BigEndianScalar_clone((LDKBigEndianScalar*)untag_ptr(o));
        LDKCOption_BigEndianScalarZ *ret_copy = MALLOC(sizeof(LDKCOption_BigEndianScalarZ), "LDKCOption_BigEndianScalarZ");
        *ret_copy = COption_BigEndianScalarZ_some(o_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
@@ -23426,54 +25557,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RecoverableSignatu
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
-       LDKSchnorrSignature o_ref;
-       CHECK((*env)->GetArrayLength(env, o) == 64);
-       (*env)->GetByteArrayRegion(env, o, 0, 64, o_ref.compact_form);
-       LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
-       *ret_conv = CResult_SchnorrSignatureNoneZ_ok(o_ref);
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1err(JNIEnv *env, jclass clz) {
-       LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
-       *ret_conv = CResult_SchnorrSignatureNoneZ_err();
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKCResult_SchnorrSignatureNoneZ* o_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(o);
-       jboolean ret_conv = CResult_SchnorrSignatureNoneZ_is_ok(o_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if (!ptr_is_owned(_res)) return;
-       void* _res_ptr = untag_ptr(_res);
-       CHECK_ACCESS(_res_ptr);
-       LDKCResult_SchnorrSignatureNoneZ _res_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(_res_ptr);
-       FREE(untag_ptr(_res));
-       CResult_SchnorrSignatureNoneZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_SchnorrSignatureNoneZ_clone_ptr(LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR arg) {
-       LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
-       *ret_conv = CResult_SchnorrSignatureNoneZ_clone(arg);
-       return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_SchnorrSignatureNoneZ* arg_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(arg);
-       int64_t ret_conv = CResult_SchnorrSignatureNoneZ_clone_ptr(arg_conv);
-       return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_SchnorrSignatureNoneZ* orig_conv = (LDKCResult_SchnorrSignatureNoneZ*)untag_ptr(orig);
-       LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
-       *ret_conv = CResult_SchnorrSignatureNoneZ_clone(orig_conv);
-       return tag_ptr(ret_conv, true);
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
        LDKECDSASignature o_ref;
        CHECK((*env)->GetArrayLength(env, o) == 64);
@@ -23522,6 +25605,56 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNone
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
+       LDKTransaction o_ref;
+       o_ref.datalen = (*env)->GetArrayLength(env, o);
+       o_ref.data = MALLOC(o_ref.datalen, "LDKTransaction Bytes");
+       (*env)->GetByteArrayRegion(env, o, 0, o_ref.datalen, o_ref.data);
+       o_ref.data_is_owned = true;
+       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
+       *ret_conv = CResult_TransactionNoneZ_ok(o_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1err(JNIEnv *env, jclass clz) {
+       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
+       *ret_conv = CResult_TransactionNoneZ_err();
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_TransactionNoneZ* o_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_TransactionNoneZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_TransactionNoneZ _res_conv = *(LDKCResult_TransactionNoneZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_TransactionNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg) {
+       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
+       *ret_conv = CResult_TransactionNoneZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_TransactionNoneZ* arg_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_TransactionNoneZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_TransactionNoneZ* orig_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(orig);
+       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
+       *ret_conv = CResult_TransactionNoneZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1WriteableEcdsaChannelSignerDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -23982,56 +26115,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDeco
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
-       LDKTransaction o_ref;
-       o_ref.datalen = (*env)->GetArrayLength(env, o);
-       o_ref.data = MALLOC(o_ref.datalen, "LDKTransaction Bytes");
-       (*env)->GetByteArrayRegion(env, o, 0, o_ref.datalen, o_ref.data);
-       o_ref.data_is_owned = true;
-       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
-       *ret_conv = CResult_TransactionNoneZ_ok(o_ref);
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1err(JNIEnv *env, jclass clz) {
-       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
-       *ret_conv = CResult_TransactionNoneZ_err();
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKCResult_TransactionNoneZ* o_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(o);
-       jboolean ret_conv = CResult_TransactionNoneZ_is_ok(o_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if (!ptr_is_owned(_res)) return;
-       void* _res_ptr = untag_ptr(_res);
-       CHECK_ACCESS(_res_ptr);
-       LDKCResult_TransactionNoneZ _res_conv = *(LDKCResult_TransactionNoneZ*)(_res_ptr);
-       FREE(untag_ptr(_res));
-       CResult_TransactionNoneZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg) {
-       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
-       *ret_conv = CResult_TransactionNoneZ_clone(arg);
-       return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_TransactionNoneZ* arg_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(arg);
-       int64_t ret_conv = CResult_TransactionNoneZ_clone_ptr(arg_conv);
-       return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_TransactionNoneZ* orig_conv = (LDKCResult_TransactionNoneZ*)untag_ptr(orig);
-       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
-       *ret_conv = CResult_TransactionNoneZ_clone(orig_conv);
-       return tag_ptr(ret_conv, true);
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1WriteableScoreZ_1some(JNIEnv *env, jclass clz, int64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -25287,6 +27370,60 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDe
        CResult_ProbabilisticScorerDecodeErrorZ_free(_res_conv);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKBestBlock o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = BestBlock_clone(&o_conv);
+       LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ");
+       *ret_conv = CResult_BestBlockDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ");
+       *ret_conv = CResult_BestBlockDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_BestBlockDecodeErrorZ* o_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_BestBlockDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_BestBlockDecodeErrorZ _res_conv = *(LDKCResult_BestBlockDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_BestBlockDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_BestBlockDecodeErrorZ_clone_ptr(LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ");
+       *ret_conv = CResult_BestBlockDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_BestBlockDecodeErrorZ* arg_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_BestBlockDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_BestBlockDecodeErrorZ* orig_conv = (LDKCResult_BestBlockDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ");
+       *ret_conv = CResult_BestBlockDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 static inline uint64_t C2Tuple_usizeTransactionZ_clone_ptr(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR arg) {
        LDKC2Tuple_usizeTransactionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
        *ret_conv = C2Tuple_usizeTransactionZ_clone(arg);
@@ -25471,81 +27608,86 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorEventZ_1free(JNIE
        CVec_MonitorEventZ_free(_res_constr);
 }
 
-static inline uint64_t C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg) {
-       LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ");
-       *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(arg);
+static inline uint64_t C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg) {
+       LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ");
+       *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(arg);
        return tag_ptr(ret_conv, true);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* arg_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(arg);
-       int64_t ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(arg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* arg_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(arg);
+       int64_t ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr(arg_conv);
        return ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* orig_conv = (LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)untag_ptr(orig);
-       LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ");
-       *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* orig_conv = (LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)untag_ptr(orig);
+       LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ");
+       *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(orig_conv);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_tArray b, int8_tArray c) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b, int64_tArray c, int8_tArray d) {
        LDKOutPoint a_conv;
        a_conv.inner = untag_ptr(a);
        a_conv.is_owned = ptr_is_owned(a);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
        a_conv = OutPoint_clone(&a_conv);
-       LDKCVec_MonitorEventZ b_constr;
-       b_constr.datalen = (*env)->GetArrayLength(env, b);
-       if (b_constr.datalen > 0)
-               b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements");
+       LDKChannelId b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv = ChannelId_clone(&b_conv);
+       LDKCVec_MonitorEventZ c_constr;
+       c_constr.datalen = (*env)->GetArrayLength(env, c);
+       if (c_constr.datalen > 0)
+               c_constr.data = MALLOC(c_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements");
        else
-               b_constr.data = NULL;
-       int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
-       for (size_t o = 0; o < b_constr.datalen; o++) {
-               int64_t b_conv_14 = b_vals[o];
-               void* b_conv_14_ptr = untag_ptr(b_conv_14);
-               CHECK_ACCESS(b_conv_14_ptr);
-               LDKMonitorEvent b_conv_14_conv = *(LDKMonitorEvent*)(b_conv_14_ptr);
-               b_conv_14_conv = MonitorEvent_clone((LDKMonitorEvent*)untag_ptr(b_conv_14));
-               b_constr.data[o] = b_conv_14_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
-       LDKPublicKey c_ref;
-       CHECK((*env)->GetArrayLength(env, c) == 33);
-       (*env)->GetByteArrayRegion(env, c, 0, 33, c_ref.compressed_form);
-       LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ");
-       *ret_conv = C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(a_conv, b_constr, c_ref);
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+               c_constr.data = NULL;
+       int64_t* c_vals = (*env)->GetLongArrayElements (env, c, NULL);
+       for (size_t o = 0; o < c_constr.datalen; o++) {
+               int64_t c_conv_14 = c_vals[o];
+               void* c_conv_14_ptr = untag_ptr(c_conv_14);
+               CHECK_ACCESS(c_conv_14_ptr);
+               LDKMonitorEvent c_conv_14_conv = *(LDKMonitorEvent*)(c_conv_14_ptr);
+               c_conv_14_conv = MonitorEvent_clone((LDKMonitorEvent*)untag_ptr(c_conv_14));
+               c_constr.data[o] = c_conv_14_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, c, c_vals, 0);
+       LDKPublicKey d_ref;
+       CHECK((*env)->GetArrayLength(env, d) == 33);
+       (*env)->GetByteArrayRegion(env, d, 0, 33, d_ref.compressed_form);
+       LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ");
+       *ret_conv = C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(a_conv, b_conv, c_constr, d_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if (!ptr_is_owned(_res)) return;
        void* _res_ptr = untag_ptr(_res);
        CHECK_ACCESS(_res_ptr);
-       LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(_res_ptr);
+       LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(_res_ptr);
        FREE(untag_ptr(_res));
-       C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(_res_conv);
+       C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ _res_constr;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ), "LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ), "LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ Elements");
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t x = 0; x < _res_constr.datalen; x++) {
-               int64_t _res_conv_49 = _res_vals[x];
-               void* _res_conv_49_ptr = untag_ptr(_res_conv_49);
-               CHECK_ACCESS(_res_conv_49_ptr);
-               LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res_conv_49_conv = *(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ*)(_res_conv_49_ptr);
-               FREE(untag_ptr(_res_conv_49));
-               _res_constr.data[x] = _res_conv_49_conv;
+       for (size_t f = 0; f < _res_constr.datalen; f++) {
+               int64_t _res_conv_57 = _res_vals[f];
+               void* _res_conv_57_ptr = untag_ptr(_res_conv_57);
+               CHECK_ACCESS(_res_conv_57_ptr);
+               LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res_conv_57_conv = *(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ*)(_res_conv_57_ptr);
+               FREE(untag_ptr(_res_conv_57));
+               _res_constr.data[f] = _res_conv_57_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(_res_constr);
+       CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(_res_constr);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
@@ -25926,6 +28068,225 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTypeFeature
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKOfferId o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = OfferId_clone(&o_conv);
+       LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ");
+       *ret_conv = CResult_OfferIdDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ");
+       *ret_conv = CResult_OfferIdDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_OfferIdDecodeErrorZ* o_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_OfferIdDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_OfferIdDecodeErrorZ _res_conv = *(LDKCResult_OfferIdDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_OfferIdDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_OfferIdDecodeErrorZ_clone_ptr(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ");
+       *ret_conv = CResult_OfferIdDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_OfferIdDecodeErrorZ* arg_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_OfferIdDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_OfferIdDecodeErrorZ* orig_conv = (LDKCResult_OfferIdDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ");
+       *ret_conv = CResult_OfferIdDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz) {
+       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       *ret_conv = CResult_NoneBolt12SemanticErrorZ_ok();
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       *ret_conv = CResult_NoneBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_NoneBolt12SemanticErrorZ* o_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_NoneBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_NoneBolt12SemanticErrorZ _res_conv = *(LDKCResult_NoneBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_NoneBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg) {
+       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NoneBolt12SemanticErrorZ* arg_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_NoneBolt12SemanticErrorZ* orig_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(orig);
+       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKOffer o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = Offer_clone(&o_conv);
+       LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+       *ret_conv = CResult_OfferBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+       *ret_conv = CResult_OfferBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_OfferBolt12SemanticErrorZ* o_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_OfferBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_OfferBolt12SemanticErrorZ _res_conv = *(LDKCResult_OfferBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_OfferBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_OfferBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR arg) {
+       LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+       *ret_conv = CResult_OfferBolt12SemanticErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_OfferBolt12SemanticErrorZ* arg_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_OfferBolt12SemanticErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_OfferBolt12SemanticErrorZ* orig_conv = (LDKCResult_OfferBolt12SemanticErrorZ*)untag_ptr(orig);
+       LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+       *ret_conv = CResult_OfferBolt12SemanticErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKInvoiceRequestWithDerivedPayerIdBuilder o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+       
+       LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKInvoiceRequestWithExplicitPayerIdBuilder o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+       
+       LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        LDKOffer o_conv;
        o_conv.inner = untag_ptr(o);
@@ -25981,55 +28342,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseEr
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
-       LDKPublicKey o_ref;
-       CHECK((*env)->GetArrayLength(env, o) == 33);
-       (*env)->GetByteArrayRegion(env, o, 0, 33, o_ref.compressed_form);
-       LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
-       *ret_conv = CResult_PublicKeySecp256k1ErrorZ_ok(o_ref);
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
-       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
-       LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
-       *ret_conv = CResult_PublicKeySecp256k1ErrorZ_err(e_conv);
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKCResult_PublicKeySecp256k1ErrorZ* o_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(o);
-       jboolean ret_conv = CResult_PublicKeySecp256k1ErrorZ_is_ok(o_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if (!ptr_is_owned(_res)) return;
-       void* _res_ptr = untag_ptr(_res);
-       CHECK_ACCESS(_res_ptr);
-       LDKCResult_PublicKeySecp256k1ErrorZ _res_conv = *(LDKCResult_PublicKeySecp256k1ErrorZ*)(_res_ptr);
-       FREE(untag_ptr(_res));
-       CResult_PublicKeySecp256k1ErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg) {
-       LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
-       *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(arg);
-       return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_PublicKeySecp256k1ErrorZ* arg_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(arg);
-       int64_t ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg_conv);
-       return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_PublicKeySecp256k1ErrorZ* orig_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(orig);
-       LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
-       *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(orig_conv);
-       return tag_ptr(ret_conv, true);
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        LDKNodeId o_conv;
        o_conv.inner = untag_ptr(o);
@@ -26084,6 +28396,55 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
+       LDKPublicKey o_ref;
+       CHECK((*env)->GetArrayLength(env, o) == 33);
+       (*env)->GetByteArrayRegion(env, o, 0, 33, o_ref.compressed_form);
+       LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
+       *ret_conv = CResult_PublicKeySecp256k1ErrorZ_ok(o_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
+       LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
+       *ret_conv = CResult_PublicKeySecp256k1ErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_PublicKeySecp256k1ErrorZ* o_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_PublicKeySecp256k1ErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_PublicKeySecp256k1ErrorZ _res_conv = *(LDKCResult_PublicKeySecp256k1ErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_PublicKeySecp256k1ErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_PublicKeySecp256k1ErrorZ_clone_ptr(LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR arg) {
+       LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
+       *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_PublicKeySecp256k1ErrorZ* arg_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_PublicKeySecp256k1ErrorZ* orig_conv = (LDKCResult_PublicKeySecp256k1ErrorZ*)untag_ptr(orig);
+       LDKCResult_PublicKeySecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecp256k1ErrorZ), "LDKCResult_PublicKeySecp256k1ErrorZ");
+       *ret_conv = CResult_PublicKeySecp256k1ErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1NetworkUpdateZ_1some(JNIEnv *env, jclass clz, int64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -26869,6 +29230,34 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1SocketAddres
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ");
+       *ret_conv = CResult_u64ShortChannelIdErrorZ_ok(o);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKShortChannelIdError e_conv = LDKShortChannelIdError_from_java(env, e);
+       LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ");
+       *ret_conv = CResult_u64ShortChannelIdErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_u64ShortChannelIdErrorZ* o_conv = (LDKCResult_u64ShortChannelIdErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_u64ShortChannelIdErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_u64ShortChannelIdErrorZ _res_conv = *(LDKCResult_u64ShortChannelIdErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_u64ShortChannelIdErrorZ_free(_res_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        LDKPendingHTLCInfo o_conv;
        o_conv.inner = untag_ptr(o);
@@ -26885,8 +29274,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInb
        e_conv.inner = untag_ptr(e);
        e_conv.is_owned = ptr_is_owned(e);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
-       // WARNING: we need a move here but no clone is available for LDKInboundHTLCErr
-       
+       e_conv = InboundHTLCErr_clone(&e_conv);
        LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ");
        *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_err(e_conv);
        return tag_ptr(ret_conv, true);
@@ -26907,6 +29295,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboun
        CResult_PendingHTLCInfoInboundHTLCErrZ_free(_res_conv);
 }
 
+static inline uint64_t CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR arg) {
+       LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ");
+       *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_PendingHTLCInfoInboundHTLCErrZ* arg_conv = (LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_PendingHTLCInfoInboundHTLCErrZ* orig_conv = (LDKCResult_PendingHTLCInfoInboundHTLCErrZ*)untag_ptr(orig);
+       LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ");
+       *ret_conv = CResult_PendingHTLCInfoInboundHTLCErrZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1HTLCOutputInCommitmentZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
        LDKCVec_HTLCOutputInCommitmentZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
@@ -27146,6 +29552,53 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1UtxoZNoneZ_1
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1some(JNIEnv *env, jclass clz, int64_t o) {
+       void* o_ptr = untag_ptr(o);
+       CHECK_ACCESS(o_ptr);
+       LDKPaymentContext o_conv = *(LDKPaymentContext*)(o_ptr);
+       o_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(o));
+       LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ");
+       *ret_copy = COption_PaymentContextZ_some(o_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1none(JNIEnv *env, jclass clz) {
+       LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ");
+       *ret_copy = COption_PaymentContextZ_none();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCOption_PaymentContextZ _res_conv = *(LDKCOption_PaymentContextZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       COption_PaymentContextZ_free(_res_conv);
+}
+
+static inline uint64_t COption_PaymentContextZ_clone_ptr(LDKCOption_PaymentContextZ *NONNULL_PTR arg) {
+       LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ");
+       *ret_copy = COption_PaymentContextZ_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCOption_PaymentContextZ* arg_conv = (LDKCOption_PaymentContextZ*)untag_ptr(arg);
+       int64_t ret_conv = COption_PaymentContextZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCOption_PaymentContextZ* orig_conv = (LDKCOption_PaymentContextZ*)untag_ptr(orig);
+       LDKCOption_PaymentContextZ *ret_copy = MALLOC(sizeof(LDKCOption_PaymentContextZ), "LDKCOption_PaymentContextZ");
+       *ret_copy = COption_PaymentContextZ_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 static inline uint64_t C2Tuple_u64u16Z_clone_ptr(LDKC2Tuple_u64u16Z *NONNULL_PTR arg) {
        LDKC2Tuple_u64u16Z* ret_conv = MALLOC(sizeof(LDKC2Tuple_u64u16Z), "LDKC2Tuple_u64u16Z");
        *ret_conv = C2Tuple_u64u16Z_clone(arg);
@@ -27270,55 +29723,57 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ChannelShutdownSta
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
-       LDKThirtyTwoBytes o_ref;
-       CHECK((*env)->GetArrayLength(env, o) == 32);
-       (*env)->GetByteArrayRegion(env, o, 0, 32, o_ref.data);
-       LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
-       *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_ok(o_ref);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKChannelId o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = ChannelId_clone(&o_conv);
+       LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ");
+       *ret_conv = CResult_ChannelIdAPIErrorZ_ok(o_conv);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        void* e_ptr = untag_ptr(e);
        CHECK_ACCESS(e_ptr);
        LDKAPIError e_conv = *(LDKAPIError*)(e_ptr);
        e_conv = APIError_clone((LDKAPIError*)untag_ptr(e));
-       LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
-       *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_err(e_conv);
+       LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ");
+       *ret_conv = CResult_ChannelIdAPIErrorZ_err(e_conv);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKCResult_ThirtyTwoBytesAPIErrorZ* o_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(o);
-       jboolean ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o_conv);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_ChannelIdAPIErrorZ* o_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_ChannelIdAPIErrorZ_is_ok(o_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if (!ptr_is_owned(_res)) return;
        void* _res_ptr = untag_ptr(_res);
        CHECK_ACCESS(_res_ptr);
-       LDKCResult_ThirtyTwoBytesAPIErrorZ _res_conv = *(LDKCResult_ThirtyTwoBytesAPIErrorZ*)(_res_ptr);
+       LDKCResult_ChannelIdAPIErrorZ _res_conv = *(LDKCResult_ChannelIdAPIErrorZ*)(_res_ptr);
        FREE(untag_ptr(_res));
-       CResult_ThirtyTwoBytesAPIErrorZ_free(_res_conv);
+       CResult_ChannelIdAPIErrorZ_free(_res_conv);
 }
 
-static inline uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg) {
-       LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
-       *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(arg);
+static inline uint64_t CResult_ChannelIdAPIErrorZ_clone_ptr(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR arg) {
+       LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ");
+       *ret_conv = CResult_ChannelIdAPIErrorZ_clone(arg);
        return tag_ptr(ret_conv, true);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ThirtyTwoBytesAPIErrorZ* arg_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(arg);
-       int64_t ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelIdAPIErrorZ* arg_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_ChannelIdAPIErrorZ_clone_ptr(arg_conv);
        return ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_ThirtyTwoBytesAPIErrorZ* orig_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(orig);
-       LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
-       *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ChannelIdAPIErrorZ* orig_conv = (LDKCResult_ChannelIdAPIErrorZ*)untag_ptr(orig);
+       LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ");
+       *ret_conv = CResult_ChannelIdAPIErrorZ_clone(orig_conv);
        return tag_ptr(ret_conv, true);
 }
 
@@ -27715,63 +30170,136 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1Thi
        return tag_ptr(ret_conv, true);
 }
 
-static inline uint64_t C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ *NONNULL_PTR arg) {
-       LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ");
-       *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(arg);
+static inline uint64_t C2Tuple_ChannelIdPublicKeyZ_clone_ptr(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR arg) {
+       LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ");
+       *ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone(arg);
        return tag_ptr(ret_conv, true);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* arg_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(arg);
-       int64_t ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr(arg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKC2Tuple_ChannelIdPublicKeyZ* arg_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(arg);
+       int64_t ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone_ptr(arg_conv);
        return ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* orig_conv = (LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(orig);
-       LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ");
-       *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKC2Tuple_ChannelIdPublicKeyZ* orig_conv = (LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(orig);
+       LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ");
+       *ret_conv = C2Tuple_ChannelIdPublicKeyZ_clone(orig_conv);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int8_tArray b) {
-       LDKThirtyTwoBytes a_ref;
-       CHECK((*env)->GetArrayLength(env, a) == 32);
-       (*env)->GetByteArrayRegion(env, a, 0, 32, a_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
+       LDKChannelId a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv = ChannelId_clone(&a_conv);
        LDKPublicKey b_ref;
        CHECK((*env)->GetArrayLength(env, b) == 33);
        (*env)->GetByteArrayRegion(env, b, 0, 33, b_ref.compressed_form);
-       LDKC2Tuple_ThirtyTwoBytesPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKC2Tuple_ThirtyTwoBytesPublicKeyZ");
-       *ret_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_new(a_ref, b_ref);
+       LDKC2Tuple_ChannelIdPublicKeyZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKC2Tuple_ChannelIdPublicKeyZ");
+       *ret_conv = C2Tuple_ChannelIdPublicKeyZ_new(a_conv, b_ref);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if (!ptr_is_owned(_res)) return;
        void* _res_ptr = untag_ptr(_res);
        CHECK_ACCESS(_res_ptr);
-       LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(_res_ptr);
+       LDKC2Tuple_ChannelIdPublicKeyZ _res_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(_res_ptr);
        FREE(untag_ptr(_res));
-       C2Tuple_ThirtyTwoBytesPublicKeyZ_free(_res_conv);
+       C2Tuple_ChannelIdPublicKeyZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1ThirtyTwoBytesPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ _res_constr;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1ChannelIdPublicKeyZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_C2Tuple_ChannelIdPublicKeyZZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ Elements");
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t j = 0; j < _res_constr.datalen; j++) {
-               int64_t _res_conv_35 = _res_vals[j];
-               void* _res_conv_35_ptr = untag_ptr(_res_conv_35);
-               CHECK_ACCESS(_res_conv_35_ptr);
-               LDKC2Tuple_ThirtyTwoBytesPublicKeyZ _res_conv_35_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(_res_conv_35_ptr);
-               FREE(untag_ptr(_res_conv_35));
-               _res_constr.data[j] = _res_conv_35_conv;
+       for (size_t e = 0; e < _res_constr.datalen; e++) {
+               int64_t _res_conv_30 = _res_vals[e];
+               void* _res_conv_30_ptr = untag_ptr(_res_conv_30);
+               CHECK_ACCESS(_res_conv_30_ptr);
+               LDKC2Tuple_ChannelIdPublicKeyZ _res_conv_30_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(_res_conv_30_ptr);
+               FREE(untag_ptr(_res_conv_30));
+               _res_constr.data[e] = _res_conv_30_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+       CVec_C2Tuple_ChannelIdPublicKeyZZ_free(_res_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelIdZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_ChannelIdZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements");
+       else
+               _res_constr.data = NULL;
+       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
+       for (size_t l = 0; l < _res_constr.datalen; l++) {
+               int64_t _res_conv_11 = _res_vals[l];
+               LDKChannelId _res_conv_11_conv;
+               _res_conv_11_conv.inner = untag_ptr(_res_conv_11);
+               _res_conv_11_conv.is_owned = ptr_is_owned(_res_conv_11);
+               CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_11_conv);
+               _res_constr.data[l] = _res_conv_11_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free(_res_constr);
+       CVec_ChannelIdZ_free(_res_constr);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKOfferWithDerivedMetadataBuilder o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = OfferWithDerivedMetadataBuilder_clone(&o_conv);
+       LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR arg) {
+       LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* arg_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* orig_conv = (LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ*)untag_ptr(orig);
+       LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1StrZ_1some(JNIEnv *env, jclass clz, jstring o) {
@@ -27818,52 +30346,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1StrZ_1clone(JNIEnv
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz) {
-       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
-       *ret_conv = CResult_NoneBolt12SemanticErrorZ_ok();
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
-       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
-       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
-       *ret_conv = CResult_NoneBolt12SemanticErrorZ_err(e_conv);
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKCResult_NoneBolt12SemanticErrorZ* o_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(o);
-       jboolean ret_conv = CResult_NoneBolt12SemanticErrorZ_is_ok(o_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if (!ptr_is_owned(_res)) return;
-       void* _res_ptr = untag_ptr(_res);
-       CHECK_ACCESS(_res_ptr);
-       LDKCResult_NoneBolt12SemanticErrorZ _res_conv = *(LDKCResult_NoneBolt12SemanticErrorZ*)(_res_ptr);
-       FREE(untag_ptr(_res));
-       CResult_NoneBolt12SemanticErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_NoneBolt12SemanticErrorZ_clone_ptr(LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR arg) {
-       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
-       *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(arg);
-       return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NoneBolt12SemanticErrorZ* arg_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(arg);
-       int64_t ret_conv = CResult_NoneBolt12SemanticErrorZ_clone_ptr(arg_conv);
-       return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_NoneBolt12SemanticErrorZ* orig_conv = (LDKCResult_NoneBolt12SemanticErrorZ*)untag_ptr(orig);
-       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
-       *ret_conv = CResult_NoneBolt12SemanticErrorZ_clone(orig_conv);
-       return tag_ptr(ret_conv, true);
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -27913,6 +30395,58 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwo
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
+       LDKThirtyTwoBytes o_ref;
+       CHECK((*env)->GetArrayLength(env, o) == 32);
+       (*env)->GetByteArrayRegion(env, o, 0, 32, o_ref.data);
+       LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
+       *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_ok(o_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKAPIError e_conv = *(LDKAPIError*)(e_ptr);
+       e_conv = APIError_clone((LDKAPIError*)untag_ptr(e));
+       LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
+       *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_ThirtyTwoBytesAPIErrorZ* o_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_ThirtyTwoBytesAPIErrorZ _res_conv = *(LDKCResult_ThirtyTwoBytesAPIErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_ThirtyTwoBytesAPIErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR arg) {
+       LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
+       *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ThirtyTwoBytesAPIErrorZ* arg_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ThirtyTwoBytesAPIErrorZ* orig_conv = (LDKCResult_ThirtyTwoBytesAPIErrorZ*)untag_ptr(orig);
+       LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
+       *ret_conv = CResult_ThirtyTwoBytesAPIErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1OffersMessageZ_1some(JNIEnv *env, jclass clz, int64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -29235,25 +31769,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CommitmentTransactionZ_1
        CVec_CommitmentTransactionZ_free(_res_constr);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
-       LDKCVec_TransactionZ _res_constr;
-       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTransaction), "LDKCVec_TransactionZ Elements");
-       else
-               _res_constr.data = NULL;
-       for (size_t i = 0; i < _res_constr.datalen; i++) {
-               int8_tArray _res_conv_8 = (*env)->GetObjectArrayElement(env, _res, i);
-               LDKTransaction _res_conv_8_ref;
-               _res_conv_8_ref.datalen = (*env)->GetArrayLength(env, _res_conv_8);
-               _res_conv_8_ref.data = MALLOC(_res_conv_8_ref.datalen, "LDKTransaction Bytes");
-               (*env)->GetByteArrayRegion(env, _res_conv_8, 0, _res_conv_8_ref.datalen, _res_conv_8_ref.data);
-               _res_conv_8_ref.data_is_owned = true;
-               _res_constr.data[i] = _res_conv_8_ref;
-       }
-       CVec_TransactionZ_free(_res_constr);
-}
-
 static inline uint64_t C2Tuple_u32TxOutZ_clone_ptr(LDKC2Tuple_u32TxOutZ *NONNULL_PTR arg) {
        LDKC2Tuple_u32TxOutZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
        *ret_conv = C2Tuple_u32TxOutZ_clone(arg);
@@ -29954,64 +32469,24 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1SocketAddressZ_1cl
        return ret_ref;
 }
 
-static inline uint64_t C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ *NONNULL_PTR arg) {
-       LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ");
-       *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(arg);
-       return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* arg_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(arg);
-       int64_t ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr(arg_conv);
-       return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* orig_conv = (LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)untag_ptr(orig);
-       LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ");
-       *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_clone(orig_conv);
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
-       LDKPublicKey a_ref;
-       CHECK((*env)->GetArrayLength(env, a) == 33);
-       (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form);
-       void* b_ptr = untag_ptr(b);
-       CHECK_ACCESS(b_ptr);
-       LDKCOption_SocketAddressZ b_conv = *(LDKCOption_SocketAddressZ*)(b_ptr);
-       b_conv = COption_SocketAddressZ_clone((LDKCOption_SocketAddressZ*)untag_ptr(b));
-       LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ");
-       *ret_conv = C2Tuple_PublicKeyCOption_SocketAddressZZ_new(a_ref, b_conv);
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if (!ptr_is_owned(_res)) return;
-       void* _res_ptr = untag_ptr(_res);
-       CHECK_ACCESS(_res_ptr);
-       LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res_conv = *(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)(_res_ptr);
-       FREE(untag_ptr(_res));
-       C2Tuple_PublicKeyCOption_SocketAddressZZ_free(_res_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1PublicKeyCOption_1SocketAddressZZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ _res_constr;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PeerDetailsZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_PeerDetailsZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPeerDetails), "LDKCVec_PeerDetailsZ Elements");
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t r = 0; r < _res_constr.datalen; r++) {
-               int64_t _res_conv_43 = _res_vals[r];
-               void* _res_conv_43_ptr = untag_ptr(_res_conv_43);
-               CHECK_ACCESS(_res_conv_43_ptr);
-               LDKC2Tuple_PublicKeyCOption_SocketAddressZZ _res_conv_43_conv = *(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ*)(_res_conv_43_ptr);
-               FREE(untag_ptr(_res_conv_43));
-               _res_constr.data[r] = _res_conv_43_conv;
+       for (size_t n = 0; n < _res_constr.datalen; n++) {
+               int64_t _res_conv_13 = _res_vals[n];
+               LDKPeerDetails _res_conv_13_conv;
+               _res_conv_13_conv.inner = untag_ptr(_res_conv_13);
+               _res_conv_13_conv.is_owned = ptr_is_owned(_res_conv_13);
+               CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_13_conv);
+               _res_constr.data[n] = _res_conv_13_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free(_res_constr);
+       CVec_PeerDetailsZ_free(_res_constr);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
@@ -30453,6 +32928,108 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwo
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKUnsignedInvoiceRequest o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = UnsignedInvoiceRequest_clone(&o_conv);
+       LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
+       *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
+       *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* o_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ _res_conv = *(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg) {
+       LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
+       *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* arg_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* orig_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(orig);
+       LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
+       *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKInvoiceRequest o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = InvoiceRequest_clone(&o_conv);
+       LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_InvoiceRequestBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_InvoiceRequestBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_InvoiceRequestBolt12SemanticErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg) {
+       LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_InvoiceRequestBolt12SemanticErrorZ* arg_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_InvoiceRequestBolt12SemanticErrorZ* orig_conv = (LDKCResult_InvoiceRequestBolt12SemanticErrorZ*)untag_ptr(orig);
+       LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceRequestBolt12SemanticErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1SecretKeyZ_1some(JNIEnv *env, jclass clz, int8_tArray o) {
        LDKSecretKey o_ref;
        CHECK((*env)->GetArrayLength(env, o) == 32);
@@ -30499,6 +33076,40 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1SecretKeyZ_1clone(
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKInvoiceWithExplicitSigningPubkeyBuilder o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+       
+       LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceRequestNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        LDKVerifiedInvoiceRequest o_conv;
        o_conv.inner = untag_ptr(o);
@@ -30549,6 +33160,94 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceReq
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKInvoiceWithDerivedSigningPubkeyBuilder o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+       
+       LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_java(env, e);
+       LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ");
+       *ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKInvoiceRequestFields o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = InvoiceRequestFields_clone(&o_conv);
+       LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ");
+       *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ");
+       *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_InvoiceRequestFieldsDecodeErrorZ* o_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_InvoiceRequestFieldsDecodeErrorZ _res_conv = *(LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_InvoiceRequestFieldsDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ");
+       *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_InvoiceRequestFieldsDecodeErrorZ* arg_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_InvoiceRequestFieldsDecodeErrorZ* orig_conv = (LDKCResult_InvoiceRequestFieldsDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ");
+       *ret_conv = CResult_InvoiceRequestFieldsDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_COption_1NoneZ_1some(JNIEnv *env, jclass clz) {
        jclass ret_conv = LDKCOption_NoneZ_to_java(env, COption_NoneZ_some());
        return ret_conv;
@@ -30583,6 +33282,52 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1WitnessZ_1free(JNIEnv *e
        CVec_WitnessZ_free(_res_constr);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1some(JNIEnv *env, jclass clz, int8_tArray o) {
+       LDKECDSASignature o_ref;
+       CHECK((*env)->GetArrayLength(env, o) == 64);
+       (*env)->GetByteArrayRegion(env, o, 0, 64, o_ref.compact_form);
+       LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ");
+       *ret_copy = COption_ECDSASignatureZ_some(o_ref);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1none(JNIEnv *env, jclass clz) {
+       LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ");
+       *ret_copy = COption_ECDSASignatureZ_none();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCOption_ECDSASignatureZ _res_conv = *(LDKCOption_ECDSASignatureZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       COption_ECDSASignatureZ_free(_res_conv);
+}
+
+static inline uint64_t COption_ECDSASignatureZ_clone_ptr(LDKCOption_ECDSASignatureZ *NONNULL_PTR arg) {
+       LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ");
+       *ret_copy = COption_ECDSASignatureZ_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCOption_ECDSASignatureZ* arg_conv = (LDKCOption_ECDSASignatureZ*)untag_ptr(arg);
+       int64_t ret_conv = COption_ECDSASignatureZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCOption_ECDSASignatureZ* orig_conv = (LDKCOption_ECDSASignatureZ*)untag_ptr(orig);
+       LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ");
+       *ret_copy = COption_ECDSASignatureZ_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1i64Z_1some(JNIEnv *env, jclass clz, int64_t o) {
        LDKCOption_i64Z *ret_copy = MALLOC(sizeof(LDKCOption_i64Z), "LDKCOption_i64Z");
        *ret_copy = COption_i64Z_some(o);
@@ -34496,6 +37241,25 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownScriptInva
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
+       LDKCVec_TransactionZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTransaction), "LDKCVec_TransactionZ Elements");
+       else
+               _res_constr.data = NULL;
+       for (size_t i = 0; i < _res_constr.datalen; i++) {
+               int8_tArray _res_conv_8 = (*env)->GetObjectArrayElement(env, _res, i);
+               LDKTransaction _res_conv_8_ref;
+               _res_conv_8_ref.datalen = (*env)->GetArrayLength(env, _res_conv_8);
+               _res_conv_8_ref.data = MALLOC(_res_conv_8_ref.datalen, "LDKTransaction Bytes");
+               (*env)->GetByteArrayRegion(env, _res_conv_8, 0, _res_conv_8_ref.datalen, _res_conv_8_ref.data);
+               _res_conv_8_ref.data_is_owned = true;
+               _res_constr.data[i] = _res_conv_8_ref;
+       }
+       CVec_TransactionZ_free(_res_constr);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentPurposeDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -36008,6 +38772,60 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UntrustedStringDec
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKChannelId o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = ChannelId_clone(&o_conv);
+       LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ");
+       *ret_conv = CResult_ChannelIdDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ");
+       *ret_conv = CResult_ChannelIdDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_ChannelIdDecodeErrorZ* o_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_ChannelIdDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_ChannelIdDecodeErrorZ _res_conv = *(LDKCResult_ChannelIdDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_ChannelIdDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_ChannelIdDecodeErrorZ_clone_ptr(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ");
+       *ret_conv = CResult_ChannelIdDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelIdDecodeErrorZ* arg_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_ChannelIdDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ChannelIdDecodeErrorZ* orig_conv = (LDKCResult_ChannelIdDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ");
+       *ret_conv = CResult_ChannelIdDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 static inline uint64_t C2Tuple__u832u16Z_clone_ptr(LDKC2Tuple__u832u16Z *NONNULL_PTR arg) {
        LDKC2Tuple__u832u16Z* ret_conv = MALLOC(sizeof(LDKC2Tuple__u832u16Z), "LDKC2Tuple__u832u16Z");
        *ret_conv = C2Tuple__u832u16Z_clone(arg);
@@ -36152,6 +38970,268 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentConstraints
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       void* o_ptr = untag_ptr(o);
+       CHECK_ACCESS(o_ptr);
+       LDKPaymentContext o_conv = *(LDKPaymentContext*)(o_ptr);
+       o_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(o));
+       LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ");
+       *ret_conv = CResult_PaymentContextDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ");
+       *ret_conv = CResult_PaymentContextDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_PaymentContextDecodeErrorZ* o_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_PaymentContextDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_PaymentContextDecodeErrorZ _res_conv = *(LDKCResult_PaymentContextDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_PaymentContextDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_PaymentContextDecodeErrorZ_clone_ptr(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ");
+       *ret_conv = CResult_PaymentContextDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_PaymentContextDecodeErrorZ* arg_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_PaymentContextDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_PaymentContextDecodeErrorZ* orig_conv = (LDKCResult_PaymentContextDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ");
+       *ret_conv = CResult_PaymentContextDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKUnknownPaymentContext o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = UnknownPaymentContext_clone(&o_conv);
+       LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ");
+       *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ");
+       *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_UnknownPaymentContextDecodeErrorZ* o_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_UnknownPaymentContextDecodeErrorZ _res_conv = *(LDKCResult_UnknownPaymentContextDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_UnknownPaymentContextDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ");
+       *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UnknownPaymentContextDecodeErrorZ* arg_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_UnknownPaymentContextDecodeErrorZ* orig_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ");
+       *ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKBolt12OfferContext o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = Bolt12OfferContext_clone(&o_conv);
+       LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ");
+       *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ");
+       *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_Bolt12OfferContextDecodeErrorZ* o_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_Bolt12OfferContextDecodeErrorZ _res_conv = *(LDKCResult_Bolt12OfferContextDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_Bolt12OfferContextDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ");
+       *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_Bolt12OfferContextDecodeErrorZ* arg_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_Bolt12OfferContextDecodeErrorZ* orig_conv = (LDKCResult_Bolt12OfferContextDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ");
+       *ret_conv = CResult_Bolt12OfferContextDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKBolt12RefundContext o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = Bolt12RefundContext_clone(&o_conv);
+       LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ");
+       *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ");
+       *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_Bolt12RefundContextDecodeErrorZ* o_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_Bolt12RefundContextDecodeErrorZ _res_conv = *(LDKCResult_Bolt12RefundContextDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_Bolt12RefundContextDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ");
+       *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_Bolt12RefundContextDecodeErrorZ* arg_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_Bolt12RefundContextDecodeErrorZ* orig_conv = (LDKCResult_Bolt12RefundContextDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ");
+       *ret_conv = CResult_Bolt12RefundContextDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, jstring o) {
+       LDKStr o_conv = java_to_owned_str(env, o);
+       LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
+       *ret_conv = CResult_StrSecp256k1ErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
+       LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
+       *ret_conv = CResult_StrSecp256k1ErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_StrSecp256k1ErrorZ* o_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_StrSecp256k1ErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_StrSecp256k1ErrorZ _res_conv = *(LDKCResult_StrSecp256k1ErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_StrSecp256k1ErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_StrSecp256k1ErrorZ_clone_ptr(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR arg) {
+       LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
+       *ret_conv = CResult_StrSecp256k1ErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_StrSecp256k1ErrorZ* arg_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_StrSecp256k1ErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_StrSecp256k1ErrorZ* orig_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(orig);
+       LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
+       *ret_conv = CResult_StrSecp256k1ErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 static inline uint64_t C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR arg) {
        LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ), "LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ");
        *ret_conv = C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(arg);
@@ -36247,53 +39327,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwo
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1ok(JNIEnv *env, jclass clz, jstring o) {
-       LDKStr o_conv = java_to_owned_str(env, o);
-       LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
-       *ret_conv = CResult_StrSecp256k1ErrorZ_ok(o_conv);
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
-       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
-       LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
-       *ret_conv = CResult_StrSecp256k1ErrorZ_err(e_conv);
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKCResult_StrSecp256k1ErrorZ* o_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(o);
-       jboolean ret_conv = CResult_StrSecp256k1ErrorZ_is_ok(o_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if (!ptr_is_owned(_res)) return;
-       void* _res_ptr = untag_ptr(_res);
-       CHECK_ACCESS(_res_ptr);
-       LDKCResult_StrSecp256k1ErrorZ _res_conv = *(LDKCResult_StrSecp256k1ErrorZ*)(_res_ptr);
-       FREE(untag_ptr(_res));
-       CResult_StrSecp256k1ErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_StrSecp256k1ErrorZ_clone_ptr(LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR arg) {
-       LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
-       *ret_conv = CResult_StrSecp256k1ErrorZ_clone(arg);
-       return tag_ptr(ret_conv, true);
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_StrSecp256k1ErrorZ* arg_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(arg);
-       int64_t ret_conv = CResult_StrSecp256k1ErrorZ_clone_ptr(arg_conv);
-       return ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_StrSecp256k1ErrorZ* orig_conv = (LDKCResult_StrSecp256k1ErrorZ*)untag_ptr(orig);
-       LDKCResult_StrSecp256k1ErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_StrSecp256k1ErrorZ), "LDKCResult_StrSecp256k1ErrorZ");
-       *ret_conv = CResult_StrSecp256k1ErrorZ_clone(orig_conv);
-       return tag_ptr(ret_conv, true);
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutUtxoLookupErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -36424,6 +39457,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOni
        CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(_res_conv);
 }
 
+static inline uint64_t CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR arg) {
+       LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ");
+       *ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* arg_conv = (LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* orig_conv = (LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ*)untag_ptr(orig);
+       LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ");
+       *ret_conv = CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -36455,6 +39506,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1fre
        CResult_PeeledOnionNoneZ_free(_res_conv);
 }
 
+static inline uint64_t CResult_PeeledOnionNoneZ_clone_ptr(LDKCResult_PeeledOnionNoneZ *NONNULL_PTR arg) {
+       LDKCResult_PeeledOnionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PeeledOnionNoneZ), "LDKCResult_PeeledOnionNoneZ");
+       *ret_conv = CResult_PeeledOnionNoneZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_PeeledOnionNoneZ* arg_conv = (LDKCResult_PeeledOnionNoneZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_PeeledOnionNoneZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_PeeledOnionNoneZ* orig_conv = (LDKCResult_PeeledOnionNoneZ*)untag_ptr(orig);
+       LDKCResult_PeeledOnionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_PeeledOnionNoneZ), "LDKCResult_PeeledOnionNoneZ");
+       *ret_conv = CResult_PeeledOnionNoneZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        void* o_ptr = untag_ptr(o);
        CHECK_ACCESS(o_ptr);
@@ -36490,6 +39559,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ
        CResult_SendSuccessSendErrorZ_free(_res_conv);
 }
 
+static inline uint64_t CResult_SendSuccessSendErrorZ_clone_ptr(LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR arg) {
+       LDKCResult_SendSuccessSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SendSuccessSendErrorZ), "LDKCResult_SendSuccessSendErrorZ");
+       *ret_conv = CResult_SendSuccessSendErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_SendSuccessSendErrorZ* arg_conv = (LDKCResult_SendSuccessSendErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_SendSuccessSendErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_SendSuccessSendErrorZ* orig_conv = (LDKCResult_SendSuccessSendErrorZ*)untag_ptr(orig);
+       LDKCResult_SendSuccessSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SendSuccessSendErrorZ), "LDKCResult_SendSuccessSendErrorZ");
+       *ret_conv = CResult_SendSuccessSendErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BlindedPathNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        LDKBlindedPath o_conv;
        o_conv.inner = untag_ptr(o);
@@ -36771,6 +39858,261 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceErrorDecode
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKTrackedSpendableOutput o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv = TrackedSpendableOutput_clone(&o_conv);
+       LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ");
+       *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ");
+       *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_TrackedSpendableOutputDecodeErrorZ* o_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_TrackedSpendableOutputDecodeErrorZ _res_conv = *(LDKCResult_TrackedSpendableOutputDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_TrackedSpendableOutputDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ");
+       *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_TrackedSpendableOutputDecodeErrorZ* arg_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_TrackedSpendableOutputDecodeErrorZ* orig_conv = (LDKCResult_TrackedSpendableOutputDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ");
+       *ret_conv = CResult_TrackedSpendableOutputDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       void* o_ptr = untag_ptr(o);
+       CHECK_ACCESS(o_ptr);
+       LDKOutputSpendStatus o_conv = *(LDKOutputSpendStatus*)(o_ptr);
+       o_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(o));
+       LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ");
+       *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ");
+       *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_OutputSpendStatusDecodeErrorZ* o_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_OutputSpendStatusDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_OutputSpendStatusDecodeErrorZ _res_conv = *(LDKCResult_OutputSpendStatusDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_OutputSpendStatusDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR arg) {
+       LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ");
+       *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_OutputSpendStatusDecodeErrorZ* arg_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(arg);
+       int64_t ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_OutputSpendStatusDecodeErrorZ* orig_conv = (LDKCResult_OutputSpendStatusDecodeErrorZ*)untag_ptr(orig);
+       LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ");
+       *ret_conv = CResult_OutputSpendStatusDecodeErrorZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1some(JNIEnv *env, jclass clz, int64_t o) {
+       void* o_ptr = untag_ptr(o);
+       CHECK_ACCESS(o_ptr);
+       LDKFilter o_conv = *(LDKFilter*)(o_ptr);
+       if (o_conv.free == LDKFilter_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKFilter_JCalls_cloned(&o_conv);
+       }
+       LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ");
+       *ret_copy = COption_FilterZ_some(o_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1none(JNIEnv *env, jclass clz) {
+       LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ");
+       *ret_copy = COption_FilterZ_none();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCOption_FilterZ _res_conv = *(LDKCOption_FilterZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       COption_FilterZ_free(_res_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TrackedSpendableOutputZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_TrackedSpendableOutputZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTrackedSpendableOutput), "LDKCVec_TrackedSpendableOutputZ Elements");
+       else
+               _res_constr.data = NULL;
+       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
+       for (size_t y = 0; y < _res_constr.datalen; y++) {
+               int64_t _res_conv_24 = _res_vals[y];
+               LDKTrackedSpendableOutput _res_conv_24_conv;
+               _res_conv_24_conv.inner = untag_ptr(_res_conv_24);
+               _res_conv_24_conv.is_owned = ptr_is_owned(_res_conv_24);
+               CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_24_conv);
+               _res_constr.data[y] = _res_conv_24_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+       CVec_TrackedSpendableOutputZ_free(_res_constr);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKOutputSweeper o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       // WARNING: we need a move here but no clone is available for LDKOutputSweeper
+       
+       LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ");
+       *ret_conv = CResult_OutputSweeperDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ");
+       *ret_conv = CResult_OutputSweeperDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_OutputSweeperDecodeErrorZ* o_conv = (LDKCResult_OutputSweeperDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_OutputSweeperDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_OutputSweeperDecodeErrorZ _res_conv = *(LDKCResult_OutputSweeperDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_OutputSweeperDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKBestBlock a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv = BestBlock_clone(&a_conv);
+       LDKOutputSweeper b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       // WARNING: we need a move here but no clone is available for LDKOutputSweeper
+       
+       LDKC2Tuple_BestBlockOutputSweeperZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_BestBlockOutputSweeperZ), "LDKC2Tuple_BestBlockOutputSweeperZ");
+       *ret_conv = C2Tuple_BestBlockOutputSweeperZ_new(a_conv, b_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKC2Tuple_BestBlockOutputSweeperZ _res_conv = *(LDKC2Tuple_BestBlockOutputSweeperZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       C2Tuple_BestBlockOutputSweeperZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       void* o_ptr = untag_ptr(o);
+       CHECK_ACCESS(o_ptr);
+       LDKC2Tuple_BestBlockOutputSweeperZ o_conv = *(LDKC2Tuple_BestBlockOutputSweeperZ*)(o_ptr);
+       // WARNING: we may need a move here but no clone is available for LDKC2Tuple_BestBlockOutputSweeperZ
+       LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ");
+       *ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(o_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       void* e_ptr = untag_ptr(e);
+       CHECK_ACCESS(e_ptr);
+       LDKDecodeError e_conv = *(LDKDecodeError*)(e_ptr);
+       e_conv = DecodeError_clone((LDKDecodeError*)untag_ptr(e));
+       LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ");
+       *ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(e_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1is_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* o_conv = (LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)untag_ptr(o);
+       jboolean ret_conv = CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(_res_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        LDKDelayedPaymentBasepoint o_conv;
        o_conv.inner = untag_ptr(o);
@@ -37095,36 +40437,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecod
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1some(JNIEnv *env, jclass clz, int64_t o) {
-       void* o_ptr = untag_ptr(o);
-       CHECK_ACCESS(o_ptr);
-       LDKFilter o_conv = *(LDKFilter*)(o_ptr);
-       if (o_conv.free == LDKFilter_JCalls_free) {
-               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
-               LDKFilter_JCalls_cloned(&o_conv);
-       }
-       LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ");
-       *ret_copy = COption_FilterZ_some(o_conv);
-       int64_t ret_ref = tag_ptr(ret_copy, true);
-       return ret_ref;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1none(JNIEnv *env, jclass clz) {
-       LDKCOption_FilterZ *ret_copy = MALLOC(sizeof(LDKCOption_FilterZ), "LDKCOption_FilterZ");
-       *ret_copy = COption_FilterZ_none();
-       int64_t ret_ref = tag_ptr(ret_copy, true);
-       return ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if (!ptr_is_owned(_res)) return;
-       void* _res_ptr = untag_ptr(_res);
-       CHECK_ACCESS(_res_ptr);
-       LDKCOption_FilterZ _res_conv = *(LDKCOption_FilterZ*)(_res_ptr);
-       FREE(untag_ptr(_res));
-       COption_FilterZ_free(_res_conv);
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        LDKLockedChannelMonitor o_conv;
        o_conv.inner = untag_ptr(o);
@@ -37158,24 +40470,67 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorN
        CResult_LockedChannelMonitorNoneZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1OutPointZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_OutPointZ _res_constr;
+static inline uint64_t C2Tuple_OutPointChannelIdZ_clone_ptr(LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR arg) {
+       LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ");
+       *ret_conv = C2Tuple_OutPointChannelIdZ_clone(arg);
+       return tag_ptr(ret_conv, true);
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKC2Tuple_OutPointChannelIdZ* arg_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(arg);
+       int64_t ret_conv = C2Tuple_OutPointChannelIdZ_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKC2Tuple_OutPointChannelIdZ* orig_conv = (LDKC2Tuple_OutPointChannelIdZ*)untag_ptr(orig);
+       LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ");
+       *ret_conv = C2Tuple_OutPointChannelIdZ_clone(orig_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKOutPoint a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv = OutPoint_clone(&a_conv);
+       LDKChannelId b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv = ChannelId_clone(&b_conv);
+       LDKC2Tuple_OutPointChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ");
+       *ret_conv = C2Tuple_OutPointChannelIdZ_new(a_conv, b_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if (!ptr_is_owned(_res)) return;
+       void* _res_ptr = untag_ptr(_res);
+       CHECK_ACCESS(_res_ptr);
+       LDKC2Tuple_OutPointChannelIdZ _res_conv = *(LDKC2Tuple_OutPointChannelIdZ*)(_res_ptr);
+       FREE(untag_ptr(_res));
+       C2Tuple_OutPointChannelIdZ_free(_res_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1OutPointChannelIdZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_C2Tuple_OutPointChannelIdZZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKOutPoint), "LDKCVec_OutPointZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKCVec_C2Tuple_OutPointChannelIdZZ Elements");
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t k = 0; k < _res_constr.datalen; k++) {
-               int64_t _res_conv_10 = _res_vals[k];
-               LDKOutPoint _res_conv_10_conv;
-               _res_conv_10_conv.inner = untag_ptr(_res_conv_10);
-               _res_conv_10_conv.is_owned = ptr_is_owned(_res_conv_10);
-               CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_10_conv);
-               _res_constr.data[k] = _res_conv_10_conv;
+       for (size_t d = 0; d < _res_constr.datalen; d++) {
+               int64_t _res_conv_29 = _res_vals[d];
+               void* _res_conv_29_ptr = untag_ptr(_res_conv_29);
+               CHECK_ACCESS(_res_conv_29_ptr);
+               LDKC2Tuple_OutPointChannelIdZ _res_conv_29_conv = *(LDKC2Tuple_OutPointChannelIdZ*)(_res_conv_29_ptr);
+               FREE(untag_ptr(_res_conv_29));
+               _res_constr.data[d] = _res_conv_29_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_OutPointZ_free(_res_constr);
+       CVec_C2Tuple_OutPointChannelIdZZ_free(_res_constr);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorUpdateIdZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
@@ -37675,6 +41030,19 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimite
        return ret_arr;
 }
 
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimited_1as_1transaction(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKTransactionU16LenLimited this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKTransaction ret_var = TransactionU16LenLimited_as_transaction(&this_arg_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       Transaction_free(ret_var);
+       return ret_arr;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimited_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKTransactionU16LenLimited obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -37907,6 +41275,55 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorUpdatingPersister_1a
        return tag_ptr(ret_ret, true);
 }
 
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKShortChannelIdError* orig_conv = (LDKShortChannelIdError*)untag_ptr(orig);
+       jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_clone(orig_conv));
+       return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1block_1overflow(JNIEnv *env, jclass clz) {
+       jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_block_overflow());
+       return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1tx_1index_1overflow(JNIEnv *env, jclass clz) {
+       jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_tx_index_overflow());
+       return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1vout_1index_1overflow(JNIEnv *env, jclass clz) {
+       jclass ret_conv = LDKShortChannelIdError_to_java(env, ShortChannelIdError_vout_index_overflow());
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKShortChannelIdError* a_conv = (LDKShortChannelIdError*)untag_ptr(a);
+       LDKShortChannelIdError* b_conv = (LDKShortChannelIdError*)untag_ptr(b);
+       jboolean ret_conv = ShortChannelIdError_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_block_1from_1scid(JNIEnv *env, jclass clz, int64_t short_channel_id) {
+       int32_t ret_conv = block_from_scid(short_channel_id);
+       return ret_conv;
+}
+
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_tx_1index_1from_1scid(JNIEnv *env, jclass clz, int64_t short_channel_id) {
+       int32_t ret_conv = tx_index_from_scid(short_channel_id);
+       return ret_conv;
+}
+
+JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_vout_1from_1scid(JNIEnv *env, jclass clz, int64_t short_channel_id) {
+       int16_t ret_conv = vout_from_scid(short_channel_id);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_scid_1from_1parts(JNIEnv *env, jclass clz, int64_t block, int64_t tx_index, int64_t vout_index) {
+       LDKCResult_u64ShortChannelIdErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_u64ShortChannelIdErrorZ), "LDKCResult_u64ShortChannelIdErrorZ");
+       *ret_conv = scid_from_parts(block, tx_index, vout_index);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UntrustedString_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKUntrustedString this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -38063,53 +41480,647 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PrintableString_1new(JNIEnv
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       if (!ptr_is_owned(this_ptr)) return;
-       void* this_ptr_ptr = untag_ptr(this_ptr);
-       CHECK_ACCESS(this_ptr_ptr);
-       LDKFutureCallback this_ptr_conv = *(LDKFutureCallback*)(this_ptr_ptr);
-       FREE(untag_ptr(this_ptr));
-       FutureCallback_free(this_ptr_conv);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
-       LDKFuture this_obj_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKTrackedSpendableOutput this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
        this_obj_conv.is_owned = ptr_is_owned(this_obj);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
-       Future_free(this_obj_conv);
+       TrackedSpendableOutput_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1descriptor(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKTrackedSpendableOutput this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKSpendableOutputDescriptor *ret_copy = MALLOC(sizeof(LDKSpendableOutputDescriptor), "LDKSpendableOutputDescriptor");
+       *ret_copy = TrackedSpendableOutput_get_descriptor(&this_ptr_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1descriptor(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKTrackedSpendableOutput this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       void* val_ptr = untag_ptr(val);
+       CHECK_ACCESS(val_ptr);
+       LDKSpendableOutputDescriptor val_conv = *(LDKSpendableOutputDescriptor*)(val_ptr);
+       val_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(val));
+       TrackedSpendableOutput_set_descriptor(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKTrackedSpendableOutput this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKChannelId ret_var = TrackedSpendableOutput_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKTrackedSpendableOutput this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       TrackedSpendableOutput_set_channel_id(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1status(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKTrackedSpendableOutput this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+       *ret_copy = TrackedSpendableOutput_get_status(&this_ptr_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1status(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKTrackedSpendableOutput this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       void* val_ptr = untag_ptr(val);
+       CHECK_ACCESS(val_ptr);
+       LDKOutputSpendStatus val_conv = *(LDKOutputSpendStatus*)(val_ptr);
+       val_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(val));
+       TrackedSpendableOutput_set_status(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1new(JNIEnv *env, jclass clz, int64_t descriptor_arg, int64_t channel_id_arg, int64_t status_arg) {
+       void* descriptor_arg_ptr = untag_ptr(descriptor_arg);
+       CHECK_ACCESS(descriptor_arg_ptr);
+       LDKSpendableOutputDescriptor descriptor_arg_conv = *(LDKSpendableOutputDescriptor*)(descriptor_arg_ptr);
+       descriptor_arg_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptor_arg));
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+       void* status_arg_ptr = untag_ptr(status_arg);
+       CHECK_ACCESS(status_arg_ptr);
+       LDKOutputSpendStatus status_arg_conv = *(LDKOutputSpendStatus*)(status_arg_ptr);
+       status_arg_conv = OutputSpendStatus_clone((LDKOutputSpendStatus*)untag_ptr(status_arg));
+       LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_new(descriptor_arg_conv, channel_id_arg_conv, status_arg_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-static inline uint64_t Future_clone_ptr(LDKFuture *NONNULL_PTR arg) {
-       LDKFuture ret_var = Future_clone(arg);
+static inline uint64_t TrackedSpendableOutput_clone_ptr(LDKTrackedSpendableOutput *NONNULL_PTR arg) {
+       LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_clone(arg);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Future_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKFuture arg_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKTrackedSpendableOutput arg_conv;
        arg_conv.inner = untag_ptr(arg);
        arg_conv.is_owned = ptr_is_owned(arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
        arg_conv.is_owned = false;
-       int64_t ret_conv = Future_clone_ptr(&arg_conv);
+       int64_t ret_conv = TrackedSpendableOutput_clone_ptr(&arg_conv);
        return ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Future_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKFuture orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKTrackedSpendableOutput orig_conv;
        orig_conv.inner = untag_ptr(orig);
        orig_conv.is_owned = ptr_is_owned(orig);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
        orig_conv.is_owned = false;
-       LDKFuture ret_var = Future_clone(&orig_conv);
+       LDKTrackedSpendableOutput ret_var = TrackedSpendableOutput_clone(&orig_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKTrackedSpendableOutput a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKTrackedSpendableOutput b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = TrackedSpendableOutput_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1is_1spent_1in(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray tx) {
+       LDKTrackedSpendableOutput this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKTransaction tx_ref;
+       tx_ref.datalen = (*env)->GetArrayLength(env, tx);
+       tx_ref.data = MALLOC(tx_ref.datalen, "LDKTransaction Bytes");
+       (*env)->GetByteArrayRegion(env, tx, 0, tx_ref.datalen, tx_ref.data);
+       tx_ref.data_is_owned = true;
+       jboolean ret_conv = TrackedSpendableOutput_is_spent_in(&this_arg_conv, tx_ref);
+       return ret_conv;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKTrackedSpendableOutput obj_conv;
+       obj_conv.inner = untag_ptr(obj);
+       obj_conv.is_owned = ptr_is_owned(obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = TrackedSpendableOutput_write(&obj_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       LDKCResult_TrackedSpendableOutputDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TrackedSpendableOutputDecodeErrorZ), "LDKCResult_TrackedSpendableOutputDecodeErrorZ");
+       *ret_conv = TrackedSpendableOutput_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKOutputSpendStatus this_ptr_conv = *(LDKOutputSpendStatus*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       OutputSpendStatus_free(this_ptr_conv);
+}
+
+static inline uint64_t OutputSpendStatus_clone_ptr(LDKOutputSpendStatus *NONNULL_PTR arg) {
+       LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+       *ret_copy = OutputSpendStatus_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKOutputSpendStatus* arg_conv = (LDKOutputSpendStatus*)untag_ptr(arg);
+       int64_t ret_conv = OutputSpendStatus_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKOutputSpendStatus* orig_conv = (LDKOutputSpendStatus*)untag_ptr(orig);
+       LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+       *ret_copy = OutputSpendStatus_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1initial_1broadcast(JNIEnv *env, jclass clz, int64_t delayed_until_height) {
+       void* delayed_until_height_ptr = untag_ptr(delayed_until_height);
+       CHECK_ACCESS(delayed_until_height_ptr);
+       LDKCOption_u32Z delayed_until_height_conv = *(LDKCOption_u32Z*)(delayed_until_height_ptr);
+       delayed_until_height_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(delayed_until_height));
+       LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+       *ret_copy = OutputSpendStatus_pending_initial_broadcast(delayed_until_height_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1first_1confirmation(JNIEnv *env, jclass clz, int8_tArray first_broadcast_hash, int32_t latest_broadcast_height, int8_tArray latest_spending_tx) {
+       LDKThirtyTwoBytes first_broadcast_hash_ref;
+       CHECK((*env)->GetArrayLength(env, first_broadcast_hash) == 32);
+       (*env)->GetByteArrayRegion(env, first_broadcast_hash, 0, 32, first_broadcast_hash_ref.data);
+       LDKTransaction latest_spending_tx_ref;
+       latest_spending_tx_ref.datalen = (*env)->GetArrayLength(env, latest_spending_tx);
+       latest_spending_tx_ref.data = MALLOC(latest_spending_tx_ref.datalen, "LDKTransaction Bytes");
+       (*env)->GetByteArrayRegion(env, latest_spending_tx, 0, latest_spending_tx_ref.datalen, latest_spending_tx_ref.data);
+       latest_spending_tx_ref.data_is_owned = true;
+       LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+       *ret_copy = OutputSpendStatus_pending_first_confirmation(first_broadcast_hash_ref, latest_broadcast_height, latest_spending_tx_ref);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1threshold_1confirmations(JNIEnv *env, jclass clz, int8_tArray first_broadcast_hash, int32_t latest_broadcast_height, int8_tArray latest_spending_tx, int32_t confirmation_height, int8_tArray confirmation_hash) {
+       LDKThirtyTwoBytes first_broadcast_hash_ref;
+       CHECK((*env)->GetArrayLength(env, first_broadcast_hash) == 32);
+       (*env)->GetByteArrayRegion(env, first_broadcast_hash, 0, 32, first_broadcast_hash_ref.data);
+       LDKTransaction latest_spending_tx_ref;
+       latest_spending_tx_ref.datalen = (*env)->GetArrayLength(env, latest_spending_tx);
+       latest_spending_tx_ref.data = MALLOC(latest_spending_tx_ref.datalen, "LDKTransaction Bytes");
+       (*env)->GetByteArrayRegion(env, latest_spending_tx, 0, latest_spending_tx_ref.datalen, latest_spending_tx_ref.data);
+       latest_spending_tx_ref.data_is_owned = true;
+       LDKThirtyTwoBytes confirmation_hash_ref;
+       CHECK((*env)->GetArrayLength(env, confirmation_hash) == 32);
+       (*env)->GetByteArrayRegion(env, confirmation_hash, 0, 32, confirmation_hash_ref.data);
+       LDKOutputSpendStatus *ret_copy = MALLOC(sizeof(LDKOutputSpendStatus), "LDKOutputSpendStatus");
+       *ret_copy = OutputSpendStatus_pending_threshold_confirmations(first_broadcast_hash_ref, latest_broadcast_height, latest_spending_tx_ref, confirmation_height, confirmation_hash_ref);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKOutputSpendStatus* a_conv = (LDKOutputSpendStatus*)untag_ptr(a);
+       LDKOutputSpendStatus* b_conv = (LDKOutputSpendStatus*)untag_ptr(b);
+       jboolean ret_conv = OutputSpendStatus_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKOutputSpendStatus* obj_conv = (LDKOutputSpendStatus*)untag_ptr(obj);
+       LDKCVec_u8Z ret_var = OutputSpendStatus_write(obj_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       LDKCResult_OutputSpendStatusDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSpendStatusDecodeErrorZ), "LDKCResult_OutputSpendStatusDecodeErrorZ");
+       *ret_conv = OutputSpendStatus_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKOutputSweeper this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       OutputSweeper_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1new(JNIEnv *env, jclass clz, int64_t best_block, int64_t broadcaster, int64_t fee_estimator, int64_t chain_data_source, int64_t output_spender, int64_t change_destination_source, int64_t kv_store, int64_t logger) {
+       LDKBestBlock best_block_conv;
+       best_block_conv.inner = untag_ptr(best_block);
+       best_block_conv.is_owned = ptr_is_owned(best_block);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(best_block_conv);
+       best_block_conv = BestBlock_clone(&best_block_conv);
+       void* broadcaster_ptr = untag_ptr(broadcaster);
+       CHECK_ACCESS(broadcaster_ptr);
+       LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr);
+       if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv);
+       }
+       void* fee_estimator_ptr = untag_ptr(fee_estimator);
+       CHECK_ACCESS(fee_estimator_ptr);
+       LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr);
+       if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv);
+       }
+       void* chain_data_source_ptr = untag_ptr(chain_data_source);
+       CHECK_ACCESS(chain_data_source_ptr);
+       LDKCOption_FilterZ chain_data_source_conv = *(LDKCOption_FilterZ*)(chain_data_source_ptr);
+       // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ
+       if (chain_data_source_conv.tag == LDKCOption_FilterZ_Some) {
+               // Manually implement clone for Java trait instances
+               if (chain_data_source_conv.some.free == LDKFilter_JCalls_free) {
+                       // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+                       LDKFilter_JCalls_cloned(&chain_data_source_conv.some);
+               }
+       }
+       void* output_spender_ptr = untag_ptr(output_spender);
+       CHECK_ACCESS(output_spender_ptr);
+       LDKOutputSpender output_spender_conv = *(LDKOutputSpender*)(output_spender_ptr);
+       if (output_spender_conv.free == LDKOutputSpender_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKOutputSpender_JCalls_cloned(&output_spender_conv);
+       }
+       void* change_destination_source_ptr = untag_ptr(change_destination_source);
+       CHECK_ACCESS(change_destination_source_ptr);
+       LDKChangeDestinationSource change_destination_source_conv = *(LDKChangeDestinationSource*)(change_destination_source_ptr);
+       if (change_destination_source_conv.free == LDKChangeDestinationSource_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKChangeDestinationSource_JCalls_cloned(&change_destination_source_conv);
+       }
+       void* kv_store_ptr = untag_ptr(kv_store);
+       CHECK_ACCESS(kv_store_ptr);
+       LDKKVStore kv_store_conv = *(LDKKVStore*)(kv_store_ptr);
+       if (kv_store_conv.free == LDKKVStore_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKKVStore_JCalls_cloned(&kv_store_conv);
+       }
+       void* logger_ptr = untag_ptr(logger);
+       CHECK_ACCESS(logger_ptr);
+       LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
+       if (logger_conv.free == LDKLogger_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKLogger_JCalls_cloned(&logger_conv);
+       }
+       LDKOutputSweeper ret_var = OutputSweeper_new(best_block_conv, broadcaster_conv, fee_estimator_conv, chain_data_source_conv, output_spender_conv, change_destination_source_conv, kv_store_conv, logger_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1track_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray output_descriptors, int64_t channel_id, jboolean exclude_static_outputs, int64_t delay_until_height) {
+       LDKOutputSweeper this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKCVec_SpendableOutputDescriptorZ output_descriptors_constr;
+       output_descriptors_constr.datalen = (*env)->GetArrayLength(env, output_descriptors);
+       if (output_descriptors_constr.datalen > 0)
+               output_descriptors_constr.data = MALLOC(output_descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
+       else
+               output_descriptors_constr.data = NULL;
+       int64_t* output_descriptors_vals = (*env)->GetLongArrayElements (env, output_descriptors, NULL);
+       for (size_t b = 0; b < output_descriptors_constr.datalen; b++) {
+               int64_t output_descriptors_conv_27 = output_descriptors_vals[b];
+               void* output_descriptors_conv_27_ptr = untag_ptr(output_descriptors_conv_27);
+               CHECK_ACCESS(output_descriptors_conv_27_ptr);
+               LDKSpendableOutputDescriptor output_descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(output_descriptors_conv_27_ptr);
+               output_descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(output_descriptors_conv_27));
+               output_descriptors_constr.data[b] = output_descriptors_conv_27_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, output_descriptors, output_descriptors_vals, 0);
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv = ChannelId_clone(&channel_id_conv);
+       void* delay_until_height_ptr = untag_ptr(delay_until_height);
+       CHECK_ACCESS(delay_until_height_ptr);
+       LDKCOption_u32Z delay_until_height_conv = *(LDKCOption_u32Z*)(delay_until_height_ptr);
+       delay_until_height_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(delay_until_height));
+       LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+       *ret_conv = OutputSweeper_track_spendable_outputs(&this_arg_conv, output_descriptors_constr, channel_id_conv, exclude_static_outputs, delay_until_height_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1tracked_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKOutputSweeper this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKCVec_TrackedSpendableOutputZ ret_var = OutputSweeper_tracked_spendable_outputs(&this_arg_conv);
+       int64_tArray ret_arr = NULL;
+       ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+       for (size_t y = 0; y < ret_var.datalen; y++) {
+               LDKTrackedSpendableOutput ret_conv_24_var = ret_var.data[y];
+               int64_t ret_conv_24_ref = 0;
+               CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_24_var);
+               ret_conv_24_ref = tag_ptr(ret_conv_24_var.inner, ret_conv_24_var.is_owned);
+               ret_arr_ptr[y] = ret_conv_24_ref;
+       }
+       (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+       FREE(ret_var.data);
+       return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1current_1best_1block(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKOutputSweeper this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKBestBlock ret_var = OutputSweeper_current_best_block(&this_arg_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1as_1Listen(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKOutputSweeper this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKListen* ret_ret = MALLOC(sizeof(LDKListen), "LDKListen");
+       *ret_ret = OutputSweeper_as_Listen(&this_arg_conv);
+       return tag_ptr(ret_ret, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1as_1Confirm(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKOutputSweeper this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKConfirm* ret_ret = MALLOC(sizeof(LDKConfirm), "LDKConfirm");
+       *ret_ret = OutputSweeper_as_Confirm(&this_arg_conv);
+       return tag_ptr(ret_ret, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKSpendingDelay this_ptr_conv = *(LDKSpendingDelay*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       SpendingDelay_free(this_ptr_conv);
+}
+
+static inline uint64_t SpendingDelay_clone_ptr(LDKSpendingDelay *NONNULL_PTR arg) {
+       LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay");
+       *ret_copy = SpendingDelay_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKSpendingDelay* arg_conv = (LDKSpendingDelay*)untag_ptr(arg);
+       int64_t ret_conv = SpendingDelay_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKSpendingDelay* orig_conv = (LDKSpendingDelay*)untag_ptr(orig);
+       LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay");
+       *ret_copy = SpendingDelay_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1relative(JNIEnv *env, jclass clz, int32_t num_blocks) {
+       LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay");
+       *ret_copy = SpendingDelay_relative(num_blocks);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1absolute(JNIEnv *env, jclass clz, int32_t height) {
+       LDKSpendingDelay *ret_copy = MALLOC(sizeof(LDKSpendingDelay), "LDKSpendingDelay");
+       *ret_copy = SpendingDelay_absolute(height);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1read(JNIEnv *env, jclass clz, int8_tArray ser, int64_t arg_a, int64_t arg_b, int64_t arg_c, int64_t arg_d, int64_t arg_e, int64_t arg_f, int64_t arg_g) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       void* arg_a_ptr = untag_ptr(arg_a);
+       CHECK_ACCESS(arg_a_ptr);
+       LDKBroadcasterInterface arg_a_conv = *(LDKBroadcasterInterface*)(arg_a_ptr);
+       if (arg_a_conv.free == LDKBroadcasterInterface_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKBroadcasterInterface_JCalls_cloned(&arg_a_conv);
+       }
+       void* arg_b_ptr = untag_ptr(arg_b);
+       CHECK_ACCESS(arg_b_ptr);
+       LDKFeeEstimator arg_b_conv = *(LDKFeeEstimator*)(arg_b_ptr);
+       if (arg_b_conv.free == LDKFeeEstimator_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKFeeEstimator_JCalls_cloned(&arg_b_conv);
+       }
+       void* arg_c_ptr = untag_ptr(arg_c);
+       CHECK_ACCESS(arg_c_ptr);
+       LDKCOption_FilterZ arg_c_conv = *(LDKCOption_FilterZ*)(arg_c_ptr);
+       // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ
+       if (arg_c_conv.tag == LDKCOption_FilterZ_Some) {
+               // Manually implement clone for Java trait instances
+               if (arg_c_conv.some.free == LDKFilter_JCalls_free) {
+                       // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+                       LDKFilter_JCalls_cloned(&arg_c_conv.some);
+               }
+       }
+       void* arg_d_ptr = untag_ptr(arg_d);
+       CHECK_ACCESS(arg_d_ptr);
+       LDKOutputSpender arg_d_conv = *(LDKOutputSpender*)(arg_d_ptr);
+       if (arg_d_conv.free == LDKOutputSpender_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKOutputSpender_JCalls_cloned(&arg_d_conv);
+       }
+       void* arg_e_ptr = untag_ptr(arg_e);
+       CHECK_ACCESS(arg_e_ptr);
+       LDKChangeDestinationSource arg_e_conv = *(LDKChangeDestinationSource*)(arg_e_ptr);
+       if (arg_e_conv.free == LDKChangeDestinationSource_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKChangeDestinationSource_JCalls_cloned(&arg_e_conv);
+       }
+       void* arg_f_ptr = untag_ptr(arg_f);
+       CHECK_ACCESS(arg_f_ptr);
+       LDKKVStore arg_f_conv = *(LDKKVStore*)(arg_f_ptr);
+       if (arg_f_conv.free == LDKKVStore_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKKVStore_JCalls_cloned(&arg_f_conv);
+       }
+       void* arg_g_ptr = untag_ptr(arg_g);
+       CHECK_ACCESS(arg_g_ptr);
+       LDKLogger arg_g_conv = *(LDKLogger*)(arg_g_ptr);
+       if (arg_g_conv.free == LDKLogger_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKLogger_JCalls_cloned(&arg_g_conv);
+       }
+       LDKCResult_OutputSweeperDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutputSweeperDecodeErrorZ), "LDKCResult_OutputSweeperDecodeErrorZ");
+       *ret_conv = OutputSweeper_read(ser_ref, arg_a_conv, arg_b_conv, arg_c_conv, arg_d_conv, arg_e_conv, arg_f_conv, arg_g_conv);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1read(JNIEnv *env, jclass clz, int8_tArray ser, int64_t arg_a, int64_t arg_b, int64_t arg_c, int64_t arg_d, int64_t arg_e, int64_t arg_f, int64_t arg_g) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       void* arg_a_ptr = untag_ptr(arg_a);
+       CHECK_ACCESS(arg_a_ptr);
+       LDKBroadcasterInterface arg_a_conv = *(LDKBroadcasterInterface*)(arg_a_ptr);
+       if (arg_a_conv.free == LDKBroadcasterInterface_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKBroadcasterInterface_JCalls_cloned(&arg_a_conv);
+       }
+       void* arg_b_ptr = untag_ptr(arg_b);
+       CHECK_ACCESS(arg_b_ptr);
+       LDKFeeEstimator arg_b_conv = *(LDKFeeEstimator*)(arg_b_ptr);
+       if (arg_b_conv.free == LDKFeeEstimator_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKFeeEstimator_JCalls_cloned(&arg_b_conv);
+       }
+       void* arg_c_ptr = untag_ptr(arg_c);
+       CHECK_ACCESS(arg_c_ptr);
+       LDKCOption_FilterZ arg_c_conv = *(LDKCOption_FilterZ*)(arg_c_ptr);
+       // WARNING: we may need a move here but no clone is available for LDKCOption_FilterZ
+       if (arg_c_conv.tag == LDKCOption_FilterZ_Some) {
+               // Manually implement clone for Java trait instances
+               if (arg_c_conv.some.free == LDKFilter_JCalls_free) {
+                       // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+                       LDKFilter_JCalls_cloned(&arg_c_conv.some);
+               }
+       }
+       void* arg_d_ptr = untag_ptr(arg_d);
+       CHECK_ACCESS(arg_d_ptr);
+       LDKOutputSpender arg_d_conv = *(LDKOutputSpender*)(arg_d_ptr);
+       if (arg_d_conv.free == LDKOutputSpender_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKOutputSpender_JCalls_cloned(&arg_d_conv);
+       }
+       void* arg_e_ptr = untag_ptr(arg_e);
+       CHECK_ACCESS(arg_e_ptr);
+       LDKChangeDestinationSource arg_e_conv = *(LDKChangeDestinationSource*)(arg_e_ptr);
+       if (arg_e_conv.free == LDKChangeDestinationSource_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKChangeDestinationSource_JCalls_cloned(&arg_e_conv);
+       }
+       void* arg_f_ptr = untag_ptr(arg_f);
+       CHECK_ACCESS(arg_f_ptr);
+       LDKKVStore arg_f_conv = *(LDKKVStore*)(arg_f_ptr);
+       if (arg_f_conv.free == LDKKVStore_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKKVStore_JCalls_cloned(&arg_f_conv);
+       }
+       void* arg_g_ptr = untag_ptr(arg_g);
+       CHECK_ACCESS(arg_g_ptr);
+       LDKLogger arg_g_conv = *(LDKLogger*)(arg_g_ptr);
+       if (arg_g_conv.free == LDKLogger_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKLogger_JCalls_cloned(&arg_g_conv);
+       }
+       LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ), "LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ");
+       *ret_conv = C2Tuple_BestBlockOutputSweeperZ_read(ser_ref, arg_a_conv, arg_b_conv, arg_c_conv, arg_d_conv, arg_e_conv, arg_f_conv, arg_g_conv);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKFutureCallback this_ptr_conv = *(LDKFutureCallback*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       FutureCallback_free(this_ptr_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKFuture this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       Future_free(this_obj_conv);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1register_1callback_1fn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t callback) {
        LDKFuture this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -38131,8 +42142,8 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1wait(JNIEnv *env, jcla
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
-       this_arg_conv = Future_clone(&this_arg_conv);
-       Future_wait(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       Future_wait(&this_arg_conv);
 }
 
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Future_1wait_1timeout(JNIEnv *env, jclass clz, int64_t this_arg, int64_t max_wait) {
@@ -38140,8 +42151,8 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Future_1wait_1timeout(JNIE
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
-       this_arg_conv = Future_clone(&this_arg_conv);
-       jboolean ret_conv = Future_wait_timeout(this_arg_conv, max_wait);
+       this_arg_conv.is_owned = false;
+       jboolean ret_conv = Future_wait_timeout(&this_arg_conv, max_wait);
        return ret_conv;
 }
 
@@ -38158,8 +42169,8 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Sleeper_1from_1single_1futu
        future_conv.inner = untag_ptr(future);
        future_conv.is_owned = ptr_is_owned(future);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(future_conv);
-       future_conv = Future_clone(&future_conv);
-       LDKSleeper ret_var = Sleeper_from_single_future(future_conv);
+       future_conv.is_owned = false;
+       LDKSleeper ret_var = Sleeper_from_single_future(&future_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -38171,13 +42182,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Sleeper_1from_1two_1futures
        fut_a_conv.inner = untag_ptr(fut_a);
        fut_a_conv.is_owned = ptr_is_owned(fut_a);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(fut_a_conv);
-       fut_a_conv = Future_clone(&fut_a_conv);
+       fut_a_conv.is_owned = false;
        LDKFuture fut_b_conv;
        fut_b_conv.inner = untag_ptr(fut_b);
        fut_b_conv.is_owned = ptr_is_owned(fut_b);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(fut_b_conv);
-       fut_b_conv = Future_clone(&fut_b_conv);
-       LDKSleeper ret_var = Sleeper_from_two_futures(fut_a_conv, fut_b_conv);
+       fut_b_conv.is_owned = false;
+       LDKSleeper ret_var = Sleeper_from_two_futures(&fut_a_conv, &fut_b_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -38198,7 +42209,8 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Sleeper_1new(JNIEnv *env, j
                futures_conv_8_conv.inner = untag_ptr(futures_conv_8);
                futures_conv_8_conv.is_owned = ptr_is_owned(futures_conv_8);
                CHECK_INNER_FIELD_ACCESS_OR_NULL(futures_conv_8_conv);
-               futures_conv_8_conv = Future_clone(&futures_conv_8_conv);
+               // WARNING: we need a move here but no clone is available for LDKFuture
+               
                futures_constr.data[i] = futures_conv_8_conv;
        }
        (*env)->ReleaseLongArrayElements(env, futures, futures_vals, 0);
@@ -38339,9 +42351,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Record_1get_1channel_1id(JN
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKCOption_ThirtyTwoBytesZ *ret_copy = MALLOC(sizeof(LDKCOption_ThirtyTwoBytesZ), "LDKCOption_ThirtyTwoBytesZ");
-       *ret_copy = Record_get_channel_id(&this_ptr_conv);
-       int64_t ret_ref = tag_ptr(ret_copy, true);
+       LDKChannelId ret_var = Record_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
 
@@ -38351,10 +42364,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Record_1set_1channel_1id(JNIEn
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       void* val_ptr = untag_ptr(val);
-       CHECK_ACCESS(val_ptr);
-       LDKCOption_ThirtyTwoBytesZ val_conv = *(LDKCOption_ThirtyTwoBytesZ*)(val_ptr);
-       val_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(val));
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
        Record_set_channel_id(&this_ptr_conv, val_conv);
 }
 
@@ -38448,10 +42462,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Record_1new(JNIEnv *env, jc
        LDKPublicKey peer_id_arg_ref;
        CHECK((*env)->GetArrayLength(env, peer_id_arg) == 33);
        (*env)->GetByteArrayRegion(env, peer_id_arg, 0, 33, peer_id_arg_ref.compressed_form);
-       void* channel_id_arg_ptr = untag_ptr(channel_id_arg);
-       CHECK_ACCESS(channel_id_arg_ptr);
-       LDKCOption_ThirtyTwoBytesZ channel_id_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(channel_id_arg_ptr);
-       channel_id_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(channel_id_arg));
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKStr args_arg_conv = java_to_owned_str(env, args_arg);
        LDKStr module_path_arg_conv = java_to_owned_str(env, module_path_arg);
        LDKStr file_arg_conv = java_to_owned_str(env, file_arg);
@@ -39710,6 +43725,59 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1free(JNIEnv *env, j
        BestBlock_free(this_obj_conv);
 }
 
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1get_1block_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKBestBlock this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *BestBlock_get_block_hash(&this_ptr_conv));
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1set_1block_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKBestBlock this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKThirtyTwoBytes val_ref;
+       CHECK((*env)->GetArrayLength(env, val) == 32);
+       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+       BestBlock_set_block_hash(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1get_1height(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKBestBlock this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int32_t ret_conv = BestBlock_get_height(&this_ptr_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1set_1height(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
+       LDKBestBlock this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       BestBlock_set_height(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1new(JNIEnv *env, jclass clz, int8_tArray block_hash_arg, int32_t height_arg) {
+       LDKThirtyTwoBytes block_hash_arg_ref;
+       CHECK((*env)->GetArrayLength(env, block_hash_arg) == 32);
+       (*env)->GetByteArrayRegion(env, block_hash_arg, 0, 32, block_hash_arg_ref.data);
+       LDKBestBlock ret_var = BestBlock_new(block_hash_arg_ref, height_arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
 static inline uint64_t BestBlock_clone_ptr(LDKBestBlock *NONNULL_PTR arg) {
        LDKBestBlock ret_var = BestBlock_clone(arg);
        int64_t ret_ref = 0;
@@ -39740,6 +43808,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1clone(JNIEnv *en
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKBestBlock o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv.is_owned = false;
+       int64_t ret_conv = BestBlock_hash(&o_conv);
+       return ret_conv;
+}
+
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_BestBlock_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
        LDKBestBlock a_conv;
        a_conv.inner = untag_ptr(a);
@@ -39764,36 +43842,27 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1from_1network(JN
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1new(JNIEnv *env, jclass clz, int8_tArray block_hash, int32_t height) {
-       LDKThirtyTwoBytes block_hash_ref;
-       CHECK((*env)->GetArrayLength(env, block_hash) == 32);
-       (*env)->GetByteArrayRegion(env, block_hash, 0, 32, block_hash_ref.data);
-       LDKBestBlock ret_var = BestBlock_new(block_hash_ref, height);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1block_1hash(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKBestBlock this_arg_conv;
-       this_arg_conv.inner = untag_ptr(this_arg);
-       this_arg_conv.is_owned = ptr_is_owned(this_arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
-       this_arg_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, BestBlock_block_hash(&this_arg_conv).data);
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKBestBlock obj_conv;
+       obj_conv.inner = untag_ptr(obj);
+       obj_conv.is_owned = ptr_is_owned(obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = BestBlock_write(&obj_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
        return ret_arr;
 }
 
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1height(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKBestBlock this_arg_conv;
-       this_arg_conv.inner = untag_ptr(this_arg);
-       this_arg_conv.is_owned = ptr_is_owned(this_arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
-       this_arg_conv.is_owned = false;
-       int32_t ret_conv = BestBlock_height(&this_arg_conv);
-       return ret_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BestBlock_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       LDKCResult_BestBlockDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BestBlockDecodeErrorZ), "LDKCResult_BestBlockDecodeErrorZ");
+       *ret_conv = BestBlock_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Listen_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -40067,6 +44136,11 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1channel_
        return ret_conv;
 }
 
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1output_1spending_1fee(JNIEnv *env, jclass clz) {
+       jclass ret_conv = LDKConfirmationTarget_to_java(env, ConfirmationTarget_output_spending_fee());
+       return ret_conv;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1hash(JNIEnv *env, jclass clz, int64_t o) {
        LDKConfirmationTarget* o_conv = (LDKConfirmationTarget*)untag_ptr(o);
        int64_t ret_conv = ConfirmationTarget_hash(o_conv);
@@ -40284,16 +44358,14 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1list_1mo
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKCVec_OutPointZ ret_var = ChainMonitor_list_monitors(&this_arg_conv);
+       LDKCVec_C2Tuple_OutPointChannelIdZZ ret_var = ChainMonitor_list_monitors(&this_arg_conv);
        int64_tArray ret_arr = NULL;
        ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
        int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t k = 0; k < ret_var.datalen; k++) {
-               LDKOutPoint ret_conv_10_var = ret_var.data[k];
-               int64_t ret_conv_10_ref = 0;
-               CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_10_var);
-               ret_conv_10_ref = tag_ptr(ret_conv_10_var.inner, ret_conv_10_var.is_owned);
-               ret_arr_ptr[k] = ret_conv_10_ref;
+       for (size_t d = 0; d < ret_var.datalen; d++) {
+               LDKC2Tuple_OutPointChannelIdZ* ret_conv_29_conv = MALLOC(sizeof(LDKC2Tuple_OutPointChannelIdZ), "LDKC2Tuple_OutPointChannelIdZ");
+               *ret_conv_29_conv = ret_var.data[d];
+               ret_arr_ptr[d] = tag_ptr(ret_conv_29_conv, true);
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
@@ -40363,6 +44435,29 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1rebroadcast_1pen
        ChainMonitor_rebroadcast_pending_claims(&this_arg_conv);
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1signer_1unblocked(JNIEnv *env, jclass clz, int64_t this_arg, int64_t monitor_opt) {
+       LDKChainMonitor this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKOutPoint monitor_opt_conv;
+       monitor_opt_conv.inner = untag_ptr(monitor_opt);
+       monitor_opt_conv.is_owned = ptr_is_owned(monitor_opt);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_opt_conv);
+       monitor_opt_conv = OutPoint_clone(&monitor_opt_conv);
+       ChainMonitor_signer_unblocked(&this_arg_conv, monitor_opt_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1archive_1fully_1resolved_1channel_1monitors(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKChainMonitor this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       ChainMonitor_archive_fully_resolved_channel_monitors(&this_arg_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1as_1Listen(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKChainMonitor this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -40434,6 +44529,33 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1upd
        ChannelMonitorUpdate_set_update_id(&this_ptr_conv, val);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKChannelMonitorUpdate this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKChannelId ret_var = ChannelMonitorUpdate_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKChannelMonitorUpdate this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       ChannelMonitorUpdate_set_channel_id(&this_ptr_conv, val_conv);
+}
+
 static inline uint64_t ChannelMonitorUpdate_clone_ptr(LDKChannelMonitorUpdate *NONNULL_PTR arg) {
        LDKChannelMonitorUpdate ret_var = ChannelMonitorUpdate_clone(arg);
        int64_t ret_ref = 0;
@@ -40543,6 +44665,27 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1htlcevent(JNI
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1holder_1force_1closed_1with_1info(JNIEnv *env, jclass clz, int64_t reason, int64_t outpoint, int64_t channel_id) {
+       void* reason_ptr = untag_ptr(reason);
+       CHECK_ACCESS(reason_ptr);
+       LDKClosureReason reason_conv = *(LDKClosureReason*)(reason_ptr);
+       reason_conv = ClosureReason_clone((LDKClosureReason*)untag_ptr(reason));
+       LDKOutPoint outpoint_conv;
+       outpoint_conv.inner = untag_ptr(outpoint);
+       outpoint_conv.is_owned = ptr_is_owned(outpoint);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_conv);
+       outpoint_conv = OutPoint_clone(&outpoint_conv);
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv = ChannelId_clone(&channel_id_conv);
+       LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
+       *ret_copy = MonitorEvent_holder_force_closed_with_info(reason_conv, outpoint_conv, channel_id_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1holder_1force_1closed(JNIEnv *env, jclass clz, int64_t a) {
        LDKOutPoint a_conv;
        a_conv.inner = untag_ptr(a);
@@ -40555,14 +44698,19 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1holder_1force
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1completed(JNIEnv *env, jclass clz, int64_t funding_txo, int64_t monitor_update_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1completed(JNIEnv *env, jclass clz, int64_t funding_txo, int64_t channel_id, int64_t monitor_update_id) {
        LDKOutPoint funding_txo_conv;
        funding_txo_conv.inner = untag_ptr(funding_txo);
        funding_txo_conv.is_owned = ptr_is_owned(funding_txo);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv);
        funding_txo_conv = OutPoint_clone(&funding_txo_conv);
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv = ChannelId_clone(&channel_id_conv);
        LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
-       *ret_copy = MonitorEvent_completed(funding_txo_conv, monitor_update_id);
+       *ret_copy = MonitorEvent_completed(funding_txo_conv, channel_id_conv, monitor_update_id);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -40862,6 +45010,19 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1fundin
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1channel_1id(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKChannelMonitor this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKChannelId ret_var = ChannelMonitor_channel_id(&this_arg_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
 JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1outputs_1to_1watch(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKChannelMonitor this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -40997,29 +45158,22 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1co
        return ret_arr;
 }
 
-JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1holder_1commitment_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t logger) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1broadcast_1latest_1holder_1commitment_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t broadcaster, int64_t fee_estimator, int64_t logger) {
        LDKChannelMonitor this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
+       void* broadcaster_ptr = untag_ptr(broadcaster);
+       if (ptr_is_owned(broadcaster)) { CHECK_ACCESS(broadcaster_ptr); }
+       LDKBroadcasterInterface* broadcaster_conv = (LDKBroadcasterInterface*)broadcaster_ptr;
+       void* fee_estimator_ptr = untag_ptr(fee_estimator);
+       if (ptr_is_owned(fee_estimator)) { CHECK_ACCESS(fee_estimator_ptr); }
+       LDKFeeEstimator* fee_estimator_conv = (LDKFeeEstimator*)fee_estimator_ptr;
        void* logger_ptr = untag_ptr(logger);
        if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); }
        LDKLogger* logger_conv = (LDKLogger*)logger_ptr;
-       LDKCVec_TransactionZ ret_var = ChannelMonitor_get_latest_holder_commitment_txn(&this_arg_conv, logger_conv);
-       jobjectArray ret_arr = NULL;
-       ret_arr = (*env)->NewObjectArray(env, ret_var.datalen, arr_of_B_clz, NULL);
-       ;
-       for (size_t i = 0; i < ret_var.datalen; i++) {
-               LDKTransaction ret_conv_8_var = ret_var.data[i];
-               int8_tArray ret_conv_8_arr = (*env)->NewByteArray(env, ret_conv_8_var.datalen);
-               (*env)->SetByteArrayRegion(env, ret_conv_8_arr, 0, ret_conv_8_var.datalen, ret_conv_8_var.data);
-               Transaction_free(ret_conv_8_var);
-               (*env)->SetObjectArrayElement(env, ret_arr, i, ret_conv_8_arr);
-       }
-       
-       FREE(ret_var.data);
-       return ret_arr;
+       ChannelMonitor_broadcast_latest_holder_commitment_txn(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv);
 }
 
 JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1block_1connected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray header, int64_tArray txdata, int32_t height, int64_t broadcaster, int64_t fee_estimator, int64_t logger) {
@@ -41296,6 +45450,32 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1rebroadcast_1p
        ChannelMonitor_rebroadcast_pending_claims(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv);
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1signer_1unblocked(JNIEnv *env, jclass clz, int64_t this_arg, int64_t broadcaster, int64_t fee_estimator, int64_t logger) {
+       LDKChannelMonitor this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       void* broadcaster_ptr = untag_ptr(broadcaster);
+       CHECK_ACCESS(broadcaster_ptr);
+       LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(broadcaster_ptr);
+       if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKBroadcasterInterface_JCalls_cloned(&broadcaster_conv);
+       }
+       void* fee_estimator_ptr = untag_ptr(fee_estimator);
+       CHECK_ACCESS(fee_estimator_ptr);
+       LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(fee_estimator_ptr);
+       if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKFeeEstimator_JCalls_cloned(&fee_estimator_conv);
+       }
+       void* logger_ptr = untag_ptr(logger);
+       if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); }
+       LDKLogger* logger_conv = (LDKLogger*)logger_ptr;
+       ChannelMonitor_signer_unblocked(&this_arg_conv, broadcaster_conv, fee_estimator_conv, logger_conv);
+}
+
 JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray tx, int32_t confirmation_height) {
        LDKChannelMonitor this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -41322,6 +45502,19 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1s
        return ret_arr;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1is_1fully_1resolved(JNIEnv *env, jclass clz, int64_t this_arg, int64_t logger) {
+       LDKChannelMonitor this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       void* logger_ptr = untag_ptr(logger);
+       if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); }
+       LDKLogger* logger_conv = (LDKLogger*)logger_ptr;
+       jboolean ret_conv = ChannelMonitor_is_fully_resolved(&this_arg_conv, logger_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1claimable_1balances(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKChannelMonitor this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -41475,17 +45668,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutPoint_1hash(JNIEnv *env,
        return ret_conv;
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1to_1channel_1id(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKOutPoint this_arg_conv;
-       this_arg_conv.inner = untag_ptr(this_arg);
-       this_arg_conv.is_owned = ptr_is_owned(this_arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
-       this_arg_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, OutPoint_to_channel_id(&this_arg_conv).data);
-       return ret_arr;
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKOutPoint obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -41597,6 +45779,61 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1new(JNIEnv
        return ret_ref;
 }
 
+static inline uint64_t InboundHTLCErr_clone_ptr(LDKInboundHTLCErr *NONNULL_PTR arg) {
+       LDKInboundHTLCErr ret_var = InboundHTLCErr_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKInboundHTLCErr arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = InboundHTLCErr_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKInboundHTLCErr orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKInboundHTLCErr ret_var = InboundHTLCErr_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKInboundHTLCErr o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv.is_owned = false;
+       int64_t ret_conv = InboundHTLCErr_hash(&o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKInboundHTLCErr a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKInboundHTLCErr b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = InboundHTLCErr_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_peel_1payment_1onion(JNIEnv *env, jclass clz, int64_t msg, int64_t node_signer, int64_t logger, int32_t cur_height, jboolean accept_mpp_keysend, jboolean allow_skimmed_fees) {
        LDKUpdateAddHTLC msg_conv;
        msg_conv.inner = untag_ptr(msg);
@@ -41660,7 +45897,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1forward
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive(JNIEnv *env, jclass clz, int64_t payment_data, int64_t payment_metadata, int32_t incoming_cltv_expiry, int8_tArray phantom_shared_secret, int64_tArray custom_tlvs, jboolean requires_blinded_error) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive(JNIEnv *env, jclass clz, int64_t payment_data, int64_t payment_metadata, int64_t payment_context, int32_t incoming_cltv_expiry, int8_tArray phantom_shared_secret, int64_tArray custom_tlvs, jboolean requires_blinded_error) {
        LDKFinalOnionHopData payment_data_conv;
        payment_data_conv.inner = untag_ptr(payment_data);
        payment_data_conv.is_owned = ptr_is_owned(payment_data);
@@ -41670,6 +45907,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive
        CHECK_ACCESS(payment_metadata_ptr);
        LDKCOption_CVec_u8ZZ payment_metadata_conv = *(LDKCOption_CVec_u8ZZ*)(payment_metadata_ptr);
        payment_metadata_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(payment_metadata));
+       void* payment_context_ptr = untag_ptr(payment_context);
+       CHECK_ACCESS(payment_context_ptr);
+       LDKCOption_PaymentContextZ payment_context_conv = *(LDKCOption_PaymentContextZ*)(payment_context_ptr);
+       payment_context_conv = COption_PaymentContextZ_clone((LDKCOption_PaymentContextZ*)untag_ptr(payment_context));
        LDKThirtyTwoBytes phantom_shared_secret_ref;
        CHECK((*env)->GetArrayLength(env, phantom_shared_secret) == 32);
        (*env)->GetByteArrayRegion(env, phantom_shared_secret, 0, 32, phantom_shared_secret_ref.data);
@@ -41690,12 +45931,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive
        }
        (*env)->ReleaseLongArrayElements(env, custom_tlvs, custom_tlvs_vals, 0);
        LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting");
-       *ret_copy = PendingHTLCRouting_receive(payment_data_conv, payment_metadata_conv, incoming_cltv_expiry, phantom_shared_secret_ref, custom_tlvs_constr, requires_blinded_error);
+       *ret_copy = PendingHTLCRouting_receive(payment_data_conv, payment_metadata_conv, payment_context_conv, incoming_cltv_expiry, phantom_shared_secret_ref, custom_tlvs_constr, requires_blinded_error);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive_1keysend(JNIEnv *env, jclass clz, int64_t payment_data, int8_tArray payment_preimage, int64_t payment_metadata, int32_t incoming_cltv_expiry, int64_tArray custom_tlvs) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive_1keysend(JNIEnv *env, jclass clz, int64_t payment_data, int8_tArray payment_preimage, int64_t payment_metadata, int32_t incoming_cltv_expiry, int64_tArray custom_tlvs, jboolean requires_blinded_error) {
        LDKFinalOnionHopData payment_data_conv;
        payment_data_conv.inner = untag_ptr(payment_data);
        payment_data_conv.is_owned = ptr_is_owned(payment_data);
@@ -41725,7 +45966,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive
        }
        (*env)->ReleaseLongArrayElements(env, custom_tlvs, custom_tlvs_vals, 0);
        LDKPendingHTLCRouting *ret_copy = MALLOC(sizeof(LDKPendingHTLCRouting), "LDKPendingHTLCRouting");
-       *ret_copy = PendingHTLCRouting_receive_keysend(payment_data_conv, payment_preimage_ref, payment_metadata_conv, incoming_cltv_expiry, custom_tlvs_constr);
+       *ret_copy = PendingHTLCRouting_receive_keysend(payment_data_conv, payment_preimage_ref, payment_metadata_conv, incoming_cltv_expiry, custom_tlvs_constr, requires_blinded_error);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -42592,27 +46833,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1free(JNIEnv *e
        ChannelDetails_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelDetails this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelDetails_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = ChannelDetails_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKChannelDetails this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       ChannelDetails_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       ChannelDetails_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1counterparty(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -43211,83 +47456,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1config(JN
        ChannelDetails_set_config(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t counterparty_arg, int64_t funding_txo_arg, int64_t channel_type_arg, int64_t short_channel_id_arg, int64_t outbound_scid_alias_arg, int64_t inbound_scid_alias_arg, int64_t channel_value_satoshis_arg, int64_t unspendable_punishment_reserve_arg, int8_tArray user_channel_id_arg, int64_t feerate_sat_per_1000_weight_arg, int64_t balance_msat_arg, int64_t outbound_capacity_msat_arg, int64_t next_outbound_htlc_limit_msat_arg, int64_t next_outbound_htlc_minimum_msat_arg, int64_t inbound_capacity_msat_arg, int64_t confirmations_required_arg, int64_t confirmations_arg, int64_t force_close_spend_delay_arg, jboolean is_outbound_arg, jboolean is_channel_ready_arg, int64_t channel_shutdown_state_arg, jboolean is_usable_arg, jboolean is_public_arg, int64_t inbound_htlc_minimum_msat_arg, int64_t inbound_htlc_maximum_msat_arg, int64_t config_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
-       LDKChannelCounterparty counterparty_arg_conv;
-       counterparty_arg_conv.inner = untag_ptr(counterparty_arg);
-       counterparty_arg_conv.is_owned = ptr_is_owned(counterparty_arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(counterparty_arg_conv);
-       counterparty_arg_conv = ChannelCounterparty_clone(&counterparty_arg_conv);
-       LDKOutPoint funding_txo_arg_conv;
-       funding_txo_arg_conv.inner = untag_ptr(funding_txo_arg);
-       funding_txo_arg_conv.is_owned = ptr_is_owned(funding_txo_arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_arg_conv);
-       funding_txo_arg_conv = OutPoint_clone(&funding_txo_arg_conv);
-       LDKChannelTypeFeatures channel_type_arg_conv;
-       channel_type_arg_conv.inner = untag_ptr(channel_type_arg);
-       channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
-       channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
-       void* short_channel_id_arg_ptr = untag_ptr(short_channel_id_arg);
-       CHECK_ACCESS(short_channel_id_arg_ptr);
-       LDKCOption_u64Z short_channel_id_arg_conv = *(LDKCOption_u64Z*)(short_channel_id_arg_ptr);
-       short_channel_id_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(short_channel_id_arg));
-       void* outbound_scid_alias_arg_ptr = untag_ptr(outbound_scid_alias_arg);
-       CHECK_ACCESS(outbound_scid_alias_arg_ptr);
-       LDKCOption_u64Z outbound_scid_alias_arg_conv = *(LDKCOption_u64Z*)(outbound_scid_alias_arg_ptr);
-       outbound_scid_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(outbound_scid_alias_arg));
-       void* inbound_scid_alias_arg_ptr = untag_ptr(inbound_scid_alias_arg);
-       CHECK_ACCESS(inbound_scid_alias_arg_ptr);
-       LDKCOption_u64Z inbound_scid_alias_arg_conv = *(LDKCOption_u64Z*)(inbound_scid_alias_arg_ptr);
-       inbound_scid_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_scid_alias_arg));
-       void* unspendable_punishment_reserve_arg_ptr = untag_ptr(unspendable_punishment_reserve_arg);
-       CHECK_ACCESS(unspendable_punishment_reserve_arg_ptr);
-       LDKCOption_u64Z unspendable_punishment_reserve_arg_conv = *(LDKCOption_u64Z*)(unspendable_punishment_reserve_arg_ptr);
-       LDKU128 user_channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, user_channel_id_arg) == 16);
-       (*env)->GetByteArrayRegion(env, user_channel_id_arg, 0, 16, user_channel_id_arg_ref.le_bytes);
-       void* feerate_sat_per_1000_weight_arg_ptr = untag_ptr(feerate_sat_per_1000_weight_arg);
-       CHECK_ACCESS(feerate_sat_per_1000_weight_arg_ptr);
-       LDKCOption_u32Z feerate_sat_per_1000_weight_arg_conv = *(LDKCOption_u32Z*)(feerate_sat_per_1000_weight_arg_ptr);
-       feerate_sat_per_1000_weight_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(feerate_sat_per_1000_weight_arg));
-       void* confirmations_required_arg_ptr = untag_ptr(confirmations_required_arg);
-       CHECK_ACCESS(confirmations_required_arg_ptr);
-       LDKCOption_u32Z confirmations_required_arg_conv = *(LDKCOption_u32Z*)(confirmations_required_arg_ptr);
-       confirmations_required_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(confirmations_required_arg));
-       void* confirmations_arg_ptr = untag_ptr(confirmations_arg);
-       CHECK_ACCESS(confirmations_arg_ptr);
-       LDKCOption_u32Z confirmations_arg_conv = *(LDKCOption_u32Z*)(confirmations_arg_ptr);
-       confirmations_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(confirmations_arg));
-       void* force_close_spend_delay_arg_ptr = untag_ptr(force_close_spend_delay_arg);
-       CHECK_ACCESS(force_close_spend_delay_arg_ptr);
-       LDKCOption_u16Z force_close_spend_delay_arg_conv = *(LDKCOption_u16Z*)(force_close_spend_delay_arg_ptr);
-       force_close_spend_delay_arg_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(force_close_spend_delay_arg));
-       void* channel_shutdown_state_arg_ptr = untag_ptr(channel_shutdown_state_arg);
-       CHECK_ACCESS(channel_shutdown_state_arg_ptr);
-       LDKCOption_ChannelShutdownStateZ channel_shutdown_state_arg_conv = *(LDKCOption_ChannelShutdownStateZ*)(channel_shutdown_state_arg_ptr);
-       channel_shutdown_state_arg_conv = COption_ChannelShutdownStateZ_clone((LDKCOption_ChannelShutdownStateZ*)untag_ptr(channel_shutdown_state_arg));
-       void* inbound_htlc_minimum_msat_arg_ptr = untag_ptr(inbound_htlc_minimum_msat_arg);
-       CHECK_ACCESS(inbound_htlc_minimum_msat_arg_ptr);
-       LDKCOption_u64Z inbound_htlc_minimum_msat_arg_conv = *(LDKCOption_u64Z*)(inbound_htlc_minimum_msat_arg_ptr);
-       inbound_htlc_minimum_msat_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_htlc_minimum_msat_arg));
-       void* inbound_htlc_maximum_msat_arg_ptr = untag_ptr(inbound_htlc_maximum_msat_arg);
-       CHECK_ACCESS(inbound_htlc_maximum_msat_arg_ptr);
-       LDKCOption_u64Z inbound_htlc_maximum_msat_arg_conv = *(LDKCOption_u64Z*)(inbound_htlc_maximum_msat_arg_ptr);
-       inbound_htlc_maximum_msat_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(inbound_htlc_maximum_msat_arg));
-       LDKChannelConfig config_arg_conv;
-       config_arg_conv.inner = untag_ptr(config_arg);
-       config_arg_conv.is_owned = ptr_is_owned(config_arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(config_arg_conv);
-       config_arg_conv = ChannelConfig_clone(&config_arg_conv);
-       LDKChannelDetails ret_var = ChannelDetails_new(channel_id_arg_ref, counterparty_arg_conv, funding_txo_arg_conv, channel_type_arg_conv, short_channel_id_arg_conv, outbound_scid_alias_arg_conv, inbound_scid_alias_arg_conv, channel_value_satoshis_arg, unspendable_punishment_reserve_arg_conv, user_channel_id_arg_ref, feerate_sat_per_1000_weight_arg_conv, balance_msat_arg, outbound_capacity_msat_arg, next_outbound_htlc_limit_msat_arg, next_outbound_htlc_minimum_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg_conv, confirmations_arg_conv, force_close_spend_delay_arg_conv, is_outbound_arg, is_channel_ready_arg, channel_shutdown_state_arg_conv, is_usable_arg, is_public_arg, inbound_htlc_minimum_msat_arg_conv, inbound_htlc_maximum_msat_arg_conv, config_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
 static inline uint64_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg) {
        LDKChannelDetails ret_var = ChannelDetails_clone(arg);
        int64_t ret_ref = 0;
@@ -43714,16 +47882,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1cha
        LDKU128 user_channel_id_ref;
        CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
        (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
-       void* temporary_channel_id_ptr = untag_ptr(temporary_channel_id);
-       CHECK_ACCESS(temporary_channel_id_ptr);
-       LDKCOption_ThirtyTwoBytesZ temporary_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(temporary_channel_id_ptr);
-       temporary_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(temporary_channel_id));
+       LDKChannelId temporary_channel_id_conv;
+       temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+       temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+       temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv);
        LDKUserConfig override_config_conv;
        override_config_conv.inner = untag_ptr(override_config);
        override_config_conv.is_owned = ptr_is_owned(override_config);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(override_config_conv);
        override_config_conv = UserConfig_clone(&override_config_conv);
-       LDKCResult_ThirtyTwoBytesAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesAPIErrorZ), "LDKCResult_ThirtyTwoBytesAPIErrorZ");
+       LDKCResult_ChannelIdAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdAPIErrorZ), "LDKCResult_ChannelIdAPIErrorZ");
        *ret_conv = ChannelManager_create_channel(&this_arg_conv, their_network_key_ref, channel_value_satoshis, push_msat, user_channel_id_ref, temporary_channel_id_conv, override_config_conv);
        return tag_ptr(ret_conv, true);
 }
@@ -43818,34 +47987,36 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelManager_1list_1
        return ret_arr;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       uint8_t channel_id_arr[32];
-       CHECK((*env)->GetArrayLength(env, channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr);
-       uint8_t (*channel_id_ref)[32] = &channel_id_arr;
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv.is_owned = false;
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
        LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = ChannelManager_close_channel(&this_arg_conv, channel_id_ref, counterparty_node_id_ref);
+       *ret_conv = ChannelManager_close_channel(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel_1with_1feerate_1and_1script(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id, int64_t target_feerate_sats_per_1000_weight, int64_t shutdown_script) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel_1with_1feerate_1and_1script(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id, int64_t target_feerate_sats_per_1000_weight, int64_t shutdown_script) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       uint8_t channel_id_arr[32];
-       CHECK((*env)->GetArrayLength(env, channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr);
-       uint8_t (*channel_id_ref)[32] = &channel_id_arr;
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv.is_owned = false;
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
@@ -43859,43 +48030,45 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1chan
        CHECK_INNER_FIELD_ACCESS_OR_NULL(shutdown_script_conv);
        shutdown_script_conv = ShutdownScript_clone(&shutdown_script_conv);
        LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = ChannelManager_close_channel_with_feerate_and_script(&this_arg_conv, channel_id_ref, counterparty_node_id_ref, target_feerate_sats_per_1000_weight_conv, shutdown_script_conv);
+       *ret_conv = ChannelManager_close_channel_with_feerate_and_script(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref, target_feerate_sats_per_1000_weight_conv, shutdown_script_conv);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1broadcasting_1latest_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1broadcasting_1latest_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       uint8_t channel_id_arr[32];
-       CHECK((*env)->GetArrayLength(env, channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr);
-       uint8_t (*channel_id_ref)[32] = &channel_id_arr;
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv.is_owned = false;
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
        LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = ChannelManager_force_close_broadcasting_latest_txn(&this_arg_conv, channel_id_ref, counterparty_node_id_ref);
+       *ret_conv = ChannelManager_force_close_broadcasting_latest_txn(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1without_1broadcasting_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray channel_id, int8_tArray counterparty_node_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1without_1broadcasting_1txn(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_id, int8_tArray counterparty_node_id) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       uint8_t channel_id_arr[32];
-       CHECK((*env)->GetArrayLength(env, channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_arr);
-       uint8_t (*channel_id_ref)[32] = &channel_id_arr;
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv.is_owned = false;
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
        LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = ChannelManager_force_close_without_broadcasting_txn(&this_arg_conv, channel_id_ref, counterparty_node_id_ref);
+       *ret_conv = ChannelManager_force_close_without_broadcasting_txn(&this_arg_conv, &channel_id_conv, counterparty_node_id_ref);
        return tag_ptr(ret_conv, true);
 }
 
@@ -44101,16 +48274,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1send_1prefl
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1funding_1transaction_1generated(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray funding_transaction) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1funding_1transaction_1generated(JNIEnv *env, jclass clz, int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray funding_transaction) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       uint8_t temporary_channel_id_arr[32];
-       CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_arr);
-       uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr;
+       LDKChannelId temporary_channel_id_conv;
+       temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+       temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+       temporary_channel_id_conv.is_owned = false;
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
@@ -44120,7 +48294,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1funding_1tr
        (*env)->GetByteArrayRegion(env, funding_transaction, 0, funding_transaction_ref.datalen, funding_transaction_ref.data);
        funding_transaction_ref.data_is_owned = true;
        LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = ChannelManager_funding_transaction_generated(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, funding_transaction_ref);
+       *ret_conv = ChannelManager_funding_transaction_generated(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, funding_transaction_ref);
        return tag_ptr(ret_conv, true);
 }
 
@@ -44130,20 +48304,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1batch_1fund
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ temporary_channels_constr;
+       LDKCVec_C2Tuple_ChannelIdPublicKeyZZ temporary_channels_constr;
        temporary_channels_constr.datalen = (*env)->GetArrayLength(env, temporary_channels);
        if (temporary_channels_constr.datalen > 0)
-               temporary_channels_constr.data = MALLOC(temporary_channels_constr.datalen * sizeof(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ), "LDKCVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ Elements");
+               temporary_channels_constr.data = MALLOC(temporary_channels_constr.datalen * sizeof(LDKC2Tuple_ChannelIdPublicKeyZ), "LDKCVec_C2Tuple_ChannelIdPublicKeyZZ Elements");
        else
                temporary_channels_constr.data = NULL;
        int64_t* temporary_channels_vals = (*env)->GetLongArrayElements (env, temporary_channels, NULL);
-       for (size_t j = 0; j < temporary_channels_constr.datalen; j++) {
-               int64_t temporary_channels_conv_35 = temporary_channels_vals[j];
-               void* temporary_channels_conv_35_ptr = untag_ptr(temporary_channels_conv_35);
-               CHECK_ACCESS(temporary_channels_conv_35_ptr);
-               LDKC2Tuple_ThirtyTwoBytesPublicKeyZ temporary_channels_conv_35_conv = *(LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)(temporary_channels_conv_35_ptr);
-               temporary_channels_conv_35_conv = C2Tuple_ThirtyTwoBytesPublicKeyZ_clone((LDKC2Tuple_ThirtyTwoBytesPublicKeyZ*)untag_ptr(temporary_channels_conv_35));
-               temporary_channels_constr.data[j] = temporary_channels_conv_35_conv;
+       for (size_t e = 0; e < temporary_channels_constr.datalen; e++) {
+               int64_t temporary_channels_conv_30 = temporary_channels_vals[e];
+               void* temporary_channels_conv_30_ptr = untag_ptr(temporary_channels_conv_30);
+               CHECK_ACCESS(temporary_channels_conv_30_ptr);
+               LDKC2Tuple_ChannelIdPublicKeyZ temporary_channels_conv_30_conv = *(LDKC2Tuple_ChannelIdPublicKeyZ*)(temporary_channels_conv_30_ptr);
+               temporary_channels_conv_30_conv = C2Tuple_ChannelIdPublicKeyZ_clone((LDKC2Tuple_ChannelIdPublicKeyZ*)untag_ptr(temporary_channels_conv_30));
+               temporary_channels_constr.data[e] = temporary_channels_conv_30_conv;
        }
        (*env)->ReleaseLongArrayElements(env, temporary_channels, temporary_channels_vals, 0);
        LDKTransaction funding_transaction_ref;
@@ -44156,7 +48330,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1batch_1fund
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1partial_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, jobjectArray channel_ids, int64_t config_update) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1partial_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, int64_tArray channel_ids, int64_t config_update) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
@@ -44165,19 +48339,23 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1par
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
-       LDKCVec_ThirtyTwoBytesZ channel_ids_constr;
+       LDKCVec_ChannelIdZ channel_ids_constr;
        channel_ids_constr.datalen = (*env)->GetArrayLength(env, channel_ids);
        if (channel_ids_constr.datalen > 0)
-               channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements");
+               channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements");
        else
                channel_ids_constr.data = NULL;
-       for (size_t i = 0; i < channel_ids_constr.datalen; i++) {
-               int8_tArray channel_ids_conv_8 = (*env)->GetObjectArrayElement(env, channel_ids, i);
-               LDKThirtyTwoBytes channel_ids_conv_8_ref;
-               CHECK((*env)->GetArrayLength(env, channel_ids_conv_8) == 32);
-               (*env)->GetByteArrayRegion(env, channel_ids_conv_8, 0, 32, channel_ids_conv_8_ref.data);
-               channel_ids_constr.data[i] = channel_ids_conv_8_ref;
-       }
+       int64_t* channel_ids_vals = (*env)->GetLongArrayElements (env, channel_ids, NULL);
+       for (size_t l = 0; l < channel_ids_constr.datalen; l++) {
+               int64_t channel_ids_conv_11 = channel_ids_vals[l];
+               LDKChannelId channel_ids_conv_11_conv;
+               channel_ids_conv_11_conv.inner = untag_ptr(channel_ids_conv_11);
+               channel_ids_conv_11_conv.is_owned = ptr_is_owned(channel_ids_conv_11);
+               CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_ids_conv_11_conv);
+               channel_ids_conv_11_conv = ChannelId_clone(&channel_ids_conv_11_conv);
+               channel_ids_constr.data[l] = channel_ids_conv_11_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, channel_ids, channel_ids_vals, 0);
        LDKChannelConfigUpdate config_update_conv;
        config_update_conv.inner = untag_ptr(config_update);
        config_update_conv.is_owned = ptr_is_owned(config_update);
@@ -44188,7 +48366,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1par
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, jobjectArray channel_ids, int64_t config) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1channel_1config(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray counterparty_node_id, int64_tArray channel_ids, int64_t config) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
@@ -44197,19 +48375,23 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1cha
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
-       LDKCVec_ThirtyTwoBytesZ channel_ids_constr;
+       LDKCVec_ChannelIdZ channel_ids_constr;
        channel_ids_constr.datalen = (*env)->GetArrayLength(env, channel_ids);
        if (channel_ids_constr.datalen > 0)
-               channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKThirtyTwoBytes), "LDKCVec_ThirtyTwoBytesZ Elements");
+               channel_ids_constr.data = MALLOC(channel_ids_constr.datalen * sizeof(LDKChannelId), "LDKCVec_ChannelIdZ Elements");
        else
                channel_ids_constr.data = NULL;
-       for (size_t i = 0; i < channel_ids_constr.datalen; i++) {
-               int8_tArray channel_ids_conv_8 = (*env)->GetObjectArrayElement(env, channel_ids, i);
-               LDKThirtyTwoBytes channel_ids_conv_8_ref;
-               CHECK((*env)->GetArrayLength(env, channel_ids_conv_8) == 32);
-               (*env)->GetByteArrayRegion(env, channel_ids_conv_8, 0, 32, channel_ids_conv_8_ref.data);
-               channel_ids_constr.data[i] = channel_ids_conv_8_ref;
-       }
+       int64_t* channel_ids_vals = (*env)->GetLongArrayElements (env, channel_ids, NULL);
+       for (size_t l = 0; l < channel_ids_constr.datalen; l++) {
+               int64_t channel_ids_conv_11 = channel_ids_vals[l];
+               LDKChannelId channel_ids_conv_11_conv;
+               channel_ids_conv_11_conv.inner = untag_ptr(channel_ids_conv_11);
+               channel_ids_conv_11_conv.is_owned = ptr_is_owned(channel_ids_conv_11);
+               CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_ids_conv_11_conv);
+               channel_ids_conv_11_conv = ChannelId_clone(&channel_ids_conv_11_conv);
+               channel_ids_constr.data[l] = channel_ids_conv_11_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, channel_ids, channel_ids_vals, 0);
        LDKChannelConfig config_conv;
        config_conv.inner = untag_ptr(config);
        config_conv.is_owned = ptr_is_owned(config);
@@ -44220,7 +48402,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1cha
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1forward_1intercepted_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray intercept_id, int8_tArray next_hop_channel_id, int8_tArray next_node_id, int64_t amt_to_forward_msat) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1forward_1intercepted_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray intercept_id, int64_t next_hop_channel_id, int8_tArray next_node_id, int64_t amt_to_forward_msat) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
@@ -44229,15 +48411,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1forward_1in
        LDKThirtyTwoBytes intercept_id_ref;
        CHECK((*env)->GetArrayLength(env, intercept_id) == 32);
        (*env)->GetByteArrayRegion(env, intercept_id, 0, 32, intercept_id_ref.data);
-       uint8_t next_hop_channel_id_arr[32];
-       CHECK((*env)->GetArrayLength(env, next_hop_channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, next_hop_channel_id, 0, 32, next_hop_channel_id_arr);
-       uint8_t (*next_hop_channel_id_ref)[32] = &next_hop_channel_id_arr;
+       LDKChannelId next_hop_channel_id_conv;
+       next_hop_channel_id_conv.inner = untag_ptr(next_hop_channel_id);
+       next_hop_channel_id_conv.is_owned = ptr_is_owned(next_hop_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(next_hop_channel_id_conv);
+       next_hop_channel_id_conv.is_owned = false;
        LDKPublicKey next_node_id_ref;
        CHECK((*env)->GetArrayLength(env, next_node_id) == 33);
        (*env)->GetByteArrayRegion(env, next_node_id, 0, 33, next_node_id_ref.compressed_form);
        LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = ChannelManager_forward_intercepted_htlc(&this_arg_conv, intercept_id_ref, next_hop_channel_id_ref, next_node_id_ref, amt_to_forward_msat);
+       *ret_conv = ChannelManager_forward_intercepted_htlc(&this_arg_conv, intercept_id_ref, &next_hop_channel_id_conv, next_node_id_ref, amt_to_forward_msat);
        return tag_ptr(ret_conv, true);
 }
 
@@ -44338,16 +48521,17 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelManager_1get_1ou
        return ret_arr;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       uint8_t temporary_channel_id_arr[32];
-       CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_arr);
-       uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr;
+       LDKChannelId temporary_channel_id_conv;
+       temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+       temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+       temporary_channel_id_conv.is_owned = false;
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
@@ -44355,20 +48539,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inb
        CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
        (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
        LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = ChannelManager_accept_inbound_channel(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, user_channel_id_ref);
+       *ret_conv = ChannelManager_accept_inbound_channel(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, user_channel_id_ref);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel_1from_1trusted_1peer_10conf(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel_1from_1trusted_1peer_10conf(JNIEnv *env, jclass clz, int64_t this_arg, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int8_tArray user_channel_id) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       uint8_t temporary_channel_id_arr[32];
-       CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_arr);
-       uint8_t (*temporary_channel_id_ref)[32] = &temporary_channel_id_arr;
+       LDKChannelId temporary_channel_id_conv;
+       temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+       temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+       temporary_channel_id_conv.is_owned = false;
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
@@ -44376,7 +48561,40 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inb
        CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
        (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
        LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(&this_arg_conv, temporary_channel_id_ref, counterparty_node_id_ref, user_channel_id_ref);
+       *ret_conv = ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(&this_arg_conv, &temporary_channel_id_conv, counterparty_node_id_ref, user_channel_id_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1offer_1builder(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKChannelManager this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = ChannelManager_create_offer_builder(&this_arg_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1refund_1builder(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats, int64_t absolute_expiry, int8_tArray payment_id, int64_t retry_strategy, int64_t max_total_routing_fee_msat) {
+       LDKChannelManager this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKThirtyTwoBytes payment_id_ref;
+       CHECK((*env)->GetArrayLength(env, payment_id) == 32);
+       (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data);
+       void* retry_strategy_ptr = untag_ptr(retry_strategy);
+       CHECK_ACCESS(retry_strategy_ptr);
+       LDKRetry retry_strategy_conv = *(LDKRetry*)(retry_strategy_ptr);
+       retry_strategy_conv = Retry_clone((LDKRetry*)untag_ptr(retry_strategy));
+       void* max_total_routing_fee_msat_ptr = untag_ptr(max_total_routing_fee_msat);
+       CHECK_ACCESS(max_total_routing_fee_msat_ptr);
+       LDKCOption_u64Z max_total_routing_fee_msat_conv = *(LDKCOption_u64Z*)(max_total_routing_fee_msat_ptr);
+       max_total_routing_fee_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(max_total_routing_fee_msat));
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = ChannelManager_create_refund_builder(&this_arg_conv, amount_msats, absolute_expiry, payment_id_ref, retry_strategy_conv, max_total_routing_fee_msat_conv);
        return tag_ptr(ret_conv, true);
 }
 
@@ -44430,7 +48648,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1request_1re
        refund_conv.is_owned = ptr_is_owned(refund);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(refund_conv);
        refund_conv.is_owned = false;
-       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
        *ret_conv = ChannelManager_request_refund_payment(&this_arg_conv, &refund_conv);
        return tag_ptr(ret_conv, true);
 }
@@ -44693,6 +48911,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1OffersM
        return tag_ptr(ret_ret, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1NodeIdLookUp(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKChannelManager this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKNodeIdLookUp* ret_ret = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp");
+       *ret_ret = ChannelManager_as_NodeIdLookUp(&this_arg_conv);
+       return tag_ptr(ret_ret, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_provided_1init_1features(JNIEnv *env, jclass clz, int64_t config) {
        LDKUserConfig config_conv;
        config_conv.inner = untag_ptr(config);
@@ -45375,6 +49604,20 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint
        return ret_arr;
 }
 
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint_1derive_1add_1tweak(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray per_commitment_point) {
+       LDKDelayedPaymentBasepoint this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKPublicKey per_commitment_point_ref;
+       CHECK((*env)->GetArrayLength(env, per_commitment_point) == 33);
+       (*env)->GetByteArrayRegion(env, per_commitment_point, 0, 33, per_commitment_point_ref.compressed_form);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, DelayedPaymentBasepoint_derive_add_tweak(&this_arg_conv, per_commitment_point_ref).data);
+       return ret_arr;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKDelayedPaymentBasepoint obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -45655,6 +49898,20 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1to_1publ
        return ret_arr;
 }
 
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1derive_1add_1tweak(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray per_commitment_point) {
+       LDKHtlcBasepoint this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKPublicKey per_commitment_point_ref;
+       CHECK((*env)->GetArrayLength(env, per_commitment_point) == 33);
+       (*env)->GetByteArrayRegion(env, per_commitment_point, 0, 33, per_commitment_point_ref.compressed_form);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, HtlcBasepoint_derive_add_tweak(&this_arg_conv, per_commitment_point_ref).data);
+       return ret_arr;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKHtlcBasepoint obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -45827,6 +50084,19 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HtlcKey_1read(JNIEnv *env,
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_add_1public_1key_1tweak(JNIEnv *env, jclass clz, int8_tArray base_point, int8_tArray tweak) {
+       LDKPublicKey base_point_ref;
+       CHECK((*env)->GetArrayLength(env, base_point) == 33);
+       (*env)->GetByteArrayRegion(env, base_point, 0, 33, base_point_ref.compressed_form);
+       uint8_t tweak_arr[32];
+       CHECK((*env)->GetArrayLength(env, tweak) == 32);
+       (*env)->GetByteArrayRegion(env, tweak, 0, 32, tweak_arr);
+       uint8_t (*tweak_ref)[32] = &tweak_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, add_public_key_tweak(base_point_ref, tweak_ref).compressed_form);
+       return ret_arr;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevocationBasepoint_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKRevocationBasepoint this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -46248,6 +50518,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1unsupported_1c
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1dangerous_1value(JNIEnv *env, jclass clz) {
+       LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+       *ret_copy = DecodeError_dangerous_value();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DecodeError_1hash(JNIEnv *env, jclass clz, int64_t o) {
        LDKDecodeError* o_conv = (LDKDecodeError*)untag_ptr(o);
        int64_t ret_conv = DecodeError_hash(o_conv);
@@ -46429,27 +50706,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1free(JNIEnv *env
        ErrorMessage_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKErrorMessage this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ErrorMessage_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = ErrorMessage_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKErrorMessage this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       ErrorMessage_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       ErrorMessage_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -46474,12 +50755,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1data(JNIEnv
        ErrorMessage_set_data(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, jstring data_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, jstring data_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKStr data_arg_conv = java_to_owned_str(env, data_arg);
-       LDKErrorMessage ret_var = ErrorMessage_new(channel_id_arg_ref, data_arg_conv);
+       LDKErrorMessage ret_var = ErrorMessage_new(channel_id_arg_conv, data_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -46549,27 +50832,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1free(JNIEnv *e
        WarningMessage_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKWarningMessage this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *WarningMessage_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = WarningMessage_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKWarningMessage this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       WarningMessage_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       WarningMessage_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -46594,12 +50881,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1set_1data(JNIE
        WarningMessage_set_data(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WarningMessage_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, jstring data_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_WarningMessage_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, jstring data_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKStr data_arg_conv = java_to_owned_str(env, data_arg);
-       LDKWarningMessage ret_var = WarningMessage_new(channel_id_arg_ref, data_arg_conv);
+       LDKWarningMessage ret_var = WarningMessage_new(channel_id_arg_conv, data_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -46860,27 +51149,27 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Pong_1eq(JNIEnv *env, jcla
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
-       LDKOpenChannel this_obj_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKCommonOpenChannelFields this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
        this_obj_conv.is_owned = ptr_is_owned(this_obj);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
-       OpenChannel_free(this_obj_conv);
+       CommonOpenChannelFields_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannel_get_chain_hash(&this_ptr_conv));
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *CommonOpenChannelFields_get_chain_hash(&this_ptr_conv));
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -46888,216 +51177,182 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1chain_1hash(
        LDKThirtyTwoBytes val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 32);
        (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       OpenChannel_set_chain_hash(&this_ptr_conv, val_ref);
+       CommonOpenChannelFields_set_chain_hash(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannel_get_temporary_channel_id(&this_ptr_conv));
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannel this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       OpenChannel_set_temporary_channel_id(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int64_t ret_conv = OpenChannel_get_funding_satoshis(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannel this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       OpenChannel_set_funding_satoshis(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int64_t ret_conv = OpenChannel_get_push_msat(&this_ptr_conv);
-       return ret_conv;
+       LDKChannelId ret_var = CommonOpenChannelFields_get_temporary_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       OpenChannel_set_push_msat(&this_ptr_conv, val);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       CommonOpenChannelFields_set_temporary_channel_id(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int64_t ret_conv = OpenChannel_get_dust_limit_satoshis(&this_ptr_conv);
+       int64_t ret_conv = CommonOpenChannelFields_get_funding_satoshis(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       OpenChannel_set_dust_limit_satoshis(&this_ptr_conv, val);
+       CommonOpenChannelFields_set_funding_satoshis(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int64_t ret_conv = OpenChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
+       int64_t ret_conv = CommonOpenChannelFields_get_dust_limit_satoshis(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       OpenChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
+       CommonOpenChannelFields_set_dust_limit_satoshis(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int64_t ret_conv = OpenChannel_get_channel_reserve_satoshis(&this_ptr_conv);
+       int64_t ret_conv = CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       OpenChannel_set_channel_reserve_satoshis(&this_ptr_conv, val);
+       CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int64_t ret_conv = OpenChannel_get_htlc_minimum_msat(&this_ptr_conv);
+       int64_t ret_conv = CommonOpenChannelFields_get_htlc_minimum_msat(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       OpenChannel_set_htlc_minimum_msat(&this_ptr_conv, val);
+       CommonOpenChannelFields_set_htlc_minimum_msat(&this_ptr_conv, val);
 }
 
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1feerate_1per_1kw(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int32_t ret_conv = OpenChannel_get_feerate_per_kw(&this_ptr_conv);
+       int32_t ret_conv = CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1feerate_1per_1kw(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       OpenChannel_set_feerate_per_kw(&this_ptr_conv, val);
+       CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(&this_ptr_conv, val);
 }
 
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int16_t ret_conv = OpenChannel_get_to_self_delay(&this_ptr_conv);
+       int16_t ret_conv = CommonOpenChannelFields_get_to_self_delay(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       OpenChannel_set_to_self_delay(&this_ptr_conv, val);
+       CommonOpenChannelFields_set_to_self_delay(&this_ptr_conv, val);
 }
 
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int16_t ret_conv = OpenChannel_get_max_accepted_htlcs(&this_ptr_conv);
+       int16_t ret_conv = CommonOpenChannelFields_get_max_accepted_htlcs(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       OpenChannel_set_max_accepted_htlcs(&this_ptr_conv, val);
+       CommonOpenChannelFields_set_max_accepted_htlcs(&this_ptr_conv, val);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_funding_pubkey(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_funding_pubkey(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -47105,22 +51360,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1pub
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannel_set_funding_pubkey(&this_ptr_conv, val_ref);
+       CommonOpenChannelFields_set_funding_pubkey(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_revocation_basepoint(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -47128,22 +51383,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1revocation_1
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannel_set_revocation_basepoint(&this_ptr_conv, val_ref);
+       CommonOpenChannelFields_set_revocation_basepoint(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_payment_point(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_payment_basepoint(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -47151,22 +51406,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1payment_1poi
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannel_set_payment_point(&this_ptr_conv, val_ref);
+       CommonOpenChannelFields_set_payment_basepoint(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -47174,22 +51429,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1delayed_1pay
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
+       CommonOpenChannelFields_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_htlc_basepoint(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -47197,22 +51452,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1basepo
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannel_set_htlc_basepoint(&this_ptr_conv, val_ref);
+       CommonOpenChannelFields_set_htlc_basepoint(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonOpenChannelFields_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -47220,42 +51475,42 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1first_1per_1
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref);
+       CommonOpenChannelFields_set_first_per_commitment_point(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_t ret_conv = OpenChannel_get_channel_flags(&this_ptr_conv);
+       int8_t ret_conv = CommonOpenChannelFields_get_channel_flags(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       OpenChannel_set_channel_flags(&this_ptr_conv, val);
+       CommonOpenChannelFields_set_channel_flags(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ");
-       *ret_copy = OpenChannel_get_shutdown_scriptpubkey(&this_ptr_conv);
+       *ret_copy = CommonOpenChannelFields_get_shutdown_scriptpubkey(&this_ptr_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -47264,24 +51519,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1shutdown_1sc
        CHECK_ACCESS(val_ptr);
        LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr);
        val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val));
-       OpenChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
+       CommonOpenChannelFields_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKChannelTypeFeatures ret_var = OpenChannel_get_channel_type(&this_ptr_conv);
+       LDKChannelTypeFeatures ret_var = CommonOpenChannelFields_get_channel_type(&this_ptr_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonOpenChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -47291,25 +51546,27 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1typ
        val_conv.is_owned = ptr_is_owned(val);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
        val_conv = ChannelTypeFeatures_clone(&val_conv);
-       OpenChannel_set_channel_type(&this_ptr_conv, val_conv);
+       CommonOpenChannelFields_set_channel_type(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1new(JNIEnv *env, jclass clz, int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t push_msat_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t feerate_per_kw_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1new(JNIEnv *env, jclass clz, int8_tArray chain_hash_arg, int64_t temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t commitment_feerate_sat_per_1000_weight_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) {
        LDKThirtyTwoBytes chain_hash_arg_ref;
        CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32);
        (*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data);
-       LDKThirtyTwoBytes temporary_channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data);
+       LDKChannelId temporary_channel_id_arg_conv;
+       temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg);
+       temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv);
+       temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv);
        LDKPublicKey funding_pubkey_arg_ref;
        CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
        (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
        LDKPublicKey revocation_basepoint_arg_ref;
        CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33);
        (*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form);
-       LDKPublicKey payment_point_arg_ref;
-       CHECK((*env)->GetArrayLength(env, payment_point_arg) == 33);
-       (*env)->GetByteArrayRegion(env, payment_point_arg, 0, 33, payment_point_arg_ref.compressed_form);
+       LDKPublicKey payment_basepoint_arg_ref;
+       CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33);
+       (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form);
        LDKPublicKey delayed_payment_basepoint_arg_ref;
        CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33);
        (*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form);
@@ -47328,7 +51585,148 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1new(JNIEnv *en
        channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
        channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
-       LDKOpenChannel ret_var = OpenChannel_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_satoshis_arg, push_msat_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, feerate_per_kw_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv);
+       LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_new(chain_hash_arg_ref, temporary_channel_id_arg_conv, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, commitment_feerate_sat_per_1000_weight_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline uint64_t CommonOpenChannelFields_clone_ptr(LDKCommonOpenChannelFields *NONNULL_PTR arg) {
+       LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCommonOpenChannelFields arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = CommonOpenChannelFields_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCommonOpenChannelFields orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKCommonOpenChannelFields ret_var = CommonOpenChannelFields_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCommonOpenChannelFields o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv.is_owned = false;
+       int64_t ret_conv = CommonOpenChannelFields_hash(&o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKCommonOpenChannelFields a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKCommonOpenChannelFields b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = CommonOpenChannelFields_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKOpenChannel this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       OpenChannel_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKOpenChannel this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCommonOpenChannelFields ret_var = OpenChannel_get_common_fields(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKOpenChannel this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCommonOpenChannelFields val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = CommonOpenChannelFields_clone(&val_conv);
+       OpenChannel_set_common_fields(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKOpenChannel this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int64_t ret_conv = OpenChannel_get_push_msat(&this_ptr_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1push_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKOpenChannel this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       OpenChannel_set_push_msat(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKOpenChannel this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int64_t ret_conv = OpenChannel_get_channel_reserve_satoshis(&this_ptr_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKOpenChannel this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       OpenChannel_set_channel_reserve_satoshis(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int64_t push_msat_arg, int64_t channel_reserve_satoshis_arg) {
+       LDKCommonOpenChannelFields common_fields_arg_conv;
+       common_fields_arg_conv.inner = untag_ptr(common_fields_arg);
+       common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv);
+       common_fields_arg_conv = CommonOpenChannelFields_clone(&common_fields_arg_conv);
+       LDKOpenChannel ret_var = OpenChannel_new(common_fields_arg_conv, push_msat_arg, channel_reserve_satoshis_arg);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -47398,50 +51796,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1free(JNIEnv *en
        OpenChannelV2_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKOpenChannelV2 this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannelV2_get_chain_hash(&this_ptr_conv));
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       OpenChannelV2_set_chain_hash(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OpenChannelV2_get_temporary_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKCommonOpenChannelFields ret_var = OpenChannelV2_get_common_fields(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKOpenChannelV2 this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       OpenChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref);
+       LDKCommonOpenChannelFields val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = CommonOpenChannelFields_clone(&val_conv);
+       OpenChannelV2_set_common_fields(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -47463,139 +51842,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1f
        OpenChannelV2_set_funding_feerate_sat_per_1000_weight(&this_ptr_conv, val);
 }
 
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int32_t ret_conv = OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1commitment_1feerate_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int64_t ret_conv = OpenChannelV2_get_funding_satoshis(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       OpenChannelV2_set_funding_satoshis(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int64_t ret_conv = OpenChannelV2_get_dust_limit_satoshis(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       OpenChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int64_t ret_conv = OpenChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       OpenChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int64_t ret_conv = OpenChannelV2_get_htlc_minimum_msat(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       OpenChannelV2_set_htlc_minimum_msat(&this_ptr_conv, val);
-}
-
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int16_t ret_conv = OpenChannelV2_get_to_self_delay(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       OpenChannelV2_set_to_self_delay(&this_ptr_conv, val);
-}
-
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int16_t ret_conv = OpenChannelV2_get_max_accepted_htlcs(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       OpenChannelV2_set_max_accepted_htlcs(&this_ptr_conv, val);
-}
-
 JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1locktime(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKOpenChannelV2 this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
@@ -47615,144 +51861,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1locktime(J
        OpenChannelV2_set_locktime(&this_ptr_conv, val);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_funding_pubkey(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannelV2_set_funding_pubkey(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_revocation_basepoint(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannelV2_set_revocation_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_payment_basepoint(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannelV2_set_payment_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannelV2_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_htlc_basepoint(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannelV2_set_htlc_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannelV2_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       OpenChannelV2_set_first_per_commitment_point(&this_ptr_conv, val_ref);
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1second_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKOpenChannelV2 this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
@@ -47776,77 +51884,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1second_1pe
        OpenChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_t ret_conv = OpenChannelV2_get_channel_flags(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1channel_1flags(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       OpenChannelV2_set_channel_flags(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ");
-       *ret_copy = OpenChannelV2_get_shutdown_scriptpubkey(&this_ptr_conv);
-       int64_t ret_ref = tag_ptr(ret_copy, true);
-       return ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       void* val_ptr = untag_ptr(val);
-       CHECK_ACCESS(val_ptr);
-       LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr);
-       val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val));
-       OpenChannelV2_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKChannelTypeFeatures ret_var = OpenChannelV2_get_channel_type(&this_ptr_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKOpenChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKChannelTypeFeatures val_conv;
-       val_conv.inner = untag_ptr(val);
-       val_conv.is_owned = ptr_is_owned(val);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
-       val_conv = ChannelTypeFeatures_clone(&val_conv);
-       OpenChannelV2_set_channel_type(&this_ptr_conv, val_conv);
-}
-
 JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1require_1confirmed_1inputs(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKOpenChannelV2 this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
@@ -47867,45 +51904,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1require_1c
        OpenChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1new(JNIEnv *env, jclass clz, int8_tArray chain_hash_arg, int8_tArray temporary_channel_id_arg, int32_t funding_feerate_sat_per_1000_weight_arg, int32_t commitment_feerate_sat_per_1000_weight_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_tArray second_per_commitment_point_arg, int8_t channel_flags_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg, jclass require_confirmed_inputs_arg) {
-       LDKThirtyTwoBytes chain_hash_arg_ref;
-       CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32);
-       (*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data);
-       LDKThirtyTwoBytes temporary_channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data);
-       LDKPublicKey funding_pubkey_arg_ref;
-       CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
-       (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
-       LDKPublicKey revocation_basepoint_arg_ref;
-       CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33);
-       (*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form);
-       LDKPublicKey payment_basepoint_arg_ref;
-       CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33);
-       (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form);
-       LDKPublicKey delayed_payment_basepoint_arg_ref;
-       CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33);
-       (*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form);
-       LDKPublicKey htlc_basepoint_arg_ref;
-       CHECK((*env)->GetArrayLength(env, htlc_basepoint_arg) == 33);
-       (*env)->GetByteArrayRegion(env, htlc_basepoint_arg, 0, 33, htlc_basepoint_arg_ref.compressed_form);
-       LDKPublicKey first_per_commitment_point_arg_ref;
-       CHECK((*env)->GetArrayLength(env, first_per_commitment_point_arg) == 33);
-       (*env)->GetByteArrayRegion(env, first_per_commitment_point_arg, 0, 33, first_per_commitment_point_arg_ref.compressed_form);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int32_t funding_feerate_sat_per_1000_weight_arg, int32_t locktime_arg, int8_tArray second_per_commitment_point_arg, jclass require_confirmed_inputs_arg) {
+       LDKCommonOpenChannelFields common_fields_arg_conv;
+       common_fields_arg_conv.inner = untag_ptr(common_fields_arg);
+       common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv);
+       common_fields_arg_conv = CommonOpenChannelFields_clone(&common_fields_arg_conv);
        LDKPublicKey second_per_commitment_point_arg_ref;
        CHECK((*env)->GetArrayLength(env, second_per_commitment_point_arg) == 33);
        (*env)->GetByteArrayRegion(env, second_per_commitment_point_arg, 0, 33, second_per_commitment_point_arg_ref.compressed_form);
-       void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg);
-       CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr);
-       LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr);
-       shutdown_scriptpubkey_arg_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(shutdown_scriptpubkey_arg));
-       LDKChannelTypeFeatures channel_type_arg_conv;
-       channel_type_arg_conv.inner = untag_ptr(channel_type_arg);
-       channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
-       channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
        LDKCOption_NoneZ require_confirmed_inputs_arg_conv = LDKCOption_NoneZ_from_java(env, require_confirmed_inputs_arg);
-       LDKOpenChannelV2 ret_var = OpenChannelV2_new(chain_hash_arg_ref, temporary_channel_id_arg_ref, funding_feerate_sat_per_1000_weight_arg, commitment_feerate_sat_per_1000_weight_arg, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, to_self_delay_arg, max_accepted_htlcs_arg, locktime_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, second_per_commitment_point_arg_ref, channel_flags_arg, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv, require_confirmed_inputs_arg_conv);
+       LDKOpenChannelV2 ret_var = OpenChannelV2_new(common_fields_arg_conv, funding_feerate_sat_per_1000_weight_arg, locktime_arg, second_per_commitment_point_arg_ref, require_confirmed_inputs_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -47967,183 +51976,168 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1eq(JNIEnv *
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
-       LDKAcceptChannel this_obj_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKCommonAcceptChannelFields this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
        this_obj_conv.is_owned = ptr_is_owned(this_obj);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
-       AcceptChannel_free(this_obj_conv);
+       CommonAcceptChannelFields_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *AcceptChannel_get_temporary_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = CommonAcceptChannelFields_get_temporary_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       AcceptChannel_set_temporary_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       CommonAcceptChannelFields_set_temporary_channel_id(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int64_t ret_conv = AcceptChannel_get_dust_limit_satoshis(&this_ptr_conv);
+       int64_t ret_conv = CommonAcceptChannelFields_get_dust_limit_satoshis(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       AcceptChannel_set_dust_limit_satoshis(&this_ptr_conv, val);
+       CommonAcceptChannelFields_set_dust_limit_satoshis(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int64_t ret_conv = AcceptChannel_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
+       int64_t ret_conv = CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       AcceptChannel_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
+       CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int64_t ret_conv = AcceptChannel_get_channel_reserve_satoshis(&this_ptr_conv);
+       int64_t ret_conv = CommonAcceptChannelFields_get_htlc_minimum_msat(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       AcceptChannel_set_channel_reserve_satoshis(&this_ptr_conv, val);
+       CommonAcceptChannelFields_set_htlc_minimum_msat(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int64_t ret_conv = AcceptChannel_get_htlc_minimum_msat(&this_ptr_conv);
+       int32_t ret_conv = CommonAcceptChannelFields_get_minimum_depth(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       AcceptChannel_set_htlc_minimum_msat(&this_ptr_conv, val);
+       CommonAcceptChannelFields_set_minimum_depth(&this_ptr_conv, val);
 }
 
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int32_t ret_conv = AcceptChannel_get_minimum_depth(&this_ptr_conv);
+       int16_t ret_conv = CommonAcceptChannelFields_get_to_self_delay(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       AcceptChannel_set_minimum_depth(&this_ptr_conv, val);
+       CommonAcceptChannelFields_set_to_self_delay(&this_ptr_conv, val);
 }
 
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int16_t ret_conv = AcceptChannel_get_to_self_delay(&this_ptr_conv);
+       int16_t ret_conv = CommonAcceptChannelFields_get_max_accepted_htlcs(&this_ptr_conv);
        return ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       AcceptChannel_set_to_self_delay(&this_ptr_conv, val);
+       CommonAcceptChannelFields_set_max_accepted_htlcs(&this_ptr_conv, val);
 }
 
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int16_t ret_conv = AcceptChannel_get_max_accepted_htlcs(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
-       LDKAcceptChannel this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       AcceptChannel_set_max_accepted_htlcs(&this_ptr_conv, val);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_funding_pubkey(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_funding_pubkey(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -48151,22 +52145,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1funding_1p
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannel_set_funding_pubkey(&this_ptr_conv, val_ref);
+       CommonAcceptChannelFields_set_funding_pubkey(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_revocation_basepoint(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -48174,22 +52168,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1revocation
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannel_set_revocation_basepoint(&this_ptr_conv, val_ref);
+       CommonAcceptChannelFields_set_revocation_basepoint(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_payment_point(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_payment_basepoint(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -48197,22 +52191,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1payment_1p
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannel_set_payment_point(&this_ptr_conv, val_ref);
+       CommonAcceptChannelFields_set_payment_basepoint(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -48220,22 +52214,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1delayed_1p
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannel_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
+       CommonAcceptChannelFields_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_htlc_basepoint(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -48243,22 +52237,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1base
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannel_set_htlc_basepoint(&this_ptr_conv, val_ref);
+       CommonAcceptChannelFields_set_htlc_basepoint(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, CommonAcceptChannelFields_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -48266,23 +52260,23 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1first_1per
        LDKPublicKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 33);
        (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref);
+       CommonAcceptChannelFields_set_first_per_commitment_point(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
        LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ");
-       *ret_copy = AcceptChannel_get_shutdown_scriptpubkey(&this_ptr_conv);
+       *ret_copy = CommonAcceptChannelFields_get_shutdown_scriptpubkey(&this_ptr_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -48291,24 +52285,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1shutdown_1
        CHECK_ACCESS(val_ptr);
        LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr);
        val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val));
-       AcceptChannel_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
+       CommonAcceptChannelFields_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKChannelTypeFeatures ret_var = AcceptChannel_get_channel_type(&this_ptr_conv);
+       LDKChannelTypeFeatures ret_var = CommonAcceptChannelFields_get_channel_type(&this_ptr_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKAcceptChannel this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKCommonAcceptChannelFields this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
@@ -48318,22 +52312,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1t
        val_conv.is_owned = ptr_is_owned(val);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
        val_conv = ChannelTypeFeatures_clone(&val_conv);
-       AcceptChannel_set_channel_type(&this_ptr_conv, val_conv);
+       CommonAcceptChannelFields_set_channel_type(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1new(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t channel_reserve_satoshis_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_point_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) {
-       LDKThirtyTwoBytes temporary_channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1new(JNIEnv *env, jclass clz, int64_t temporary_channel_id_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg) {
+       LDKChannelId temporary_channel_id_arg_conv;
+       temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg);
+       temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv);
+       temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv);
        LDKPublicKey funding_pubkey_arg_ref;
        CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
        (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
        LDKPublicKey revocation_basepoint_arg_ref;
        CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33);
        (*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form);
-       LDKPublicKey payment_point_arg_ref;
-       CHECK((*env)->GetArrayLength(env, payment_point_arg) == 33);
-       (*env)->GetByteArrayRegion(env, payment_point_arg, 0, 33, payment_point_arg_ref.compressed_form);
+       LDKPublicKey payment_basepoint_arg_ref;
+       CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33);
+       (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form);
        LDKPublicKey delayed_payment_basepoint_arg_ref;
        CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33);
        (*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form);
@@ -48352,7 +52348,129 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1new(JNIEnv *
        channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
        channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
-       LDKAcceptChannel ret_var = AcceptChannel_new(temporary_channel_id_arg_ref, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, channel_reserve_satoshis_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_point_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv);
+       LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_new(temporary_channel_id_arg_conv, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline uint64_t CommonAcceptChannelFields_clone_ptr(LDKCommonAcceptChannelFields *NONNULL_PTR arg) {
+       LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCommonAcceptChannelFields arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = CommonAcceptChannelFields_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCommonAcceptChannelFields orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKCommonAcceptChannelFields ret_var = CommonAcceptChannelFields_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCommonAcceptChannelFields o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv.is_owned = false;
+       int64_t ret_conv = CommonAcceptChannelFields_hash(&o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKCommonAcceptChannelFields a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKCommonAcceptChannelFields b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = CommonAcceptChannelFields_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKAcceptChannel this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       AcceptChannel_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKAcceptChannel this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCommonAcceptChannelFields ret_var = AcceptChannel_get_common_fields(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKAcceptChannel this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCommonAcceptChannelFields val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = CommonAcceptChannelFields_clone(&val_conv);
+       AcceptChannel_set_common_fields(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKAcceptChannel this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int64_t ret_conv = AcceptChannel_get_channel_reserve_satoshis(&this_ptr_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1reserve_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKAcceptChannel this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       AcceptChannel_set_channel_reserve_satoshis(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int64_t channel_reserve_satoshis_arg) {
+       LDKCommonAcceptChannelFields common_fields_arg_conv;
+       common_fields_arg_conv.inner = untag_ptr(common_fields_arg);
+       common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv);
+       common_fields_arg_conv = CommonAcceptChannelFields_clone(&common_fields_arg_conv);
+       LDKAcceptChannel ret_var = AcceptChannel_new(common_fields_arg_conv, channel_reserve_satoshis_arg);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -48422,27 +52540,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1free(JNIEnv *
        AcceptChannelV2_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKAcceptChannelV2 this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *AcceptChannelV2_get_temporary_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKCommonAcceptChannelFields ret_var = AcceptChannelV2_get_common_fields(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1common_1fields(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKAcceptChannelV2 this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       AcceptChannelV2_set_temporary_channel_id(&this_ptr_conv, val_ref);
+       LDKCommonAcceptChannelFields val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = CommonAcceptChannelFields_clone(&val_conv);
+       AcceptChannelV2_set_common_fields(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -48464,258 +52586,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1funding_
        AcceptChannelV2_set_funding_satoshis(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int64_t ret_conv = AcceptChannelV2_get_dust_limit_satoshis(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1dust_1limit_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       AcceptChannelV2_set_dust_limit_satoshis(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int64_t ret_conv = AcceptChannelV2_get_max_htlc_value_in_flight_msat(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1max_1htlc_1value_1in_1flight_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       AcceptChannelV2_set_max_htlc_value_in_flight_msat(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int64_t ret_conv = AcceptChannelV2_get_htlc_minimum_msat(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       AcceptChannelV2_set_htlc_minimum_msat(&this_ptr_conv, val);
-}
-
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int32_t ret_conv = AcceptChannelV2_get_minimum_depth(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr, int32_t val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       AcceptChannelV2_set_minimum_depth(&this_ptr_conv, val);
-}
-
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int16_t ret_conv = AcceptChannelV2_get_to_self_delay(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       AcceptChannelV2_set_to_self_delay(&this_ptr_conv, val);
-}
-
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int16_t ret_conv = AcceptChannelV2_get_max_accepted_htlcs(&this_ptr_conv);
-       return ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1max_1accepted_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       AcceptChannelV2_set_max_accepted_htlcs(&this_ptr_conv, val);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_funding_pubkey(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannelV2_set_funding_pubkey(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_revocation_basepoint(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannelV2_set_revocation_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_payment_basepoint(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannelV2_set_payment_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannelV2_set_delayed_payment_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_htlc_basepoint(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannelV2_set_htlc_basepoint(&this_ptr_conv, val_ref);
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannelV2_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
-       return ret_arr;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1first_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       AcceptChannelV2_set_first_per_commitment_point(&this_ptr_conv, val_ref);
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1second_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKAcceptChannelV2 this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
@@ -48739,58 +52609,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1second_1
        AcceptChannelV2_set_second_per_commitment_point(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKCOption_CVec_u8ZZ *ret_copy = MALLOC(sizeof(LDKCOption_CVec_u8ZZ), "LDKCOption_CVec_u8ZZ");
-       *ret_copy = AcceptChannelV2_get_shutdown_scriptpubkey(&this_ptr_conv);
-       int64_t ret_ref = tag_ptr(ret_copy, true);
-       return ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1shutdown_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       void* val_ptr = untag_ptr(val);
-       CHECK_ACCESS(val_ptr);
-       LDKCOption_CVec_u8ZZ val_conv = *(LDKCOption_CVec_u8ZZ*)(val_ptr);
-       val_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(val));
-       AcceptChannelV2_set_shutdown_scriptpubkey(&this_ptr_conv, val_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKChannelTypeFeatures ret_var = AcceptChannelV2_get_channel_type(&this_ptr_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
-       return ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1channel_1type(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKAcceptChannelV2 this_ptr_conv;
-       this_ptr_conv.inner = untag_ptr(this_ptr);
-       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
-       this_ptr_conv.is_owned = false;
-       LDKChannelTypeFeatures val_conv;
-       val_conv.inner = untag_ptr(val);
-       val_conv.is_owned = ptr_is_owned(val);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
-       val_conv = ChannelTypeFeatures_clone(&val_conv);
-       AcceptChannelV2_set_channel_type(&this_ptr_conv, val_conv);
-}
-
 JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1require_1confirmed_1inputs(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKAcceptChannelV2 this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
@@ -48811,42 +52629,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1require_
        AcceptChannelV2_set_require_confirmed_inputs(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1new(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id_arg, int64_t funding_satoshis_arg, int64_t dust_limit_satoshis_arg, int64_t max_htlc_value_in_flight_msat_arg, int64_t htlc_minimum_msat_arg, int32_t minimum_depth_arg, int16_t to_self_delay_arg, int16_t max_accepted_htlcs_arg, int8_tArray funding_pubkey_arg, int8_tArray revocation_basepoint_arg, int8_tArray payment_basepoint_arg, int8_tArray delayed_payment_basepoint_arg, int8_tArray htlc_basepoint_arg, int8_tArray first_per_commitment_point_arg, int8_tArray second_per_commitment_point_arg, int64_t shutdown_scriptpubkey_arg, int64_t channel_type_arg, jclass require_confirmed_inputs_arg) {
-       LDKThirtyTwoBytes temporary_channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data);
-       LDKPublicKey funding_pubkey_arg_ref;
-       CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
-       (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
-       LDKPublicKey revocation_basepoint_arg_ref;
-       CHECK((*env)->GetArrayLength(env, revocation_basepoint_arg) == 33);
-       (*env)->GetByteArrayRegion(env, revocation_basepoint_arg, 0, 33, revocation_basepoint_arg_ref.compressed_form);
-       LDKPublicKey payment_basepoint_arg_ref;
-       CHECK((*env)->GetArrayLength(env, payment_basepoint_arg) == 33);
-       (*env)->GetByteArrayRegion(env, payment_basepoint_arg, 0, 33, payment_basepoint_arg_ref.compressed_form);
-       LDKPublicKey delayed_payment_basepoint_arg_ref;
-       CHECK((*env)->GetArrayLength(env, delayed_payment_basepoint_arg) == 33);
-       (*env)->GetByteArrayRegion(env, delayed_payment_basepoint_arg, 0, 33, delayed_payment_basepoint_arg_ref.compressed_form);
-       LDKPublicKey htlc_basepoint_arg_ref;
-       CHECK((*env)->GetArrayLength(env, htlc_basepoint_arg) == 33);
-       (*env)->GetByteArrayRegion(env, htlc_basepoint_arg, 0, 33, htlc_basepoint_arg_ref.compressed_form);
-       LDKPublicKey first_per_commitment_point_arg_ref;
-       CHECK((*env)->GetArrayLength(env, first_per_commitment_point_arg) == 33);
-       (*env)->GetByteArrayRegion(env, first_per_commitment_point_arg, 0, 33, first_per_commitment_point_arg_ref.compressed_form);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1new(JNIEnv *env, jclass clz, int64_t common_fields_arg, int64_t funding_satoshis_arg, int8_tArray second_per_commitment_point_arg, jclass require_confirmed_inputs_arg) {
+       LDKCommonAcceptChannelFields common_fields_arg_conv;
+       common_fields_arg_conv.inner = untag_ptr(common_fields_arg);
+       common_fields_arg_conv.is_owned = ptr_is_owned(common_fields_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(common_fields_arg_conv);
+       common_fields_arg_conv = CommonAcceptChannelFields_clone(&common_fields_arg_conv);
        LDKPublicKey second_per_commitment_point_arg_ref;
        CHECK((*env)->GetArrayLength(env, second_per_commitment_point_arg) == 33);
        (*env)->GetByteArrayRegion(env, second_per_commitment_point_arg, 0, 33, second_per_commitment_point_arg_ref.compressed_form);
-       void* shutdown_scriptpubkey_arg_ptr = untag_ptr(shutdown_scriptpubkey_arg);
-       CHECK_ACCESS(shutdown_scriptpubkey_arg_ptr);
-       LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg_conv = *(LDKCOption_CVec_u8ZZ*)(shutdown_scriptpubkey_arg_ptr);
-       shutdown_scriptpubkey_arg_conv = COption_CVec_u8ZZ_clone((LDKCOption_CVec_u8ZZ*)untag_ptr(shutdown_scriptpubkey_arg));
-       LDKChannelTypeFeatures channel_type_arg_conv;
-       channel_type_arg_conv.inner = untag_ptr(channel_type_arg);
-       channel_type_arg_conv.is_owned = ptr_is_owned(channel_type_arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_arg_conv);
-       channel_type_arg_conv = ChannelTypeFeatures_clone(&channel_type_arg_conv);
        LDKCOption_NoneZ require_confirmed_inputs_arg_conv = LDKCOption_NoneZ_from_java(env, require_confirmed_inputs_arg);
-       LDKAcceptChannelV2 ret_var = AcceptChannelV2_new(temporary_channel_id_arg_ref, funding_satoshis_arg, dust_limit_satoshis_arg, max_htlc_value_in_flight_msat_arg, htlc_minimum_msat_arg, minimum_depth_arg, to_self_delay_arg, max_accepted_htlcs_arg, funding_pubkey_arg_ref, revocation_basepoint_arg_ref, payment_basepoint_arg_ref, delayed_payment_basepoint_arg_ref, htlc_basepoint_arg_ref, first_per_commitment_point_arg_ref, second_per_commitment_point_arg_ref, shutdown_scriptpubkey_arg_conv, channel_type_arg_conv, require_confirmed_inputs_arg_conv);
+       LDKAcceptChannelV2 ret_var = AcceptChannelV2_new(common_fields_arg_conv, funding_satoshis_arg, second_per_commitment_point_arg_ref, require_confirmed_inputs_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -48916,27 +52709,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1free(JNIEnv *e
        FundingCreated_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKFundingCreated this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *FundingCreated_get_temporary_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = FundingCreated_get_temporary_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1temporary_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKFundingCreated this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       FundingCreated_set_temporary_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       FundingCreated_set_temporary_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1funding_1txid(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -49004,17 +52801,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1signature
        FundingCreated_set_signature(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id_arg, int8_tArray funding_txid_arg, int16_t funding_output_index_arg, int8_tArray signature_arg) {
-       LDKThirtyTwoBytes temporary_channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, temporary_channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, temporary_channel_id_arg, 0, 32, temporary_channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new(JNIEnv *env, jclass clz, int64_t temporary_channel_id_arg, int8_tArray funding_txid_arg, int16_t funding_output_index_arg, int8_tArray signature_arg) {
+       LDKChannelId temporary_channel_id_arg_conv;
+       temporary_channel_id_arg_conv.inner = untag_ptr(temporary_channel_id_arg);
+       temporary_channel_id_arg_conv.is_owned = ptr_is_owned(temporary_channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_arg_conv);
+       temporary_channel_id_arg_conv = ChannelId_clone(&temporary_channel_id_arg_conv);
        LDKThirtyTwoBytes funding_txid_arg_ref;
        CHECK((*env)->GetArrayLength(env, funding_txid_arg) == 32);
        (*env)->GetByteArrayRegion(env, funding_txid_arg, 0, 32, funding_txid_arg_ref.data);
        LDKECDSASignature signature_arg_ref;
        CHECK((*env)->GetArrayLength(env, signature_arg) == 64);
        (*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form);
-       LDKFundingCreated ret_var = FundingCreated_new(temporary_channel_id_arg_ref, funding_txid_arg_ref, funding_output_index_arg, signature_arg_ref);
+       LDKFundingCreated ret_var = FundingCreated_new(temporary_channel_id_arg_conv, funding_txid_arg_ref, funding_output_index_arg, signature_arg_ref);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -49084,27 +52883,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1free(JNIEnv *en
        FundingSigned_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKFundingSigned this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *FundingSigned_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = FundingSigned_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKFundingSigned this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       FundingSigned_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       FundingSigned_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1signature(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -49130,14 +52933,16 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1signature(
        FundingSigned_set_signature(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray signature_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray signature_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKECDSASignature signature_arg_ref;
        CHECK((*env)->GetArrayLength(env, signature_arg) == 64);
        (*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form);
-       LDKFundingSigned ret_var = FundingSigned_new(channel_id_arg_ref, signature_arg_ref);
+       LDKFundingSigned ret_var = FundingSigned_new(channel_id_arg_conv, signature_arg_ref);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -49207,27 +53012,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1free(JNIEnv *env
        ChannelReady_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelReady this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelReady_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = ChannelReady_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKChannelReady this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       ChannelReady_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       ChannelReady_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1next_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -49278,10 +53087,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1set_1short_1chan
        ChannelReady_set_short_channel_id_alias(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray next_per_commitment_point_arg, int64_t short_channel_id_alias_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray next_per_commitment_point_arg, int64_t short_channel_id_alias_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKPublicKey next_per_commitment_point_arg_ref;
        CHECK((*env)->GetArrayLength(env, next_per_commitment_point_arg) == 33);
        (*env)->GetByteArrayRegion(env, next_per_commitment_point_arg, 0, 33, next_per_commitment_point_arg_ref.compressed_form);
@@ -49289,7 +53100,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReady_1new(JNIEnv *e
        CHECK_ACCESS(short_channel_id_alias_arg_ptr);
        LDKCOption_u64Z short_channel_id_alias_arg_conv = *(LDKCOption_u64Z*)(short_channel_id_alias_arg_ptr);
        short_channel_id_alias_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(short_channel_id_alias_arg));
-       LDKChannelReady ret_var = ChannelReady_new(channel_id_arg_ref, next_per_commitment_point_arg_ref, short_channel_id_alias_arg_conv);
+       LDKChannelReady ret_var = ChannelReady_new(channel_id_arg_conv, next_per_commitment_point_arg_ref, short_channel_id_alias_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -49359,27 +53170,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1free(JNIEnv *env, jclass
        Stfu_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKStfu this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *Stfu_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = Stfu_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKStfu this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       Stfu_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       Stfu_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1initiator(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -49401,11 +53216,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1set_1initiator(JNIEnv *e
        Stfu_set_initiator(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Stfu_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_t initiator_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
-       LDKStfu ret_var = Stfu_new(channel_id_arg_ref, initiator_arg);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Stfu_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_t initiator_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+       LDKStfu ret_var = Stfu_new(channel_id_arg_conv, initiator_arg);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -49465,27 +53282,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1free(JNIEnv *env, jcla
        Splice_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Splice_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Splice_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKSplice this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *Splice_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = Splice_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKSplice this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       Splice_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       Splice_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Splice_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -49591,17 +53412,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1set_1funding_1pubkey(J
        Splice_set_funding_pubkey(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Splice_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int32_t funding_feerate_perkw_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Splice_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int32_t funding_feerate_perkw_arg, int32_t locktime_arg, int8_tArray funding_pubkey_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKThirtyTwoBytes chain_hash_arg_ref;
        CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32);
        (*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data);
        LDKPublicKey funding_pubkey_arg_ref;
        CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
        (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
-       LDKSplice ret_var = Splice_new(channel_id_arg_ref, chain_hash_arg_ref, relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, funding_pubkey_arg_ref);
+       LDKSplice ret_var = Splice_new(channel_id_arg_conv, chain_hash_arg_ref, relative_satoshis_arg, funding_feerate_perkw_arg, locktime_arg, funding_pubkey_arg_ref);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -49661,27 +53484,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1free(JNIEnv *env, j
        SpliceAck_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKSpliceAck this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *SpliceAck_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = SpliceAck_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKSpliceAck this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       SpliceAck_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       SpliceAck_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -49749,17 +53576,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1set_1funding_1pubke
        SpliceAck_set_funding_pubkey(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceAck_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int8_tArray funding_pubkey_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceAck_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray chain_hash_arg, int64_t relative_satoshis_arg, int8_tArray funding_pubkey_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKThirtyTwoBytes chain_hash_arg_ref;
        CHECK((*env)->GetArrayLength(env, chain_hash_arg) == 32);
        (*env)->GetByteArrayRegion(env, chain_hash_arg, 0, 32, chain_hash_arg_ref.data);
        LDKPublicKey funding_pubkey_arg_ref;
        CHECK((*env)->GetArrayLength(env, funding_pubkey_arg) == 33);
        (*env)->GetByteArrayRegion(env, funding_pubkey_arg, 0, 33, funding_pubkey_arg_ref.compressed_form);
-       LDKSpliceAck ret_var = SpliceAck_new(channel_id_arg_ref, chain_hash_arg_ref, relative_satoshis_arg, funding_pubkey_arg_ref);
+       LDKSpliceAck ret_var = SpliceAck_new(channel_id_arg_conv, chain_hash_arg_ref, relative_satoshis_arg, funding_pubkey_arg_ref);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -49819,34 +53648,40 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1free(JNIEnv *env
        SpliceLocked_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKSpliceLocked this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *SpliceLocked_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = SpliceLocked_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKSpliceLocked this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       SpliceLocked_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       SpliceLocked_set_channel_id(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
-       LDKSpliceLocked ret_var = SpliceLocked_new(channel_id_arg_ref);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+       LDKSpliceLocked ret_var = SpliceLocked_new(channel_id_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -49906,27 +53741,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1free(JNIEnv *env,
        TxAddInput_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKTxAddInput this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAddInput_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = TxAddInput_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKTxAddInput this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       TxAddInput_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       TxAddInput_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -50013,16 +53852,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1set_1sequence(JNIE
        TxAddInput_set_sequence(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg, int64_t prevtx_arg, int32_t prevtx_out_arg, int32_t sequence_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddInput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg, int64_t prevtx_arg, int32_t prevtx_out_arg, int32_t sequence_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKTransactionU16LenLimited prevtx_arg_conv;
        prevtx_arg_conv.inner = untag_ptr(prevtx_arg);
        prevtx_arg_conv.is_owned = ptr_is_owned(prevtx_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(prevtx_arg_conv);
        prevtx_arg_conv = TransactionU16LenLimited_clone(&prevtx_arg_conv);
-       LDKTxAddInput ret_var = TxAddInput_new(channel_id_arg_ref, serial_id_arg, prevtx_arg_conv, prevtx_out_arg, sequence_arg);
+       LDKTxAddInput ret_var = TxAddInput_new(channel_id_arg_conv, serial_id_arg, prevtx_arg_conv, prevtx_out_arg, sequence_arg);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -50092,27 +53933,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1free(JNIEnv *env,
        TxAddOutput_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKTxAddOutput this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAddOutput_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = TxAddOutput_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKTxAddOutput this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       TxAddOutput_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       TxAddOutput_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -50179,15 +54024,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1set_1script(JNIEn
        TxAddOutput_set_script(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg, int64_t sats_arg, int8_tArray script_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg, int64_t sats_arg, int8_tArray script_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKCVec_u8Z script_arg_ref;
        script_arg_ref.datalen = (*env)->GetArrayLength(env, script_arg);
        script_arg_ref.data = MALLOC(script_arg_ref.datalen, "LDKCVec_u8Z Bytes");
        (*env)->GetByteArrayRegion(env, script_arg, 0, script_arg_ref.datalen, script_arg_ref.data);
-       LDKTxAddOutput ret_var = TxAddOutput_new(channel_id_arg_ref, serial_id_arg, sats_arg, script_arg_ref);
+       LDKTxAddOutput ret_var = TxAddOutput_new(channel_id_arg_conv, serial_id_arg, sats_arg, script_arg_ref);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -50257,27 +54104,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1free(JNIEnv *en
        TxRemoveInput_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKTxRemoveInput this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxRemoveInput_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = TxRemoveInput_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKTxRemoveInput this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       TxRemoveInput_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       TxRemoveInput_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -50299,11 +54150,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1set_1serial_1id
        TxRemoveInput_set_serial_id(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
-       LDKTxRemoveInput ret_var = TxRemoveInput_new(channel_id_arg_ref, serial_id_arg);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+       LDKTxRemoveInput ret_var = TxRemoveInput_new(channel_id_arg_conv, serial_id_arg);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -50373,27 +54226,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1free(JNIEnv *e
        TxRemoveOutput_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKTxRemoveOutput this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxRemoveOutput_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = TxRemoveOutput_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKTxRemoveOutput this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       TxRemoveOutput_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       TxRemoveOutput_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1serial_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -50415,11 +54272,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1set_1serial_1i
        TxRemoveOutput_set_serial_id(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t serial_id_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
-       LDKTxRemoveOutput ret_var = TxRemoveOutput_new(channel_id_arg_ref, serial_id_arg);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t serial_id_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+       LDKTxRemoveOutput ret_var = TxRemoveOutput_new(channel_id_arg_conv, serial_id_arg);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -50489,34 +54348,40 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxComplete_1free(JNIEnv *env,
        TxComplete_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxComplete_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxComplete_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKTxComplete this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxComplete_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = TxComplete_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxComplete_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxComplete_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKTxComplete this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       TxComplete_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       TxComplete_set_channel_id(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxComplete_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
-       LDKTxComplete ret_var = TxComplete_new(channel_id_arg_ref);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxComplete_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+       LDKTxComplete ret_var = TxComplete_new(channel_id_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -50586,27 +54451,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1free(JNIEnv *env
        TxSignatures_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKTxSignatures this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxSignatures_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = TxSignatures_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKTxSignatures this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       TxSignatures_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       TxSignatures_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1tx_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -50678,10 +54547,37 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1witnesses(J
        TxSignatures_set_witnesses(&this_ptr_conv, val_constr);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray tx_hash_arg, jobjectArray witnesses_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1funding_1outpoint_1sig(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKTxSignatures this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCOption_ECDSASignatureZ *ret_copy = MALLOC(sizeof(LDKCOption_ECDSASignatureZ), "LDKCOption_ECDSASignatureZ");
+       *ret_copy = TxSignatures_get_funding_outpoint_sig(&this_ptr_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1funding_1outpoint_1sig(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKTxSignatures this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       void* val_ptr = untag_ptr(val);
+       CHECK_ACCESS(val_ptr);
+       LDKCOption_ECDSASignatureZ val_conv = *(LDKCOption_ECDSASignatureZ*)(val_ptr);
+       val_conv = COption_ECDSASignatureZ_clone((LDKCOption_ECDSASignatureZ*)untag_ptr(val));
+       TxSignatures_set_funding_outpoint_sig(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray tx_hash_arg, jobjectArray witnesses_arg, int64_t funding_outpoint_sig_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKThirtyTwoBytes tx_hash_arg_ref;
        CHECK((*env)->GetArrayLength(env, tx_hash_arg) == 32);
        (*env)->GetByteArrayRegion(env, tx_hash_arg, 0, 32, tx_hash_arg_ref.data);
@@ -50700,7 +54596,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxSignatures_1new(JNIEnv *e
                witnesses_arg_conv_8_ref.data_is_owned = true;
                witnesses_arg_constr.data[i] = witnesses_arg_conv_8_ref;
        }
-       LDKTxSignatures ret_var = TxSignatures_new(channel_id_arg_ref, tx_hash_arg_ref, witnesses_arg_constr);
+       void* funding_outpoint_sig_arg_ptr = untag_ptr(funding_outpoint_sig_arg);
+       CHECK_ACCESS(funding_outpoint_sig_arg_ptr);
+       LDKCOption_ECDSASignatureZ funding_outpoint_sig_arg_conv = *(LDKCOption_ECDSASignatureZ*)(funding_outpoint_sig_arg_ptr);
+       funding_outpoint_sig_arg_conv = COption_ECDSASignatureZ_clone((LDKCOption_ECDSASignatureZ*)untag_ptr(funding_outpoint_sig_arg));
+       LDKTxSignatures ret_var = TxSignatures_new(channel_id_arg_conv, tx_hash_arg_ref, witnesses_arg_constr, funding_outpoint_sig_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -50770,27 +54670,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1free(JNIEnv *env, j
        TxInitRbf_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKTxInitRbf this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxInitRbf_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = TxInitRbf_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKTxInitRbf this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       TxInitRbf_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       TxInitRbf_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1locktime(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -50856,15 +54760,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1set_1funding_1outpu
        TxInitRbf_set_funding_output_contribution(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int32_t locktime_arg, int32_t feerate_sat_per_1000_weight_arg, int64_t funding_output_contribution_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int32_t locktime_arg, int32_t feerate_sat_per_1000_weight_arg, int64_t funding_output_contribution_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        void* funding_output_contribution_arg_ptr = untag_ptr(funding_output_contribution_arg);
        CHECK_ACCESS(funding_output_contribution_arg_ptr);
        LDKCOption_i64Z funding_output_contribution_arg_conv = *(LDKCOption_i64Z*)(funding_output_contribution_arg_ptr);
        funding_output_contribution_arg_conv = COption_i64Z_clone((LDKCOption_i64Z*)untag_ptr(funding_output_contribution_arg));
-       LDKTxInitRbf ret_var = TxInitRbf_new(channel_id_arg_ref, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg_conv);
+       LDKTxInitRbf ret_var = TxInitRbf_new(channel_id_arg_conv, locktime_arg, feerate_sat_per_1000_weight_arg, funding_output_contribution_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -50934,27 +54840,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1free(JNIEnv *env, jc
        TxAckRbf_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKTxAckRbf this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAckRbf_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = TxAckRbf_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKTxAckRbf this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       TxAckRbf_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       TxAckRbf_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1funding_1output_1contribution(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -50982,15 +54892,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1set_1funding_1output
        TxAckRbf_set_funding_output_contribution(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t funding_output_contribution_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t funding_output_contribution_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        void* funding_output_contribution_arg_ptr = untag_ptr(funding_output_contribution_arg);
        CHECK_ACCESS(funding_output_contribution_arg_ptr);
        LDKCOption_i64Z funding_output_contribution_arg_conv = *(LDKCOption_i64Z*)(funding_output_contribution_arg_ptr);
        funding_output_contribution_arg_conv = COption_i64Z_clone((LDKCOption_i64Z*)untag_ptr(funding_output_contribution_arg));
-       LDKTxAckRbf ret_var = TxAckRbf_new(channel_id_arg_ref, funding_output_contribution_arg_conv);
+       LDKTxAckRbf ret_var = TxAckRbf_new(channel_id_arg_conv, funding_output_contribution_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -51060,27 +54972,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1free(JNIEnv *env, jcl
        TxAbort_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKTxAbort this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TxAbort_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = TxAbort_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKTxAbort this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       TxAbort_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       TxAbort_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -51109,15 +55025,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1set_1data(JNIEnv *env
        TxAbort_set_data(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAbort_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray data_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxAbort_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray data_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKCVec_u8Z data_arg_ref;
        data_arg_ref.datalen = (*env)->GetArrayLength(env, data_arg);
        data_arg_ref.data = MALLOC(data_arg_ref.datalen, "LDKCVec_u8Z Bytes");
        (*env)->GetByteArrayRegion(env, data_arg, 0, data_arg_ref.datalen, data_arg_ref.data);
-       LDKTxAbort ret_var = TxAbort_new(channel_id_arg_ref, data_arg_ref);
+       LDKTxAbort ret_var = TxAbort_new(channel_id_arg_conv, data_arg_ref);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -51187,27 +55105,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1free(JNIEnv *env, jc
        Shutdown_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKShutdown this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *Shutdown_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = Shutdown_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKShutdown this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       Shutdown_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       Shutdown_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -51236,15 +55158,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1scriptpubkey(JN
        Shutdown_set_scriptpubkey(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray scriptpubkey_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray scriptpubkey_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKCVec_u8Z scriptpubkey_arg_ref;
        scriptpubkey_arg_ref.datalen = (*env)->GetArrayLength(env, scriptpubkey_arg);
        scriptpubkey_arg_ref.data = MALLOC(scriptpubkey_arg_ref.datalen, "LDKCVec_u8Z Bytes");
        (*env)->GetByteArrayRegion(env, scriptpubkey_arg, 0, scriptpubkey_arg_ref.datalen, scriptpubkey_arg_ref.data);
-       LDKShutdown ret_var = Shutdown_new(channel_id_arg_ref, scriptpubkey_arg_ref);
+       LDKShutdown ret_var = Shutdown_new(channel_id_arg_conv, scriptpubkey_arg_ref);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -51423,27 +55347,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1free(JNIEnv *en
        ClosingSigned_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKClosingSigned this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ClosingSigned_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = ClosingSigned_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKClosingSigned this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       ClosingSigned_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       ClosingSigned_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1fee_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -51515,10 +55443,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1fee_1range
        ClosingSigned_set_fee_range(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t fee_satoshis_arg, int8_tArray signature_arg, int64_t fee_range_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t fee_satoshis_arg, int8_tArray signature_arg, int64_t fee_range_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKECDSASignature signature_arg_ref;
        CHECK((*env)->GetArrayLength(env, signature_arg) == 64);
        (*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form);
@@ -51527,7 +55457,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new(JNIEnv *
        fee_range_arg_conv.is_owned = ptr_is_owned(fee_range_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(fee_range_arg_conv);
        fee_range_arg_conv = ClosingSignedFeeRange_clone(&fee_range_arg_conv);
-       LDKClosingSigned ret_var = ClosingSigned_new(channel_id_arg_ref, fee_satoshis_arg, signature_arg_ref, fee_range_arg_conv);
+       LDKClosingSigned ret_var = ClosingSigned_new(channel_id_arg_conv, fee_satoshis_arg, signature_arg_ref, fee_range_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -51597,27 +55527,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1free(JNIEnv *en
        UpdateAddHTLC_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKUpdateAddHTLC this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateAddHTLC_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = UpdateAddHTLC_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKUpdateAddHTLC this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       UpdateAddHTLC_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       UpdateAddHTLC_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -51775,10 +55709,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1blinding_1
        UpdateAddHTLC_set_blinding_point(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t htlc_id_arg, int64_t amount_msat_arg, int8_tArray payment_hash_arg, int32_t cltv_expiry_arg, int64_t skimmed_fee_msat_arg, int64_t onion_routing_packet_arg, int8_tArray blinding_point_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t htlc_id_arg, int64_t amount_msat_arg, int8_tArray payment_hash_arg, int32_t cltv_expiry_arg, int64_t skimmed_fee_msat_arg, int64_t onion_routing_packet_arg, int8_tArray blinding_point_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKThirtyTwoBytes payment_hash_arg_ref;
        CHECK((*env)->GetArrayLength(env, payment_hash_arg) == 32);
        (*env)->GetByteArrayRegion(env, payment_hash_arg, 0, 32, payment_hash_arg_ref.data);
@@ -51794,7 +55730,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1new(JNIEnv *
        LDKPublicKey blinding_point_arg_ref;
        CHECK((*env)->GetArrayLength(env, blinding_point_arg) == 33);
        (*env)->GetByteArrayRegion(env, blinding_point_arg, 0, 33, blinding_point_arg_ref.compressed_form);
-       LDKUpdateAddHTLC ret_var = UpdateAddHTLC_new(channel_id_arg_ref, htlc_id_arg, amount_msat_arg, payment_hash_arg_ref, cltv_expiry_arg, skimmed_fee_msat_arg_conv, onion_routing_packet_arg_conv, blinding_point_arg_ref);
+       LDKUpdateAddHTLC ret_var = UpdateAddHTLC_new(channel_id_arg_conv, htlc_id_arg, amount_msat_arg, payment_hash_arg_ref, cltv_expiry_arg, skimmed_fee_msat_arg_conv, onion_routing_packet_arg_conv, blinding_point_arg_ref);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -51993,27 +55929,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1free(JNIEnv
        UpdateFulfillHTLC_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKUpdateFulfillHTLC this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFulfillHTLC_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = UpdateFulfillHTLC_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKUpdateFulfillHTLC this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       UpdateFulfillHTLC_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       UpdateFulfillHTLC_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -52058,14 +55998,16 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1paymen
        UpdateFulfillHTLC_set_payment_preimage(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t htlc_id_arg, int8_tArray payment_preimage_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t htlc_id_arg, int8_tArray payment_preimage_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKThirtyTwoBytes payment_preimage_arg_ref;
        CHECK((*env)->GetArrayLength(env, payment_preimage_arg) == 32);
        (*env)->GetByteArrayRegion(env, payment_preimage_arg, 0, 32, payment_preimage_arg_ref.data);
-       LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_new(channel_id_arg_ref, htlc_id_arg, payment_preimage_arg_ref);
+       LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_new(channel_id_arg_conv, htlc_id_arg, payment_preimage_arg_ref);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -52135,27 +56077,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1free(JNIEnv *e
        UpdateFailHTLC_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKUpdateFailHTLC this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFailHTLC_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = UpdateFailHTLC_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKUpdateFailHTLC this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       UpdateFailHTLC_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       UpdateFailHTLC_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -52240,27 +56186,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1free(
        UpdateFailMalformedHTLC_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKUpdateFailMalformedHTLC this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFailMalformedHTLC_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = UpdateFailMalformedHTLC_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKUpdateFailMalformedHTLC this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       UpdateFailMalformedHTLC_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       UpdateFailMalformedHTLC_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1htlc_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -52364,27 +56314,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1free(JNIEnv
        CommitmentSigned_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKCommitmentSigned this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *CommitmentSigned_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = CommitmentSigned_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKCommitmentSigned this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       CommitmentSigned_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       CommitmentSigned_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1signature(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -52452,10 +56406,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1htlc_1s
        CommitmentSigned_set_htlc_signatures(&this_ptr_conv, val_constr);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray signature_arg, jobjectArray htlc_signatures_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray signature_arg, jobjectArray htlc_signatures_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKECDSASignature signature_arg_ref;
        CHECK((*env)->GetArrayLength(env, signature_arg) == 64);
        (*env)->GetByteArrayRegion(env, signature_arg, 0, 64, signature_arg_ref.compact_form);
@@ -52472,7 +56428,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new(JNIEn
                (*env)->GetByteArrayRegion(env, htlc_signatures_arg_conv_8, 0, 64, htlc_signatures_arg_conv_8_ref.compact_form);
                htlc_signatures_arg_constr.data[i] = htlc_signatures_arg_conv_8_ref;
        }
-       LDKCommitmentSigned ret_var = CommitmentSigned_new(channel_id_arg_ref, signature_arg_ref, htlc_signatures_arg_constr);
+       LDKCommitmentSigned ret_var = CommitmentSigned_new(channel_id_arg_conv, signature_arg_ref, htlc_signatures_arg_constr);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -52542,27 +56498,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1free(JNIEnv *env
        RevokeAndACK_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKRevokeAndACK this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *RevokeAndACK_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = RevokeAndACK_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKRevokeAndACK this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       RevokeAndACK_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       RevokeAndACK_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1per_1commitment_1secret(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -52611,17 +56571,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1next_1per_1
        RevokeAndACK_set_next_per_commitment_point(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray per_commitment_secret_arg, int8_tArray next_per_commitment_point_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray per_commitment_secret_arg, int8_tArray next_per_commitment_point_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKThirtyTwoBytes per_commitment_secret_arg_ref;
        CHECK((*env)->GetArrayLength(env, per_commitment_secret_arg) == 32);
        (*env)->GetByteArrayRegion(env, per_commitment_secret_arg, 0, 32, per_commitment_secret_arg_ref.data);
        LDKPublicKey next_per_commitment_point_arg_ref;
        CHECK((*env)->GetArrayLength(env, next_per_commitment_point_arg) == 33);
        (*env)->GetByteArrayRegion(env, next_per_commitment_point_arg, 0, 33, next_per_commitment_point_arg_ref.compressed_form);
-       LDKRevokeAndACK ret_var = RevokeAndACK_new(channel_id_arg_ref, per_commitment_secret_arg_ref, next_per_commitment_point_arg_ref);
+       LDKRevokeAndACK ret_var = RevokeAndACK_new(channel_id_arg_conv, per_commitment_secret_arg_ref, next_per_commitment_point_arg_ref);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -52691,27 +56653,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1free(JNIEnv *env, j
        UpdateFee_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKUpdateFee this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *UpdateFee_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = UpdateFee_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKUpdateFee this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       UpdateFee_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       UpdateFee_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1feerate_1per_1kw(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -52733,11 +56699,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1feerate_1per_1
        UpdateFee_set_feerate_per_kw(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int32_t feerate_per_kw_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
-       LDKUpdateFee ret_var = UpdateFee_new(channel_id_arg_ref, feerate_per_kw_arg);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int32_t feerate_per_kw_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
+       LDKUpdateFee ret_var = UpdateFee_new(channel_id_arg_conv, feerate_per_kw_arg);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -52807,27 +56775,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1free(JNIEn
        ChannelReestablish_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelReestablish this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelReestablish_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = ChannelReestablish_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKChannelReestablish this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       ChannelReestablish_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       ChannelReestablish_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1next_1local_1commitment_1number(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -52939,10 +56911,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1next_
        ChannelReestablish_set_next_funding_txid(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t next_local_commitment_number_arg, int64_t next_remote_commitment_number_arg, int8_tArray your_last_per_commitment_secret_arg, int8_tArray my_current_per_commitment_point_arg, int64_t next_funding_txid_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t next_local_commitment_number_arg, int64_t next_remote_commitment_number_arg, int8_tArray your_last_per_commitment_secret_arg, int8_tArray my_current_per_commitment_point_arg, int64_t next_funding_txid_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKThirtyTwoBytes your_last_per_commitment_secret_arg_ref;
        CHECK((*env)->GetArrayLength(env, your_last_per_commitment_secret_arg) == 32);
        (*env)->GetByteArrayRegion(env, your_last_per_commitment_secret_arg, 0, 32, your_last_per_commitment_secret_arg_ref.data);
@@ -52953,7 +56927,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1new(JNI
        CHECK_ACCESS(next_funding_txid_arg_ptr);
        LDKCOption_ThirtyTwoBytesZ next_funding_txid_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(next_funding_txid_arg_ptr);
        next_funding_txid_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(next_funding_txid_arg));
-       LDKChannelReestablish ret_var = ChannelReestablish_new(channel_id_arg_ref, next_local_commitment_number_arg, next_remote_commitment_number_arg, your_last_per_commitment_secret_arg_ref, my_current_per_commitment_point_arg_ref, next_funding_txid_arg_conv);
+       LDKChannelReestablish ret_var = ChannelReestablish_new(channel_id_arg_conv, next_local_commitment_number_arg, next_remote_commitment_number_arg, your_last_per_commitment_secret_arg_ref, my_current_per_commitment_point_arg_ref, next_funding_txid_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -53023,27 +56997,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1free(J
        AnnouncementSignatures_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKAnnouncementSignatures this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *AnnouncementSignatures_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = AnnouncementSignatures_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKAnnouncementSignatures this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       AnnouncementSignatures_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       AnnouncementSignatures_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1short_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -53111,17 +57089,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1b
        AnnouncementSignatures_set_bitcoin_signature(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int64_t short_channel_id_arg, int8_tArray node_signature_arg, int8_tArray bitcoin_signature_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int64_t short_channel_id_arg, int8_tArray node_signature_arg, int8_tArray bitcoin_signature_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKECDSASignature node_signature_arg_ref;
        CHECK((*env)->GetArrayLength(env, node_signature_arg) == 64);
        (*env)->GetByteArrayRegion(env, node_signature_arg, 0, 64, node_signature_arg_ref.compact_form);
        LDKECDSASignature bitcoin_signature_arg_ref;
        CHECK((*env)->GetArrayLength(env, bitcoin_signature_arg) == 64);
        (*env)->GetByteArrayRegion(env, bitcoin_signature_arg, 0, 64, bitcoin_signature_arg_ref.compact_form);
-       LDKAnnouncementSignatures ret_var = AnnouncementSignatures_new(channel_id_arg_ref, short_channel_id_arg, node_signature_arg_ref, bitcoin_signature_arg_ref);
+       LDKAnnouncementSignatures ret_var = AnnouncementSignatures_new(channel_id_arg_conv, short_channel_id_arg, node_signature_arg_ref, bitcoin_signature_arg_ref);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -53608,6 +57588,107 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_
        UnsignedNodeAnnouncement_set_addresses(&this_ptr_conv, val_constr);
 }
 
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1excess_1address_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKUnsignedNodeAnnouncement this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = UnsignedNodeAnnouncement_get_excess_address_data(&this_ptr_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1excess_1address_1data(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKUnsignedNodeAnnouncement this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z val_ref;
+       val_ref.datalen = (*env)->GetArrayLength(env, val);
+       val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, val, 0, val_ref.datalen, val_ref.data);
+       UnsignedNodeAnnouncement_set_excess_address_data(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1excess_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKUnsignedNodeAnnouncement this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = UnsignedNodeAnnouncement_get_excess_data(&this_ptr_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1excess_1data(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKUnsignedNodeAnnouncement this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z val_ref;
+       val_ref.datalen = (*env)->GetArrayLength(env, val);
+       val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, val, 0, val_ref.datalen, val_ref.data);
+       UnsignedNodeAnnouncement_set_excess_data(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1new(JNIEnv *env, jclass clz, int64_t features_arg, int32_t timestamp_arg, int64_t node_id_arg, int8_tArray rgb_arg, int64_t alias_arg, int64_tArray addresses_arg, int8_tArray excess_address_data_arg, int8_tArray excess_data_arg) {
+       LDKNodeFeatures features_arg_conv;
+       features_arg_conv.inner = untag_ptr(features_arg);
+       features_arg_conv.is_owned = ptr_is_owned(features_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(features_arg_conv);
+       features_arg_conv = NodeFeatures_clone(&features_arg_conv);
+       LDKNodeId node_id_arg_conv;
+       node_id_arg_conv.inner = untag_ptr(node_id_arg);
+       node_id_arg_conv.is_owned = ptr_is_owned(node_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(node_id_arg_conv);
+       node_id_arg_conv = NodeId_clone(&node_id_arg_conv);
+       LDKThreeBytes rgb_arg_ref;
+       CHECK((*env)->GetArrayLength(env, rgb_arg) == 3);
+       (*env)->GetByteArrayRegion(env, rgb_arg, 0, 3, rgb_arg_ref.data);
+       LDKNodeAlias alias_arg_conv;
+       alias_arg_conv.inner = untag_ptr(alias_arg);
+       alias_arg_conv.is_owned = ptr_is_owned(alias_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(alias_arg_conv);
+       alias_arg_conv = NodeAlias_clone(&alias_arg_conv);
+       LDKCVec_SocketAddressZ addresses_arg_constr;
+       addresses_arg_constr.datalen = (*env)->GetArrayLength(env, addresses_arg);
+       if (addresses_arg_constr.datalen > 0)
+               addresses_arg_constr.data = MALLOC(addresses_arg_constr.datalen * sizeof(LDKSocketAddress), "LDKCVec_SocketAddressZ Elements");
+       else
+               addresses_arg_constr.data = NULL;
+       int64_t* addresses_arg_vals = (*env)->GetLongArrayElements (env, addresses_arg, NULL);
+       for (size_t p = 0; p < addresses_arg_constr.datalen; p++) {
+               int64_t addresses_arg_conv_15 = addresses_arg_vals[p];
+               void* addresses_arg_conv_15_ptr = untag_ptr(addresses_arg_conv_15);
+               CHECK_ACCESS(addresses_arg_conv_15_ptr);
+               LDKSocketAddress addresses_arg_conv_15_conv = *(LDKSocketAddress*)(addresses_arg_conv_15_ptr);
+               addresses_arg_constr.data[p] = addresses_arg_conv_15_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, addresses_arg, addresses_arg_vals, 0);
+       LDKCVec_u8Z excess_address_data_arg_ref;
+       excess_address_data_arg_ref.datalen = (*env)->GetArrayLength(env, excess_address_data_arg);
+       excess_address_data_arg_ref.data = MALLOC(excess_address_data_arg_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, excess_address_data_arg, 0, excess_address_data_arg_ref.datalen, excess_address_data_arg_ref.data);
+       LDKCVec_u8Z excess_data_arg_ref;
+       excess_data_arg_ref.datalen = (*env)->GetArrayLength(env, excess_data_arg);
+       excess_data_arg_ref.data = MALLOC(excess_data_arg_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, excess_data_arg, 0, excess_data_arg_ref.datalen, excess_data_arg_ref.data);
+       LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_new(features_arg_conv, timestamp_arg, node_id_arg_conv, rgb_arg_ref, alias_arg_conv, addresses_arg_constr, excess_address_data_arg_ref, excess_data_arg_ref);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
 static inline uint64_t UnsignedNodeAnnouncement_clone_ptr(LDKUnsignedNodeAnnouncement *NONNULL_PTR arg) {
        LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_clone(arg);
        int64_t ret_ref = 0;
@@ -56300,6 +60381,191 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OnionPacket_1eq(JNIEnv *en
        return ret_conv;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKTrampolineOnionPacket this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       TrampolineOnionPacket_free(this_obj_conv);
+}
+
+JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1version(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKTrampolineOnionPacket this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int8_t ret_conv = TrampolineOnionPacket_get_version(&this_ptr_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1version(JNIEnv *env, jclass clz, int64_t this_ptr, int8_t val) {
+       LDKTrampolineOnionPacket this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       TrampolineOnionPacket_set_version(&this_ptr_conv, val);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1public_1key(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKTrampolineOnionPacket this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, TrampolineOnionPacket_get_public_key(&this_ptr_conv).compressed_form);
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1public_1key(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKTrampolineOnionPacket this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKPublicKey val_ref;
+       CHECK((*env)->GetArrayLength(env, val) == 33);
+       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
+       TrampolineOnionPacket_set_public_key(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1hop_1data(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKTrampolineOnionPacket this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = TrampolineOnionPacket_get_hop_data(&this_ptr_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1hop_1data(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKTrampolineOnionPacket this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCVec_u8Z val_ref;
+       val_ref.datalen = (*env)->GetArrayLength(env, val);
+       val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, val, 0, val_ref.datalen, val_ref.data);
+       TrampolineOnionPacket_set_hop_data(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1hmac(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKTrampolineOnionPacket this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *TrampolineOnionPacket_get_hmac(&this_ptr_conv));
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1hmac(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKTrampolineOnionPacket this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKThirtyTwoBytes val_ref;
+       CHECK((*env)->GetArrayLength(env, val) == 32);
+       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+       TrampolineOnionPacket_set_hmac(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1new(JNIEnv *env, jclass clz, int8_t version_arg, int8_tArray public_key_arg, int8_tArray hop_data_arg, int8_tArray hmac_arg) {
+       LDKPublicKey public_key_arg_ref;
+       CHECK((*env)->GetArrayLength(env, public_key_arg) == 33);
+       (*env)->GetByteArrayRegion(env, public_key_arg, 0, 33, public_key_arg_ref.compressed_form);
+       LDKCVec_u8Z hop_data_arg_ref;
+       hop_data_arg_ref.datalen = (*env)->GetArrayLength(env, hop_data_arg);
+       hop_data_arg_ref.data = MALLOC(hop_data_arg_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, hop_data_arg, 0, hop_data_arg_ref.datalen, hop_data_arg_ref.data);
+       LDKThirtyTwoBytes hmac_arg_ref;
+       CHECK((*env)->GetArrayLength(env, hmac_arg) == 32);
+       (*env)->GetByteArrayRegion(env, hmac_arg, 0, 32, hmac_arg_ref.data);
+       LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_new(version_arg, public_key_arg_ref, hop_data_arg_ref, hmac_arg_ref);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline uint64_t TrampolineOnionPacket_clone_ptr(LDKTrampolineOnionPacket *NONNULL_PTR arg) {
+       LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKTrampolineOnionPacket arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = TrampolineOnionPacket_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKTrampolineOnionPacket orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKTrampolineOnionPacket ret_var = TrampolineOnionPacket_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKTrampolineOnionPacket o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv.is_owned = false;
+       int64_t ret_conv = TrampolineOnionPacket_hash(&o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKTrampolineOnionPacket a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKTrampolineOnionPacket b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = TrampolineOnionPacket_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKTrampolineOnionPacket obj_conv;
+       obj_conv.inner = untag_ptr(obj);
+       obj_conv.is_owned = ptr_is_owned(obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = TrampolineOnionPacket_write(&obj_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKAcceptChannel obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -57817,6 +62083,127 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1free(JNIEnv
        SocketDescriptor_free(this_ptr_conv);
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKPeerDetails this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       PeerDetails_free(this_obj_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1counterparty_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKPeerDetails this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, PeerDetails_get_counterparty_node_id(&this_ptr_conv).compressed_form);
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1counterparty_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKPeerDetails this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKPublicKey val_ref;
+       CHECK((*env)->GetArrayLength(env, val) == 33);
+       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
+       PeerDetails_set_counterparty_node_id(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1socket_1address(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKPeerDetails this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCOption_SocketAddressZ *ret_copy = MALLOC(sizeof(LDKCOption_SocketAddressZ), "LDKCOption_SocketAddressZ");
+       *ret_copy = PeerDetails_get_socket_address(&this_ptr_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1socket_1address(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKPeerDetails this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       void* val_ptr = untag_ptr(val);
+       CHECK_ACCESS(val_ptr);
+       LDKCOption_SocketAddressZ val_conv = *(LDKCOption_SocketAddressZ*)(val_ptr);
+       val_conv = COption_SocketAddressZ_clone((LDKCOption_SocketAddressZ*)untag_ptr(val));
+       PeerDetails_set_socket_address(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1init_1features(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKPeerDetails this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKInitFeatures ret_var = PeerDetails_get_init_features(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1init_1features(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKPeerDetails this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKInitFeatures val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = InitFeatures_clone(&val_conv);
+       PeerDetails_set_init_features(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1is_1inbound_1connection(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKPeerDetails this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       jboolean ret_conv = PeerDetails_get_is_inbound_connection(&this_ptr_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1is_1inbound_1connection(JNIEnv *env, jclass clz, int64_t this_ptr, jboolean val) {
+       LDKPeerDetails this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       PeerDetails_set_is_inbound_connection(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerDetails_1new(JNIEnv *env, jclass clz, int8_tArray counterparty_node_id_arg, int64_t socket_address_arg, int64_t init_features_arg, jboolean is_inbound_connection_arg) {
+       LDKPublicKey counterparty_node_id_arg_ref;
+       CHECK((*env)->GetArrayLength(env, counterparty_node_id_arg) == 33);
+       (*env)->GetByteArrayRegion(env, counterparty_node_id_arg, 0, 33, counterparty_node_id_arg_ref.compressed_form);
+       void* socket_address_arg_ptr = untag_ptr(socket_address_arg);
+       CHECK_ACCESS(socket_address_arg_ptr);
+       LDKCOption_SocketAddressZ socket_address_arg_conv = *(LDKCOption_SocketAddressZ*)(socket_address_arg_ptr);
+       LDKInitFeatures init_features_arg_conv;
+       init_features_arg_conv.inner = untag_ptr(init_features_arg);
+       init_features_arg_conv.is_owned = ptr_is_owned(init_features_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(init_features_arg_conv);
+       init_features_arg_conv = InitFeatures_clone(&init_features_arg_conv);
+       LDKPeerDetails ret_var = PeerDetails_new(counterparty_node_id_arg_ref, socket_address_arg_conv, init_features_arg_conv, is_inbound_connection_arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKPeerHandleError this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -57903,26 +62290,44 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerManager_1new(JNIEnv *en
        return ret_ref;
 }
 
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_PeerManager_1get_1peer_1node_1ids(JNIEnv *env, jclass clz, int64_t this_arg) {
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_PeerManager_1list_1peers(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKPeerManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKCVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ ret_var = PeerManager_get_peer_node_ids(&this_arg_conv);
+       LDKCVec_PeerDetailsZ ret_var = PeerManager_list_peers(&this_arg_conv);
        int64_tArray ret_arr = NULL;
        ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
        int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t r = 0; r < ret_var.datalen; r++) {
-               LDKC2Tuple_PublicKeyCOption_SocketAddressZZ* ret_conv_43_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyCOption_SocketAddressZZ), "LDKC2Tuple_PublicKeyCOption_SocketAddressZZ");
-               *ret_conv_43_conv = ret_var.data[r];
-               ret_arr_ptr[r] = tag_ptr(ret_conv_43_conv, true);
+       for (size_t n = 0; n < ret_var.datalen; n++) {
+               LDKPeerDetails ret_conv_13_var = ret_var.data[n];
+               int64_t ret_conv_13_ref = 0;
+               CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_13_var);
+               ret_conv_13_ref = tag_ptr(ret_conv_13_var.inner, ret_conv_13_var.is_owned);
+               ret_arr_ptr[n] = ret_conv_13_ref;
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
        return ret_arr;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerManager_1peer_1by_1node_1id(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id) {
+       LDKPeerManager this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKPublicKey their_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, their_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, their_node_id, 0, 33, their_node_id_ref.compressed_form);
+       LDKPeerDetails ret_var = PeerManager_peer_by_node_id(&this_arg_conv, their_node_id_ref);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerManager_1new_1outbound_1connection(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t descriptor, int64_t remote_network_address) {
        LDKPeerManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -63751,6 +68156,120 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1requires_1ke
        return ret_conv;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1set_1trampoline_1routing_1optional(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInitFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       InitFeatures_set_trampoline_routing_optional(&this_arg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1set_1trampoline_1routing_1required(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInitFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       InitFeatures_set_trampoline_routing_required(&this_arg_conv);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InitFeatures_1supports_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInitFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       jboolean ret_conv = InitFeatures_supports_trampoline_routing(&this_arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1set_1trampoline_1routing_1optional(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKNodeFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       NodeFeatures_set_trampoline_routing_optional(&this_arg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1set_1trampoline_1routing_1required(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKNodeFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       NodeFeatures_set_trampoline_routing_required(&this_arg_conv);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1supports_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKNodeFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       jboolean ret_conv = NodeFeatures_supports_trampoline_routing(&this_arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1set_1trampoline_1routing_1optional(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKBolt11InvoiceFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       Bolt11InvoiceFeatures_set_trampoline_routing_optional(&this_arg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1set_1trampoline_1routing_1required(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKBolt11InvoiceFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       Bolt11InvoiceFeatures_set_trampoline_routing_required(&this_arg_conv);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1supports_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKBolt11InvoiceFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       jboolean ret_conv = Bolt11InvoiceFeatures_supports_trampoline_routing(&this_arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InitFeatures_1requires_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInitFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       jboolean ret_conv = InitFeatures_requires_trampoline_routing(&this_arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1requires_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKNodeFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       jboolean ret_conv = NodeFeatures_requires_trampoline_routing(&this_arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1requires_1trampoline_1routing(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKBolt11InvoiceFeatures this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       jboolean ret_conv = Bolt11InvoiceFeatures_requires_trampoline_routing(&this_arg_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ShutdownScript_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKShutdownScript this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -63976,6 +68495,222 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ShutdownScript_1is_1compat
        return ret_conv;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelId_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKChannelId this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       ChannelId_free(this_obj_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelId_1get_1a(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKChannelId this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChannelId_get_a(&this_ptr_conv));
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelId_1set_1a(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKChannelId this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKThirtyTwoBytes val_ref;
+       CHECK((*env)->GetArrayLength(env, val) == 32);
+       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+       ChannelId_set_a(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1new(JNIEnv *env, jclass clz, int8_tArray a_arg) {
+       LDKThirtyTwoBytes a_arg_ref;
+       CHECK((*env)->GetArrayLength(env, a_arg) == 32);
+       (*env)->GetByteArrayRegion(env, a_arg, 0, 32, a_arg_ref.data);
+       LDKChannelId ret_var = ChannelId_new(a_arg_ref);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline uint64_t ChannelId_clone_ptr(LDKChannelId *NONNULL_PTR arg) {
+       LDKChannelId ret_var = ChannelId_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKChannelId arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = ChannelId_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelId orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKChannelId ret_var = ChannelId_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelId_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKChannelId a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKChannelId b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = ChannelId_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKChannelId o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv.is_owned = false;
+       int64_t ret_conv = ChannelId_hash(&o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1v1_1from_1funding_1txid(JNIEnv *env, jclass clz, int8_tArray txid, int16_t output_index) {
+       uint8_t txid_arr[32];
+       CHECK((*env)->GetArrayLength(env, txid) == 32);
+       (*env)->GetByteArrayRegion(env, txid, 0, 32, txid_arr);
+       uint8_t (*txid_ref)[32] = &txid_arr;
+       LDKChannelId ret_var = ChannelId_v1_from_funding_txid(txid_ref, output_index);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1v1_1from_1funding_1outpoint(JNIEnv *env, jclass clz, int64_t outpoint) {
+       LDKOutPoint outpoint_conv;
+       outpoint_conv.inner = untag_ptr(outpoint);
+       outpoint_conv.is_owned = ptr_is_owned(outpoint);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(outpoint_conv);
+       outpoint_conv = OutPoint_clone(&outpoint_conv);
+       LDKChannelId ret_var = ChannelId_v1_from_funding_outpoint(outpoint_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1temporary_1from_1entropy_1source(JNIEnv *env, jclass clz, int64_t entropy_source) {
+       void* entropy_source_ptr = untag_ptr(entropy_source);
+       if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
+       LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+       LDKChannelId ret_var = ChannelId_temporary_from_entropy_source(entropy_source_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1from_1bytes(JNIEnv *env, jclass clz, int8_tArray data) {
+       LDKThirtyTwoBytes data_ref;
+       CHECK((*env)->GetArrayLength(env, data) == 32);
+       (*env)->GetByteArrayRegion(env, data, 0, 32, data_ref.data);
+       LDKChannelId ret_var = ChannelId_from_bytes(data_ref);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1new_1zero(JNIEnv *env, jclass clz) {
+       LDKChannelId ret_var = ChannelId_new_zero();
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelId_1is_1zero(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKChannelId this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       jboolean ret_conv = ChannelId_is_zero(&this_arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1v2_1from_1revocation_1basepoints(JNIEnv *env, jclass clz, int64_t ours, int64_t theirs) {
+       LDKRevocationBasepoint ours_conv;
+       ours_conv.inner = untag_ptr(ours);
+       ours_conv.is_owned = ptr_is_owned(ours);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ours_conv);
+       ours_conv.is_owned = false;
+       LDKRevocationBasepoint theirs_conv;
+       theirs_conv.inner = untag_ptr(theirs);
+       theirs_conv.is_owned = ptr_is_owned(theirs);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(theirs_conv);
+       theirs_conv.is_owned = false;
+       LDKChannelId ret_var = ChannelId_v2_from_revocation_basepoints(&ours_conv, &theirs_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1temporary_1v2_1from_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t our_revocation_basepoint) {
+       LDKRevocationBasepoint our_revocation_basepoint_conv;
+       our_revocation_basepoint_conv.inner = untag_ptr(our_revocation_basepoint);
+       our_revocation_basepoint_conv.is_owned = ptr_is_owned(our_revocation_basepoint);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(our_revocation_basepoint_conv);
+       our_revocation_basepoint_conv.is_owned = false;
+       LDKChannelId ret_var = ChannelId_temporary_v2_from_revocation_basepoint(&our_revocation_basepoint_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelId_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKChannelId obj_conv;
+       obj_conv.inner = untag_ptr(obj);
+       obj_conv.is_owned = ptr_is_owned(obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = ChannelId_write(&obj_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelId_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       LDKCResult_ChannelIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelIdDecodeErrorZ), "LDKCResult_ChannelIdDecodeErrorZ");
+       *ret_conv = ChannelId_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Retry_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -64495,6 +69230,413 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Type_1free(JNIEnv *env, jclass
        Type_free(this_ptr_conv);
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferId_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKOfferId this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       OfferId_free(this_obj_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OfferId_1get_1a(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKOfferId this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *OfferId_get_a(&this_ptr_conv));
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferId_1set_1a(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKOfferId this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKThirtyTwoBytes val_ref;
+       CHECK((*env)->GetArrayLength(env, val) == 32);
+       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+       OfferId_set_a(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1new(JNIEnv *env, jclass clz, int8_tArray a_arg) {
+       LDKThirtyTwoBytes a_arg_ref;
+       CHECK((*env)->GetArrayLength(env, a_arg) == 32);
+       (*env)->GetByteArrayRegion(env, a_arg, 0, 32, a_arg_ref.data);
+       LDKOfferId ret_var = OfferId_new(a_arg_ref);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline uint64_t OfferId_clone_ptr(LDKOfferId *NONNULL_PTR arg) {
+       LDKOfferId ret_var = OfferId_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKOfferId arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = OfferId_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKOfferId orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKOfferId ret_var = OfferId_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OfferId_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKOfferId a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKOfferId b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = OfferId_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OfferId_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKOfferId obj_conv;
+       obj_conv.inner = untag_ptr(obj);
+       obj_conv.is_owned = ptr_is_owned(obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = OfferId_write(&obj_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferId_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       LDKCResult_OfferIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferIdDecodeErrorZ), "LDKCResult_OfferIdDecodeErrorZ");
+       *ret_conv = OfferId_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKOfferWithExplicitMetadataBuilder this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       OfferWithExplicitMetadataBuilder_free(this_obj_conv);
+}
+
+static inline uint64_t OfferWithExplicitMetadataBuilder_clone_ptr(LDKOfferWithExplicitMetadataBuilder *NONNULL_PTR arg) {
+       LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKOfferWithExplicitMetadataBuilder arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = OfferWithExplicitMetadataBuilder_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKOfferWithExplicitMetadataBuilder orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKOfferWithDerivedMetadataBuilder this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       OfferWithDerivedMetadataBuilder_free(this_obj_conv);
+}
+
+static inline uint64_t OfferWithDerivedMetadataBuilder_clone_ptr(LDKOfferWithDerivedMetadataBuilder *NONNULL_PTR arg) {
+       LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKOfferWithDerivedMetadataBuilder arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = OfferWithDerivedMetadataBuilder_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKOfferWithDerivedMetadataBuilder orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1new(JNIEnv *env, jclass clz, int8_tArray signing_pubkey) {
+       LDKPublicKey signing_pubkey_ref;
+       CHECK((*env)->GetArrayLength(env, signing_pubkey) == 33);
+       (*env)->GetByteArrayRegion(env, signing_pubkey, 0, 33, signing_pubkey_ref.compressed_form);
+       LDKOfferWithExplicitMetadataBuilder ret_var = OfferWithExplicitMetadataBuilder_new(signing_pubkey_ref);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1metadata(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray metadata) {
+       LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+       LDKCVec_u8Z metadata_ref;
+       metadata_ref.datalen = (*env)->GetArrayLength(env, metadata);
+       metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, metadata, 0, metadata_ref.datalen, metadata_ref.data);
+       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       *ret_conv = OfferWithExplicitMetadataBuilder_metadata(this_arg_conv, metadata_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) {
+       LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+       LDKNetwork network_conv = LDKNetwork_from_java(env, network);
+       OfferWithExplicitMetadataBuilder_chain(this_arg_conv, network_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) {
+       LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+       OfferWithExplicitMetadataBuilder_amount_msats(this_arg_conv, amount_msats);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1absolute_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int64_t absolute_expiry) {
+       LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+       OfferWithExplicitMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1description(JNIEnv *env, jclass clz, int64_t this_arg, jstring description) {
+       LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+       LDKStr description_conv = java_to_owned_str(env, description);
+       OfferWithExplicitMetadataBuilder_description(this_arg_conv, description_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1issuer(JNIEnv *env, jclass clz, int64_t this_arg, jstring issuer) {
+       LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+       LDKStr issuer_conv = java_to_owned_str(env, issuer);
+       OfferWithExplicitMetadataBuilder_issuer(this_arg_conv, issuer_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1path(JNIEnv *env, jclass clz, int64_t this_arg, int64_t path) {
+       LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+       LDKBlindedPath path_conv;
+       path_conv.inner = untag_ptr(path);
+       path_conv.is_owned = ptr_is_owned(path);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
+       path_conv = BlindedPath_clone(&path_conv);
+       OfferWithExplicitMetadataBuilder_path(this_arg_conv, path_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1supported_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) {
+       LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+       void* quantity_ptr = untag_ptr(quantity);
+       CHECK_ACCESS(quantity_ptr);
+       LDKQuantity quantity_conv = *(LDKQuantity*)(quantity_ptr);
+       quantity_conv = Quantity_clone((LDKQuantity*)untag_ptr(quantity));
+       OfferWithExplicitMetadataBuilder_supported_quantity(this_arg_conv, quantity_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKOfferWithExplicitMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithExplicitMetadataBuilder_clone(&this_arg_conv);
+       LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+       *ret_conv = OfferWithExplicitMetadataBuilder_build(this_arg_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1deriving_1signing_1pubkey(JNIEnv *env, jclass clz, int8_tArray node_id, int64_t expanded_key, int64_t entropy_source) {
+       LDKPublicKey node_id_ref;
+       CHECK((*env)->GetArrayLength(env, node_id) == 33);
+       (*env)->GetByteArrayRegion(env, node_id, 0, 33, node_id_ref.compressed_form);
+       LDKExpandedKey expanded_key_conv;
+       expanded_key_conv.inner = untag_ptr(expanded_key);
+       expanded_key_conv.is_owned = ptr_is_owned(expanded_key);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv);
+       expanded_key_conv.is_owned = false;
+       void* entropy_source_ptr = untag_ptr(entropy_source);
+       CHECK_ACCESS(entropy_source_ptr);
+       LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+       if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+       }
+       LDKOfferWithDerivedMetadataBuilder ret_var = OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(node_id_ref, &expanded_key_conv, entropy_source_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) {
+       LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       LDKNetwork network_conv = LDKNetwork_from_java(env, network);
+       OfferWithDerivedMetadataBuilder_chain(this_arg_conv, network_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) {
+       LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       OfferWithDerivedMetadataBuilder_amount_msats(this_arg_conv, amount_msats);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1absolute_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int64_t absolute_expiry) {
+       LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       OfferWithDerivedMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1description(JNIEnv *env, jclass clz, int64_t this_arg, jstring description) {
+       LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       LDKStr description_conv = java_to_owned_str(env, description);
+       OfferWithDerivedMetadataBuilder_description(this_arg_conv, description_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1issuer(JNIEnv *env, jclass clz, int64_t this_arg, jstring issuer) {
+       LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       LDKStr issuer_conv = java_to_owned_str(env, issuer);
+       OfferWithDerivedMetadataBuilder_issuer(this_arg_conv, issuer_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1path(JNIEnv *env, jclass clz, int64_t this_arg, int64_t path) {
+       LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       LDKBlindedPath path_conv;
+       path_conv.inner = untag_ptr(path);
+       path_conv.is_owned = ptr_is_owned(path);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
+       path_conv = BlindedPath_clone(&path_conv);
+       OfferWithDerivedMetadataBuilder_path(this_arg_conv, path_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1supported_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) {
+       LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       void* quantity_ptr = untag_ptr(quantity);
+       CHECK_ACCESS(quantity_ptr);
+       LDKQuantity quantity_conv = *(LDKQuantity*)(quantity_ptr);
+       quantity_conv = Quantity_clone((LDKQuantity*)untag_ptr(quantity));
+       OfferWithDerivedMetadataBuilder_supported_quantity(this_arg_conv, quantity_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKOfferWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = OfferWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       LDKCResult_OfferBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12SemanticErrorZ), "LDKCResult_OfferBolt12SemanticErrorZ");
+       *ret_conv = OfferWithDerivedMetadataBuilder_build(this_arg_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Offer_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKOffer this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -64571,10 +69713,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1amount(JNIEnv *env,
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKAmount ret_var = Offer_amount(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+       *ret_copy = Offer_amount(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -64657,10 +69798,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1supported_1quantity(
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKQuantity ret_var = Offer_supported_quantity(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+       *ret_copy = Offer_supported_quantity(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -64675,6 +69815,19 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Offer_1signing_1pubkey(
        return ret_arr;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1id(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKOffer this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKOfferId ret_var = Offer_id(&this_arg_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Offer_1supports_1chain(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray chain) {
        LDKOffer this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -64728,6 +69881,89 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Offer_1expects_1quantity(J
        return ret_conv;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice_1deriving_1payer_1id(JNIEnv *env, jclass clz, int64_t this_arg, int64_t expanded_key, int64_t entropy_source, int8_tArray payment_id) {
+       LDKOffer this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKExpandedKey expanded_key_conv;
+       expanded_key_conv.inner = untag_ptr(expanded_key);
+       expanded_key_conv.is_owned = ptr_is_owned(expanded_key);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv);
+       expanded_key_conv.is_owned = false;
+       void* entropy_source_ptr = untag_ptr(entropy_source);
+       CHECK_ACCESS(entropy_source_ptr);
+       LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+       if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+       }
+       LDKThirtyTwoBytes payment_id_ref;
+       CHECK((*env)->GetArrayLength(env, payment_id) == 32);
+       (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data);
+       LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ");
+       *ret_conv = Offer_request_invoice_deriving_payer_id(&this_arg_conv, &expanded_key_conv, entropy_source_conv, payment_id_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice_1deriving_1metadata(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray payer_id, int64_t expanded_key, int64_t entropy_source, int8_tArray payment_id) {
+       LDKOffer this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKPublicKey payer_id_ref;
+       CHECK((*env)->GetArrayLength(env, payer_id) == 33);
+       (*env)->GetByteArrayRegion(env, payer_id, 0, 33, payer_id_ref.compressed_form);
+       LDKExpandedKey expanded_key_conv;
+       expanded_key_conv.inner = untag_ptr(expanded_key);
+       expanded_key_conv.is_owned = ptr_is_owned(expanded_key);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv);
+       expanded_key_conv.is_owned = false;
+       void* entropy_source_ptr = untag_ptr(entropy_source);
+       CHECK_ACCESS(entropy_source_ptr);
+       LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+       if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+       }
+       LDKThirtyTwoBytes payment_id_ref;
+       CHECK((*env)->GetArrayLength(env, payment_id) == 32);
+       (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data);
+       LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ");
+       *ret_conv = Offer_request_invoice_deriving_metadata(&this_arg_conv, payer_id_ref, &expanded_key_conv, entropy_source_conv, payment_id_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray metadata, int8_tArray payer_id) {
+       LDKOffer this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKCVec_u8Z metadata_ref;
+       metadata_ref.datalen = (*env)->GetArrayLength(env, metadata);
+       metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, metadata, 0, metadata_ref.datalen, metadata_ref.data);
+       LDKPublicKey payer_id_ref;
+       CHECK((*env)->GetArrayLength(env, payer_id) == 33);
+       (*env)->GetByteArrayRegion(env, payer_id, 0, 33, payer_id_ref.compressed_form);
+       LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ");
+       *ret_conv = Offer_request_invoice(&this_arg_conv, metadata_ref, payer_id_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKOffer o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv.is_owned = false;
+       int64_t ret_conv = Offer_hash(&o_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Offer_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKOffer obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -64741,95 +69977,316 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Offer_1write(JNIEnv *en
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Amount_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
-       LDKAmount this_obj_conv;
-       this_obj_conv.inner = untag_ptr(this_obj);
-       this_obj_conv.is_owned = ptr_is_owned(this_obj);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
-       Amount_free(this_obj_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Amount_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKAmount this_ptr_conv = *(LDKAmount*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       Amount_free(this_ptr_conv);
 }
 
 static inline uint64_t Amount_clone_ptr(LDKAmount *NONNULL_PTR arg) {
-       LDKAmount ret_var = Amount_clone(arg);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount");
+       *ret_copy = Amount_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKAmount arg_conv;
-       arg_conv.inner = untag_ptr(arg);
-       arg_conv.is_owned = ptr_is_owned(arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
-       arg_conv.is_owned = false;
-       int64_t ret_conv = Amount_clone_ptr(&arg_conv);
+       LDKAmount* arg_conv = (LDKAmount*)untag_ptr(arg);
+       int64_t ret_conv = Amount_clone_ptr(arg_conv);
        return ret_conv;
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKAmount orig_conv;
-       orig_conv.inner = untag_ptr(orig);
-       orig_conv.is_owned = ptr_is_owned(orig);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
-       orig_conv.is_owned = false;
-       LDKAmount ret_var = Amount_clone(&orig_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKAmount* orig_conv = (LDKAmount*)untag_ptr(orig);
+       LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount");
+       *ret_copy = Amount_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1bitcoin(JNIEnv *env, jclass clz, int64_t amount_msats) {
+       LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount");
+       *ret_copy = Amount_bitcoin(amount_msats);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Amount_1currency(JNIEnv *env, jclass clz, int8_tArray iso4217_code, int64_t amount) {
+       LDKThreeBytes iso4217_code_ref;
+       CHECK((*env)->GetArrayLength(env, iso4217_code) == 3);
+       (*env)->GetByteArrayRegion(env, iso4217_code, 0, 3, iso4217_code_ref.data);
+       LDKAmount *ret_copy = MALLOC(sizeof(LDKAmount), "LDKAmount");
+       *ret_copy = Amount_currency(iso4217_code_ref, amount);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Quantity_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
-       LDKQuantity this_obj_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Quantity_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKQuantity this_ptr_conv = *(LDKQuantity*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       Quantity_free(this_ptr_conv);
+}
+
+static inline uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg) {
+       LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+       *ret_copy = Quantity_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKQuantity* arg_conv = (LDKQuantity*)untag_ptr(arg);
+       int64_t ret_conv = Quantity_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKQuantity* orig_conv = (LDKQuantity*)untag_ptr(orig);
+       LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+       *ret_copy = Quantity_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1bounded(JNIEnv *env, jclass clz, int64_t a) {
+       LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+       *ret_copy = Quantity_bounded(a);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1unbounded(JNIEnv *env, jclass clz) {
+       LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+       *ret_copy = Quantity_unbounded();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1one(JNIEnv *env, jclass clz) {
+       LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+       *ret_copy = Quantity_one();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1from_1str(JNIEnv *env, jclass clz, jstring s) {
+       LDKStr s_conv = java_to_owned_str(env, s);
+       LDKCResult_OfferBolt12ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12ParseErrorZ), "LDKCResult_OfferBolt12ParseErrorZ");
+       *ret_conv = Offer_from_str(s_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKInvoiceWithExplicitSigningPubkeyBuilder this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
        this_obj_conv.is_owned = ptr_is_owned(this_obj);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
-       Quantity_free(this_obj_conv);
+       InvoiceWithExplicitSigningPubkeyBuilder_free(this_obj_conv);
 }
 
-static inline uint64_t Quantity_clone_ptr(LDKQuantity *NONNULL_PTR arg) {
-       LDKQuantity ret_var = Quantity_clone(arg);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKInvoiceWithDerivedSigningPubkeyBuilder this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       InvoiceWithDerivedSigningPubkeyBuilder_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+       
+       LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ");
+       *ret_conv = InvoiceWithExplicitSigningPubkeyBuilder_build(this_arg_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1relative_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int32_t relative_expiry_secs) {
+       LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+       
+       InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(this_arg_conv, relative_expiry_secs);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v0_1p2wsh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray script_hash) {
+       LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+       
+       uint8_t script_hash_arr[32];
+       CHECK((*env)->GetArrayLength(env, script_hash) == 32);
+       (*env)->GetByteArrayRegion(env, script_hash, 0, 32, script_hash_arr);
+       uint8_t (*script_hash_ref)[32] = &script_hash_arr;
+       InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg_conv, script_hash_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v0_1p2wpkh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray pubkey_hash) {
+       LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+       
+       uint8_t pubkey_hash_arr[20];
+       CHECK((*env)->GetArrayLength(env, pubkey_hash) == 20);
+       (*env)->GetByteArrayRegion(env, pubkey_hash, 0, 20, pubkey_hash_arr);
+       uint8_t (*pubkey_hash_ref)[20] = &pubkey_hash_arr;
+       InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg_conv, pubkey_hash_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v1_1p2tr_1tweaked(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray utput_key) {
+       LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+       
+       LDKTweakedPublicKey utput_key_ref;
+       CHECK((*env)->GetArrayLength(env, utput_key) == 32);
+       (*env)->GetByteArrayRegion(env, utput_key, 0, 32, utput_key_ref.x_coordinate);
+       InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg_conv, utput_key_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1allow_1mpp(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithExplicitSigningPubkeyBuilder
+       
+       InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(this_arg_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1build_1and_1sign(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+       
+       LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ), "LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ");
+       *ret_conv = InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(this_arg_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1relative_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int32_t relative_expiry_secs) {
+       LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+       
+       InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(this_arg_conv, relative_expiry_secs);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v0_1p2wsh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray script_hash) {
+       LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+       
+       uint8_t script_hash_arr[32];
+       CHECK((*env)->GetArrayLength(env, script_hash) == 32);
+       (*env)->GetByteArrayRegion(env, script_hash, 0, 32, script_hash_arr);
+       uint8_t (*script_hash_ref)[32] = &script_hash_arr;
+       InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(this_arg_conv, script_hash_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v0_1p2wpkh(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray pubkey_hash) {
+       LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+       
+       uint8_t pubkey_hash_arr[20];
+       CHECK((*env)->GetArrayLength(env, pubkey_hash) == 20);
+       (*env)->GetByteArrayRegion(env, pubkey_hash, 0, 20, pubkey_hash_arr);
+       uint8_t (*pubkey_hash_ref)[20] = &pubkey_hash_arr;
+       InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(this_arg_conv, pubkey_hash_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v1_1p2tr_1tweaked(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray utput_key) {
+       LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+       
+       LDKTweakedPublicKey utput_key_ref;
+       CHECK((*env)->GetArrayLength(env, utput_key) == 32);
+       (*env)->GetByteArrayRegion(env, utput_key, 0, 32, utput_key_ref.x_coordinate);
+       InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(this_arg_conv, utput_key_ref);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1allow_1mpp(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceWithDerivedSigningPubkeyBuilder
+       
+       InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(this_arg_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKUnsignedBolt12Invoice this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       UnsignedBolt12Invoice_free(this_obj_conv);
+}
+
+static inline uint64_t UnsignedBolt12Invoice_clone_ptr(LDKUnsignedBolt12Invoice *NONNULL_PTR arg) {
+       LDKUnsignedBolt12Invoice ret_var = UnsignedBolt12Invoice_clone(arg);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKQuantity arg_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKUnsignedBolt12Invoice arg_conv;
        arg_conv.inner = untag_ptr(arg);
        arg_conv.is_owned = ptr_is_owned(arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
        arg_conv.is_owned = false;
-       int64_t ret_conv = Quantity_clone_ptr(&arg_conv);
+       int64_t ret_conv = UnsignedBolt12Invoice_clone_ptr(&arg_conv);
        return ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Quantity_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKQuantity orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUnsignedBolt12Invoice orig_conv;
        orig_conv.inner = untag_ptr(orig);
        orig_conv.is_owned = ptr_is_owned(orig);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
        orig_conv.is_owned = false;
-       LDKQuantity ret_var = Quantity_clone(&orig_conv);
+       LDKUnsignedBolt12Invoice ret_var = UnsignedBolt12Invoice_clone(&orig_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Offer_1from_1str(JNIEnv *env, jclass clz, jstring s) {
-       LDKStr s_conv = java_to_owned_str(env, s);
-       LDKCResult_OfferBolt12ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OfferBolt12ParseErrorZ), "LDKCResult_OfferBolt12ParseErrorZ");
-       *ret_conv = Offer_from_str(s_conv);
-       return tag_ptr(ret_conv, true);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
-       LDKUnsignedBolt12Invoice this_obj_conv;
-       this_obj_conv.inner = untag_ptr(this_obj);
-       this_obj_conv.is_owned = ptr_is_owned(this_obj);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
-       UnsignedBolt12Invoice_free(this_obj_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignBolt12InvoiceFn_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKSignBolt12InvoiceFn this_ptr_conv = *(LDKSignBolt12InvoiceFn*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       SignBolt12InvoiceFn_free(this_ptr_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1tagged_1hash(JNIEnv *env, jclass clz, int64_t this_arg) {
@@ -64924,10 +70381,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1amou
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKAmount ret_var = UnsignedBolt12Invoice_amount(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+       *ret_copy = UnsignedBolt12Invoice_amount(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -65010,10 +70466,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1supp
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKQuantity ret_var = UnsignedBolt12Invoice_supported_quantity(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+       *ret_copy = UnsignedBolt12Invoice_supported_quantity(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -65194,10 +70649,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1amount(JNIEn
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKAmount ret_var = Bolt12Invoice_amount(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+       *ret_copy = Bolt12Invoice_amount(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -65280,10 +70734,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1supported_1q
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKQuantity ret_var = Bolt12Invoice_supported_quantity(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKCOption_QuantityZ *ret_copy = MALLOC(sizeof(LDKCOption_QuantityZ), "LDKCOption_QuantityZ");
+       *ret_copy = Bolt12Invoice_supported_quantity(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -65461,6 +70914,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1verify(JNIEn
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKBolt12Invoice o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv.is_owned = false;
+       int64_t ret_conv = Bolt12Invoice_hash(&o_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKUnsignedBolt12Invoice obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -65944,6 +71407,142 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceError_1read(JNIEnv *
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKInvoiceRequestWithExplicitPayerIdBuilder this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       InvoiceRequestWithExplicitPayerIdBuilder_free(this_obj_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKInvoiceRequestWithDerivedPayerIdBuilder this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       InvoiceRequestWithDerivedPayerIdBuilder_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+       
+       LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
+       *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_build(this_arg_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) {
+       LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+       
+       LDKNetwork network_conv = LDKNetwork_from_java(env, network);
+       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_chain(this_arg_conv, network_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) {
+       LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+       
+       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(this_arg_conv, amount_msats);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) {
+       LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+       
+       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_quantity(this_arg_conv, quantity);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1payer_1note(JNIEnv *env, jclass clz, int64_t this_arg, jstring payer_note) {
+       LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithExplicitPayerIdBuilder
+       
+       LDKStr payer_note_conv = java_to_owned_str(env, payer_note);
+       InvoiceRequestWithExplicitPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1build_1and_1sign(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+       
+       LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ");
+       *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(this_arg_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) {
+       LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+       
+       LDKNetwork network_conv = LDKNetwork_from_java(env, network);
+       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_chain(this_arg_conv, network_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1amount_1msats(JNIEnv *env, jclass clz, int64_t this_arg, int64_t amount_msats) {
+       LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+       
+       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(this_arg_conv, amount_msats);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) {
+       LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+       
+       LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
+       *ret_conv = InvoiceRequestWithDerivedPayerIdBuilder_quantity(this_arg_conv, quantity);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1payer_1note(JNIEnv *env, jclass clz, int64_t this_arg, jstring payer_note) {
+       LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerIdBuilder
+       
+       LDKStr payer_note_conv = java_to_owned_str(env, payer_note);
+       InvoiceRequestWithDerivedPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKUnsignedInvoiceRequest this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -65952,6 +71551,45 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1free(J
        UnsignedInvoiceRequest_free(this_obj_conv);
 }
 
+static inline uint64_t UnsignedInvoiceRequest_clone_ptr(LDKUnsignedInvoiceRequest *NONNULL_PTR arg) {
+       LDKUnsignedInvoiceRequest ret_var = UnsignedInvoiceRequest_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKUnsignedInvoiceRequest arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = UnsignedInvoiceRequest_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUnsignedInvoiceRequest orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKUnsignedInvoiceRequest ret_var = UnsignedInvoiceRequest_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignInvoiceRequestFn_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKSignInvoiceRequestFn this_ptr_conv = *(LDKSignInvoiceRequestFn*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       SignInvoiceRequestFn_free(this_ptr_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1tagged_1hash(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKUnsignedInvoiceRequest this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -66011,6 +71649,33 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1free(J
        VerifiedInvoiceRequest_free(this_obj_conv);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1get_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKVerifiedInvoiceRequest this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKOfferId ret_var = VerifiedInvoiceRequest_get_offer_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1set_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKVerifiedInvoiceRequest this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKOfferId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = OfferId_clone(&val_conv);
+       VerifiedInvoiceRequest_set_offer_id(&this_ptr_conv, val_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1get_1keys(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKVerifiedInvoiceRequest this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
@@ -66104,10 +71769,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1amo
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKAmount ret_var = UnsignedInvoiceRequest_amount(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+       *ret_copy = UnsignedInvoiceRequest_amount(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -66190,10 +71854,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1sup
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKQuantity ret_var = UnsignedInvoiceRequest_supported_quantity(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+       *ret_copy = UnsignedInvoiceRequest_supported_quantity(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -66330,10 +71993,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1amount(JNIE
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKAmount ret_var = InvoiceRequest_amount(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+       *ret_copy = InvoiceRequest_amount(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -66416,10 +72078,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1supported_1
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKQuantity ret_var = InvoiceRequest_supported_quantity(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+       *ret_copy = InvoiceRequest_supported_quantity(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -66518,15 +72179,64 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1payer_1note
        return ret_ref;
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1signature(JNIEnv *env, jclass clz, int64_t this_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1respond_1with(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) {
        LDKInvoiceRequest this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, InvoiceRequest_signature(&this_arg_conv).compact_form);
-       return ret_arr;
+       LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+       payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+       if (payment_paths_constr.datalen > 0)
+               payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+       else
+               payment_paths_constr.data = NULL;
+       int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+       for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+               int64_t payment_paths_conv_37 = payment_paths_vals[l];
+               void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+               CHECK_ACCESS(payment_paths_conv_37_ptr);
+               LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+               payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+               payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+       LDKThirtyTwoBytes payment_hash_ref;
+       CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+       (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+       LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+       *ret_conv = InvoiceRequest_respond_with(&this_arg_conv, payment_paths_constr, payment_hash_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1respond_1with_1no_1std(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) {
+       LDKInvoiceRequest this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+       payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+       if (payment_paths_constr.datalen > 0)
+               payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+       else
+               payment_paths_constr.data = NULL;
+       int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+       for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+               int64_t payment_paths_conv_37 = payment_paths_vals[l];
+               void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+               CHECK_ACCESS(payment_paths_conv_37_ptr);
+               LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+               payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+               payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+       LDKThirtyTwoBytes payment_hash_ref;
+       CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+       (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+       LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+       *ret_conv = InvoiceRequest_respond_with_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at);
+       return tag_ptr(ret_conv, true);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1verify(JNIEnv *env, jclass clz, int64_t this_arg, int64_t key) {
@@ -66545,6 +72255,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1verify(JNIE
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1signature(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInvoiceRequest this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, InvoiceRequest_signature(&this_arg_conv).compact_form);
+       return ret_arr;
+}
+
 JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1chains(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKVerifiedInvoiceRequest this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -66583,10 +72304,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1amo
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKAmount ret_var = VerifiedInvoiceRequest_amount(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKCOption_AmountZ *ret_copy = MALLOC(sizeof(LDKCOption_AmountZ), "LDKCOption_AmountZ");
+       *ret_copy = VerifiedInvoiceRequest_amount(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -66669,10 +72389,9 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1sup
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKQuantity ret_var = VerifiedInvoiceRequest_supported_quantity(&this_arg_conv);
-       int64_t ret_ref = 0;
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
-       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       LDKQuantity *ret_copy = MALLOC(sizeof(LDKQuantity), "LDKQuantity");
+       *ret_copy = VerifiedInvoiceRequest_supported_quantity(&this_arg_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
@@ -66771,6 +72490,126 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1pay
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1with(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) {
+       LDKVerifiedInvoiceRequest this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+       payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+       if (payment_paths_constr.datalen > 0)
+               payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+       else
+               payment_paths_constr.data = NULL;
+       int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+       for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+               int64_t payment_paths_conv_37 = payment_paths_vals[l];
+               void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+               CHECK_ACCESS(payment_paths_conv_37_ptr);
+               LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+               payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+               payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+       LDKThirtyTwoBytes payment_hash_ref;
+       CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+       (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+       LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+       *ret_conv = VerifiedInvoiceRequest_respond_with(&this_arg_conv, payment_paths_constr, payment_hash_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1with_1no_1std(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) {
+       LDKVerifiedInvoiceRequest this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+       payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+       if (payment_paths_constr.datalen > 0)
+               payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+       else
+               payment_paths_constr.data = NULL;
+       int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+       for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+               int64_t payment_paths_conv_37 = payment_paths_vals[l];
+               void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+               CHECK_ACCESS(payment_paths_conv_37_ptr);
+               LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+               payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+               payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+       LDKThirtyTwoBytes payment_hash_ref;
+       CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+       (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+       LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ");
+       *ret_conv = VerifiedInvoiceRequest_respond_with_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1using_1derived_1keys(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) {
+       LDKVerifiedInvoiceRequest this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+       payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+       if (payment_paths_constr.datalen > 0)
+               payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+       else
+               payment_paths_constr.data = NULL;
+       int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+       for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+               int64_t payment_paths_conv_37 = payment_paths_vals[l];
+               void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+               CHECK_ACCESS(payment_paths_conv_37_ptr);
+               LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+               payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+               payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+       LDKThirtyTwoBytes payment_hash_ref;
+       CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+       (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+       LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ");
+       *ret_conv = VerifiedInvoiceRequest_respond_using_derived_keys(&this_arg_conv, payment_paths_constr, payment_hash_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1using_1derived_1keys_1no_1std(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash, int64_t created_at) {
+       LDKVerifiedInvoiceRequest this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths_constr;
+       payment_paths_constr.datalen = (*env)->GetArrayLength(env, payment_paths);
+       if (payment_paths_constr.datalen > 0)
+               payment_paths_constr.data = MALLOC(payment_paths_constr.datalen * sizeof(LDKC2Tuple_BlindedPayInfoBlindedPathZ), "LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ Elements");
+       else
+               payment_paths_constr.data = NULL;
+       int64_t* payment_paths_vals = (*env)->GetLongArrayElements (env, payment_paths, NULL);
+       for (size_t l = 0; l < payment_paths_constr.datalen; l++) {
+               int64_t payment_paths_conv_37 = payment_paths_vals[l];
+               void* payment_paths_conv_37_ptr = untag_ptr(payment_paths_conv_37);
+               CHECK_ACCESS(payment_paths_conv_37_ptr);
+               LDKC2Tuple_BlindedPayInfoBlindedPathZ payment_paths_conv_37_conv = *(LDKC2Tuple_BlindedPayInfoBlindedPathZ*)(payment_paths_conv_37_ptr);
+               payment_paths_conv_37_conv = C2Tuple_BlindedPayInfoBlindedPathZ_clone((LDKC2Tuple_BlindedPayInfoBlindedPathZ*)untag_ptr(payment_paths_conv_37));
+               payment_paths_constr.data[l] = payment_paths_conv_37_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, payment_paths, payment_paths_vals, 0);
+       LDKThirtyTwoBytes payment_hash_ref;
+       CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
+       (*env)->GetByteArrayRegion(env, payment_hash, 0, 32, payment_hash_ref.data);
+       LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ");
+       *ret_conv = VerifiedInvoiceRequest_respond_using_derived_keys_no_std(&this_arg_conv, payment_paths_constr, payment_hash_ref, created_at);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKUnsignedInvoiceRequest obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -66797,6 +72636,177 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1write(J
        return ret_arr;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKInvoiceRequestFields this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       InvoiceRequestFields_free(this_obj_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1payer_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKInvoiceRequestFields this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, InvoiceRequestFields_get_payer_id(&this_ptr_conv).compressed_form);
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1payer_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKInvoiceRequestFields this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKPublicKey val_ref;
+       CHECK((*env)->GetArrayLength(env, val) == 33);
+       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
+       InvoiceRequestFields_set_payer_id(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1quantity(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKInvoiceRequestFields this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKCOption_u64Z *ret_copy = MALLOC(sizeof(LDKCOption_u64Z), "LDKCOption_u64Z");
+       *ret_copy = InvoiceRequestFields_get_quantity(&this_ptr_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1quantity(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKInvoiceRequestFields this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       void* val_ptr = untag_ptr(val);
+       CHECK_ACCESS(val_ptr);
+       LDKCOption_u64Z val_conv = *(LDKCOption_u64Z*)(val_ptr);
+       val_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(val));
+       InvoiceRequestFields_set_quantity(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1payer_1note_1truncated(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKInvoiceRequestFields this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKUntrustedString ret_var = InvoiceRequestFields_get_payer_note_truncated(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1payer_1note_1truncated(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKInvoiceRequestFields this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKUntrustedString val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = UntrustedString_clone(&val_conv);
+       InvoiceRequestFields_set_payer_note_truncated(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1new(JNIEnv *env, jclass clz, int8_tArray payer_id_arg, int64_t quantity_arg, int64_t payer_note_truncated_arg) {
+       LDKPublicKey payer_id_arg_ref;
+       CHECK((*env)->GetArrayLength(env, payer_id_arg) == 33);
+       (*env)->GetByteArrayRegion(env, payer_id_arg, 0, 33, payer_id_arg_ref.compressed_form);
+       void* quantity_arg_ptr = untag_ptr(quantity_arg);
+       CHECK_ACCESS(quantity_arg_ptr);
+       LDKCOption_u64Z quantity_arg_conv = *(LDKCOption_u64Z*)(quantity_arg_ptr);
+       quantity_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(quantity_arg));
+       LDKUntrustedString payer_note_truncated_arg_conv;
+       payer_note_truncated_arg_conv.inner = untag_ptr(payer_note_truncated_arg);
+       payer_note_truncated_arg_conv.is_owned = ptr_is_owned(payer_note_truncated_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(payer_note_truncated_arg_conv);
+       payer_note_truncated_arg_conv = UntrustedString_clone(&payer_note_truncated_arg_conv);
+       LDKInvoiceRequestFields ret_var = InvoiceRequestFields_new(payer_id_arg_ref, quantity_arg_conv, payer_note_truncated_arg_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline uint64_t InvoiceRequestFields_clone_ptr(LDKInvoiceRequestFields *NONNULL_PTR arg) {
+       LDKInvoiceRequestFields ret_var = InvoiceRequestFields_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKInvoiceRequestFields arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = InvoiceRequestFields_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKInvoiceRequestFields orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKInvoiceRequestFields ret_var = InvoiceRequestFields_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKInvoiceRequestFields a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKInvoiceRequestFields b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = InvoiceRequestFields_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKInvoiceRequestFields obj_conv;
+       obj_conv.inner = untag_ptr(obj);
+       obj_conv.is_owned = ptr_is_owned(obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = InvoiceRequestFields_write(&obj_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       LDKCResult_InvoiceRequestFieldsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestFieldsDecodeErrorZ), "LDKCResult_InvoiceRequestFieldsDecodeErrorZ");
+       *ret_conv = InvoiceRequestFields_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TaggedHash_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKTaggedHash this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -66869,6 +72879,50 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TaggedHash_1merkle_1roo
        return ret_arr;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignError_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKSignError this_ptr_conv = *(LDKSignError*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       SignError_free(this_ptr_conv);
+}
+
+static inline uint64_t SignError_clone_ptr(LDKSignError *NONNULL_PTR arg) {
+       LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError");
+       *ret_copy = SignError_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKSignError* arg_conv = (LDKSignError*)untag_ptr(arg);
+       int64_t ret_conv = SignError_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKSignError* orig_conv = (LDKSignError*)untag_ptr(orig);
+       LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError");
+       *ret_copy = SignError_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1signing(JNIEnv *env, jclass clz) {
+       LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError");
+       *ret_copy = SignError_signing();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SignError_1verification(JNIEnv *env, jclass clz, jclass a) {
+       LDKSecp256k1Error a_conv = LDKSecp256k1Error_from_java(env, a);
+       LDKSignError *ret_copy = MALLOC(sizeof(LDKSignError), "LDKSignError");
+       *ret_copy = SignError_verification(a_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12ParseError_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKBolt12ParseError this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -67028,6 +73082,11 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1missing
        return ret_conv;
 }
 
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1unexpected_1paths(JNIEnv *env, jclass clz) {
+       jclass ret_conv = LDKBolt12SemanticError_to_java(env, Bolt12SemanticError_unexpected_paths());
+       return ret_conv;
+}
+
 JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1invalid_1pay_1info(JNIEnv *env, jclass clz) {
        jclass ret_conv = LDKBolt12SemanticError_to_java(env, Bolt12SemanticError_invalid_pay_info());
        return ret_conv;
@@ -67048,6 +73107,164 @@ JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1missing
        return ret_conv;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKRefundMaybeWithDerivedMetadataBuilder this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       RefundMaybeWithDerivedMetadataBuilder_free(this_obj_conv);
+}
+
+static inline uint64_t RefundMaybeWithDerivedMetadataBuilder_clone_ptr(LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR arg) {
+       LDKRefundMaybeWithDerivedMetadataBuilder ret_var = RefundMaybeWithDerivedMetadataBuilder_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKRefundMaybeWithDerivedMetadataBuilder arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = RefundMaybeWithDerivedMetadataBuilder_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKRefundMaybeWithDerivedMetadataBuilder orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKRefundMaybeWithDerivedMetadataBuilder ret_var = RefundMaybeWithDerivedMetadataBuilder_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1new(JNIEnv *env, jclass clz, int8_tArray metadata, int8_tArray payer_id, int64_t amount_msats) {
+       LDKCVec_u8Z metadata_ref;
+       metadata_ref.datalen = (*env)->GetArrayLength(env, metadata);
+       metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, metadata, 0, metadata_ref.datalen, metadata_ref.data);
+       LDKPublicKey payer_id_ref;
+       CHECK((*env)->GetArrayLength(env, payer_id) == 33);
+       (*env)->GetByteArrayRegion(env, payer_id, 0, 33, payer_id_ref.compressed_form);
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = RefundMaybeWithDerivedMetadataBuilder_new(metadata_ref, payer_id_ref, amount_msats);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1deriving_1payer_1id(JNIEnv *env, jclass clz, int8_tArray node_id, int64_t expanded_key, int64_t entropy_source, int64_t amount_msats, int8_tArray payment_id) {
+       LDKPublicKey node_id_ref;
+       CHECK((*env)->GetArrayLength(env, node_id) == 33);
+       (*env)->GetByteArrayRegion(env, node_id, 0, 33, node_id_ref.compressed_form);
+       LDKExpandedKey expanded_key_conv;
+       expanded_key_conv.inner = untag_ptr(expanded_key);
+       expanded_key_conv.is_owned = ptr_is_owned(expanded_key);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_conv);
+       expanded_key_conv.is_owned = false;
+       void* entropy_source_ptr = untag_ptr(entropy_source);
+       CHECK_ACCESS(entropy_source_ptr);
+       LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+       if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+       }
+       LDKThirtyTwoBytes payment_id_ref;
+       CHECK((*env)->GetArrayLength(env, payment_id) == 32);
+       (*env)->GetByteArrayRegion(env, payment_id, 0, 32, payment_id_ref.data);
+       LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
+       *ret_conv = RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(node_id_ref, &expanded_key_conv, entropy_source_conv, amount_msats, payment_id_ref);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1description(JNIEnv *env, jclass clz, int64_t this_arg, jstring description) {
+       LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       LDKStr description_conv = java_to_owned_str(env, description);
+       RefundMaybeWithDerivedMetadataBuilder_description(this_arg_conv, description_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1absolute_1expiry(JNIEnv *env, jclass clz, int64_t this_arg, int64_t absolute_expiry) {
+       LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(this_arg_conv, absolute_expiry);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1issuer(JNIEnv *env, jclass clz, int64_t this_arg, jstring issuer) {
+       LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       LDKStr issuer_conv = java_to_owned_str(env, issuer);
+       RefundMaybeWithDerivedMetadataBuilder_issuer(this_arg_conv, issuer_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1path(JNIEnv *env, jclass clz, int64_t this_arg, int64_t path) {
+       LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       LDKBlindedPath path_conv;
+       path_conv.inner = untag_ptr(path);
+       path_conv.is_owned = ptr_is_owned(path);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
+       path_conv = BlindedPath_clone(&path_conv);
+       RefundMaybeWithDerivedMetadataBuilder_path(this_arg_conv, path_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1chain(JNIEnv *env, jclass clz, int64_t this_arg, jclass network) {
+       LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       LDKNetwork network_conv = LDKNetwork_from_java(env, network);
+       RefundMaybeWithDerivedMetadataBuilder_chain(this_arg_conv, network_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1quantity(JNIEnv *env, jclass clz, int64_t this_arg, int64_t quantity) {
+       LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       RefundMaybeWithDerivedMetadataBuilder_quantity(this_arg_conv, quantity);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1payer_1note(JNIEnv *env, jclass clz, int64_t this_arg, jstring payer_note) {
+       LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       LDKStr payer_note_conv = java_to_owned_str(env, payer_note);
+       RefundMaybeWithDerivedMetadataBuilder_payer_note(this_arg_conv, payer_note_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1build(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKRefundMaybeWithDerivedMetadataBuilder this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv = RefundMaybeWithDerivedMetadataBuilder_clone(&this_arg_conv);
+       LDKCResult_RefundBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundBolt12SemanticErrorZ), "LDKCResult_RefundBolt12SemanticErrorZ");
+       *ret_conv = RefundMaybeWithDerivedMetadataBuilder_build(this_arg_conv);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Refund_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKRefund this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -67248,6 +73465,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Refund_1payer_1note(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Refund_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKRefund o_conv;
+       o_conv.inner = untag_ptr(o);
+       o_conv.is_owned = ptr_is_owned(o);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv);
+       o_conv.is_owned = false;
+       int64_t ret_conv = Refund_hash(&o_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Refund_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKRefund obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -67479,6 +73706,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeId_1from_1pubkey(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeId_1from_1slice(JNIEnv *env, jclass clz, int8_tArray bytes) {
+       LDKu8slice bytes_ref;
+       bytes_ref.datalen = (*env)->GetArrayLength(env, bytes);
+       bytes_ref.data = (*env)->GetByteArrayElements (env, bytes, NULL);
+       LDKCResult_NodeIdDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeIdDecodeErrorZ), "LDKCResult_NodeIdDecodeErrorZ");
+       *ret_conv = NodeId_from_slice(bytes_ref);
+       (*env)->ReleaseByteArrayElements(env, bytes, (int8_t*)bytes_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeId_1as_1slice(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKNodeId this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -68352,6 +74589,32 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1effect
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1source(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKDirectedChannelInfo this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKNodeId ret_var = DirectedChannelInfo_source(&this_arg_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1target(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKDirectedChannelInfo this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKNodeId ret_var = DirectedChannelInfo_target(&this_arg_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EffectiveCapacity_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -69072,6 +75335,16 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeInfo_1eq(JNIEnv *env,
        return ret_conv;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeInfo_1is_1tor_1only(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKNodeInfo this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       jboolean ret_conv = NodeInfo_is_tor_only(&this_arg_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeInfo_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKNodeInfo obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -73226,7 +79499,34 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor
        DelayedPaymentOutputDescriptor_set_channel_value_satoshis(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1new(JNIEnv *env, jclass clz, int64_t outpoint_arg, int8_tArray per_commitment_point_arg, int16_t to_self_delay_arg, int64_t output_arg, int64_t revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1channel_1transaction_1parameters(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKChannelTransactionParameters ret_var = DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1channel_1transaction_1parameters(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKChannelTransactionParameters val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelTransactionParameters_clone(&val_conv);
+       DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1new(JNIEnv *env, jclass clz, int64_t outpoint_arg, int8_tArray per_commitment_point_arg, int16_t to_self_delay_arg, int64_t output_arg, int64_t revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg, int64_t channel_transaction_parameters_arg) {
        LDKOutPoint outpoint_arg_conv;
        outpoint_arg_conv.inner = untag_ptr(outpoint_arg);
        outpoint_arg_conv.is_owned = ptr_is_owned(outpoint_arg);
@@ -73247,7 +79547,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescrip
        LDKThirtyTwoBytes channel_keys_id_arg_ref;
        CHECK((*env)->GetArrayLength(env, channel_keys_id_arg) == 32);
        (*env)->GetByteArrayRegion(env, channel_keys_id_arg, 0, 32, channel_keys_id_arg_ref.data);
-       LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_new(outpoint_arg_conv, per_commitment_point_arg_ref, to_self_delay_arg, output_arg_conv, revocation_pubkey_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg);
+       LDKChannelTransactionParameters channel_transaction_parameters_arg_conv;
+       channel_transaction_parameters_arg_conv.inner = untag_ptr(channel_transaction_parameters_arg);
+       channel_transaction_parameters_arg_conv.is_owned = ptr_is_owned(channel_transaction_parameters_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_transaction_parameters_arg_conv);
+       channel_transaction_parameters_arg_conv = ChannelTransactionParameters_clone(&channel_transaction_parameters_arg_conv);
+       LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_new(outpoint_arg_conv, per_commitment_point_arg_ref, to_self_delay_arg, output_arg_conv, revocation_pubkey_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg, channel_transaction_parameters_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -73931,6 +80236,29 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1set_1channel_1
        HTLCDescriptor_set_channel_derivation_parameters(&this_ptr_conv, val_conv);
 }
 
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1get_1commitment_1txid(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKHTLCDescriptor this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *HTLCDescriptor_get_commitment_txid(&this_ptr_conv));
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1set_1commitment_1txid(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKHTLCDescriptor this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKThirtyTwoBytes val_ref;
+       CHECK((*env)->GetArrayLength(env, val) == 32);
+       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+       HTLCDescriptor_set_commitment_txid(&this_ptr_conv, val_ref);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1get_1per_1commitment_1number(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKHTLCDescriptor this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
@@ -74067,6 +80395,37 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1set_1counterpa
        HTLCDescriptor_set_counterparty_sig(&this_ptr_conv, val_ref);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1new(JNIEnv *env, jclass clz, int64_t channel_derivation_parameters_arg, int8_tArray commitment_txid_arg, int64_t per_commitment_number_arg, int8_tArray per_commitment_point_arg, int32_t feerate_per_kw_arg, int64_t htlc_arg, int64_t preimage_arg, int8_tArray counterparty_sig_arg) {
+       LDKChannelDerivationParameters channel_derivation_parameters_arg_conv;
+       channel_derivation_parameters_arg_conv.inner = untag_ptr(channel_derivation_parameters_arg);
+       channel_derivation_parameters_arg_conv.is_owned = ptr_is_owned(channel_derivation_parameters_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_derivation_parameters_arg_conv);
+       channel_derivation_parameters_arg_conv = ChannelDerivationParameters_clone(&channel_derivation_parameters_arg_conv);
+       LDKThirtyTwoBytes commitment_txid_arg_ref;
+       CHECK((*env)->GetArrayLength(env, commitment_txid_arg) == 32);
+       (*env)->GetByteArrayRegion(env, commitment_txid_arg, 0, 32, commitment_txid_arg_ref.data);
+       LDKPublicKey per_commitment_point_arg_ref;
+       CHECK((*env)->GetArrayLength(env, per_commitment_point_arg) == 33);
+       (*env)->GetByteArrayRegion(env, per_commitment_point_arg, 0, 33, per_commitment_point_arg_ref.compressed_form);
+       LDKHTLCOutputInCommitment htlc_arg_conv;
+       htlc_arg_conv.inner = untag_ptr(htlc_arg);
+       htlc_arg_conv.is_owned = ptr_is_owned(htlc_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(htlc_arg_conv);
+       htlc_arg_conv = HTLCOutputInCommitment_clone(&htlc_arg_conv);
+       void* preimage_arg_ptr = untag_ptr(preimage_arg);
+       CHECK_ACCESS(preimage_arg_ptr);
+       LDKCOption_ThirtyTwoBytesZ preimage_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(preimage_arg_ptr);
+       preimage_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(preimage_arg));
+       LDKECDSASignature counterparty_sig_arg_ref;
+       CHECK((*env)->GetArrayLength(env, counterparty_sig_arg) == 64);
+       (*env)->GetByteArrayRegion(env, counterparty_sig_arg, 0, 64, counterparty_sig_arg_ref.compact_form);
+       LDKHTLCDescriptor ret_var = HTLCDescriptor_new(channel_derivation_parameters_arg_conv, commitment_txid_arg_ref, per_commitment_number_arg, per_commitment_point_arg_ref, feerate_per_kw_arg, htlc_arg_conv, preimage_arg_conv, counterparty_sig_arg_ref);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
 static inline uint64_t HTLCDescriptor_clone_ptr(LDKHTLCDescriptor *NONNULL_PTR arg) {
        LDKHTLCDescriptor ret_var = HTLCDescriptor_clone(arg);
        int64_t ret_ref = 0;
@@ -74271,6 +80630,15 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeSigner_1free(JNIEnv *env,
        NodeSigner_free(this_ptr_conv);
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSpender_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKOutputSpender this_ptr_conv = *(LDKOutputSpender*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       OutputSpender_free(this_ptr_conv);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignerProvider_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -74280,6 +80648,15 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignerProvider_1free(JNIEnv *e
        SignerProvider_free(this_ptr_conv);
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChangeDestinationSource_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKChangeDestinationSource this_ptr_conv = *(LDKChangeDestinationSource*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       ChangeDestinationSource_free(this_ptr_conv);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKInMemorySigner this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -74771,76 +81148,36 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1sign_1spendabl
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1spend_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1EntropySource(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKKeysManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKCVec_SpendableOutputDescriptorZ descriptors_constr;
-       descriptors_constr.datalen = (*env)->GetArrayLength(env, descriptors);
-       if (descriptors_constr.datalen > 0)
-               descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
-       else
-               descriptors_constr.data = NULL;
-       int64_t* descriptors_vals = (*env)->GetLongArrayElements (env, descriptors, NULL);
-       for (size_t b = 0; b < descriptors_constr.datalen; b++) {
-               int64_t descriptors_conv_27 = descriptors_vals[b];
-               void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27);
-               CHECK_ACCESS(descriptors_conv_27_ptr);
-               LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr);
-               descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27));
-               descriptors_constr.data[b] = descriptors_conv_27_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, descriptors, descriptors_vals, 0);
-       LDKCVec_TxOutZ outputs_constr;
-       outputs_constr.datalen = (*env)->GetArrayLength(env, outputs);
-       if (outputs_constr.datalen > 0)
-               outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements");
-       else
-               outputs_constr.data = NULL;
-       int64_t* outputs_vals = (*env)->GetLongArrayElements (env, outputs, NULL);
-       for (size_t h = 0; h < outputs_constr.datalen; h++) {
-               int64_t outputs_conv_7 = outputs_vals[h];
-               void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7);
-               CHECK_ACCESS(outputs_conv_7_ptr);
-               LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr);
-               outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7));
-               outputs_constr.data[h] = outputs_conv_7_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0);
-       LDKCVec_u8Z change_destination_script_ref;
-       change_destination_script_ref.datalen = (*env)->GetArrayLength(env, change_destination_script);
-       change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes");
-       (*env)->GetByteArrayRegion(env, change_destination_script, 0, change_destination_script_ref.datalen, change_destination_script_ref.data);
-       void* locktime_ptr = untag_ptr(locktime);
-       CHECK_ACCESS(locktime_ptr);
-       LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr);
-       locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime));
-       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
-       *ret_conv = KeysManager_spend_spendable_outputs(&this_arg_conv, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv);
-       return tag_ptr(ret_conv, true);
+       LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource");
+       *ret_ret = KeysManager_as_EntropySource(&this_arg_conv);
+       return tag_ptr(ret_ret, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1EntropySource(JNIEnv *env, jclass clz, int64_t this_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1NodeSigner(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKKeysManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource");
-       *ret_ret = KeysManager_as_EntropySource(&this_arg_conv);
+       LDKNodeSigner* ret_ret = MALLOC(sizeof(LDKNodeSigner), "LDKNodeSigner");
+       *ret_ret = KeysManager_as_NodeSigner(&this_arg_conv);
        return tag_ptr(ret_ret, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1NodeSigner(JNIEnv *env, jclass clz, int64_t this_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1OutputSpender(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKKeysManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
        this_arg_conv.is_owned = ptr_is_owned(this_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
        this_arg_conv.is_owned = false;
-       LDKNodeSigner* ret_ret = MALLOC(sizeof(LDKNodeSigner), "LDKNodeSigner");
-       *ret_ret = KeysManager_as_NodeSigner(&this_arg_conv);
+       LDKOutputSpender* ret_ret = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender");
+       *ret_ret = KeysManager_as_OutputSpender(&this_arg_conv);
        return tag_ptr(ret_ret, true);
 }
 
@@ -74885,6 +81222,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1Nod
        return tag_ptr(ret_ret, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1OutputSpender(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKPhantomKeysManager this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKOutputSpender* ret_ret = MALLOC(sizeof(LDKOutputSpender), "LDKOutputSpender");
+       *ret_ret = PhantomKeysManager_as_OutputSpender(&this_arg_conv);
+       return tag_ptr(ret_ret, true);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1SignerProvider(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKPhantomKeysManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -74912,57 +81260,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1new(JNI
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1spend_1spendable_1outputs(JNIEnv *env, jclass clz, int64_t this_arg, int64_tArray descriptors, int64_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight, int64_t locktime) {
-       LDKPhantomKeysManager this_arg_conv;
-       this_arg_conv.inner = untag_ptr(this_arg);
-       this_arg_conv.is_owned = ptr_is_owned(this_arg);
-       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
-       this_arg_conv.is_owned = false;
-       LDKCVec_SpendableOutputDescriptorZ descriptors_constr;
-       descriptors_constr.datalen = (*env)->GetArrayLength(env, descriptors);
-       if (descriptors_constr.datalen > 0)
-               descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
-       else
-               descriptors_constr.data = NULL;
-       int64_t* descriptors_vals = (*env)->GetLongArrayElements (env, descriptors, NULL);
-       for (size_t b = 0; b < descriptors_constr.datalen; b++) {
-               int64_t descriptors_conv_27 = descriptors_vals[b];
-               void* descriptors_conv_27_ptr = untag_ptr(descriptors_conv_27);
-               CHECK_ACCESS(descriptors_conv_27_ptr);
-               LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(descriptors_conv_27_ptr);
-               descriptors_conv_27_conv = SpendableOutputDescriptor_clone((LDKSpendableOutputDescriptor*)untag_ptr(descriptors_conv_27));
-               descriptors_constr.data[b] = descriptors_conv_27_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, descriptors, descriptors_vals, 0);
-       LDKCVec_TxOutZ outputs_constr;
-       outputs_constr.datalen = (*env)->GetArrayLength(env, outputs);
-       if (outputs_constr.datalen > 0)
-               outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements");
-       else
-               outputs_constr.data = NULL;
-       int64_t* outputs_vals = (*env)->GetLongArrayElements (env, outputs, NULL);
-       for (size_t h = 0; h < outputs_constr.datalen; h++) {
-               int64_t outputs_conv_7 = outputs_vals[h];
-               void* outputs_conv_7_ptr = untag_ptr(outputs_conv_7);
-               CHECK_ACCESS(outputs_conv_7_ptr);
-               LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(outputs_conv_7_ptr);
-               outputs_conv_7_conv = TxOut_clone((LDKTxOut*)untag_ptr(outputs_conv_7));
-               outputs_constr.data[h] = outputs_conv_7_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0);
-       LDKCVec_u8Z change_destination_script_ref;
-       change_destination_script_ref.datalen = (*env)->GetArrayLength(env, change_destination_script);
-       change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes");
-       (*env)->GetByteArrayRegion(env, change_destination_script, 0, change_destination_script_ref.datalen, change_destination_script_ref.data);
-       void* locktime_ptr = untag_ptr(locktime);
-       CHECK_ACCESS(locktime_ptr);
-       LDKCOption_u32Z locktime_conv = *(LDKCOption_u32Z*)(locktime_ptr);
-       locktime_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(locktime));
-       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
-       *ret_conv = PhantomKeysManager_spend_spendable_outputs(&this_arg_conv, descriptors_constr, outputs_constr, change_destination_script_ref, feerate_sat_per_1000_weight, locktime_conv);
-       return tag_ptr(ret_conv, true);
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1derive_1channel_1keys(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_value_satoshis, int8_tArray params) {
        LDKPhantomKeysManager this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
@@ -75002,6 +81299,36 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1get
        return ret_arr;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RandomBytes_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKRandomBytes this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       RandomBytes_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RandomBytes_1new(JNIEnv *env, jclass clz, int8_tArray seed) {
+       LDKThirtyTwoBytes seed_ref;
+       CHECK((*env)->GetArrayLength(env, seed) == 32);
+       (*env)->GetByteArrayRegion(env, seed, 0, 32, seed_ref.data);
+       LDKRandomBytes ret_var = RandomBytes_new(seed_ref);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RandomBytes_1as_1EntropySource(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKRandomBytes this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKEntropySource* ret_ret = MALLOC(sizeof(LDKEntropySource), "LDKEntropySource");
+       *ret_ret = RandomBytes_as_EntropySource(&this_arg_conv);
+       return tag_ptr(ret_ret, true);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EcdsaChannelSigner_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -75318,6 +81645,29 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Destination_1blinded_1path(
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Destination_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKDestination* o_conv = (LDKDestination*)untag_ptr(o);
+       int64_t ret_conv = Destination_hash(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Destination_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKDestination* a_conv = (LDKDestination*)untag_ptr(a);
+       LDKDestination* b_conv = (LDKDestination*)untag_ptr(b);
+       jboolean ret_conv = Destination_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Destination_1resolve(JNIEnv *env, jclass clz, int64_t this_arg, int64_t network_graph) {
+       LDKDestination* this_arg_conv = (LDKDestination*)untag_ptr(this_arg);
+       LDKReadOnlyNetworkGraph network_graph_conv;
+       network_graph_conv.inner = untag_ptr(network_graph);
+       network_graph_conv.is_owned = ptr_is_owned(network_graph);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv);
+       network_graph_conv.is_owned = false;
+       Destination_resolve(this_arg_conv, &network_graph_conv);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SendSuccess_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -75364,6 +81714,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendSuccess_1buffered_1awai
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendSuccess_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKSendSuccess* o_conv = (LDKSendSuccess*)untag_ptr(o);
+       int64_t ret_conv = SendSuccess_hash(o_conv);
+       return ret_conv;
+}
+
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_SendSuccess_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
        LDKSendSuccess* a_conv = (LDKSendSuccess*)untag_ptr(a);
        LDKSendSuccess* b_conv = (LDKSendSuccess*)untag_ptr(b);
@@ -75460,6 +81816,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1get_1node_1id_1f
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1unresolved_1introduction_1node(JNIEnv *env, jclass clz) {
+       LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
+       *ret_copy = SendError_unresolved_introduction_node();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1blinded_1path_1advance_1failed(JNIEnv *env, jclass clz) {
        LDKSendError *ret_copy = MALLOC(sizeof(LDKSendError), "LDKSendError");
        *ret_copy = SendError_blinded_path_advance_failed();
@@ -75467,6 +81830,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1blinded_1path_1a
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SendError_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKSendError* o_conv = (LDKSendError*)untag_ptr(o);
+       int64_t ret_conv = SendError_hash(o_conv);
+       return ret_conv;
+}
+
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_SendError_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
        LDKSendError* a_conv = (LDKSendError*)untag_ptr(a);
        LDKSendError* b_conv = (LDKSendError*)untag_ptr(b);
@@ -75512,17 +81881,18 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1clone(JNIEnv *
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1forward(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
-       LDKPublicKey a_ref;
-       CHECK((*env)->GetArrayLength(env, a) == 33);
-       (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1forward(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       void* a_ptr = untag_ptr(a);
+       CHECK_ACCESS(a_ptr);
+       LDKNextMessageHop a_conv = *(LDKNextMessageHop*)(a_ptr);
+       a_conv = NextMessageHop_clone((LDKNextMessageHop*)untag_ptr(a));
        LDKOnionMessage b_conv;
        b_conv.inner = untag_ptr(b);
        b_conv.is_owned = ptr_is_owned(b);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
        b_conv = OnionMessage_clone(&b_conv);
        LDKPeeledOnion *ret_copy = MALLOC(sizeof(LDKPeeledOnion), "LDKPeeledOnion");
-       *ret_copy = PeeledOnion_forward(a_ref, b_conv);
+       *ret_copy = PeeledOnion_forward(a_conv, b_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -75546,13 +81916,53 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1receive(JNIEnv
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1onion_1message(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t path, int64_t contents, int64_t reply_path) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1onion_1message_1resolving_1destination(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t node_id_lookup, int64_t network_graph, int64_t path, int64_t contents, int64_t reply_path) {
+       void* entropy_source_ptr = untag_ptr(entropy_source);
+       if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
+       LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+       void* node_signer_ptr = untag_ptr(node_signer);
+       if (ptr_is_owned(node_signer)) { CHECK_ACCESS(node_signer_ptr); }
+       LDKNodeSigner* node_signer_conv = (LDKNodeSigner*)node_signer_ptr;
+       void* node_id_lookup_ptr = untag_ptr(node_id_lookup);
+       if (ptr_is_owned(node_id_lookup)) { CHECK_ACCESS(node_id_lookup_ptr); }
+       LDKNodeIdLookUp* node_id_lookup_conv = (LDKNodeIdLookUp*)node_id_lookup_ptr;
+       LDKReadOnlyNetworkGraph network_graph_conv;
+       network_graph_conv.inner = untag_ptr(network_graph);
+       network_graph_conv.is_owned = ptr_is_owned(network_graph);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv);
+       network_graph_conv.is_owned = false;
+       LDKOnionMessagePath path_conv;
+       path_conv.inner = untag_ptr(path);
+       path_conv.is_owned = ptr_is_owned(path);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
+       path_conv = OnionMessagePath_clone(&path_conv);
+       void* contents_ptr = untag_ptr(contents);
+       CHECK_ACCESS(contents_ptr);
+       LDKOnionMessageContents contents_conv = *(LDKOnionMessageContents*)(contents_ptr);
+       if (contents_conv.free == LDKOnionMessageContents_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKOnionMessageContents_JCalls_cloned(&contents_conv);
+       }
+       LDKBlindedPath reply_path_conv;
+       reply_path_conv.inner = untag_ptr(reply_path);
+       reply_path_conv.is_owned = ptr_is_owned(reply_path);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv);
+       reply_path_conv = BlindedPath_clone(&reply_path_conv);
+       LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ");
+       *ret_conv = create_onion_message_resolving_destination(entropy_source_conv, node_signer_conv, node_id_lookup_conv, &network_graph_conv, path_conv, contents_conv, reply_path_conv);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1onion_1message(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t node_id_lookup, int64_t path, int64_t contents, int64_t reply_path) {
        void* entropy_source_ptr = untag_ptr(entropy_source);
        if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
        LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
        void* node_signer_ptr = untag_ptr(node_signer);
        if (ptr_is_owned(node_signer)) { CHECK_ACCESS(node_signer_ptr); }
        LDKNodeSigner* node_signer_conv = (LDKNodeSigner*)node_signer_ptr;
+       void* node_id_lookup_ptr = untag_ptr(node_id_lookup);
+       if (ptr_is_owned(node_id_lookup)) { CHECK_ACCESS(node_id_lookup_ptr); }
+       LDKNodeIdLookUp* node_id_lookup_conv = (LDKNodeIdLookUp*)node_id_lookup_ptr;
        LDKOnionMessagePath path_conv;
        path_conv.inner = untag_ptr(path);
        path_conv.is_owned = ptr_is_owned(path);
@@ -75571,7 +81981,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_create_1onion_1message(JNIE
        CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_conv);
        reply_path_conv = BlindedPath_clone(&reply_path_conv);
        LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ), "LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ");
-       *ret_conv = create_onion_message(entropy_source_conv, node_signer_conv, path_conv, contents_conv, reply_path_conv);
+       *ret_conv = create_onion_message(entropy_source_conv, node_signer_conv, node_id_lookup_conv, path_conv, contents_conv, reply_path_conv);
        return tag_ptr(ret_conv, true);
 }
 
@@ -75607,7 +82017,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_peel_1onion_1message(JNIEnv
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t logger, int64_t message_router, int64_t offers_handler, int64_t custom_handler) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv *env, jclass clz, int64_t entropy_source, int64_t node_signer, int64_t logger, int64_t node_id_lookup, int64_t message_router, int64_t offers_handler, int64_t custom_handler) {
        void* entropy_source_ptr = untag_ptr(entropy_source);
        CHECK_ACCESS(entropy_source_ptr);
        LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
@@ -75629,6 +82039,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKLogger_JCalls_cloned(&logger_conv);
        }
+       void* node_id_lookup_ptr = untag_ptr(node_id_lookup);
+       CHECK_ACCESS(node_id_lookup_ptr);
+       LDKNodeIdLookUp node_id_lookup_conv = *(LDKNodeIdLookUp*)(node_id_lookup_ptr);
+       if (node_id_lookup_conv.free == LDKNodeIdLookUp_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKNodeIdLookUp_JCalls_cloned(&node_id_lookup_conv);
+       }
        void* message_router_ptr = untag_ptr(message_router);
        CHECK_ACCESS(message_router_ptr);
        LDKMessageRouter message_router_conv = *(LDKMessageRouter*)(message_router_ptr);
@@ -75650,7 +82067,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new(JNIEnv
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
                LDKCustomOnionMessageHandler_JCalls_cloned(&custom_handler_conv);
        }
-       LDKOnionMessenger ret_var = OnionMessenger_new(entropy_source_conv, node_signer_conv, logger_conv, message_router_conv, offers_handler_conv, custom_handler_conv);
+       LDKOnionMessenger ret_var = OnionMessenger_new(entropy_source_conv, node_signer_conv, logger_conv, node_id_lookup_conv, message_router_conv, offers_handler_conv, custom_handler_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -76089,6 +82506,65 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OnionMessageContents_1free(JNI
        OnionMessageContents_free(this_ptr_conv);
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKNextMessageHop this_ptr_conv = *(LDKNextMessageHop*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       NextMessageHop_free(this_ptr_conv);
+}
+
+static inline uint64_t NextMessageHop_clone_ptr(LDKNextMessageHop *NONNULL_PTR arg) {
+       LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop");
+       *ret_copy = NextMessageHop_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKNextMessageHop* arg_conv = (LDKNextMessageHop*)untag_ptr(arg);
+       int64_t ret_conv = NextMessageHop_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKNextMessageHop* orig_conv = (LDKNextMessageHop*)untag_ptr(orig);
+       LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop");
+       *ret_copy = NextMessageHop_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1node_1id(JNIEnv *env, jclass clz, int8_tArray a) {
+       LDKPublicKey a_ref;
+       CHECK((*env)->GetArrayLength(env, a) == 33);
+       (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form);
+       LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop");
+       *ret_copy = NextMessageHop_node_id(a_ref);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1short_1channel_1id(JNIEnv *env, jclass clz, int64_t a) {
+       LDKNextMessageHop *ret_copy = MALLOC(sizeof(LDKNextMessageHop), "LDKNextMessageHop");
+       *ret_copy = NextMessageHop_short_channel_id(a);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKNextMessageHop* o_conv = (LDKNextMessageHop*)untag_ptr(o);
+       int64_t ret_conv = NextMessageHop_hash(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKNextMessageHop* a_conv = (LDKNextMessageHop*)untag_ptr(a);
+       LDKNextMessageHop* b_conv = (LDKNextMessageHop*)untag_ptr(b);
+       jboolean ret_conv = NextMessageHop_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKBlindedPath this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -76097,27 +82573,29 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1free(JNIEnv *env,
        BlindedPath_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1introduction_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1introduction_1node(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKBlindedPath this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, BlindedPath_get_introduction_node_id(&this_ptr_conv).compressed_form);
-       return ret_arr;
+       LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode");
+       *ret_copy = BlindedPath_get_introduction_node(&this_ptr_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1introduction_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1introduction_1node(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKBlindedPath this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 33);
-       (*env)->GetByteArrayRegion(env, val, 0, 33, val_ref.compressed_form);
-       BlindedPath_set_introduction_node_id(&this_ptr_conv, val_ref);
+       void* val_ptr = untag_ptr(val);
+       CHECK_ACCESS(val_ptr);
+       LDKIntroductionNode val_conv = *(LDKIntroductionNode*)(val_ptr);
+       val_conv = IntroductionNode_clone((LDKIntroductionNode*)untag_ptr(val));
+       BlindedPath_set_introduction_node(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1blinding_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -76191,10 +82669,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1blinded_1hop
        BlindedPath_set_blinded_hops(&this_ptr_conv, val_constr);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new(JNIEnv *env, jclass clz, int8_tArray introduction_node_id_arg, int8_tArray blinding_point_arg, int64_tArray blinded_hops_arg) {
-       LDKPublicKey introduction_node_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, introduction_node_id_arg) == 33);
-       (*env)->GetByteArrayRegion(env, introduction_node_id_arg, 0, 33, introduction_node_id_arg_ref.compressed_form);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new(JNIEnv *env, jclass clz, int64_t introduction_node_arg, int8_tArray blinding_point_arg, int64_tArray blinded_hops_arg) {
+       void* introduction_node_arg_ptr = untag_ptr(introduction_node_arg);
+       CHECK_ACCESS(introduction_node_arg_ptr);
+       LDKIntroductionNode introduction_node_arg_conv = *(LDKIntroductionNode*)(introduction_node_arg_ptr);
+       introduction_node_arg_conv = IntroductionNode_clone((LDKIntroductionNode*)untag_ptr(introduction_node_arg));
        LDKPublicKey blinding_point_arg_ref;
        CHECK((*env)->GetArrayLength(env, blinding_point_arg) == 33);
        (*env)->GetByteArrayRegion(env, blinding_point_arg, 0, 33, blinding_point_arg_ref.compressed_form);
@@ -76215,7 +82694,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new(JNIEnv *en
                blinded_hops_arg_constr.data[m] = blinded_hops_arg_conv_12_conv;
        }
        (*env)->ReleaseLongArrayElements(env, blinded_hops_arg, blinded_hops_arg_vals, 0);
-       LDKBlindedPath ret_var = BlindedPath_new(introduction_node_id_arg_ref, blinding_point_arg_ref, blinded_hops_arg_constr);
+       LDKBlindedPath ret_var = BlindedPath_new(introduction_node_arg_conv, blinding_point_arg_ref, blinded_hops_arg_constr);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -76277,6 +82756,131 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_BlindedPath_1eq(JNIEnv *en
        return ret_conv;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKIntroductionNode this_ptr_conv = *(LDKIntroductionNode*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       IntroductionNode_free(this_ptr_conv);
+}
+
+static inline uint64_t IntroductionNode_clone_ptr(LDKIntroductionNode *NONNULL_PTR arg) {
+       LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode");
+       *ret_copy = IntroductionNode_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKIntroductionNode* arg_conv = (LDKIntroductionNode*)untag_ptr(arg);
+       int64_t ret_conv = IntroductionNode_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKIntroductionNode* orig_conv = (LDKIntroductionNode*)untag_ptr(orig);
+       LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode");
+       *ret_copy = IntroductionNode_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1node_1id(JNIEnv *env, jclass clz, int8_tArray a) {
+       LDKPublicKey a_ref;
+       CHECK((*env)->GetArrayLength(env, a) == 33);
+       (*env)->GetByteArrayRegion(env, a, 0, 33, a_ref.compressed_form);
+       LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode");
+       *ret_copy = IntroductionNode_node_id(a_ref);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1directed_1short_1channel_1id(JNIEnv *env, jclass clz, jclass a, int64_t b) {
+       LDKDirection a_conv = LDKDirection_from_java(env, a);
+       LDKIntroductionNode *ret_copy = MALLOC(sizeof(LDKIntroductionNode), "LDKIntroductionNode");
+       *ret_copy = IntroductionNode_directed_short_channel_id(a_conv, b);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKIntroductionNode* o_conv = (LDKIntroductionNode*)untag_ptr(o);
+       int64_t ret_conv = IntroductionNode_hash(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKIntroductionNode* a_conv = (LDKIntroductionNode*)untag_ptr(a);
+       LDKIntroductionNode* b_conv = (LDKIntroductionNode*)untag_ptr(b);
+       jboolean ret_conv = IntroductionNode_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Direction_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKDirection* orig_conv = (LDKDirection*)untag_ptr(orig);
+       jclass ret_conv = LDKDirection_to_java(env, Direction_clone(orig_conv));
+       return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Direction_1node_1one(JNIEnv *env, jclass clz) {
+       jclass ret_conv = LDKDirection_to_java(env, Direction_node_one());
+       return ret_conv;
+}
+
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_Direction_1node_1two(JNIEnv *env, jclass clz) {
+       jclass ret_conv = LDKDirection_to_java(env, Direction_node_two());
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Direction_1hash(JNIEnv *env, jclass clz, int64_t o) {
+       LDKDirection* o_conv = (LDKDirection*)untag_ptr(o);
+       int64_t ret_conv = Direction_hash(o_conv);
+       return ret_conv;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Direction_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKDirection* a_conv = (LDKDirection*)untag_ptr(a);
+       LDKDirection* b_conv = (LDKDirection*)untag_ptr(b);
+       jboolean ret_conv = Direction_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeIdLookUp_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKNodeIdLookUp this_ptr_conv = *(LDKNodeIdLookUp*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       NodeIdLookUp_free(this_ptr_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKEmptyNodeIdLookUp this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       EmptyNodeIdLookUp_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1new(JNIEnv *env, jclass clz) {
+       LDKEmptyNodeIdLookUp ret_var = EmptyNodeIdLookUp_new();
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1as_1NodeIdLookUp(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKEmptyNodeIdLookUp this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKNodeIdLookUp* ret_ret = MALLOC(sizeof(LDKNodeIdLookUp), "LDKNodeIdLookUp");
+       *ret_ret = EmptyNodeIdLookUp_as_NodeIdLookUp(&this_arg_conv);
+       return tag_ptr(ret_ret, true);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedHop_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
        LDKBlindedHop this_obj_conv;
        this_obj_conv.inner = untag_ptr(this_obj);
@@ -76409,8 +83013,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1one_1hop_1for_
        CHECK((*env)->GetArrayLength(env, recipient_node_id) == 33);
        (*env)->GetByteArrayRegion(env, recipient_node_id, 0, 33, recipient_node_id_ref.compressed_form);
        void* entropy_source_ptr = untag_ptr(entropy_source);
-       if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
-       LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+       CHECK_ACCESS(entropy_source_ptr);
+       LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+       if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+       }
        LDKCResult_BlindedPathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedPathNoneZ), "LDKCResult_BlindedPathNoneZ");
        *ret_conv = BlindedPath_one_hop_for_message(recipient_node_id_ref, entropy_source_conv);
        return tag_ptr(ret_conv, true);
@@ -76431,14 +83039,18 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1mess
                node_pks_constr.data[i] = node_pks_conv_8_ref;
        }
        void* entropy_source_ptr = untag_ptr(entropy_source);
-       if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
-       LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+       CHECK_ACCESS(entropy_source_ptr);
+       LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+       if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+       }
        LDKCResult_BlindedPathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedPathNoneZ), "LDKCResult_BlindedPathNoneZ");
        *ret_conv = BlindedPath_new_for_message(node_pks_constr, entropy_source_conv);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1one_1hop_1for_1payment(JNIEnv *env, jclass clz, int8_tArray payee_node_id, int64_t payee_tlvs, int64_t entropy_source) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1one_1hop_1for_1payment(JNIEnv *env, jclass clz, int8_tArray payee_node_id, int64_t payee_tlvs, int16_t min_final_cltv_expiry_delta, int64_t entropy_source) {
        LDKPublicKey payee_node_id_ref;
        CHECK((*env)->GetArrayLength(env, payee_node_id) == 33);
        (*env)->GetByteArrayRegion(env, payee_node_id, 0, 33, payee_node_id_ref.compressed_form);
@@ -76448,14 +83060,18 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1one_1hop_1for_
        CHECK_INNER_FIELD_ACCESS_OR_NULL(payee_tlvs_conv);
        payee_tlvs_conv = ReceiveTlvs_clone(&payee_tlvs_conv);
        void* entropy_source_ptr = untag_ptr(entropy_source);
-       if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
-       LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+       CHECK_ACCESS(entropy_source_ptr);
+       LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+       if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+       }
        LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ), "LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ");
-       *ret_conv = BlindedPath_one_hop_for_payment(payee_node_id_ref, payee_tlvs_conv, entropy_source_conv);
+       *ret_conv = BlindedPath_one_hop_for_payment(payee_node_id_ref, payee_tlvs_conv, min_final_cltv_expiry_delta, entropy_source_conv);
        return tag_ptr(ret_conv, true);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1payment(JNIEnv *env, jclass clz, int64_tArray intermediate_nodes, int8_tArray payee_node_id, int64_t payee_tlvs, int64_t htlc_maximum_msat, int64_t entropy_source) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1payment(JNIEnv *env, jclass clz, int64_tArray intermediate_nodes, int8_tArray payee_node_id, int64_t payee_tlvs, int64_t htlc_maximum_msat, int16_t min_final_cltv_expiry_delta, int64_t entropy_source) {
        LDKCVec_ForwardNodeZ intermediate_nodes_constr;
        intermediate_nodes_constr.datalen = (*env)->GetArrayLength(env, intermediate_nodes);
        if (intermediate_nodes_constr.datalen > 0)
@@ -76482,13 +83098,35 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1paym
        CHECK_INNER_FIELD_ACCESS_OR_NULL(payee_tlvs_conv);
        payee_tlvs_conv = ReceiveTlvs_clone(&payee_tlvs_conv);
        void* entropy_source_ptr = untag_ptr(entropy_source);
-       if (ptr_is_owned(entropy_source)) { CHECK_ACCESS(entropy_source_ptr); }
-       LDKEntropySource* entropy_source_conv = (LDKEntropySource*)entropy_source_ptr;
+       CHECK_ACCESS(entropy_source_ptr);
+       LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
+       if (entropy_source_conv.free == LDKEntropySource_JCalls_free) {
+               // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+               LDKEntropySource_JCalls_cloned(&entropy_source_conv);
+       }
        LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ), "LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ");
-       *ret_conv = BlindedPath_new_for_payment(intermediate_nodes_constr, payee_node_id_ref, payee_tlvs_conv, htlc_maximum_msat, entropy_source_conv);
+       *ret_conv = BlindedPath_new_for_payment(intermediate_nodes_constr, payee_node_id_ref, payee_tlvs_conv, htlc_maximum_msat, min_final_cltv_expiry_delta, entropy_source_conv);
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BlindedPath_1public_1introduction_1node_1id(JNIEnv *env, jclass clz, int64_t this_arg, int64_t network_graph) {
+       LDKBlindedPath this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       LDKReadOnlyNetworkGraph network_graph_conv;
+       network_graph_conv.inner = untag_ptr(network_graph);
+       network_graph_conv.is_owned = ptr_is_owned(network_graph);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_conv);
+       network_graph_conv.is_owned = false;
+       LDKNodeId ret_var = BlindedPath_public_introduction_node_id(&this_arg_conv, &network_graph_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BlindedPath_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKBlindedPath obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -76877,7 +83515,32 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1set_1payment_1con
        ReceiveTlvs_set_payment_constraints(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1new(JNIEnv *env, jclass clz, int8_tArray payment_secret_arg, int64_t payment_constraints_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1get_1payment_1context(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKReceiveTlvs this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+       *ret_copy = ReceiveTlvs_get_payment_context(&this_ptr_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1set_1payment_1context(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKReceiveTlvs this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       void* val_ptr = untag_ptr(val);
+       CHECK_ACCESS(val_ptr);
+       LDKPaymentContext val_conv = *(LDKPaymentContext*)(val_ptr);
+       val_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(val));
+       ReceiveTlvs_set_payment_context(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1new(JNIEnv *env, jclass clz, int8_tArray payment_secret_arg, int64_t payment_constraints_arg, int64_t payment_context_arg) {
        LDKThirtyTwoBytes payment_secret_arg_ref;
        CHECK((*env)->GetArrayLength(env, payment_secret_arg) == 32);
        (*env)->GetByteArrayRegion(env, payment_secret_arg, 0, 32, payment_secret_arg_ref.data);
@@ -76886,7 +83549,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1new(JNIEnv *en
        payment_constraints_arg_conv.is_owned = ptr_is_owned(payment_constraints_arg);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_constraints_arg_conv);
        payment_constraints_arg_conv = PaymentConstraints_clone(&payment_constraints_arg_conv);
-       LDKReceiveTlvs ret_var = ReceiveTlvs_new(payment_secret_arg_ref, payment_constraints_arg_conv);
+       void* payment_context_arg_ptr = untag_ptr(payment_context_arg);
+       CHECK_ACCESS(payment_context_arg_ptr);
+       LDKPaymentContext payment_context_arg_conv = *(LDKPaymentContext*)(payment_context_arg_ptr);
+       payment_context_arg_conv = PaymentContext_clone((LDKPaymentContext*)untag_ptr(payment_context_arg));
+       LDKReceiveTlvs ret_var = ReceiveTlvs_new(payment_secret_arg_ref, payment_constraints_arg_conv, payment_context_arg_conv);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -77110,6 +83777,317 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentConstraints_1clone(J
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentContext_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if (!ptr_is_owned(this_ptr)) return;
+       void* this_ptr_ptr = untag_ptr(this_ptr);
+       CHECK_ACCESS(this_ptr_ptr);
+       LDKPaymentContext this_ptr_conv = *(LDKPaymentContext*)(this_ptr_ptr);
+       FREE(untag_ptr(this_ptr));
+       PaymentContext_free(this_ptr_conv);
+}
+
+static inline uint64_t PaymentContext_clone_ptr(LDKPaymentContext *NONNULL_PTR arg) {
+       LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+       *ret_copy = PaymentContext_clone(arg);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKPaymentContext* arg_conv = (LDKPaymentContext*)untag_ptr(arg);
+       int64_t ret_conv = PaymentContext_clone_ptr(arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKPaymentContext* orig_conv = (LDKPaymentContext*)untag_ptr(orig);
+       LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+       *ret_copy = PaymentContext_clone(orig_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1unknown(JNIEnv *env, jclass clz, int64_t a) {
+       LDKUnknownPaymentContext a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv = UnknownPaymentContext_clone(&a_conv);
+       LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+       *ret_copy = PaymentContext_unknown(a_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1bolt12_1offer(JNIEnv *env, jclass clz, int64_t a) {
+       LDKBolt12OfferContext a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv = Bolt12OfferContext_clone(&a_conv);
+       LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+       *ret_copy = PaymentContext_bolt12_offer(a_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1bolt12_1refund(JNIEnv *env, jclass clz, int64_t a) {
+       LDKBolt12RefundContext a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv = Bolt12RefundContext_clone(&a_conv);
+       LDKPaymentContext *ret_copy = MALLOC(sizeof(LDKPaymentContext), "LDKPaymentContext");
+       *ret_copy = PaymentContext_bolt12_refund(a_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PaymentContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKPaymentContext* a_conv = (LDKPaymentContext*)untag_ptr(a);
+       LDKPaymentContext* b_conv = (LDKPaymentContext*)untag_ptr(b);
+       jboolean ret_conv = PaymentContext_eq(a_conv, b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKUnknownPaymentContext this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       UnknownPaymentContext_free(this_obj_conv);
+}
+
+static inline uint64_t UnknownPaymentContext_clone_ptr(LDKUnknownPaymentContext *NONNULL_PTR arg) {
+       LDKUnknownPaymentContext ret_var = UnknownPaymentContext_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKUnknownPaymentContext arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = UnknownPaymentContext_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUnknownPaymentContext orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKUnknownPaymentContext ret_var = UnknownPaymentContext_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKUnknownPaymentContext a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKUnknownPaymentContext b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = UnknownPaymentContext_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKBolt12OfferContext this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       Bolt12OfferContext_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1get_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKBolt12OfferContext this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKOfferId ret_var = Bolt12OfferContext_get_offer_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1set_1offer_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKBolt12OfferContext this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKOfferId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = OfferId_clone(&val_conv);
+       Bolt12OfferContext_set_offer_id(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1get_1invoice_1request(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKBolt12OfferContext this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKInvoiceRequestFields ret_var = Bolt12OfferContext_get_invoice_request(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1set_1invoice_1request(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKBolt12OfferContext this_ptr_conv;
+       this_ptr_conv.inner = untag_ptr(this_ptr);
+       this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKInvoiceRequestFields val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = InvoiceRequestFields_clone(&val_conv);
+       Bolt12OfferContext_set_invoice_request(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1new(JNIEnv *env, jclass clz, int64_t offer_id_arg, int64_t invoice_request_arg) {
+       LDKOfferId offer_id_arg_conv;
+       offer_id_arg_conv.inner = untag_ptr(offer_id_arg);
+       offer_id_arg_conv.is_owned = ptr_is_owned(offer_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(offer_id_arg_conv);
+       offer_id_arg_conv = OfferId_clone(&offer_id_arg_conv);
+       LDKInvoiceRequestFields invoice_request_arg_conv;
+       invoice_request_arg_conv.inner = untag_ptr(invoice_request_arg);
+       invoice_request_arg_conv.is_owned = ptr_is_owned(invoice_request_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_arg_conv);
+       invoice_request_arg_conv = InvoiceRequestFields_clone(&invoice_request_arg_conv);
+       LDKBolt12OfferContext ret_var = Bolt12OfferContext_new(offer_id_arg_conv, invoice_request_arg_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline uint64_t Bolt12OfferContext_clone_ptr(LDKBolt12OfferContext *NONNULL_PTR arg) {
+       LDKBolt12OfferContext ret_var = Bolt12OfferContext_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKBolt12OfferContext arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = Bolt12OfferContext_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKBolt12OfferContext orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKBolt12OfferContext ret_var = Bolt12OfferContext_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKBolt12OfferContext a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKBolt12OfferContext b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Bolt12OfferContext_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1free(JNIEnv *env, jclass clz, int64_t this_obj) {
+       LDKBolt12RefundContext this_obj_conv;
+       this_obj_conv.inner = untag_ptr(this_obj);
+       this_obj_conv.is_owned = ptr_is_owned(this_obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_obj_conv);
+       Bolt12RefundContext_free(this_obj_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1new(JNIEnv *env, jclass clz) {
+       LDKBolt12RefundContext ret_var = Bolt12RefundContext_new();
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+static inline uint64_t Bolt12RefundContext_clone_ptr(LDKBolt12RefundContext *NONNULL_PTR arg) {
+       LDKBolt12RefundContext ret_var = Bolt12RefundContext_clone(arg);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1clone_1ptr(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKBolt12RefundContext arg_conv;
+       arg_conv.inner = untag_ptr(arg);
+       arg_conv.is_owned = ptr_is_owned(arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(arg_conv);
+       arg_conv.is_owned = false;
+       int64_t ret_conv = Bolt12RefundContext_clone_ptr(&arg_conv);
+       return ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKBolt12RefundContext orig_conv;
+       orig_conv.inner = untag_ptr(orig);
+       orig_conv.is_owned = ptr_is_owned(orig);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(orig_conv);
+       orig_conv.is_owned = false;
+       LDKBolt12RefundContext ret_var = Bolt12RefundContext_clone(&orig_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
+       LDKBolt12RefundContext a_conv;
+       a_conv.inner = untag_ptr(a);
+       a_conv.is_owned = ptr_is_owned(a);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(a_conv);
+       a_conv.is_owned = false;
+       LDKBolt12RefundContext b_conv;
+       b_conv.inner = untag_ptr(b);
+       b_conv.is_owned = ptr_is_owned(b);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(b_conv);
+       b_conv.is_owned = false;
+       jboolean ret_conv = Bolt12RefundContext_eq(&a_conv, &b_conv);
+       return ret_conv;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ForwardTlvs_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKForwardTlvs obj_conv;
        obj_conv.inner = untag_ptr(obj);
@@ -77182,6 +84160,94 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentConstraints_1read(JN
        return tag_ptr(ret_conv, true);
 }
 
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_PaymentContext_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKPaymentContext* obj_conv = (LDKPaymentContext*)untag_ptr(obj);
+       LDKCVec_u8Z ret_var = PaymentContext_write(obj_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       LDKCResult_PaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PaymentContextDecodeErrorZ), "LDKCResult_PaymentContextDecodeErrorZ");
+       *ret_conv = PaymentContext_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKUnknownPaymentContext obj_conv;
+       obj_conv.inner = untag_ptr(obj);
+       obj_conv.is_owned = ptr_is_owned(obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = UnknownPaymentContext_write(&obj_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ");
+       *ret_conv = UnknownPaymentContext_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKBolt12OfferContext obj_conv;
+       obj_conv.inner = untag_ptr(obj);
+       obj_conv.is_owned = ptr_is_owned(obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = Bolt12OfferContext_write(&obj_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       LDKCResult_Bolt12OfferContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12OfferContextDecodeErrorZ), "LDKCResult_Bolt12OfferContextDecodeErrorZ");
+       *ret_conv = Bolt12OfferContext_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKBolt12RefundContext obj_conv;
+       obj_conv.inner = untag_ptr(obj);
+       obj_conv.is_owned = ptr_is_owned(obj);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(obj_conv);
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = Bolt12RefundContext_write(&obj_conv);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, ret_var.datalen);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, ret_var.datalen, ret_var.data);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = (*env)->GetArrayLength(env, ser);
+       ser_ref.data = (*env)->GetByteArrayElements (env, ser, NULL);
+       LDKCResult_Bolt12RefundContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12RefundContextDecodeErrorZ), "LDKCResult_Bolt12RefundContextDecodeErrorZ");
+       *ret_conv = Bolt12RefundContext_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return tag_ptr(ret_conv, true);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if (!ptr_is_owned(this_ptr)) return;
        void* this_ptr_ptr = untag_ptr(this_ptr);
@@ -77211,7 +84277,21 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1clone(JNIEn
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1invoice_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt11_1invoice_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret) {
+       void* payment_preimage_ptr = untag_ptr(payment_preimage);
+       CHECK_ACCESS(payment_preimage_ptr);
+       LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr);
+       payment_preimage_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_preimage));
+       LDKThirtyTwoBytes payment_secret_ref;
+       CHECK((*env)->GetArrayLength(env, payment_secret) == 32);
+       (*env)->GetByteArrayRegion(env, payment_secret, 0, 32, payment_secret_ref.data);
+       LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose");
+       *ret_copy = PaymentPurpose_bolt11_invoice_payment(payment_preimage_conv, payment_secret_ref);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt12_1offer_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret, int64_t payment_context) {
        void* payment_preimage_ptr = untag_ptr(payment_preimage);
        CHECK_ACCESS(payment_preimage_ptr);
        LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr);
@@ -77219,8 +84299,32 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1invoice_1pa
        LDKThirtyTwoBytes payment_secret_ref;
        CHECK((*env)->GetArrayLength(env, payment_secret) == 32);
        (*env)->GetByteArrayRegion(env, payment_secret, 0, 32, payment_secret_ref.data);
+       LDKBolt12OfferContext payment_context_conv;
+       payment_context_conv.inner = untag_ptr(payment_context);
+       payment_context_conv.is_owned = ptr_is_owned(payment_context);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_conv);
+       payment_context_conv = Bolt12OfferContext_clone(&payment_context_conv);
        LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose");
-       *ret_copy = PaymentPurpose_invoice_payment(payment_preimage_conv, payment_secret_ref);
+       *ret_copy = PaymentPurpose_bolt12_offer_payment(payment_preimage_conv, payment_secret_ref, payment_context_conv);
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt12_1refund_1payment(JNIEnv *env, jclass clz, int64_t payment_preimage, int8_tArray payment_secret, int64_t payment_context) {
+       void* payment_preimage_ptr = untag_ptr(payment_preimage);
+       CHECK_ACCESS(payment_preimage_ptr);
+       LDKCOption_ThirtyTwoBytesZ payment_preimage_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_preimage_ptr);
+       payment_preimage_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_preimage));
+       LDKThirtyTwoBytes payment_secret_ref;
+       CHECK((*env)->GetArrayLength(env, payment_secret) == 32);
+       (*env)->GetByteArrayRegion(env, payment_secret, 0, 32, payment_secret_ref.data);
+       LDKBolt12RefundContext payment_context_conv;
+       payment_context_conv.inner = untag_ptr(payment_context);
+       payment_context_conv.is_owned = ptr_is_owned(payment_context);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(payment_context_conv);
+       payment_context_conv = Bolt12RefundContext_clone(&payment_context_conv);
+       LDKPaymentPurpose *ret_copy = MALLOC(sizeof(LDKPaymentPurpose), "LDKPaymentPurpose");
+       *ret_copy = PaymentPurpose_bolt12_refund_payment(payment_preimage_conv, payment_secret_ref, payment_context_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -77277,27 +84381,31 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1free(JNIEnv *env,
        ClaimedHTLC_free(this_obj_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKClaimedHTLC this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ClaimedHTLC_get_channel_id(&this_ptr_conv));
-       return ret_arr;
+       LDKChannelId ret_var = ClaimedHTLC_get_channel_id(&this_ptr_conv);
+       int64_t ret_ref = 0;
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+       ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+       return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1set_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
        LDKClaimedHTLC this_ptr_conv;
        this_ptr_conv.inner = untag_ptr(this_ptr);
        this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
        this_ptr_conv.is_owned = false;
-       LDKThirtyTwoBytes val_ref;
-       CHECK((*env)->GetArrayLength(env, val) == 32);
-       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       ClaimedHTLC_set_channel_id(&this_ptr_conv, val_ref);
+       LDKChannelId val_conv;
+       val_conv.inner = untag_ptr(val);
+       val_conv.is_owned = ptr_is_owned(val);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
+       val_conv = ChannelId_clone(&val_conv);
+       ClaimedHTLC_set_channel_id(&this_ptr_conv, val_conv);
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1user_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -77380,14 +84488,16 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1set_1counterparty
        ClaimedHTLC_set_counterparty_skimmed_fee_msat(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1new(JNIEnv *env, jclass clz, int8_tArray channel_id_arg, int8_tArray user_channel_id_arg, int32_t cltv_expiry_arg, int64_t value_msat_arg, int64_t counterparty_skimmed_fee_msat_arg) {
-       LDKThirtyTwoBytes channel_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id_arg) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id_arg, 0, 32, channel_id_arg_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1new(JNIEnv *env, jclass clz, int64_t channel_id_arg, int8_tArray user_channel_id_arg, int32_t cltv_expiry_arg, int64_t value_msat_arg, int64_t counterparty_skimmed_fee_msat_arg) {
+       LDKChannelId channel_id_arg_conv;
+       channel_id_arg_conv.inner = untag_ptr(channel_id_arg);
+       channel_id_arg_conv.is_owned = ptr_is_owned(channel_id_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_arg_conv);
+       channel_id_arg_conv = ChannelId_clone(&channel_id_arg_conv);
        LDKU128 user_channel_id_arg_ref;
        CHECK((*env)->GetArrayLength(env, user_channel_id_arg) == 16);
        (*env)->GetByteArrayRegion(env, user_channel_id_arg, 0, 16, user_channel_id_arg_ref.le_bytes);
-       LDKClaimedHTLC ret_var = ClaimedHTLC_new(channel_id_arg_ref, user_channel_id_arg_ref, cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg);
+       LDKClaimedHTLC ret_var = ClaimedHTLC_new(channel_id_arg_conv, user_channel_id_arg_ref, cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg);
        int64_t ret_ref = 0;
        CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
        ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
@@ -77587,9 +84697,23 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1holder_1forc
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1cooperative_1closure(JNIEnv *env, jclass clz) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1legacy_1cooperative_1closure(JNIEnv *env, jclass clz) {
+       LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason");
+       *ret_copy = ClosureReason_legacy_cooperative_closure();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1counterparty_1initiated_1cooperative_1closure(JNIEnv *env, jclass clz) {
        LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason");
-       *ret_copy = ClosureReason_cooperative_closure();
+       *ret_copy = ClosureReason_counterparty_initiated_cooperative_closure();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1locally_1initiated_1cooperative_1closure(JNIEnv *env, jclass clz) {
+       LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason");
+       *ret_copy = ClosureReason_locally_initiated_cooperative_closure();
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -77644,6 +84768,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1funding_1bat
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosureReason_1htlcs_1timed_1out(JNIEnv *env, jclass clz) {
+       LDKClosureReason *ret_copy = MALLOC(sizeof(LDKClosureReason), "LDKClosureReason");
+       *ret_copy = ClosureReason_htlcs_timed_out();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ClosureReason_1eq(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
        LDKClosureReason* a_conv = (LDKClosureReason*)untag_ptr(a);
        LDKClosureReason* b_conv = (LDKClosureReason*)untag_ptr(b);
@@ -77699,15 +84830,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1clone(JNIE
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1next_1hop_1channel(JNIEnv *env, jclass clz, int8_tArray node_id, int8_tArray channel_id) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1next_1hop_1channel(JNIEnv *env, jclass clz, int8_tArray node_id, int64_t channel_id) {
        LDKPublicKey node_id_ref;
        CHECK((*env)->GetArrayLength(env, node_id) == 33);
        (*env)->GetByteArrayRegion(env, node_id, 0, 33, node_id_ref.compressed_form);
-       LDKThirtyTwoBytes channel_id_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data);
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv = ChannelId_clone(&channel_id_conv);
        LDKHTLCDestination *ret_copy = MALLOC(sizeof(LDKHTLCDestination), "LDKHTLCDestination");
-       *ret_copy = HTLCDestination_next_hop_channel(node_id_ref, channel_id_ref);
+       *ret_copy = HTLCDestination_next_hop_channel(node_id_ref, channel_id_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -77726,6 +84859,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1invalid_1f
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1invalid_1onion(JNIEnv *env, jclass clz) {
+       LDKHTLCDestination *ret_copy = MALLOC(sizeof(LDKHTLCDestination), "LDKHTLCDestination");
+       *ret_copy = HTLCDestination_invalid_onion();
+       int64_t ret_ref = tag_ptr(ret_copy, true);
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1failed_1payment(JNIEnv *env, jclass clz, int8_tArray payment_hash) {
        LDKThirtyTwoBytes payment_hash_ref;
        CHECK((*env)->GetArrayLength(env, payment_hash) == 32);
@@ -77853,10 +84993,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1clone(JNIEnv *env, j
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1funding_1generation_1ready(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int64_t channel_value_satoshis, int8_tArray output_script, int8_tArray user_channel_id) {
-       LDKThirtyTwoBytes temporary_channel_id_ref;
-       CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1funding_1generation_1ready(JNIEnv *env, jclass clz, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t channel_value_satoshis, int8_tArray output_script, int8_tArray user_channel_id) {
+       LDKChannelId temporary_channel_id_conv;
+       temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+       temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+       temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv);
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
@@ -77868,7 +85010,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1funding_1generation_
        CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
        (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
        LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
-       *ret_copy = Event_funding_generation_ready(temporary_channel_id_ref, counterparty_node_id_ref, channel_value_satoshis, output_script_ref, user_channel_id_ref);
+       *ret_copy = Event_funding_generation_ready(temporary_channel_id_conv, counterparty_node_id_ref, channel_value_satoshis, output_script_ref, user_channel_id_ref);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -77889,10 +85031,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1payment_1claimable(J
        CHECK_ACCESS(purpose_ptr);
        LDKPaymentPurpose purpose_conv = *(LDKPaymentPurpose*)(purpose_ptr);
        purpose_conv = PaymentPurpose_clone((LDKPaymentPurpose*)untag_ptr(purpose));
-       void* via_channel_id_ptr = untag_ptr(via_channel_id);
-       CHECK_ACCESS(via_channel_id_ptr);
-       LDKCOption_ThirtyTwoBytesZ via_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(via_channel_id_ptr);
-       via_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(via_channel_id));
+       LDKChannelId via_channel_id_conv;
+       via_channel_id_conv.inner = untag_ptr(via_channel_id);
+       via_channel_id_conv.is_owned = ptr_is_owned(via_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(via_channel_id_conv);
+       via_channel_id_conv = ChannelId_clone(&via_channel_id_conv);
        void* via_user_channel_id_ptr = untag_ptr(via_user_channel_id);
        CHECK_ACCESS(via_user_channel_id_ptr);
        LDKCOption_U128Z via_user_channel_id_conv = *(LDKCOption_U128Z*)(via_user_channel_id_ptr);
@@ -78141,50 +85284,68 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1spendable_1outputs(J
                outputs_constr.data[b] = outputs_conv_27_conv;
        }
        (*env)->ReleaseLongArrayElements(env, outputs, outputs_vals, 0);
-       void* channel_id_ptr = untag_ptr(channel_id);
-       CHECK_ACCESS(channel_id_ptr);
-       LDKCOption_ThirtyTwoBytesZ channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(channel_id_ptr);
-       channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(channel_id));
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv = ChannelId_clone(&channel_id_conv);
        LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
        *ret_copy = Event_spendable_outputs(outputs_constr, channel_id_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1payment_1forwarded(JNIEnv *env, jclass clz, int64_t prev_channel_id, int64_t next_channel_id, int64_t fee_earned_msat, jboolean claim_from_onchain_tx, int64_t outbound_amount_forwarded_msat) {
-       void* prev_channel_id_ptr = untag_ptr(prev_channel_id);
-       CHECK_ACCESS(prev_channel_id_ptr);
-       LDKCOption_ThirtyTwoBytesZ prev_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(prev_channel_id_ptr);
-       prev_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(prev_channel_id));
-       void* next_channel_id_ptr = untag_ptr(next_channel_id);
-       CHECK_ACCESS(next_channel_id_ptr);
-       LDKCOption_ThirtyTwoBytesZ next_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(next_channel_id_ptr);
-       next_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(next_channel_id));
-       void* fee_earned_msat_ptr = untag_ptr(fee_earned_msat);
-       CHECK_ACCESS(fee_earned_msat_ptr);
-       LDKCOption_u64Z fee_earned_msat_conv = *(LDKCOption_u64Z*)(fee_earned_msat_ptr);
-       fee_earned_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(fee_earned_msat));
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1payment_1forwarded(JNIEnv *env, jclass clz, int64_t prev_channel_id, int64_t next_channel_id, int64_t prev_user_channel_id, int64_t next_user_channel_id, int64_t total_fee_earned_msat, int64_t skimmed_fee_msat, jboolean claim_from_onchain_tx, int64_t outbound_amount_forwarded_msat) {
+       LDKChannelId prev_channel_id_conv;
+       prev_channel_id_conv.inner = untag_ptr(prev_channel_id);
+       prev_channel_id_conv.is_owned = ptr_is_owned(prev_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_conv);
+       prev_channel_id_conv = ChannelId_clone(&prev_channel_id_conv);
+       LDKChannelId next_channel_id_conv;
+       next_channel_id_conv.inner = untag_ptr(next_channel_id);
+       next_channel_id_conv.is_owned = ptr_is_owned(next_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(next_channel_id_conv);
+       next_channel_id_conv = ChannelId_clone(&next_channel_id_conv);
+       void* prev_user_channel_id_ptr = untag_ptr(prev_user_channel_id);
+       CHECK_ACCESS(prev_user_channel_id_ptr);
+       LDKCOption_U128Z prev_user_channel_id_conv = *(LDKCOption_U128Z*)(prev_user_channel_id_ptr);
+       prev_user_channel_id_conv = COption_U128Z_clone((LDKCOption_U128Z*)untag_ptr(prev_user_channel_id));
+       void* next_user_channel_id_ptr = untag_ptr(next_user_channel_id);
+       CHECK_ACCESS(next_user_channel_id_ptr);
+       LDKCOption_U128Z next_user_channel_id_conv = *(LDKCOption_U128Z*)(next_user_channel_id_ptr);
+       next_user_channel_id_conv = COption_U128Z_clone((LDKCOption_U128Z*)untag_ptr(next_user_channel_id));
+       void* total_fee_earned_msat_ptr = untag_ptr(total_fee_earned_msat);
+       CHECK_ACCESS(total_fee_earned_msat_ptr);
+       LDKCOption_u64Z total_fee_earned_msat_conv = *(LDKCOption_u64Z*)(total_fee_earned_msat_ptr);
+       total_fee_earned_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(total_fee_earned_msat));
+       void* skimmed_fee_msat_ptr = untag_ptr(skimmed_fee_msat);
+       CHECK_ACCESS(skimmed_fee_msat_ptr);
+       LDKCOption_u64Z skimmed_fee_msat_conv = *(LDKCOption_u64Z*)(skimmed_fee_msat_ptr);
+       skimmed_fee_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(skimmed_fee_msat));
        void* outbound_amount_forwarded_msat_ptr = untag_ptr(outbound_amount_forwarded_msat);
        CHECK_ACCESS(outbound_amount_forwarded_msat_ptr);
        LDKCOption_u64Z outbound_amount_forwarded_msat_conv = *(LDKCOption_u64Z*)(outbound_amount_forwarded_msat_ptr);
        outbound_amount_forwarded_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(outbound_amount_forwarded_msat));
        LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
-       *ret_copy = Event_payment_forwarded(prev_channel_id_conv, next_channel_id_conv, fee_earned_msat_conv, claim_from_onchain_tx, outbound_amount_forwarded_msat_conv);
+       *ret_copy = Event_payment_forwarded(prev_channel_id_conv, next_channel_id_conv, prev_user_channel_id_conv, next_user_channel_id_conv, total_fee_earned_msat_conv, skimmed_fee_msat_conv, claim_from_onchain_tx, outbound_amount_forwarded_msat_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1pending(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray user_channel_id, int64_t former_temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_txo) {
-       LDKThirtyTwoBytes channel_id_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1pending(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray user_channel_id, int64_t former_temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_txo, int64_t channel_type) {
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv = ChannelId_clone(&channel_id_conv);
        LDKU128 user_channel_id_ref;
        CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
        (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
-       void* former_temporary_channel_id_ptr = untag_ptr(former_temporary_channel_id);
-       CHECK_ACCESS(former_temporary_channel_id_ptr);
-       LDKCOption_ThirtyTwoBytesZ former_temporary_channel_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(former_temporary_channel_id_ptr);
-       former_temporary_channel_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(former_temporary_channel_id));
+       LDKChannelId former_temporary_channel_id_conv;
+       former_temporary_channel_id_conv.inner = untag_ptr(former_temporary_channel_id);
+       former_temporary_channel_id_conv.is_owned = ptr_is_owned(former_temporary_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(former_temporary_channel_id_conv);
+       former_temporary_channel_id_conv = ChannelId_clone(&former_temporary_channel_id_conv);
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
@@ -78193,16 +85354,23 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1pending(JNI
        funding_txo_conv.is_owned = ptr_is_owned(funding_txo);
        CHECK_INNER_FIELD_ACCESS_OR_NULL(funding_txo_conv);
        funding_txo_conv = OutPoint_clone(&funding_txo_conv);
+       LDKChannelTypeFeatures channel_type_conv;
+       channel_type_conv.inner = untag_ptr(channel_type);
+       channel_type_conv.is_owned = ptr_is_owned(channel_type);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv);
+       channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv);
        LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
-       *ret_copy = Event_channel_pending(channel_id_ref, user_channel_id_ref, former_temporary_channel_id_conv, counterparty_node_id_ref, funding_txo_conv);
+       *ret_copy = Event_channel_pending(channel_id_conv, user_channel_id_ref, former_temporary_channel_id_conv, counterparty_node_id_ref, funding_txo_conv, channel_type_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1ready(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray user_channel_id, int8_tArray counterparty_node_id, int64_t channel_type) {
-       LDKThirtyTwoBytes channel_id_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1ready(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray user_channel_id, int8_tArray counterparty_node_id, int64_t channel_type) {
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv = ChannelId_clone(&channel_id_conv);
        LDKU128 user_channel_id_ref;
        CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
        (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
@@ -78215,15 +85383,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1ready(JNIEn
        CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv);
        channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv);
        LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
-       *ret_copy = Event_channel_ready(channel_id_ref, user_channel_id_ref, counterparty_node_id_ref, channel_type_conv);
+       *ret_copy = Event_channel_ready(channel_id_conv, user_channel_id_ref, counterparty_node_id_ref, channel_type_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1closed(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray user_channel_id, int64_t reason, int8_tArray counterparty_node_id, int64_t channel_capacity_sats, int64_t channel_funding_txo) {
-       LDKThirtyTwoBytes channel_id_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1closed(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray user_channel_id, int64_t reason, int8_tArray counterparty_node_id, int64_t channel_capacity_sats, int64_t channel_funding_txo) {
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv = ChannelId_clone(&channel_id_conv);
        LDKU128 user_channel_id_ref;
        CHECK((*env)->GetArrayLength(env, user_channel_id) == 16);
        (*env)->GetByteArrayRegion(env, user_channel_id, 0, 16, user_channel_id_ref.le_bytes);
@@ -78244,30 +85414,34 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1channel_1closed(JNIE
        CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_txo_conv);
        channel_funding_txo_conv = OutPoint_clone(&channel_funding_txo_conv);
        LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
-       *ret_copy = Event_channel_closed(channel_id_ref, user_channel_id_ref, reason_conv, counterparty_node_id_ref, channel_capacity_sats_conv, channel_funding_txo_conv);
+       *ret_copy = Event_channel_closed(channel_id_conv, user_channel_id_ref, reason_conv, counterparty_node_id_ref, channel_capacity_sats_conv, channel_funding_txo_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1discard_1funding(JNIEnv *env, jclass clz, int8_tArray channel_id, int8_tArray transaction) {
-       LDKThirtyTwoBytes channel_id_ref;
-       CHECK((*env)->GetArrayLength(env, channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, channel_id, 0, 32, channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1discard_1funding(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray transaction) {
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv = ChannelId_clone(&channel_id_conv);
        LDKTransaction transaction_ref;
        transaction_ref.datalen = (*env)->GetArrayLength(env, transaction);
        transaction_ref.data = MALLOC(transaction_ref.datalen, "LDKTransaction Bytes");
        (*env)->GetByteArrayRegion(env, transaction, 0, transaction_ref.datalen, transaction_ref.data);
        transaction_ref.data_is_owned = true;
        LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
-       *ret_copy = Event_discard_funding(channel_id_ref, transaction_ref);
+       *ret_copy = Event_discard_funding(channel_id_conv, transaction_ref);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1open_1channel_1request(JNIEnv *env, jclass clz, int8_tArray temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t push_msat, int64_t channel_type) {
-       LDKThirtyTwoBytes temporary_channel_id_ref;
-       CHECK((*env)->GetArrayLength(env, temporary_channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, temporary_channel_id, 0, 32, temporary_channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1open_1channel_1request(JNIEnv *env, jclass clz, int64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t push_msat, int64_t channel_type) {
+       LDKChannelId temporary_channel_id_conv;
+       temporary_channel_id_conv.inner = untag_ptr(temporary_channel_id);
+       temporary_channel_id_conv.is_owned = ptr_is_owned(temporary_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(temporary_channel_id_conv);
+       temporary_channel_id_conv = ChannelId_clone(&temporary_channel_id_conv);
        LDKPublicKey counterparty_node_id_ref;
        CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
        (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
@@ -78277,21 +85451,23 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1open_1channel_1reque
        CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_type_conv);
        channel_type_conv = ChannelTypeFeatures_clone(&channel_type_conv);
        LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
-       *ret_copy = Event_open_channel_request(temporary_channel_id_ref, counterparty_node_id_ref, funding_satoshis, push_msat, channel_type_conv);
+       *ret_copy = Event_open_channel_request(temporary_channel_id_conv, counterparty_node_id_ref, funding_satoshis, push_msat, channel_type_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1htlchandling_1failed(JNIEnv *env, jclass clz, int8_tArray prev_channel_id, int64_t failed_next_destination) {
-       LDKThirtyTwoBytes prev_channel_id_ref;
-       CHECK((*env)->GetArrayLength(env, prev_channel_id) == 32);
-       (*env)->GetByteArrayRegion(env, prev_channel_id, 0, 32, prev_channel_id_ref.data);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1htlchandling_1failed(JNIEnv *env, jclass clz, int64_t prev_channel_id, int64_t failed_next_destination) {
+       LDKChannelId prev_channel_id_conv;
+       prev_channel_id_conv.inner = untag_ptr(prev_channel_id);
+       prev_channel_id_conv.is_owned = ptr_is_owned(prev_channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(prev_channel_id_conv);
+       prev_channel_id_conv = ChannelId_clone(&prev_channel_id_conv);
        void* failed_next_destination_ptr = untag_ptr(failed_next_destination);
        CHECK_ACCESS(failed_next_destination_ptr);
        LDKHTLCDestination failed_next_destination_conv = *(LDKHTLCDestination*)(failed_next_destination_ptr);
        failed_next_destination_conv = HTLCDestination_clone((LDKHTLCDestination*)untag_ptr(failed_next_destination));
        LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
-       *ret_copy = Event_htlchandling_failed(prev_channel_id_ref, failed_next_destination_conv);
+       *ret_copy = Event_htlchandling_failed(prev_channel_id_conv, failed_next_destination_conv);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -79148,7 +86324,15 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1clone
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1channel_1close(JNIEnv *env, jclass clz, int8_tArray claim_id, int32_t package_target_feerate_sat_per_1000_weight, int8_tArray commitment_tx, int64_t commitment_tx_fee_satoshis, int64_t anchor_descriptor, int64_tArray pending_htlcs) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1channel_1close(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray counterparty_node_id, int8_tArray claim_id, int32_t package_target_feerate_sat_per_1000_weight, int8_tArray commitment_tx, int64_t commitment_tx_fee_satoshis, int64_t anchor_descriptor, int64_tArray pending_htlcs) {
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv = ChannelId_clone(&channel_id_conv);
+       LDKPublicKey counterparty_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
        LDKThirtyTwoBytes claim_id_ref;
        CHECK((*env)->GetArrayLength(env, claim_id) == 32);
        (*env)->GetByteArrayRegion(env, claim_id, 0, 32, claim_id_ref.data);
@@ -79180,12 +86364,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1chann
        }
        (*env)->ReleaseLongArrayElements(env, pending_htlcs, pending_htlcs_vals, 0);
        LDKBumpTransactionEvent *ret_copy = MALLOC(sizeof(LDKBumpTransactionEvent), "LDKBumpTransactionEvent");
-       *ret_copy = BumpTransactionEvent_channel_close(claim_id_ref, package_target_feerate_sat_per_1000_weight, commitment_tx_ref, commitment_tx_fee_satoshis, anchor_descriptor_conv, pending_htlcs_constr);
+       *ret_copy = BumpTransactionEvent_channel_close(channel_id_conv, counterparty_node_id_ref, claim_id_ref, package_target_feerate_sat_per_1000_weight, commitment_tx_ref, commitment_tx_fee_satoshis, anchor_descriptor_conv, pending_htlcs_constr);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1htlcresolution(JNIEnv *env, jclass clz, int8_tArray claim_id, int32_t target_feerate_sat_per_1000_weight, int64_tArray htlc_descriptors, int32_t tx_lock_time) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1htlcresolution(JNIEnv *env, jclass clz, int64_t channel_id, int8_tArray counterparty_node_id, int8_tArray claim_id, int32_t target_feerate_sat_per_1000_weight, int64_tArray htlc_descriptors, int32_t tx_lock_time) {
+       LDKChannelId channel_id_conv;
+       channel_id_conv.inner = untag_ptr(channel_id);
+       channel_id_conv.is_owned = ptr_is_owned(channel_id);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_id_conv);
+       channel_id_conv = ChannelId_clone(&channel_id_conv);
+       LDKPublicKey counterparty_node_id_ref;
+       CHECK((*env)->GetArrayLength(env, counterparty_node_id) == 33);
+       (*env)->GetByteArrayRegion(env, counterparty_node_id, 0, 33, counterparty_node_id_ref.compressed_form);
        LDKThirtyTwoBytes claim_id_ref;
        CHECK((*env)->GetArrayLength(env, claim_id) == 32);
        (*env)->GetByteArrayRegion(env, claim_id, 0, 32, claim_id_ref.data);
@@ -79207,7 +86399,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1htlcr
        }
        (*env)->ReleaseLongArrayElements(env, htlc_descriptors, htlc_descriptors_vals, 0);
        LDKBumpTransactionEvent *ret_copy = MALLOC(sizeof(LDKBumpTransactionEvent), "LDKBumpTransactionEvent");
-       *ret_copy = BumpTransactionEvent_htlcresolution(claim_id_ref, target_feerate_sat_per_1000_weight, htlc_descriptors_constr, tx_lock_time);
+       *ret_copy = BumpTransactionEvent_htlcresolution(channel_id_conv, counterparty_node_id_ref, claim_id_ref, target_feerate_sat_per_1000_weight, htlc_descriptors_constr, tx_lock_time);
        int64_t ret_ref = tag_ptr(ret_copy, true);
        return ret_ref;
 }
@@ -81653,6 +88845,17 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1recover_
        return ret_arr;
 }
 
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1get_1payee_1pub_1key(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKBolt11Invoice this_arg_conv;
+       this_arg_conv.inner = untag_ptr(this_arg);
+       this_arg_conv.is_owned = ptr_is_owned(this_arg);
+       CHECK_INNER_FIELD_ACCESS_OR_NULL(this_arg_conv);
+       this_arg_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, Bolt11Invoice_get_payee_pub_key(&this_arg_conv).compressed_form);
+       return ret_arr;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1expires_1at(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKBolt11Invoice this_arg_conv;
        this_arg_conv.inner = untag_ptr(this_arg);
diff --git a/src/main/jni/org_ldk_enums_Direction.h b/src/main/jni/org_ldk_enums_Direction.h
new file mode 100644 (file)
index 0000000..6662f65
--- /dev/null
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_enums_Direction */
+
+#ifndef _Included_org_ldk_enums_Direction
+#define _Included_org_ldk_enums_Direction
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_enums_Direction
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_enums_Direction_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_enums_ShortChannelIdError.h b/src/main/jni/org_ldk_enums_ShortChannelIdError.h
new file mode 100644 (file)
index 0000000..0a63cdf
--- /dev/null
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_enums_ShortChannelIdError */
+
+#ifndef _Included_org_ldk_enums_ShortChannelIdError
+#define _Included_org_ldk_enums_ShortChannelIdError
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_enums_ShortChannelIdError
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_enums_ShortChannelIdError_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
index 15da14522328aacb10faafb51616b61479e99553..6c237b9142679dfcb916593fe2e37a550891c4c1 100644 (file)
@@ -71,6 +71,38 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1free
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKBech32Error_1ref_1from_1ptr
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RefundBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RefundBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LDKCOption_u64Z_ref_from_ptr
@@ -215,6 +247,54 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RecipientOnionFields
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RecipientOnionFieldsNoneZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_Bolt12InvoiceBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_SchnorrSignatureNoneZ_get_ok
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_SchnorrSignatureNoneZ_get_err
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LDKCOption_CVec_ThirtyTwoBytesZZ_ref_from_ptr
@@ -223,6 +303,38 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RecipientOnionFieldsN
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1CVec_1ThirtyTwoBytesZZ_1ref_1from_1ptr
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKAmount_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKAmount;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKAmount_1ref_1from_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCOption_AmountZ_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_AmountZ;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1AmountZ_1ref_1from_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKQuantity_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKQuantity;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKQuantity_1ref_1from_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCOption_QuantityZ_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_QuantityZ;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1QuantityZ_1ref_1from_1ptr
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CResult_ThirtyTwoBytesNoneZ_get_ok
@@ -441,34 +553,34 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RecoverableSignatureN
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_SchnorrSignatureNoneZ_get_ok
+ * Method:    CResult_ECDSASignatureNoneZ_get_ok
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1ok
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_SchnorrSignatureNoneZ_get_err
+ * Method:    CResult_ECDSASignatureNoneZ_get_err
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1get_1err
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ECDSASignatureNoneZ_get_ok
+ * Method:    CResult_TransactionNoneZ_get_ok
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1ok
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ECDSASignatureNoneZ_get_err
+ * Method:    CResult_TransactionNoneZ_get_err
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1get_1err
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -783,22 +895,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDecode
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CResult_TransactionNoneZ_get_ok
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CResult_TransactionNoneZ_get_err
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1get_1err
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LDKCandidateRouteHop_ref_from_ptr
@@ -1263,6 +1359,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerD
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_BestBlockDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_BestBlockDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    C2Tuple_usizeTransactionZ_get_a
@@ -1319,6 +1431,14 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpda
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateStatusNoneZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKClosureReason_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKClosureReason;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKClosureReason_1ref_1from_1ptr
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LDKMonitorEvent_ref_from_ptr
@@ -1329,26 +1449,34 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMonitorEvent_1ref_1from_
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a
+ * Method:    C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_a
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1a
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_b
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1a
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b
+ * Method:    C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c
  * Signature: (J)[J
  */
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1b
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1c
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c
+ * Method:    C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1get_1c
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1get_1d
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -1465,34 +1593,98 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTypeFeaturesD
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_OfferBolt12ParseErrorZ_get_ok
+ * Method:    CResult_OfferIdDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_OfferBolt12ParseErrorZ_get_err
+ * Method:    CResult_OfferIdDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PublicKeySecp256k1ErrorZ_get_ok
- * Signature: (J)[B
+ * Method:    CResult_NoneBolt12SemanticErrorZ_get_ok
+ * Signature: (J)V
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1ok
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PublicKeySecp256k1ErrorZ_get_err
- * Signature: (J)Lorg/ldk/enums/Secp256k1Error;
+ * Method:    CResult_NoneBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1err
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OfferBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OfferBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OfferBolt12ParseErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OfferBolt12ParseErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -1511,6 +1703,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_PublicKeySecp256k1ErrorZ_get_ok
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_PublicKeySecp256k1ErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Secp256k1Error;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LDKNetworkUpdate_ref_from_ptr
@@ -1799,6 +2007,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeEr
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1CVec_1SocketAddressZZ_1ref_1from_1ptr
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_u64ShortChannelIdErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_u64ShortChannelIdErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/ShortChannelIdError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CResult_PendingHTLCInfoInboundHTLCErrZ_get_ok
@@ -1855,6 +2079,22 @@ JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1UtxoZNone
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1UtxoZNoneZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKPaymentContext_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKPaymentContext;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPaymentContext_1ref_1from_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCOption_PaymentContextZ_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_PaymentContextZ;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1PaymentContextZ_1ref_1from_1ptr
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    C2Tuple_u64u16Z_get_a
@@ -1889,18 +2129,18 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1ChannelShutdown
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ThirtyTwoBytesAPIErrorZ_get_ok
- * Signature: (J)[B
+ * Method:    CResult_ChannelIdAPIErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ThirtyTwoBytesAPIErrorZ_get_err
+ * Method:    CResult_ChannelIdAPIErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -2041,42 +2281,42 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1Thirt
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_ThirtyTwoBytesPublicKeyZ_get_a
- * Signature: (J)[B
+ * Method:    C2Tuple_ChannelIdPublicKeyZ_get_a
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1get_1a
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_ThirtyTwoBytesPublicKeyZ_get_b
+ * Method:    C2Tuple_ChannelIdPublicKeyZ_get_b
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1get_1b
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCOption_StrZ_ref_from_ptr
- * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_StrZ;
+ * Method:    CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1StrZ_1ref_1from_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneBolt12SemanticErrorZ_get_ok
- * Signature: (J)V
+ * Method:    CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1ok
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneBolt12SemanticErrorZ_get_err
- * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ * Method:    LDKCOption_StrZ_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_StrZ;
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1get_1err
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1StrZ_1ref_1from_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -2095,6 +2335,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBy
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ThirtyTwoBytesAPIErrorZ_get_ok
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ThirtyTwoBytesAPIErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LDKOffersMessage_ref_from_ptr
@@ -3015,22 +3271,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1TypeZDecode
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1SocketAddressZ_1ref_1from_1ptr
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_PublicKeyCOption_SocketAddressZZ_get_a
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1get_1a
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_PublicKeyCOption_SocketAddressZZ_get_b
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1get_1b
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CResult_CVec_u8ZPeerHandleErrorZ_get_ok
@@ -3167,6 +3407,38 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBy
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesChannelMonitorZIOErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LDKCOption_SecretKeyZ_ref_from_ptr
@@ -3175,6 +3447,22 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwo
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1SecretKeyZ_1ref_1from_1ptr
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CResult_VerifiedInvoiceRequestNoneZ_get_ok
@@ -3191,6 +3479,46 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceReque
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceRequestNoneZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestFieldsDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCOption_ECDSASignatureZ_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKCOption_ECDSASignatureZ;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1ECDSASignatureZ_1ref_1from_1ptr
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LDKCOption_i64Z_ref_from_ptr
@@ -4399,14 +4727,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1PathFailure
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1COption_1PathFailureZDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    LDKClosureReason_ref_from_ptr
- * Signature: (J)Lorg/ldk/impl/bindings/LDKClosureReason;
- */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKClosureReason_1ref_1from_1ptr
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LDKCOption_ClosureReasonZ_ref_from_ptr
@@ -4815,6 +5135,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UntrustedStringDecod
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UntrustedStringDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelIdDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelIdDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    C2Tuple__u832u16Z_get_a
@@ -4865,42 +5201,66 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentConstraintsDe
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a
- * Signature: (J)[B
+ * Method:    CResult_PaymentContextDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1a
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b
+ * Method:    CResult_PaymentContextDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1b
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c
+ * Method:    CResult_UnknownPaymentContextDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1c
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok
+ * Method:    CResult_UnknownPaymentContextDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err
- * Signature: (J)V
+ * Method:    CResult_Bolt12OfferContextDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_Bolt12OfferContextDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_Bolt12RefundContextDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_Bolt12RefundContextDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -4919,6 +5279,46 @@ JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_a
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1a
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_b
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1b
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_get_c
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1get_1c
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_get_err
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_get_a
@@ -4967,6 +5367,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOn
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKNextMessageHop_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKNextMessageHop;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKNextMessageHop_1ref_1from_1ptr
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LDKParsedOnionMessageContents_ref_from_ptr
@@ -5105,98 +5513,42 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceErrorDecodeEr
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CResult_DelayedPaymentBasepointDecodeErrorZ_get_err
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1err
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CResult_DelayedPaymentKeyDecodeErrorZ_get_ok
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CResult_DelayedPaymentKeyDecodeErrorZ_get_err
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1err
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CResult_HtlcBasepointDecodeErrorZ_get_ok
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CResult_HtlcBasepointDecodeErrorZ_get_err
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1err
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CResult_HtlcKeyDecodeErrorZ_get_ok
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CResult_HtlcKeyDecodeErrorZ_get_err
+ * Method:    CResult_TrackedSpendableOutputDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_RevocationBasepointDecodeErrorZ_get_ok
+ * Method:    CResult_TrackedSpendableOutputDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_RevocationBasepointDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method:    LDKOutputSpendStatus_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKOutputSpendStatus;
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1err
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKOutputSpendStatus_1ref_1from_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_RevocationKeyDecodeErrorZ_get_ok
+ * Method:    CResult_OutputSpendStatusDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_RevocationKeyDecodeErrorZ_get_err
+ * Method:    CResult_OutputSpendStatusDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -5233,34 +5585,18 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCOption_1FilterZ_1ref_1f
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_LockedChannelMonitorNoneZ_get_ok
- * Signature: (J)J
+ * Method:    LDKChangeDestinationSource_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKChangeDestinationSource;)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CResult_LockedChannelMonitorNoneZ_get_err
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1err
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKChangeDestinationSource_1new
+  (JNIEnv *, jclass, jobject);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a
+ * Method:    ChangeDestinationSource_get_change_destination_script
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1a
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b
- * Signature: (J)[J
- */
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1b
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChangeDestinationSource_1get_1change_1destination_1script
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -5303,6 +5639,214 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KVStore_1remove
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KVStore_1list
   (JNIEnv *, jclass, jlong, jstring, jstring);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKOutputSpender_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKOutputSpender;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKOutputSpender_1new
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutputSpender_spend_spendable_outputs
+ * Signature: (J[J[J[BIJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSpender_1spend_1spendable_1outputs
+  (JNIEnv *, jclass, jlong, jlongArray, jlongArray, jbyteArray, jint, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OutputSweeperDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OutputSweeperDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C2Tuple_BestBlockOutputSweeperZ_get_a
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1get_1a
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C2Tuple_BestBlockOutputSweeperZ_get_b
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1get_1b
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_DelayedPaymentBasepointDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_DelayedPaymentBasepointDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentBasepointDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_DelayedPaymentKeyDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_DelayedPaymentKeyDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DelayedPaymentKeyDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HtlcBasepointDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HtlcBasepointDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcBasepointDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HtlcKeyDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HtlcKeyDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HtlcKeyDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RevocationBasepointDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RevocationBasepointDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationBasepointDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RevocationKeyDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RevocationKeyDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_LockedChannelMonitorNoneZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_LockedChannelMonitorNoneZ_get_err
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C2Tuple_OutPointChannelIdZ_get_a
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1get_1a
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C2Tuple_OutPointChannelIdZ_get_b
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1get_1b
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_a
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1a
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C2Tuple_OutPointCVec_MonitorUpdateIdZZ_get_b
+ * Signature: (J)[J
+ */
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointCVec_1MonitorUpdateIdZZ_1get_1b
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LDKPersister_new
@@ -5361,19 +5905,11 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKFutureCallback_new
- * Signature: (Lorg/ldk/impl/bindings/LDKFutureCallback;)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKFutureCallback_1new
-  (JNIEnv *, jclass, jobject);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    FutureCallback_call
- * Signature: (J)V
+ * Method:    Persist_archive_persisted_channel
+ * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1call
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Persist_1archive_1persisted_1channel
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -5447,6 +5983,30 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Confirm_1best_1block_1updated
 JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_Confirm_1get_1relevant_1txids
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKSpendingDelay_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKSpendingDelay;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSpendingDelay_1ref_1from_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKFutureCallback_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKFutureCallback;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKFutureCallback_1new
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    FutureCallback_call
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1call
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LDKEventHandler_new
@@ -5599,30 +6159,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1stfu
   (JNIEnv *, jclass, jlong, jbyteArray, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_splice
- * Signature: (J[BJ)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_splice_ack
- * Signature: (J[BJ)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice_1ack
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_splice_locked
- * Signature: (J[BJ)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1splice_1locked
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelMessageHandler_handle_tx_add_input
@@ -5847,6 +6383,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OffersMessageHandler_1handle_
 JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_OffersMessageHandler_1release_1pending_1messages
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKNodeIdLookUp_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKNodeIdLookUp;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKNodeIdLookUp_1new
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeIdLookUp_next_node_id
+ * Signature: (JJ)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_NodeIdLookUp_1next_1node_1id
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LDKRoutingMessageHandler_new
@@ -6167,6 +6719,46 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1disconnect_1
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1hash
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKSignBolt12InvoiceFn_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKSignBolt12InvoiceFn;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKSignBolt12InvoiceFn_1new
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SignBolt12InvoiceFn_sign_invoice
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SignBolt12InvoiceFn_1sign_1invoice
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKSignInvoiceRequestFn_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKSignInvoiceRequestFn;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKSignInvoiceRequestFn_1new
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SignInvoiceRequestFn_sign_invoice_request
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SignInvoiceRequestFn_1sign_1invoice_1request
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKSignError_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKSignError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSignError_1ref_1from_1ptr
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LDKEffectiveCapacity_ref_from_ptr
@@ -6215,6 +6807,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKScore_1get_1ScoreUpdate
 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Score_1write
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKIntroductionNode_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKIntroductionNode;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKIntroductionNode_1ref_1from_1ptr
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LDKCoinSelectionSource_new
@@ -6375,6 +6975,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WitnessProgram_1free
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1new
   (JNIEnv *, jclass, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    BigEndianScalar_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    BigEndianScalar_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BigEndianScalar_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Bech32Error_clone_ptr
@@ -6527,6 +7143,110 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxOut_1clone
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Str_1free
   (JNIEnv *, jclass, jstring);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_u8Z_free
+ * Signature: ([B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1err
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RefundBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RefundBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1err
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RefundBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RefundBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RefundBolt12SemanticErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RefundBolt12SemanticErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RefundBolt12SemanticErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    COption_u64Z_some
@@ -6775,14 +7495,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1ThirtyTwoBytesZ_1clo
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1ThirtyTwoBytesZ_1clone
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CVec_u8Z_free
- * Signature: ([B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free
-  (JNIEnv *, jclass, jbyteArray);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    COption_CVec_u8ZZ_some
@@ -6959,6 +7671,150 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RecipientOnionFields
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RecipientOnionFieldsNoneZ_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1err
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedBolt12InvoiceBolt12SemanticErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_Bolt12InvoiceBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1err
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_Bolt12InvoiceBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12InvoiceBolt12SemanticErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_SchnorrSignatureNoneZ_ok
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1ok
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_SchnorrSignatureNoneZ_err
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1err
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_SchnorrSignatureNoneZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_SchnorrSignatureNoneZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_SchnorrSignatureNoneZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_SchnorrSignatureNoneZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CVec_ThirtyTwoBytesZ_free
@@ -7007,6 +7863,86 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1ThirtyTwoBytes
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1ThirtyTwoBytesZZ_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_AmountZ_some
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1some
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_AmountZ_none
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1none
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_AmountZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_AmountZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_AmountZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1AmountZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_QuantityZ_some
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1some
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_QuantityZ_none
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1none
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_QuantityZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_QuantityZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_QuantityZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1QuantityZ_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CResult_ThirtyTwoBytesNoneZ_ok
@@ -7673,98 +8609,98 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RecoverableSignature
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_SchnorrSignatureNoneZ_ok
+ * Method:    CResult_ECDSASignatureNoneZ_ok
  * Signature: ([B)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1ok
   (JNIEnv *, jclass, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_SchnorrSignatureNoneZ_err
+ * Method:    CResult_ECDSASignatureNoneZ_err
  * Signature: ()J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1err
   (JNIEnv *, jclass);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_SchnorrSignatureNoneZ_is_ok
+ * Method:    CResult_ECDSASignatureNoneZ_is_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1is_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1is_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_SchnorrSignatureNoneZ_free
+ * Method:    CResult_ECDSASignatureNoneZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_SchnorrSignatureNoneZ_clone_ptr
+ * Method:    CResult_ECDSASignatureNoneZ_clone_ptr
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1clone_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_SchnorrSignatureNoneZ_clone
+ * Method:    CResult_ECDSASignatureNoneZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SchnorrSignatureNoneZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ECDSASignatureNoneZ_ok
+ * Method:    CResult_TransactionNoneZ_ok
  * Signature: ([B)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1ok
   (JNIEnv *, jclass, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ECDSASignatureNoneZ_err
+ * Method:    CResult_TransactionNoneZ_err
  * Signature: ()J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1err
   (JNIEnv *, jclass);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ECDSASignatureNoneZ_is_ok
+ * Method:    CResult_TransactionNoneZ_is_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1is_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1is_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ECDSASignatureNoneZ_free
+ * Method:    CResult_TransactionNoneZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ECDSASignatureNoneZ_clone_ptr
+ * Method:    CResult_TransactionNoneZ_clone_ptr
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ECDSASignatureNoneZ_clone
+ * Method:    CResult_TransactionNoneZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ECDSASignatureNoneZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -8175,54 +9111,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDecode
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CResult_TransactionNoneZ_ok
- * Signature: ([B)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1ok
-  (JNIEnv *, jclass, jbyteArray);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CResult_TransactionNoneZ_err
- * Signature: ()J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1err
-  (JNIEnv *, jclass);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CResult_TransactionNoneZ_is_ok
- * Signature: (J)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1is_1ok
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CResult_TransactionNoneZ_free
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1free
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CResult_TransactionNoneZ_clone_ptr
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone_1ptr
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CResult_TransactionNoneZ_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    COption_WriteableScoreZ_some
@@ -9231,6 +10119,54 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScor
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ProbabilisticScorerDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_BestBlockDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_BestBlockDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_BestBlockDecodeErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_BestBlockDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_BestBlockDecodeErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_BestBlockDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BestBlockDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    C2Tuple_usizeTransactionZ_clone_ptr
@@ -9369,42 +10305,42 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorEventZ_1free
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr
+ * Method:    C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone_ptr
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1clone_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone
+ * Method:    C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new
- * Signature: (J[J[B)J
+ * Method:    C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new
+ * Signature: (JJ[J[B)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1new
-  (JNIEnv *, jclass, jlong, jlongArray, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1new
+  (JNIEnv *, jclass, jlong, jlong, jlongArray, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free
+ * Method:    C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free
+ * Method:    CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free
  * Signature: ([J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1OutPointCVec_1MonitorEventZPublicKeyZZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C4Tuple_1OutPointChannelIdCVec_1MonitorEventZPublicKeyZZ_1free
   (JNIEnv *, jclass, jlongArray);
 
 /*
@@ -9743,6 +10679,214 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTypeFeaturesD
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTypeFeaturesDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OfferIdDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OfferIdDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OfferIdDecodeErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OfferIdDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OfferIdDecodeErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OfferIdDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferIdDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneBolt12SemanticErrorZ_ok
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1ok
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1err
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneBolt12SemanticErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneBolt12SemanticErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OfferBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OfferBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1err
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OfferBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OfferBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OfferBolt12SemanticErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OfferBolt12SemanticErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12SemanticErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1err
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1err
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CResult_OfferBolt12ParseErrorZ_ok
@@ -9793,98 +10937,98 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferBolt12ParseErro
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PublicKeySecp256k1ErrorZ_ok
- * Signature: ([B)J
+ * Method:    CResult_NodeIdDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1ok
-  (JNIEnv *, jclass, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PublicKeySecp256k1ErrorZ_err
- * Signature: (Lorg/ldk/enums/Secp256k1Error;)J
+ * Method:    CResult_NodeIdDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1err
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PublicKeySecp256k1ErrorZ_is_ok
+ * Method:    CResult_NodeIdDecodeErrorZ_is_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1is_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1is_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PublicKeySecp256k1ErrorZ_free
+ * Method:    CResult_NodeIdDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PublicKeySecp256k1ErrorZ_clone_ptr
+ * Method:    CResult_NodeIdDecodeErrorZ_clone_ptr
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1clone_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PublicKeySecp256k1ErrorZ_clone
+ * Method:    CResult_NodeIdDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NodeIdDecodeErrorZ_ok
- * Signature: (J)J
+ * Method:    CResult_PublicKeySecp256k1ErrorZ_ok
+ * Signature: ([B)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1ok
+  (JNIEnv *, jclass, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NodeIdDecodeErrorZ_err
- * Signature: (J)J
+ * Method:    CResult_PublicKeySecp256k1ErrorZ_err
+ * Signature: (Lorg/ldk/enums/Secp256k1Error;)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1err
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1err
+  (JNIEnv *, jclass, jobject);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NodeIdDecodeErrorZ_is_ok
+ * Method:    CResult_PublicKeySecp256k1ErrorZ_is_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1is_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1is_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NodeIdDecodeErrorZ_free
+ * Method:    CResult_PublicKeySecp256k1ErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NodeIdDecodeErrorZ_clone_ptr
+ * Method:    CResult_PublicKeySecp256k1ErrorZ_clone_ptr
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NodeIdDecodeErrorZ_clone
+ * Method:    CResult_PublicKeySecp256k1ErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeIdDecodeErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecp256k1ErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -10543,6 +11687,38 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1SocketAddressZ
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1CVec_1SocketAddressZZ_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_u64ShortChannelIdErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_u64ShortChannelIdErrorZ_err
+ * Signature: (Lorg/ldk/enums/ShortChannelIdError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1err
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_u64ShortChannelIdErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_u64ShortChannelIdErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1u64ShortChannelIdErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CResult_PendingHTLCInfoInboundHTLCErrZ_ok
@@ -10575,6 +11751,22 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoIn
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1free
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_PendingHTLCInfoInboundHTLCErrZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_PendingHTLCInfoInboundHTLCErrZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PendingHTLCInfoInboundHTLCErrZ_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CVec_HTLCOutputInCommitmentZ_free
@@ -10743,6 +11935,46 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1UtxoZNoneZ_1cl
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1UtxoZNoneZ_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_PaymentContextZ_some
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1some
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_PaymentContextZ_none
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1none
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_PaymentContextZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_PaymentContextZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_PaymentContextZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1PaymentContextZ_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    C2Tuple_u64u16Z_clone_ptr
@@ -10857,50 +12089,50 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1ChannelShutdownState
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ThirtyTwoBytesAPIErrorZ_ok
- * Signature: ([B)J
+ * Method:    CResult_ChannelIdAPIErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1ok
-  (JNIEnv *, jclass, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ThirtyTwoBytesAPIErrorZ_err
+ * Method:    CResult_ChannelIdAPIErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ThirtyTwoBytesAPIErrorZ_is_ok
+ * Method:    CResult_ChannelIdAPIErrorZ_is_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1is_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1is_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ThirtyTwoBytesAPIErrorZ_free
+ * Method:    CResult_ChannelIdAPIErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr
+ * Method:    CResult_ChannelIdAPIErrorZ_clone_ptr
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1clone_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ThirtyTwoBytesAPIErrorZ_clone
+ * Method:    CResult_ChannelIdAPIErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdAPIErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -11241,44 +12473,100 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1C2Tuple_1Thirt
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_ThirtyTwoBytesPublicKeyZ_clone_ptr
+ * Method:    C2Tuple_ChannelIdPublicKeyZ_clone_ptr
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1clone_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_ThirtyTwoBytesPublicKeyZ_clone
+ * Method:    C2Tuple_ChannelIdPublicKeyZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_ThirtyTwoBytesPublicKeyZ_new
- * Signature: ([B[B)J
+ * Method:    C2Tuple_ChannelIdPublicKeyZ_new
+ * Signature: (J[B)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1new
-  (JNIEnv *, jclass, jbyteArray, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1new
+  (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_ThirtyTwoBytesPublicKeyZ_free
+ * Method:    C2Tuple_ChannelIdPublicKeyZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ThirtyTwoBytesPublicKeyZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1ChannelIdPublicKeyZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_C2Tuple_ThirtyTwoBytesPublicKeyZZ_free
+ * Method:    CVec_C2Tuple_ChannelIdPublicKeyZZ_free
  * Signature: ([J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1ThirtyTwoBytesPublicKeyZZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1ChannelIdPublicKeyZZ_1free
   (JNIEnv *, jclass, jlongArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_ChannelIdZ_free
+ * Signature: ([J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelIdZ_1free
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1err
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    COption_StrZ_some
@@ -11321,98 +12609,98 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1StrZ_1clone
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneBolt12SemanticErrorZ_ok
- * Signature: ()J
+ * Method:    CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1ok
-  (JNIEnv *, jclass);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneBolt12SemanticErrorZ_err
- * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ * Method:    CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_err
+ * Signature: ()J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1err
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1err
+  (JNIEnv *, jclass);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneBolt12SemanticErrorZ_is_ok
+ * Method:    CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_is_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1is_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1is_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneBolt12SemanticErrorZ_free
+ * Method:    CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneBolt12SemanticErrorZ_clone_ptr
+ * Method:    CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone_ptr
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1clone_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneBolt12SemanticErrorZ_clone
+ * Method:    CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneBolt12SemanticErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok
- * Signature: (J)J
+ * Method:    CResult_ThirtyTwoBytesAPIErrorZ_ok
+ * Signature: ([B)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1ok
+  (JNIEnv *, jclass, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_err
- * Signature: ()J
+ * Method:    CResult_ThirtyTwoBytesAPIErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1err
-  (JNIEnv *, jclass);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_is_ok
+ * Method:    CResult_ThirtyTwoBytesAPIErrorZ_is_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1is_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1is_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_free
+ * Method:    CResult_ThirtyTwoBytesAPIErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone_ptr
+ * Method:    CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone
+ * Method:    CResult_ThirtyTwoBytesAPIErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesThirtyTwoBytesZNoneZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ThirtyTwoBytesAPIErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -12511,14 +13799,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1ThirtyTwoBytesC
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CommitmentTransactionZ_1free
   (JNIEnv *, jclass, jlongArray);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CVec_TransactionZ_free
- * Signature: ([[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free
-  (JNIEnv *, jclass, jobjectArray);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    C2Tuple_u32TxOutZ_clone_ptr
@@ -13025,42 +14305,10 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1SocketAddressZ_1clon
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_PublicKeyCOption_SocketAddressZZ_clone_ptr
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1clone_1ptr
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_PublicKeyCOption_SocketAddressZZ_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1clone
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_PublicKeyCOption_SocketAddressZZ_new
- * Signature: ([BJ)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1new
-  (JNIEnv *, jclass, jbyteArray, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_PublicKeyCOption_SocketAddressZZ_free
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1PublicKeyCOption_1SocketAddressZZ_1free
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CVec_C2Tuple_PublicKeyCOption_SocketAddressZZZ_free
+ * Method:    CVec_PeerDetailsZ_free
  * Signature: ([J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1PublicKeyCOption_1SocketAddressZZZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PeerDetailsZ_1free
   (JNIEnv *, jclass, jlongArray);
 
 /*
@@ -13447,6 +14695,102 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBy
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1ThirtyTwoBytesChannelMonitorZIOErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1err
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedInvoiceRequestBolt12SemanticErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1err
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestBolt12SemanticErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestBolt12SemanticErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestBolt12SemanticErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    COption_SecretKeyZ_some
@@ -13487,6 +14831,38 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1SecretKeyZ_1clone_1p
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1SecretKeyZ_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1err
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CResult_VerifiedInvoiceRequestNoneZ_ok
@@ -13535,6 +14911,86 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceReque
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1VerifiedInvoiceRequestNoneZ_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err
+ * Signature: (Lorg/ldk/enums/Bolt12SemanticError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1err
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestFieldsDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestFieldsDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestFieldsDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestFieldsDecodeErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InvoiceRequestFieldsDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceRequestFieldsDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    COption_NoneZ_some
@@ -13567,6 +15023,46 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1NoneZ_1free
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1WitnessZ_1free
   (JNIEnv *, jclass, jobjectArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_ECDSASignatureZ_some
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1some
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_ECDSASignatureZ_none
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1none
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_ECDSASignatureZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_ECDSASignatureZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_ECDSASignatureZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1ECDSASignatureZ_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    COption_i64Z_some
@@ -16999,6 +18495,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownScriptInvali
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownScriptInvalidShutdownScriptZ_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_TransactionZ_free
+ * Signature: ([[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free
+  (JNIEnv *, jclass, jobjectArray);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CResult_PaymentPurposeDecodeErrorZ_ok
@@ -18343,6 +19847,54 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UntrustedStringDecod
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UntrustedStringDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelIdDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelIdDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelIdDecodeErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelIdDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelIdDecodeErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelIdDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelIdDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    C2Tuple__u832u16Z_clone_ptr
@@ -18473,82 +20025,194 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentConstraintsDe
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr
+ * Method:    CResult_PaymentContextDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone
+ * Method:    CResult_PaymentContextDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new
- * Signature: ([BJJ)J
+ * Method:    CResult_PaymentContextDecodeErrorZ_is_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1new
-  (JNIEnv *, jclass, jbyteArray, jlong, jlong);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free
+ * Method:    CResult_PaymentContextDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok
+ * Method:    CResult_PaymentContextDecodeErrorZ_clone_ptr
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1clone_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err
- * Signature: ()J
+ * Method:    CResult_PaymentContextDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1err
-  (JNIEnv *, jclass);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PaymentContextDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok
+ * Method:    CResult_UnknownPaymentContextDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_UnknownPaymentContextDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_UnknownPaymentContextDecodeErrorZ_is_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1is_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1is_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free
+ * Method:    CResult_UnknownPaymentContextDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr
+ * Method:    CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1clone_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone
+ * Method:    CResult_UnknownPaymentContextDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnknownPaymentContextDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_Bolt12OfferContextDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_Bolt12OfferContextDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_Bolt12OfferContextDecodeErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_Bolt12OfferContextDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_Bolt12OfferContextDecodeErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_Bolt12OfferContextDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12OfferContextDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_Bolt12RefundContextDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_Bolt12RefundContextDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_Bolt12RefundContextDecodeErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_Bolt12RefundContextDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_Bolt12RefundContextDecodeErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_Bolt12RefundContextDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1Bolt12RefundContextDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -18599,6 +20263,86 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1StrSecp256k1ErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new
+ * Signature: ([BJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1new
+  (JNIEnv *, jclass, jbyteArray, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1err
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CResult_TxOutUtxoLookupErrorZ_ok
@@ -18711,6 +20455,22 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKe
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C3Tuple_1PublicKeyOnionMessageCOption_1CVec_1SocketAddressZZZSendErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CResult_PeeledOnionNoneZ_ok
@@ -18743,6 +20503,22 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1free
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_PeeledOnionNoneZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_PeeledOnionNoneZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PeeledOnionNoneZ_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CResult_SendSuccessSendErrorZ_ok
@@ -18775,6 +20551,22 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendEr
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_SendSuccessSendErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_SendSuccessSendErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SendSuccessSendErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CResult_BlindedPathNoneZ_ok
@@ -19023,6 +20815,214 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceErrorDecodeEr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InvoiceErrorDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TrackedSpendableOutputDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TrackedSpendableOutputDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TrackedSpendableOutputDecodeErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TrackedSpendableOutputDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TrackedSpendableOutputDecodeErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TrackedSpendableOutputDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrackedSpendableOutputDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OutputSpendStatusDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OutputSpendStatusDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OutputSpendStatusDecodeErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OutputSpendStatusDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OutputSpendStatusDecodeErrorZ_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OutputSpendStatusDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSpendStatusDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_FilterZ_some
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1some
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_FilterZ_none
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1none
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    COption_FilterZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_TrackedSpendableOutputZ_free
+ * Signature: ([J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TrackedSpendableOutputZ_1free
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OutputSweeperDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OutputSweeperDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OutputSweeperDecodeErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OutputSweeperDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OutputSweeperDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C2Tuple_BestBlockOutputSweeperZ_new
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1new
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C2Tuple_BestBlockOutputSweeperZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BestBlockOutputSweeperZDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CResult_DelayedPaymentBasepointDecodeErrorZ_ok
@@ -19313,66 +21313,74 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevocationKeyDecodeE
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    COption_FilterZ_some
+ * Method:    CResult_LockedChannelMonitorNoneZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1some
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    COption_FilterZ_none
+ * Method:    CResult_LockedChannelMonitorNoneZ_err
  * Signature: ()J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1none
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1err
   (JNIEnv *, jclass);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    COption_FilterZ_free
+ * Method:    CResult_LockedChannelMonitorNoneZ_is_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1is_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_LockedChannelMonitorNoneZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_COption_1FilterZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_LockedChannelMonitorNoneZ_ok
+ * Method:    C2Tuple_OutPointChannelIdZ_clone_ptr
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1clone_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_LockedChannelMonitorNoneZ_err
- * Signature: ()J
+ * Method:    C2Tuple_OutPointChannelIdZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1err
-  (JNIEnv *, jclass);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_LockedChannelMonitorNoneZ_is_ok
- * Signature: (J)Z
+ * Method:    C2Tuple_OutPointChannelIdZ_new
+ * Signature: (JJ)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1is_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1new
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_LockedChannelMonitorNoneZ_free
+ * Method:    C2Tuple_OutPointChannelIdZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1LockedChannelMonitorNoneZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointChannelIdZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_OutPointZ_free
+ * Method:    CVec_C2Tuple_OutPointChannelIdZZ_free
  * Signature: ([J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1OutPointZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1OutPointChannelIdZZ_1free
   (JNIEnv *, jclass, jlongArray);
 
 /*
@@ -19719,6 +21727,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimited_1new
 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimited_1into_1transaction
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TransactionU16LenLimited_as_transaction
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TransactionU16LenLimited_1as_1transaction
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TransactionU16LenLimited_write
@@ -19839,6 +21855,78 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MonitorUpdatingPersister_1cle
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MonitorUpdatingPersister_1as_1Persist
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ShortChannelIdError_clone
+ * Signature: (J)Lorg/ldk/enums/ShortChannelIdError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ShortChannelIdError_block_overflow
+ * Signature: ()Lorg/ldk/enums/ShortChannelIdError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1block_1overflow
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ShortChannelIdError_tx_index_overflow
+ * Signature: ()Lorg/ldk/enums/ShortChannelIdError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1tx_1index_1overflow
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ShortChannelIdError_vout_index_overflow
+ * Signature: ()Lorg/ldk/enums/ShortChannelIdError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1vout_1index_1overflow
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ShortChannelIdError_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ShortChannelIdError_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    block_from_scid
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_block_1from_1scid
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    tx_index_from_scid
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_tx_1index_1from_1scid
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    vout_from_scid
+ * Signature: (J)S
+ */
+JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_vout_1from_1scid
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    scid_from_parts
+ * Signature: (JJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_scid_1from_1parts
+  (JNIEnv *, jclass, jlong, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UntrustedString_free
@@ -19953,34 +22041,314 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PrintableString_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    FutureCallback_free
+ * Method:    TrackedSpendableOutput_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Future_free
+ * Method:    TrackedSpendableOutput_get_descriptor
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1descriptor
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrackedSpendableOutput_set_descriptor
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1descriptor
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrackedSpendableOutput_get_channel_id
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1channel_1id
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrackedSpendableOutput_set_channel_id
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1channel_1id
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrackedSpendableOutput_get_status
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1get_1status
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrackedSpendableOutput_set_status
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1set_1status
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrackedSpendableOutput_new
+ * Signature: (JJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1new
+  (JNIEnv *, jclass, jlong, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrackedSpendableOutput_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrackedSpendableOutput_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrackedSpendableOutput_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrackedSpendableOutput_is_spent_in
+ * Signature: (J[B)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1is_1spent_1in
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrackedSpendableOutput_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1write
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrackedSpendableOutput_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrackedSpendableOutput_1read
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutputSpendStatus_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutputSpendStatus_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutputSpendStatus_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutputSpendStatus_pending_initial_broadcast
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1initial_1broadcast
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutputSpendStatus_pending_first_confirmation
+ * Signature: ([BI[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1first_1confirmation
+  (JNIEnv *, jclass, jbyteArray, jint, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutputSpendStatus_pending_threshold_confirmations
+ * Signature: ([BI[BI[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1pending_1threshold_1confirmations
+  (JNIEnv *, jclass, jbyteArray, jint, jbyteArray, jint, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutputSpendStatus_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutputSpendStatus_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1write
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutputSpendStatus_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSpendStatus_1read
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutputSweeper_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutputSweeper_new
+ * Signature: (JJJJJJJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1new
+  (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutputSweeper_track_spendable_outputs
+ * Signature: (J[JJZJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1track_1spendable_1outputs
+  (JNIEnv *, jclass, jlong, jlongArray, jlong, jboolean, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutputSweeper_tracked_spendable_outputs
+ * Signature: (J)[J
+ */
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1tracked_1spendable_1outputs
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutputSweeper_current_best_block
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1current_1best_1block
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Future_clone_ptr
+ * Method:    OutputSweeper_as_Listen
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Future_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1as_1Listen
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Future_clone
+ * Method:    OutputSweeper_as_Confirm
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Future_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1as_1Confirm
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SpendingDelay_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SpendingDelay_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SpendingDelay_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SpendingDelay_relative
+ * Signature: (I)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1relative
+  (JNIEnv *, jclass, jint);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SpendingDelay_absolute
+ * Signature: (I)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpendingDelay_1absolute
+  (JNIEnv *, jclass, jint);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutputSweeper_read
+ * Signature: ([BJJJJJJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutputSweeper_1read
+  (JNIEnv *, jclass, jbyteArray, jlong, jlong, jlong, jlong, jlong, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C2Tuple_BestBlockOutputSweeperZ_read
+ * Signature: ([BJJJJJJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BestBlockOutputSweeperZ_1read
+  (JNIEnv *, jclass, jbyteArray, jlong, jlong, jlong, jlong, jlong, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    FutureCallback_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FutureCallback_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Future_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Future_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -21199,6 +23567,46 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1default
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1free
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    BestBlock_get_block_hash
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1get_1block_1hash
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    BestBlock_set_block_hash
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1set_1block_1hash
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    BestBlock_get_height
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_BestBlock_1get_1height
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    BestBlock_set_height
+ * Signature: (JI)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BestBlock_1set_1height
+  (JNIEnv *, jclass, jlong, jint);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    BestBlock_new
+ * Signature: ([BI)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BestBlock_1new
+  (JNIEnv *, jclass, jbyteArray, jint);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    BestBlock_clone_ptr
@@ -21215,6 +23623,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BestBlock_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BestBlock_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    BestBlock_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BestBlock_1hash
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    BestBlock_eq
@@ -21233,27 +23649,19 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BestBlock_1from_1network
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    BestBlock_new
- * Signature: ([BI)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BestBlock_1new
-  (JNIEnv *, jclass, jbyteArray, jint);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    BestBlock_block_hash
+ * Method:    BestBlock_write
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1block_1hash
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_BestBlock_1write
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    BestBlock_height
- * Signature: (J)I
+ * Method:    BestBlock_read
+ * Signature: ([B)J
  */
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_BestBlock_1height
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BestBlock_1read
+  (JNIEnv *, jclass, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -21487,6 +23895,14 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1non_1an
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1channel_1close_1minimum
   (JNIEnv *, jclass);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ConfirmationTarget_output_spending_fee
+ * Signature: ()Lorg/ldk/enums/ConfirmationTarget;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ConfirmationTarget_1output_1spending_1fee
+  (JNIEnv *, jclass);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ConfirmationTarget_hash
@@ -21639,6 +24055,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1get_1update_1fu
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1rebroadcast_1pending_1claims
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChainMonitor_signer_unblocked
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1signer_1unblocked
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChainMonitor_archive_fully_resolved_channel_monitors
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1archive_1fully_1resolved_1channel_1monitors
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChainMonitor_as_Listen
@@ -21695,6 +24127,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1get_1up
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1update_1id
   (JNIEnv *, jclass, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMonitorUpdate_get_channel_id
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1get_1channel_1id
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMonitorUpdate_set_channel_id
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1channel_1id
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelMonitorUpdate_clone_ptr
@@ -21767,6 +24215,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1clone
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1htlcevent
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    MonitorEvent_holder_force_closed_with_info
+ * Signature: (JJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1holder_1force_1closed_1with_1info
+  (JNIEnv *, jclass, jlong, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    MonitorEvent_holder_force_closed
@@ -21778,10 +24234,10 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1holder_1force_1
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    MonitorEvent_completed
- * Signature: (JJ)J
+ * Signature: (JJJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1completed
-  (JNIEnv *, jclass, jlong, jlong);
+  (JNIEnv *, jclass, jlong, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -21999,6 +24455,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1funding_1txo
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMonitor_channel_id
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1channel_1id
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelMonitor_get_outputs_to_watch
@@ -22065,11 +24529,11 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1cou
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMonitor_get_latest_holder_commitment_txn
- * Signature: (JJ)[[B
+ * Method:    ChannelMonitor_broadcast_latest_holder_commitment_txn
+ * Signature: (JJJJ)V
  */
-JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1holder_1commitment_1txn
-  (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1broadcast_1latest_1holder_1commitment_1txn
+  (JNIEnv *, jclass, jlong, jlong, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -22135,6 +24599,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1current_1best
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1rebroadcast_1pending_1claims
   (JNIEnv *, jclass, jlong, jlong, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMonitor_signer_unblocked
+ * Signature: (JJJJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1signer_1unblocked
+  (JNIEnv *, jclass, jlong, jlong, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelMonitor_get_spendable_outputs
@@ -22143,6 +24615,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1rebroadcast_1p
 JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1spendable_1outputs
   (JNIEnv *, jclass, jlong, jbyteArray, jint);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMonitor_is_fully_resolved
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1is_1fully_1resolved
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelMonitor_get_claimable_balances
@@ -22239,14 +24719,6 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OutPoint_1eq
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1hash
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OutPoint_to_channel_id
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1to_1channel_1id
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    OutPoint_write
@@ -22327,6 +24799,38 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1set_1msg
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1new
   (JNIEnv *, jclass, jshort, jbyteArray, jstring);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InboundHTLCErr_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InboundHTLCErr_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InboundHTLCErr_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1hash
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InboundHTLCErr_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InboundHTLCErr_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    peel_payment_onion
@@ -22370,18 +24874,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1forward
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    PendingHTLCRouting_receive
- * Signature: (JJI[B[JZ)J
+ * Signature: (JJJI[B[JZ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive
-  (JNIEnv *, jclass, jlong, jlong, jint, jbyteArray, jlongArray, jboolean);
+  (JNIEnv *, jclass, jlong, jlong, jlong, jint, jbyteArray, jlongArray, jboolean);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    PendingHTLCRouting_receive_keysend
- * Signature: (J[BJI[J)J
+ * Signature: (J[BJI[JZ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PendingHTLCRouting_1receive_1keysend
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jint, jlongArray);
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jint, jlongArray, jboolean);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -22994,18 +25498,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelDetails_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelDetails_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -23423,14 +25927,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1config
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1config
   (JNIEnv *, jclass, jlong, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    ChannelDetails_new
- * Signature: ([BJJJJJJJJ[BJJJJJJJJJZZJZZJJJ)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1new
-  (JNIEnv *, jclass, jbyteArray, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jbyteArray, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jboolean, jboolean, jlong, jboolean, jboolean, jlong, jlong, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelDetails_clone_ptr
@@ -23714,34 +26210,34 @@ JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_ChannelManager_1list_1re
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelManager_close_channel
- * Signature: (J[B[B)J
+ * Signature: (JJ[B)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel
-  (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelManager_close_channel_with_feerate_and_script
- * Signature: (J[B[BJJ)J
+ * Signature: (JJ[BJJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1close_1channel_1with_1feerate_1and_1script
-  (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jlong, jlong);
+  (JNIEnv *, jclass, jlong, jlong, jbyteArray, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelManager_force_close_broadcasting_latest_txn
- * Signature: (J[B[B)J
+ * Signature: (JJ[B)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1broadcasting_1latest_1txn
-  (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelManager_force_close_without_broadcasting_txn
- * Signature: (J[B[B)J
+ * Signature: (JJ[B)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1force_1close_1without_1broadcasting_1txn
-  (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -23826,10 +26322,10 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1send_1preflig
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelManager_funding_transaction_generated
- * Signature: (J[B[B[B)J
+ * Signature: (JJ[B[B)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1funding_1transaction_1generated
-  (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong, jbyteArray, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -23842,26 +26338,26 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1batch_1fundin
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelManager_update_partial_channel_config
- * Signature: (J[B[[BJ)J
+ * Signature: (J[B[JJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1partial_1channel_1config
-  (JNIEnv *, jclass, jlong, jbyteArray, jobjectArray, jlong);
+  (JNIEnv *, jclass, jlong, jbyteArray, jlongArray, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelManager_update_channel_config
- * Signature: (J[B[[BJ)J
+ * Signature: (J[B[JJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1update_1channel_1config
-  (JNIEnv *, jclass, jlong, jbyteArray, jobjectArray, jlong);
+  (JNIEnv *, jclass, jlong, jbyteArray, jlongArray, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelManager_forward_intercepted_htlc
- * Signature: (J[B[B[BJ)J
+ * Signature: (J[BJ[BJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1forward_1intercepted_1htlc
-  (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jbyteArray, jlong);
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jbyteArray, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -23930,18 +26426,34 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelManager_1get_1our
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelManager_accept_inbound_channel
- * Signature: (J[B[B[B)J
+ * Signature: (JJ[B[B)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel
-  (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong, jbyteArray, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelManager_accept_inbound_channel_from_trusted_peer_0conf
- * Signature: (J[B[B[B)J
+ * Signature: (JJ[B[B)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1accept_1inbound_1channel_1from_1trusted_1peer_10conf
-  (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong, jbyteArray, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelManager_create_offer_builder
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1offer_1builder
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelManager_create_refund_builder
+ * Signature: (JJJ[BJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1create_1refund_1builder
+  (JNIEnv *, jclass, jlong, jlong, jlong, jbyteArray, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -24119,6 +26631,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1ChannelMe
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1OffersMessageHandler
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelManager_as_NodeIdLookUp
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1NodeIdLookUp
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    provided_init_features
@@ -24519,6 +27039,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint_1hash
 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint_1to_1public_1key
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DelayedPaymentBasepoint_derive_add_tweak
+ * Signature: (J[B)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentBasepoint_1derive_1add_1tweak
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    DelayedPaymentBasepoint_write
@@ -24703,6 +27231,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1hash
 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1to_1public_1key
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    HtlcBasepoint_derive_add_tweak
+ * Signature: (J[B)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HtlcBasepoint_1derive_1add_1tweak
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    HtlcBasepoint_write
@@ -24815,6 +27351,14 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HtlcKey_1write
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HtlcKey_1read
   (JNIEnv *, jclass, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    add_public_key_tweak
+ * Signature: ([B[B)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_add_1public_1key_1tweak
+  (JNIEnv *, jclass, jbyteArray, jbyteArray);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    RevocationBasepoint_free
@@ -25111,6 +27655,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DecodeError_1io
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DecodeError_1unsupported_1compression
   (JNIEnv *, jclass);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DecodeError_dangerous_value
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DecodeError_1dangerous_1value
+  (JNIEnv *, jclass);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    DecodeError_hash
@@ -25234,18 +27786,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ErrorMessage_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ErrorMessage_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -25266,10 +27818,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1set_1data
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ErrorMessage_new
- * Signature: ([BLjava/lang/String;)J
+ * Signature: (JLjava/lang/String;)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new
-  (JNIEnv *, jclass, jbyteArray, jstring);
+  (JNIEnv *, jclass, jlong, jstring);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -25314,18 +27866,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    WarningMessage_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_WarningMessage_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    WarningMessage_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -25346,10 +27898,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_WarningMessage_1set_1data
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    WarningMessage_new
- * Signature: ([BLjava/lang/String;)J
+ * Signature: (JLjava/lang/String;)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_WarningMessage_1new
-  (JNIEnv *, jclass, jbyteArray, jstring);
+  (JNIEnv *, jclass, jlong, jstring);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -25529,539 +28081,475 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Pong_1eq
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_free
+ * Method:    CommonOpenChannelFields_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_get_chain_hash
+ * Method:    CommonOpenChannelFields_get_chain_hash
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1chain_1hash
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1chain_1hash
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_set_chain_hash
+ * Method:    CommonOpenChannelFields_set_chain_hash
  * Signature: (J[B)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1chain_1hash
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1chain_1hash
   (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_get_temporary_channel_id
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1temporary_1channel_1id
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_set_temporary_channel_id
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1temporary_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_get_funding_satoshis
+ * Method:    CommonOpenChannelFields_get_temporary_channel_id
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1satoshis
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1temporary_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_set_funding_satoshis
+ * Method:    CommonOpenChannelFields_set_temporary_channel_id
  * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1satoshis
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1temporary_1channel_1id
   (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_get_push_msat
+ * Method:    CommonOpenChannelFields_get_funding_satoshis
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1push_1msat
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1funding_1satoshis
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_set_push_msat
+ * Method:    CommonOpenChannelFields_set_funding_satoshis
  * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1push_1msat
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1funding_1satoshis
   (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_get_dust_limit_satoshis
+ * Method:    CommonOpenChannelFields_get_dust_limit_satoshis
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1dust_1limit_1satoshis
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1dust_1limit_1satoshis
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_set_dust_limit_satoshis
+ * Method:    CommonOpenChannelFields_set_dust_limit_satoshis
  * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1dust_1limit_1satoshis
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1dust_1limit_1satoshis
   (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_get_max_htlc_value_in_flight_msat
+ * Method:    CommonOpenChannelFields_get_max_htlc_value_in_flight_msat
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1htlc_1value_1in_1flight_1msat
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1max_1htlc_1value_1in_1flight_1msat
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_set_max_htlc_value_in_flight_msat
+ * Method:    CommonOpenChannelFields_set_max_htlc_value_in_flight_msat
  * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1htlc_1value_1in_1flight_1msat
-  (JNIEnv *, jclass, jlong, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_get_channel_reserve_satoshis
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1reserve_1satoshis
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_set_channel_reserve_satoshis
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1reserve_1satoshis
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1max_1htlc_1value_1in_1flight_1msat
   (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_get_htlc_minimum_msat
+ * Method:    CommonOpenChannelFields_get_htlc_minimum_msat
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1minimum_1msat
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1htlc_1minimum_1msat
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_set_htlc_minimum_msat
+ * Method:    CommonOpenChannelFields_set_htlc_minimum_msat
  * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1minimum_1msat
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1htlc_1minimum_1msat
   (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_get_feerate_per_kw
+ * Method:    CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight
  * Signature: (J)I
  */
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1feerate_1per_1kw
+JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1commitment_1feerate_1sat_1per_11000_1weight
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_set_feerate_per_kw
+ * Method:    CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight
  * Signature: (JI)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1feerate_1per_1kw
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1commitment_1feerate_1sat_1per_11000_1weight
   (JNIEnv *, jclass, jlong, jint);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_get_to_self_delay
+ * Method:    CommonOpenChannelFields_get_to_self_delay
  * Signature: (J)S
  */
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1to_1self_1delay
+JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1to_1self_1delay
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_set_to_self_delay
+ * Method:    CommonOpenChannelFields_set_to_self_delay
  * Signature: (JS)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1to_1self_1delay
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1to_1self_1delay
   (JNIEnv *, jclass, jlong, jshort);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_get_max_accepted_htlcs
+ * Method:    CommonOpenChannelFields_get_max_accepted_htlcs
  * Signature: (J)S
  */
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1max_1accepted_1htlcs
+JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1max_1accepted_1htlcs
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_set_max_accepted_htlcs
+ * Method:    CommonOpenChannelFields_set_max_accepted_htlcs
  * Signature: (JS)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1max_1accepted_1htlcs
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1max_1accepted_1htlcs
   (JNIEnv *, jclass, jlong, jshort);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_get_funding_pubkey
+ * Method:    CommonOpenChannelFields_get_funding_pubkey
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1funding_1pubkey
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1funding_1pubkey
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_set_funding_pubkey
+ * Method:    CommonOpenChannelFields_set_funding_pubkey
  * Signature: (J[B)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1funding_1pubkey
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1funding_1pubkey
   (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_get_revocation_basepoint
+ * Method:    CommonOpenChannelFields_get_revocation_basepoint
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1revocation_1basepoint
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1revocation_1basepoint
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_set_revocation_basepoint
+ * Method:    CommonOpenChannelFields_set_revocation_basepoint
  * Signature: (J[B)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1revocation_1basepoint
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1revocation_1basepoint
   (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_get_payment_point
+ * Method:    CommonOpenChannelFields_get_payment_basepoint
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1payment_1point
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1payment_1basepoint
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_set_payment_point
+ * Method:    CommonOpenChannelFields_set_payment_basepoint
  * Signature: (J[B)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1payment_1point
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1payment_1basepoint
   (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_get_delayed_payment_basepoint
+ * Method:    CommonOpenChannelFields_get_delayed_payment_basepoint
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1delayed_1payment_1basepoint
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1delayed_1payment_1basepoint
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_set_delayed_payment_basepoint
+ * Method:    CommonOpenChannelFields_set_delayed_payment_basepoint
  * Signature: (J[B)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1delayed_1payment_1basepoint
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1delayed_1payment_1basepoint
   (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_get_htlc_basepoint
+ * Method:    CommonOpenChannelFields_get_htlc_basepoint
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_1basepoint
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1htlc_1basepoint
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_set_htlc_basepoint
+ * Method:    CommonOpenChannelFields_set_htlc_basepoint
  * Signature: (J[B)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1htlc_1basepoint
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1htlc_1basepoint
   (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_get_first_per_commitment_point
+ * Method:    CommonOpenChannelFields_get_first_per_commitment_point
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1first_1per_1commitment_1point
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1first_1per_1commitment_1point
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_set_first_per_commitment_point
+ * Method:    CommonOpenChannelFields_set_first_per_commitment_point
  * Signature: (J[B)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1first_1per_1commitment_1point
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1first_1per_1commitment_1point
   (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_get_channel_flags
+ * Method:    CommonOpenChannelFields_get_channel_flags
  * Signature: (J)B
  */
-JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1flags
+JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1channel_1flags
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_set_channel_flags
+ * Method:    CommonOpenChannelFields_set_channel_flags
  * Signature: (JB)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1flags
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1channel_1flags
   (JNIEnv *, jclass, jlong, jbyte);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_get_shutdown_scriptpubkey
+ * Method:    CommonOpenChannelFields_get_shutdown_scriptpubkey
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1shutdown_1scriptpubkey
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1shutdown_1scriptpubkey
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_set_shutdown_scriptpubkey
+ * Method:    CommonOpenChannelFields_set_shutdown_scriptpubkey
  * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1shutdown_1scriptpubkey
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1shutdown_1scriptpubkey
   (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_get_channel_type
+ * Method:    CommonOpenChannelFields_get_channel_type
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1type
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1get_1channel_1type
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_set_channel_type
+ * Method:    CommonOpenChannelFields_set_channel_type
  * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1type
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1set_1channel_1type
   (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_new
- * Signature: ([B[BJJJJJJISS[B[B[B[B[B[BBJJ)J
+ * Method:    CommonOpenChannelFields_new
+ * Signature: ([BJJJJJISS[B[B[B[B[B[BBJJ)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1new
-  (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong, jlong, jlong, jlong, jlong, jlong, jint, jshort, jshort, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyte, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1new
+  (JNIEnv *, jclass, jbyteArray, jlong, jlong, jlong, jlong, jlong, jint, jshort, jshort, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyte, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_clone_ptr
+ * Method:    CommonOpenChannelFields_clone_ptr
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1clone_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_clone
+ * Method:    CommonOpenChannelFields_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_hash
+ * Method:    CommonOpenChannelFields_hash
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1hash
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1hash
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_eq
+ * Method:    CommonOpenChannelFields_eq
  * Signature: (JJ)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OpenChannel_1eq
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommonOpenChannelFields_1eq
   (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_free
+ * Method:    OpenChannel_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_get_chain_hash
- * Signature: (J)[B
+ * Method:    OpenChannel_get_common_fields
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1chain_1hash
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1common_1fields
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_set_chain_hash
- * Signature: (J[B)V
+ * Method:    OpenChannel_set_common_fields
+ * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1chain_1hash
-  (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1common_1fields
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_get_temporary_channel_id
- * Signature: (J)[B
+ * Method:    OpenChannel_get_push_msat
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1temporary_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1push_1msat
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_set_temporary_channel_id
- * Signature: (J[B)V
+ * Method:    OpenChannel_set_push_msat
+ * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1temporary_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1push_1msat
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_get_funding_feerate_sat_per_1000_weight
- * Signature: (J)I
+ * Method:    OpenChannel_get_channel_reserve_satoshis
+ * Signature: (J)J
  */
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1feerate_1sat_1per_11000_1weight
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1channel_1reserve_1satoshis
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_set_funding_feerate_sat_per_1000_weight
- * Signature: (JI)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1feerate_1sat_1per_11000_1weight
-  (JNIEnv *, jclass, jlong, jint);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_get_commitment_feerate_sat_per_1000_weight
- * Signature: (J)I
+ * Method:    OpenChannel_set_channel_reserve_satoshis
+ * Signature: (JJ)V
  */
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1commitment_1feerate_1sat_1per_11000_1weight
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1reserve_1satoshis
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_set_commitment_feerate_sat_per_1000_weight
- * Signature: (JI)V
+ * Method:    OpenChannel_new
+ * Signature: (JJJ)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1commitment_1feerate_1sat_1per_11000_1weight
-  (JNIEnv *, jclass, jlong, jint);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1new
+  (JNIEnv *, jclass, jlong, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_get_funding_satoshis
+ * Method:    OpenChannel_clone_ptr
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1satoshis
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_set_funding_satoshis
- * Signature: (JJ)V
+ * Method:    OpenChannel_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1satoshis
-  (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_get_dust_limit_satoshis
+ * Method:    OpenChannel_hash
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1dust_1limit_1satoshis
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1hash
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_set_dust_limit_satoshis
- * Signature: (JJ)V
+ * Method:    OpenChannel_eq
+ * Signature: (JJ)Z
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1dust_1limit_1satoshis
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OpenChannel_1eq
   (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_get_max_htlc_value_in_flight_msat
- * Signature: (J)J
+ * Method:    OpenChannelV2_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1max_1htlc_1value_1in_1flight_1msat
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_set_max_htlc_value_in_flight_msat
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1max_1htlc_1value_1in_1flight_1msat
-  (JNIEnv *, jclass, jlong, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_get_htlc_minimum_msat
+ * Method:    OpenChannelV2_get_common_fields
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1htlc_1minimum_1msat
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1common_1fields
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_set_htlc_minimum_msat
+ * Method:    OpenChannelV2_set_common_fields
  * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1htlc_1minimum_1msat
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1common_1fields
   (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_get_to_self_delay
- * Signature: (J)S
- */
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1to_1self_1delay
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_set_to_self_delay
- * Signature: (JS)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1to_1self_1delay
-  (JNIEnv *, jclass, jlong, jshort);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_get_max_accepted_htlcs
- * Signature: (J)S
+ * Method:    OpenChannelV2_get_funding_feerate_sat_per_1000_weight
+ * Signature: (J)I
  */
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1max_1accepted_1htlcs
+JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1feerate_1sat_1per_11000_1weight
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_set_max_accepted_htlcs
- * Signature: (JS)V
+ * Method:    OpenChannelV2_set_funding_feerate_sat_per_1000_weight
+ * Signature: (JI)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1max_1accepted_1htlcs
-  (JNIEnv *, jclass, jlong, jshort);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1feerate_1sat_1per_11000_1weight
+  (JNIEnv *, jclass, jlong, jint);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -26079,102 +28567,6 @@ JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1locktime
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1locktime
   (JNIEnv *, jclass, jlong, jint);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_get_funding_pubkey
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1funding_1pubkey
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_set_funding_pubkey
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1funding_1pubkey
-  (JNIEnv *, jclass, jlong, jbyteArray);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_get_revocation_basepoint
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1revocation_1basepoint
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_set_revocation_basepoint
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1revocation_1basepoint
-  (JNIEnv *, jclass, jlong, jbyteArray);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_get_payment_basepoint
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1payment_1basepoint
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_set_payment_basepoint
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1payment_1basepoint
-  (JNIEnv *, jclass, jlong, jbyteArray);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_get_delayed_payment_basepoint
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1delayed_1payment_1basepoint
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_set_delayed_payment_basepoint
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1delayed_1payment_1basepoint
-  (JNIEnv *, jclass, jlong, jbyteArray);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_get_htlc_basepoint
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1htlc_1basepoint
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_set_htlc_basepoint
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1htlc_1basepoint
-  (JNIEnv *, jclass, jlong, jbyteArray);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_get_first_per_commitment_point
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1first_1per_1commitment_1point
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_set_first_per_commitment_point
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1first_1per_1commitment_1point
-  (JNIEnv *, jclass, jlong, jbyteArray);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    OpenChannelV2_get_second_per_commitment_point
@@ -26191,54 +28583,6 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1seco
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1second_1per_1commitment_1point
   (JNIEnv *, jclass, jlong, jbyteArray);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_get_channel_flags
- * Signature: (J)B
- */
-JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1channel_1flags
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_set_channel_flags
- * Signature: (JB)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1channel_1flags
-  (JNIEnv *, jclass, jlong, jbyte);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_get_shutdown_scriptpubkey
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1shutdown_1scriptpubkey
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_set_shutdown_scriptpubkey
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1shutdown_1scriptpubkey
-  (JNIEnv *, jclass, jlong, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_get_channel_type
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1get_1channel_1type
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    OpenChannelV2_set_channel_type
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1channel_1type
-  (JNIEnv *, jclass, jlong, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    OpenChannelV2_get_require_confirmed_inputs
@@ -26258,10 +28602,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1set_1require_1c
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    OpenChannelV2_new
- * Signature: ([B[BIIJJJJSSI[B[B[B[B[B[B[BBJJLorg/ldk/enums/COption_NoneZ;)J
+ * Signature: (JII[BLorg/ldk/enums/COption_NoneZ;)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1new
-  (JNIEnv *, jclass, jbyteArray, jbyteArray, jint, jint, jlong, jlong, jlong, jlong, jshort, jshort, jint, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyte, jlong, jlong, jobject);
+  (JNIEnv *, jclass, jlong, jint, jint, jbyteArray, jobject);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -26297,539 +28641,411 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OpenChannelV2_1eq
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_free
+ * Method:    CommonAcceptChannelFields_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_get_temporary_channel_id
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1temporary_1channel_1id
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_set_temporary_channel_id
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1temporary_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_get_dust_limit_satoshis
+ * Method:    CommonAcceptChannelFields_get_temporary_channel_id
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1dust_1limit_1satoshis
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1temporary_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_set_dust_limit_satoshis
+ * Method:    CommonAcceptChannelFields_set_temporary_channel_id
  * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1dust_1limit_1satoshis
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1temporary_1channel_1id
   (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_get_max_htlc_value_in_flight_msat
+ * Method:    CommonAcceptChannelFields_get_dust_limit_satoshis
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1htlc_1value_1in_1flight_1msat
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1dust_1limit_1satoshis
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_set_max_htlc_value_in_flight_msat
+ * Method:    CommonAcceptChannelFields_set_dust_limit_satoshis
  * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1htlc_1value_1in_1flight_1msat
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1dust_1limit_1satoshis
   (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_get_channel_reserve_satoshis
+ * Method:    CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1reserve_1satoshis
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1max_1htlc_1value_1in_1flight_1msat
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_set_channel_reserve_satoshis
+ * Method:    CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat
  * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1reserve_1satoshis
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1max_1htlc_1value_1in_1flight_1msat
   (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_get_htlc_minimum_msat
+ * Method:    CommonAcceptChannelFields_get_htlc_minimum_msat
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1minimum_1msat
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1htlc_1minimum_1msat
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_set_htlc_minimum_msat
+ * Method:    CommonAcceptChannelFields_set_htlc_minimum_msat
  * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1minimum_1msat
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1htlc_1minimum_1msat
   (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_get_minimum_depth
+ * Method:    CommonAcceptChannelFields_get_minimum_depth
  * Signature: (J)I
  */
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1minimum_1depth
+JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1minimum_1depth
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_set_minimum_depth
+ * Method:    CommonAcceptChannelFields_set_minimum_depth
  * Signature: (JI)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1minimum_1depth
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1minimum_1depth
   (JNIEnv *, jclass, jlong, jint);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_get_to_self_delay
+ * Method:    CommonAcceptChannelFields_get_to_self_delay
  * Signature: (J)S
  */
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1to_1self_1delay
+JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1to_1self_1delay
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_set_to_self_delay
+ * Method:    CommonAcceptChannelFields_set_to_self_delay
  * Signature: (JS)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1to_1self_1delay
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1to_1self_1delay
   (JNIEnv *, jclass, jlong, jshort);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_get_max_accepted_htlcs
+ * Method:    CommonAcceptChannelFields_get_max_accepted_htlcs
  * Signature: (J)S
  */
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1max_1accepted_1htlcs
+JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1max_1accepted_1htlcs
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_set_max_accepted_htlcs
+ * Method:    CommonAcceptChannelFields_set_max_accepted_htlcs
  * Signature: (JS)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1max_1accepted_1htlcs
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1max_1accepted_1htlcs
   (JNIEnv *, jclass, jlong, jshort);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_get_funding_pubkey
+ * Method:    CommonAcceptChannelFields_get_funding_pubkey
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1funding_1pubkey
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1funding_1pubkey
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_set_funding_pubkey
+ * Method:    CommonAcceptChannelFields_set_funding_pubkey
  * Signature: (J[B)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1funding_1pubkey
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1funding_1pubkey
   (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_get_revocation_basepoint
+ * Method:    CommonAcceptChannelFields_get_revocation_basepoint
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1revocation_1basepoint
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1revocation_1basepoint
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_set_revocation_basepoint
+ * Method:    CommonAcceptChannelFields_set_revocation_basepoint
  * Signature: (J[B)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1revocation_1basepoint
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1revocation_1basepoint
   (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_get_payment_point
+ * Method:    CommonAcceptChannelFields_get_payment_basepoint
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1payment_1point
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1payment_1basepoint
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_set_payment_point
+ * Method:    CommonAcceptChannelFields_set_payment_basepoint
  * Signature: (J[B)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1payment_1point
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1payment_1basepoint
   (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_get_delayed_payment_basepoint
+ * Method:    CommonAcceptChannelFields_get_delayed_payment_basepoint
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1delayed_1payment_1basepoint
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1delayed_1payment_1basepoint
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_set_delayed_payment_basepoint
+ * Method:    CommonAcceptChannelFields_set_delayed_payment_basepoint
  * Signature: (J[B)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1delayed_1payment_1basepoint
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1delayed_1payment_1basepoint
   (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_get_htlc_basepoint
+ * Method:    CommonAcceptChannelFields_get_htlc_basepoint
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htlc_1basepoint
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1htlc_1basepoint
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_set_htlc_basepoint
+ * Method:    CommonAcceptChannelFields_set_htlc_basepoint
  * Signature: (J[B)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1htlc_1basepoint
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1htlc_1basepoint
   (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_get_first_per_commitment_point
+ * Method:    CommonAcceptChannelFields_get_first_per_commitment_point
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1first_1per_1commitment_1point
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1first_1per_1commitment_1point
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_set_first_per_commitment_point
+ * Method:    CommonAcceptChannelFields_set_first_per_commitment_point
  * Signature: (J[B)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1first_1per_1commitment_1point
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1first_1per_1commitment_1point
   (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_get_shutdown_scriptpubkey
+ * Method:    CommonAcceptChannelFields_get_shutdown_scriptpubkey
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1shutdown_1scriptpubkey
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1shutdown_1scriptpubkey
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_set_shutdown_scriptpubkey
+ * Method:    CommonAcceptChannelFields_set_shutdown_scriptpubkey
  * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1shutdown_1scriptpubkey
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1shutdown_1scriptpubkey
   (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_get_channel_type
+ * Method:    CommonAcceptChannelFields_get_channel_type
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1type
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1get_1channel_1type
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_set_channel_type
+ * Method:    CommonAcceptChannelFields_set_channel_type
  * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1type
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1set_1channel_1type
   (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_new
- * Signature: ([BJJJJISS[B[B[B[B[B[BJJ)J
+ * Method:    CommonAcceptChannelFields_new
+ * Signature: (JJJJISS[B[B[B[B[B[BJJ)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1new
-  (JNIEnv *, jclass, jbyteArray, jlong, jlong, jlong, jlong, jint, jshort, jshort, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1new
+  (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jint, jshort, jshort, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_clone_ptr
+ * Method:    CommonAcceptChannelFields_clone_ptr
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1clone_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_clone
+ * Method:    CommonAcceptChannelFields_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_hash
+ * Method:    CommonAcceptChannelFields_hash
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1hash
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1hash
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_eq
+ * Method:    CommonAcceptChannelFields_eq
  * Signature: (JJ)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1eq
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_CommonAcceptChannelFields_1eq
   (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_free
+ * Method:    AcceptChannel_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1free
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_get_temporary_channel_id
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1temporary_1channel_1id
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_set_temporary_channel_id
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1temporary_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_get_funding_satoshis
+ * Method:    AcceptChannel_get_common_fields
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1funding_1satoshis
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1common_1fields
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_set_funding_satoshis
+ * Method:    AcceptChannel_set_common_fields
  * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1funding_1satoshis
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1common_1fields
   (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_get_dust_limit_satoshis
+ * Method:    AcceptChannel_get_channel_reserve_satoshis
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1dust_1limit_1satoshis
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1channel_1reserve_1satoshis
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_set_dust_limit_satoshis
+ * Method:    AcceptChannel_set_channel_reserve_satoshis
  * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1dust_1limit_1satoshis
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1channel_1reserve_1satoshis
   (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_get_max_htlc_value_in_flight_msat
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1max_1htlc_1value_1in_1flight_1msat
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_set_max_htlc_value_in_flight_msat
- * Signature: (JJ)V
+ * Method:    AcceptChannel_new
+ * Signature: (JJ)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1max_1htlc_1value_1in_1flight_1msat
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1new
   (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_get_htlc_minimum_msat
+ * Method:    AcceptChannel_clone_ptr
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1htlc_1minimum_1msat
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_set_htlc_minimum_msat
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1htlc_1minimum_1msat
-  (JNIEnv *, jclass, jlong, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_get_minimum_depth
- * Signature: (J)I
- */
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1minimum_1depth
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_set_minimum_depth
- * Signature: (JI)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1minimum_1depth
-  (JNIEnv *, jclass, jlong, jint);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_get_to_self_delay
- * Signature: (J)S
- */
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1to_1self_1delay
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_set_to_self_delay
- * Signature: (JS)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1to_1self_1delay
-  (JNIEnv *, jclass, jlong, jshort);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_get_max_accepted_htlcs
- * Signature: (J)S
- */
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1max_1accepted_1htlcs
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_set_max_accepted_htlcs
- * Signature: (JS)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1max_1accepted_1htlcs
-  (JNIEnv *, jclass, jlong, jshort);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_get_funding_pubkey
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1funding_1pubkey
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_set_funding_pubkey
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1funding_1pubkey
-  (JNIEnv *, jclass, jlong, jbyteArray);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_get_revocation_basepoint
- * Signature: (J)[B
+ * Method:    AcceptChannel_clone
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1revocation_1basepoint
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_set_revocation_basepoint
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1revocation_1basepoint
-  (JNIEnv *, jclass, jlong, jbyteArray);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_get_payment_basepoint
- * Signature: (J)[B
+ * Method:    AcceptChannel_hash
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1payment_1basepoint
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1hash
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_set_payment_basepoint
- * Signature: (J[B)V
+ * Method:    AcceptChannel_eq
+ * Signature: (JJ)Z
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1payment_1basepoint
-  (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1eq
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_get_delayed_payment_basepoint
- * Signature: (J)[B
+ * Method:    AcceptChannelV2_free
+ * Signature: (J)V
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1delayed_1payment_1basepoint
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_set_delayed_payment_basepoint
- * Signature: (J[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1delayed_1payment_1basepoint
-  (JNIEnv *, jclass, jlong, jbyteArray);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_get_htlc_basepoint
- * Signature: (J)[B
+ * Method:    AcceptChannelV2_get_common_fields
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1htlc_1basepoint
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1common_1fields
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_set_htlc_basepoint
- * Signature: (J[B)V
+ * Method:    AcceptChannelV2_set_common_fields
+ * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1htlc_1basepoint
-  (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1common_1fields
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_get_first_per_commitment_point
- * Signature: (J)[B
+ * Method:    AcceptChannelV2_get_funding_satoshis
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1first_1per_1commitment_1point
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1funding_1satoshis
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_set_first_per_commitment_point
- * Signature: (J[B)V
+ * Method:    AcceptChannelV2_set_funding_satoshis
+ * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1first_1per_1commitment_1point
-  (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1funding_1satoshis
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -26847,38 +29063,6 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1se
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1second_1per_1commitment_1point
   (JNIEnv *, jclass, jlong, jbyteArray);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_get_shutdown_scriptpubkey
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1shutdown_1scriptpubkey
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_set_shutdown_scriptpubkey
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1shutdown_1scriptpubkey
-  (JNIEnv *, jclass, jlong, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_get_channel_type
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1get_1channel_1type
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannelV2_set_channel_type
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1channel_1type
-  (JNIEnv *, jclass, jlong, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    AcceptChannelV2_get_require_confirmed_inputs
@@ -26898,10 +29082,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1set_1require_
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    AcceptChannelV2_new
- * Signature: ([BJJJJISS[B[B[B[B[B[B[BJJLorg/ldk/enums/COption_NoneZ;)J
+ * Signature: (JJ[BLorg/ldk/enums/COption_NoneZ;)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannelV2_1new
-  (JNIEnv *, jclass, jbyteArray, jlong, jlong, jlong, jlong, jint, jshort, jshort, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jlong, jlong, jobject);
+  (JNIEnv *, jclass, jlong, jlong, jbyteArray, jobject);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -26946,18 +29130,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    FundingCreated_get_temporary_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1temporary_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1temporary_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    FundingCreated_set_temporary_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1temporary_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -27010,10 +29194,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1signature
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    FundingCreated_new
- * Signature: ([B[BS[B)J
+ * Signature: (J[BS[B)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new
-  (JNIEnv *, jclass, jbyteArray, jbyteArray, jshort, jbyteArray);
+  (JNIEnv *, jclass, jlong, jbyteArray, jshort, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -27058,18 +29242,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    FundingSigned_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    FundingSigned_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -27090,10 +29274,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1signature
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    FundingSigned_new
- * Signature: ([B[B)J
+ * Signature: (J[B)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new
-  (JNIEnv *, jclass, jbyteArray, jbyteArray);
+  (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -27138,18 +29322,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelReady_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReady_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelReady_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -27186,10 +29370,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReady_1set_1short_1chan
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelReady_new
- * Signature: ([B[BJ)J
+ * Signature: (J[BJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReady_1new
-  (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong);
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -27234,18 +29418,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Stfu_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Stfu_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Stfu_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -27266,10 +29450,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Stfu_1set_1initiator
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Stfu_new
- * Signature: ([BB)J
+ * Signature: (JB)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Stfu_1new
-  (JNIEnv *, jclass, jbyteArray, jbyte);
+  (JNIEnv *, jclass, jlong, jbyte);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -27306,18 +29490,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Splice_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Splice_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Splice_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Splice_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -27402,10 +29586,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Splice_1set_1funding_1pubkey
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Splice_new
- * Signature: ([B[BJII[B)J
+ * Signature: (J[BJII[B)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Splice_1new
-  (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong, jint, jint, jbyteArray);
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jint, jint, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -27442,18 +29626,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    SpliceAck_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpliceAck_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    SpliceAck_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -27506,10 +29690,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceAck_1set_1funding_1pubke
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    SpliceAck_new
- * Signature: ([B[BJ[B)J
+ * Signature: (J[BJ[B)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpliceAck_1new
-  (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -27546,26 +29730,26 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    SpliceLocked_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    SpliceLocked_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    SpliceLocked_new
- * Signature: ([B)J
+ * Signature: (J)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpliceLocked_1new
-  (JNIEnv *, jclass, jbyteArray);
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -27602,18 +29786,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxAddInput_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAddInput_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxAddInput_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -27682,10 +29866,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddInput_1set_1sequence
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxAddInput_new
- * Signature: ([BJJII)J
+ * Signature: (JJJII)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAddInput_1new
-  (JNIEnv *, jclass, jbyteArray, jlong, jlong, jint, jint);
+  (JNIEnv *, jclass, jlong, jlong, jlong, jint, jint);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -27730,18 +29914,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxAddOutput_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxAddOutput_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -27794,10 +29978,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1set_1script
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxAddOutput_new
- * Signature: ([BJJ[B)J
+ * Signature: (JJJ[B)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAddOutput_1new
-  (JNIEnv *, jclass, jbyteArray, jlong, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -27842,18 +30026,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxRemoveInput_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxRemoveInput_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -27874,10 +30058,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1set_1serial_1id
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxRemoveInput_new
- * Signature: ([BJ)J
+ * Signature: (JJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxRemoveInput_1new
-  (JNIEnv *, jclass, jbyteArray, jlong);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -27922,18 +30106,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxRemoveOutput_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxRemoveOutput_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -27954,10 +30138,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1set_1serial_1i
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxRemoveOutput_new
- * Signature: ([BJ)J
+ * Signature: (JJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxRemoveOutput_1new
-  (JNIEnv *, jclass, jbyteArray, jlong);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -28002,26 +30186,26 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxComplete_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxComplete_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxComplete_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxComplete_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxComplete_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxComplete_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxComplete_new
- * Signature: ([B)J
+ * Signature: (J)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxComplete_1new
-  (JNIEnv *, jclass, jbyteArray);
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -28066,18 +30250,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxSignatures_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxSignatures_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -28111,13 +30295,29 @@ JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1wit
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1witnesses
   (JNIEnv *, jclass, jlong, jobjectArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TxSignatures_get_funding_outpoint_sig
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxSignatures_1get_1funding_1outpoint_1sig
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TxSignatures_set_funding_outpoint_sig
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxSignatures_1set_1funding_1outpoint_1sig
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxSignatures_new
- * Signature: ([B[B[[B)J
+ * Signature: (J[B[[BJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxSignatures_1new
-  (JNIEnv *, jclass, jbyteArray, jbyteArray, jobjectArray);
+  (JNIEnv *, jclass, jlong, jbyteArray, jobjectArray, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -28162,18 +30362,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxInitRbf_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxInitRbf_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -28226,10 +30426,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1set_1funding_1outpu
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxInitRbf_new
- * Signature: ([BIIJ)J
+ * Signature: (JIIJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxInitRbf_1new
-  (JNIEnv *, jclass, jbyteArray, jint, jint, jlong);
+  (JNIEnv *, jclass, jlong, jint, jint, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -28274,18 +30474,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxAckRbf_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxAckRbf_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -28306,10 +30506,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1set_1funding_1output
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxAckRbf_new
- * Signature: ([BJ)J
+ * Signature: (JJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAckRbf_1new
-  (JNIEnv *, jclass, jbyteArray, jlong);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -28354,18 +30554,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxAbort_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAbort_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxAbort_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -28386,10 +30586,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxAbort_1set_1data
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxAbort_new
- * Signature: ([B[B)J
+ * Signature: (J[B)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxAbort_1new
-  (JNIEnv *, jclass, jbyteArray, jbyteArray);
+  (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -28434,18 +30634,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Shutdown_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Shutdown_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -28466,10 +30666,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1scriptpubkey
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Shutdown_new
- * Signature: ([B[B)J
+ * Signature: (J[B)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1new
-  (JNIEnv *, jclass, jbyteArray, jbyteArray);
+  (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -28594,18 +30794,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ClosingSigned_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ClosingSigned_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -28658,10 +30858,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1fee_1range
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ClosingSigned_new
- * Signature: ([BJ[BJ)J
+ * Signature: (JJ[BJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new
-  (JNIEnv *, jclass, jbyteArray, jlong, jbyteArray, jlong);
+  (JNIEnv *, jclass, jlong, jlong, jbyteArray, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -28706,18 +30906,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UpdateAddHTLC_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UpdateAddHTLC_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -28834,10 +31034,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1blinding_1
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UpdateAddHTLC_new
- * Signature: ([BJJ[BIJJ[B)J
+ * Signature: (JJJ[BIJJ[B)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1new
-  (JNIEnv *, jclass, jbyteArray, jlong, jlong, jbyteArray, jint, jlong, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong, jlong, jbyteArray, jint, jlong, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -28962,18 +31162,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UpdateFulfillHTLC_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UpdateFulfillHTLC_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -29010,10 +31210,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1set_1paymen
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UpdateFulfillHTLC_new
- * Signature: ([BJ[B)J
+ * Signature: (JJ[B)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1new
-  (JNIEnv *, jclass, jbyteArray, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -29058,18 +31258,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UpdateFailHTLC_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UpdateFailHTLC_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -29130,18 +31330,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UpdateFailMalformedHTLC_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UpdateFailMalformedHTLC_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -29218,18 +31418,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CommitmentSigned_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CommitmentSigned_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -29266,10 +31466,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1htlc_1s
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CommitmentSigned_new
- * Signature: ([B[B[[B)J
+ * Signature: (J[B[[B)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new
-  (JNIEnv *, jclass, jbyteArray, jbyteArray, jobjectArray);
+  (JNIEnv *, jclass, jlong, jbyteArray, jobjectArray);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -29314,18 +31514,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    RevokeAndACK_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    RevokeAndACK_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -29362,10 +31562,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1next_1per_1
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    RevokeAndACK_new
- * Signature: ([B[B[B)J
+ * Signature: (J[B[B)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1new
-  (JNIEnv *, jclass, jbyteArray, jbyteArray, jbyteArray);
+  (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -29410,18 +31610,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UpdateFee_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UpdateFee_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -29442,10 +31642,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1set_1feerate_1per_1
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UpdateFee_new
- * Signature: ([BI)J
+ * Signature: (JI)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new
-  (JNIEnv *, jclass, jbyteArray, jint);
+  (JNIEnv *, jclass, jlong, jint);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -29490,18 +31690,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelReestablish_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelReestablish_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -29586,10 +31786,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1next_
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelReestablish_new
- * Signature: ([BJJ[B[BJ)J
+ * Signature: (JJJ[B[BJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1new
-  (JNIEnv *, jclass, jbyteArray, jlong, jlong, jbyteArray, jbyteArray, jlong);
+  (JNIEnv *, jclass, jlong, jlong, jlong, jbyteArray, jbyteArray, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -29634,18 +31834,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    AnnouncementSignatures_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    AnnouncementSignatures_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -29698,10 +31898,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1b
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    AnnouncementSignatures_new
- * Signature: ([BJ[B[B)J
+ * Signature: (JJ[B[B)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1new
-  (JNIEnv *, jclass, jbyteArray, jlong, jbyteArray, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong, jbyteArray, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -30071,6 +32271,46 @@ JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1addresses
   (JNIEnv *, jclass, jlong, jlongArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UnsignedNodeAnnouncement_get_excess_address_data
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1excess_1address_1data
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UnsignedNodeAnnouncement_set_excess_address_data
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1excess_1address_1data
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UnsignedNodeAnnouncement_get_excess_data
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1excess_1data
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UnsignedNodeAnnouncement_set_excess_data
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1excess_1data
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UnsignedNodeAnnouncement_new
+ * Signature: (JIJ[BJ[J[B[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1new
+  (JNIEnv *, jclass, jlong, jint, jlong, jbyteArray, jlong, jlongArray, jbyteArray, jbyteArray);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UnsignedNodeAnnouncement_clone_ptr
@@ -31727,6 +33967,126 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OnionPacket_1hash
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OnionPacket_1eq
   (JNIEnv *, jclass, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrampolineOnionPacket_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrampolineOnionPacket_get_version
+ * Signature: (J)B
+ */
+JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1version
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrampolineOnionPacket_set_version
+ * Signature: (JB)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1version
+  (JNIEnv *, jclass, jlong, jbyte);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrampolineOnionPacket_get_public_key
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1public_1key
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrampolineOnionPacket_set_public_key
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1public_1key
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrampolineOnionPacket_get_hop_data
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1hop_1data
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrampolineOnionPacket_set_hop_data
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1hop_1data
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrampolineOnionPacket_get_hmac
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1get_1hmac
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrampolineOnionPacket_set_hmac
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1set_1hmac
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrampolineOnionPacket_new
+ * Signature: (B[B[B[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1new
+  (JNIEnv *, jclass, jbyte, jbyteArray, jbyteArray, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrampolineOnionPacket_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrampolineOnionPacket_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrampolineOnionPacket_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1hash
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrampolineOnionPacket_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TrampolineOnionPacket_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TrampolineOnionPacket_1write
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    AcceptChannel_write
@@ -32775,6 +35135,86 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1clone
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1free
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PeerDetails_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PeerDetails_get_counterparty_node_id
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1counterparty_1node_1id
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PeerDetails_set_counterparty_node_id
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1counterparty_1node_1id
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PeerDetails_get_socket_address
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1socket_1address
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PeerDetails_set_socket_address
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1socket_1address
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PeerDetails_get_init_features
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1init_1features
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PeerDetails_set_init_features
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1init_1features
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PeerDetails_get_is_inbound_connection
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PeerDetails_1get_1is_1inbound_1connection
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PeerDetails_set_is_inbound_connection
+ * Signature: (JZ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerDetails_1set_1is_1inbound_1connection
+  (JNIEnv *, jclass, jlong, jboolean);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PeerDetails_new
+ * Signature: ([BJJZ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerDetails_1new
+  (JNIEnv *, jclass, jbyteArray, jlong, jlong, jboolean);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    PeerHandleError_free
@@ -32825,12 +35265,20 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    PeerManager_get_peer_node_ids
+ * Method:    PeerManager_list_peers
  * Signature: (J)[J
  */
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_PeerManager_1get_1peer_1node_1ids
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_PeerManager_1list_1peers
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PeerManager_peer_by_node_id
+ * Signature: (J[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerManager_1peer_1by_1node_1id
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    PeerManager_new_outbound_connection
@@ -36887,6 +39335,102 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1supports_1ke
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1requires_1keysend
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InitFeatures_set_trampoline_routing_optional
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1set_1trampoline_1routing_1optional
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InitFeatures_set_trampoline_routing_required
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1set_1trampoline_1routing_1required
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InitFeatures_supports_trampoline_routing
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InitFeatures_1supports_1trampoline_1routing
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeFeatures_set_trampoline_routing_optional
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1set_1trampoline_1routing_1optional
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeFeatures_set_trampoline_routing_required
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1set_1trampoline_1routing_1required
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeFeatures_supports_trampoline_routing
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1supports_1trampoline_1routing
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt11InvoiceFeatures_set_trampoline_routing_optional
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1set_1trampoline_1routing_1optional
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt11InvoiceFeatures_set_trampoline_routing_required
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1set_1trampoline_1routing_1required
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt11InvoiceFeatures_supports_trampoline_routing
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1supports_1trampoline_1routing
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InitFeatures_requires_trampoline_routing
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InitFeatures_1requires_1trampoline_1routing
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeFeatures_requires_trampoline_routing
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1requires_1trampoline_1routing
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt11InvoiceFeatures_requires_trampoline_routing
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt11InvoiceFeatures_1requires_1trampoline_1routing
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ShutdownScript_free
@@ -37031,6 +39575,150 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ShutdownScript_1as_1lega
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ShutdownScript_1is_1compatible
   (JNIEnv *, jclass, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelId_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelId_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelId_get_a
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelId_1get_1a
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelId_set_a
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelId_1set_1a
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelId_new
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1new
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelId_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelId_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelId_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelId_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelId_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1hash
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelId_v1_from_funding_txid
+ * Signature: ([BS)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1v1_1from_1funding_1txid
+  (JNIEnv *, jclass, jbyteArray, jshort);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelId_v1_from_funding_outpoint
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1v1_1from_1funding_1outpoint
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelId_temporary_from_entropy_source
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1temporary_1from_1entropy_1source
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelId_from_bytes
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1from_1bytes
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelId_new_zero
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1new_1zero
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelId_is_zero
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelId_1is_1zero
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelId_v2_from_revocation_basepoints
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1v2_1from_1revocation_1basepoints
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelId_temporary_v2_from_revocation_basepoint
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1temporary_1v2_1from_1revocation_1basepoint
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelId_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelId_1write
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelId_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelId_1read
+  (JNIEnv *, jclass, jbyteArray);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Retry_free
@@ -37407,6 +40095,278 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Type_1clone
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Type_1free
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferId_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferId_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferId_get_a
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OfferId_1get_1a
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferId_set_a
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferId_1set_1a
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferId_new
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferId_1new
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferId_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferId_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferId_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferId_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferId_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_OfferId_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferId_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OfferId_1write
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferId_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferId_1read
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithExplicitMetadataBuilder_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithExplicitMetadataBuilder_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithExplicitMetadataBuilder_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithDerivedMetadataBuilder_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithDerivedMetadataBuilder_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithDerivedMetadataBuilder_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithExplicitMetadataBuilder_new
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1new
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithExplicitMetadataBuilder_metadata
+ * Signature: (J[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1metadata
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithExplicitMetadataBuilder_chain
+ * Signature: (JLorg/ldk/enums/Network;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1chain
+  (JNIEnv *, jclass, jlong, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithExplicitMetadataBuilder_amount_msats
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1amount_1msats
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithExplicitMetadataBuilder_absolute_expiry
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1absolute_1expiry
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithExplicitMetadataBuilder_description
+ * Signature: (JLjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1description
+  (JNIEnv *, jclass, jlong, jstring);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithExplicitMetadataBuilder_issuer
+ * Signature: (JLjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1issuer
+  (JNIEnv *, jclass, jlong, jstring);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithExplicitMetadataBuilder_path
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1path
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithExplicitMetadataBuilder_supported_quantity
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1supported_1quantity
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithExplicitMetadataBuilder_build
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithExplicitMetadataBuilder_1build
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithDerivedMetadataBuilder_deriving_signing_pubkey
+ * Signature: ([BJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1deriving_1signing_1pubkey
+  (JNIEnv *, jclass, jbyteArray, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithDerivedMetadataBuilder_chain
+ * Signature: (JLorg/ldk/enums/Network;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1chain
+  (JNIEnv *, jclass, jlong, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithDerivedMetadataBuilder_amount_msats
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1amount_1msats
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithDerivedMetadataBuilder_absolute_expiry
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1absolute_1expiry
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithDerivedMetadataBuilder_description
+ * Signature: (JLjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1description
+  (JNIEnv *, jclass, jlong, jstring);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithDerivedMetadataBuilder_issuer
+ * Signature: (JLjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1issuer
+  (JNIEnv *, jclass, jlong, jstring);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithDerivedMetadataBuilder_path
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1path
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithDerivedMetadataBuilder_supported_quantity
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1supported_1quantity
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OfferWithDerivedMetadataBuilder_build
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OfferWithDerivedMetadataBuilder_1build
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Offer_free
@@ -37511,6 +40471,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Offer_1supported_1quantity
 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Offer_1signing_1pubkey
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Offer_id
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Offer_1id
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Offer_supports_chain
@@ -37551,6 +40519,38 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Offer_1is_1valid_1quantity
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Offer_1expects_1quantity
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Offer_request_invoice_deriving_payer_id
+ * Signature: (JJJ[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice_1deriving_1payer_1id
+  (JNIEnv *, jclass, jlong, jlong, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Offer_request_invoice_deriving_metadata
+ * Signature: (J[BJJ[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice_1deriving_1metadata
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Offer_request_invoice
+ * Signature: (J[B[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Offer_1request_1invoice
+  (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Offer_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Offer_1hash
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Offer_write
@@ -37583,6 +40583,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Amount_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Amount_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Amount_bitcoin
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Amount_1bitcoin
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Amount_currency
+ * Signature: ([BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Amount_1currency
+  (JNIEnv *, jclass, jbyteArray, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Quantity_free
@@ -37607,6 +40623,30 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Quantity_1clone_1ptr
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Quantity_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Quantity_bounded
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Quantity_1bounded
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Quantity_unbounded
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Quantity_1unbounded
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Quantity_one
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Quantity_1one
+  (JNIEnv *, jclass);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Offer_from_str
@@ -37615,6 +40655,118 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Quantity_1clone
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Offer_1from_1str
   (JNIEnv *, jclass, jstring);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceWithExplicitSigningPubkeyBuilder_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceWithDerivedSigningPubkeyBuilder_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceWithExplicitSigningPubkeyBuilder_build
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1build
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry
+ * Signature: (JI)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1relative_1expiry
+  (JNIEnv *, jclass, jlong, jint);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v0_1p2wsh
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v0_1p2wpkh
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1fallback_1v1_1p2tr_1tweaked
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithExplicitSigningPubkeyBuilder_1allow_1mpp
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1build_1and_1sign
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry
+ * Signature: (JI)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1relative_1expiry
+  (JNIEnv *, jclass, jlong, jint);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v0_1p2wsh
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v0_1p2wpkh
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1fallback_1v1_1p2tr_1tweaked
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceWithDerivedSigningPubkeyBuilder_1allow_1mpp
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UnsignedBolt12Invoice_free
@@ -37623,6 +40775,30 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Offer_1from_1str
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1free
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UnsignedBolt12Invoice_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UnsignedBolt12Invoice_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedBolt12Invoice_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SignBolt12InvoiceFn_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignBolt12InvoiceFn_1free
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UnsignedBolt12Invoice_tagged_hash
@@ -38031,6 +41207,14 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1signable_
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1verify
   (JNIEnv *, jclass, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt12Invoice_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12Invoice_1hash
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UnsignedBolt12Invoice_write
@@ -38359,6 +41543,102 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InvoiceError_1write
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceError_1read
   (JNIEnv *, jclass, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestWithExplicitPayerIdBuilder_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestWithDerivedPayerIdBuilder_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestWithExplicitPayerIdBuilder_build
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1build
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestWithExplicitPayerIdBuilder_chain
+ * Signature: (JLorg/ldk/enums/Network;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1chain
+  (JNIEnv *, jclass, jlong, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestWithExplicitPayerIdBuilder_amount_msats
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1amount_1msats
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestWithExplicitPayerIdBuilder_quantity
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1quantity
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestWithExplicitPayerIdBuilder_payer_note
+ * Signature: (JLjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithExplicitPayerIdBuilder_1payer_1note
+  (JNIEnv *, jclass, jlong, jstring);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1build_1and_1sign
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestWithDerivedPayerIdBuilder_chain
+ * Signature: (JLorg/ldk/enums/Network;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1chain
+  (JNIEnv *, jclass, jlong, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestWithDerivedPayerIdBuilder_amount_msats
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1amount_1msats
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestWithDerivedPayerIdBuilder_quantity
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1quantity
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestWithDerivedPayerIdBuilder_payer_note
+ * Signature: (JLjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestWithDerivedPayerIdBuilder_1payer_1note
+  (JNIEnv *, jclass, jlong, jstring);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UnsignedInvoiceRequest_free
@@ -38367,6 +41647,30 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceError_1read
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1free
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UnsignedInvoiceRequest_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UnsignedInvoiceRequest_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SignInvoiceRequestFn_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignInvoiceRequestFn_1free
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UnsignedInvoiceRequest_tagged_hash
@@ -38407,6 +41711,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1clone
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1free
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    VerifiedInvoiceRequest_get_offer_id
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1get_1offer_1id
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    VerifiedInvoiceRequest_set_offer_id
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1set_1offer_1id
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    VerifiedInvoiceRequest_get_keys
@@ -38713,11 +42033,19 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1payer_1note
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InvoiceRequest_signature
- * Signature: (J)[B
+ * Method:    InvoiceRequest_respond_with
+ * Signature: (J[J[B)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1signature
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1respond_1with
+  (JNIEnv *, jclass, jlong, jlongArray, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequest_respond_with_no_std
+ * Signature: (J[J[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1respond_1with_1no_1std
+  (JNIEnv *, jclass, jlong, jlongArray, jbyteArray, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -38727,6 +42055,14 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1signatur
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1verify
   (JNIEnv *, jclass, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequest_signature
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1signature
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    VerifiedInvoiceRequest_chains
@@ -38863,6 +42199,38 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1payer_1note
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    VerifiedInvoiceRequest_respond_with
+ * Signature: (J[J[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1with
+  (JNIEnv *, jclass, jlong, jlongArray, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    VerifiedInvoiceRequest_respond_with_no_std
+ * Signature: (J[J[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1with_1no_1std
+  (JNIEnv *, jclass, jlong, jlongArray, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    VerifiedInvoiceRequest_respond_using_derived_keys
+ * Signature: (J[J[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1using_1derived_1keys
+  (JNIEnv *, jclass, jlong, jlongArray, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    VerifiedInvoiceRequest_respond_using_derived_keys_no_std
+ * Signature: (J[J[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_VerifiedInvoiceRequest_1respond_1using_1derived_1keys_1no_1std
+  (JNIEnv *, jclass, jlong, jlongArray, jbyteArray, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UnsignedInvoiceRequest_write
@@ -38879,6 +42247,110 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedInvoiceRequest_1
 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequest_1write
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestFields_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestFields_get_payer_id
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1payer_1id
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestFields_set_payer_id
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1payer_1id
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestFields_get_quantity
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1quantity
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestFields_set_quantity
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1quantity
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestFields_get_payer_note_truncated
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1get_1payer_1note_1truncated
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestFields_set_payer_note_truncated
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1set_1payer_1note_1truncated
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestFields_new
+ * Signature: ([BJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1new
+  (JNIEnv *, jclass, jbyteArray, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestFields_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestFields_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestFields_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestFields_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1write
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InvoiceRequestFields_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InvoiceRequestFields_1read
+  (JNIEnv *, jclass, jbyteArray);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TaggedHash_free
@@ -38927,6 +42399,46 @@ JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_TaggedHash_1tag
 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_TaggedHash_1merkle_1root
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SignError_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignError_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SignError_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SignError_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SignError_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SignError_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SignError_signing
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SignError_1signing
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SignError_verification
+ * Signature: (Lorg/ldk/enums/Secp256k1Error;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SignError_1verification
+  (JNIEnv *, jclass, jobject);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Bolt12ParseError_free
@@ -39143,6 +42655,14 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1duplic
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1missing_1paths
   (JNIEnv *, jclass);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt12SemanticError_unexpected_paths
+ * Signature: ()Lorg/ldk/enums/Bolt12SemanticError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1unexpected_1paths
+  (JNIEnv *, jclass);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Bolt12SemanticError_invalid_pay_info
@@ -39175,6 +42695,110 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1missin
 JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Bolt12SemanticError_1missing_1signature
   (JNIEnv *, jclass);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RefundMaybeWithDerivedMetadataBuilder_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RefundMaybeWithDerivedMetadataBuilder_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RefundMaybeWithDerivedMetadataBuilder_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RefundMaybeWithDerivedMetadataBuilder_new
+ * Signature: ([B[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1new
+  (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id
+ * Signature: ([BJJJ[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1deriving_1payer_1id
+  (JNIEnv *, jclass, jbyteArray, jlong, jlong, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RefundMaybeWithDerivedMetadataBuilder_description
+ * Signature: (JLjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1description
+  (JNIEnv *, jclass, jlong, jstring);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RefundMaybeWithDerivedMetadataBuilder_absolute_expiry
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1absolute_1expiry
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RefundMaybeWithDerivedMetadataBuilder_issuer
+ * Signature: (JLjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1issuer
+  (JNIEnv *, jclass, jlong, jstring);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RefundMaybeWithDerivedMetadataBuilder_path
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1path
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RefundMaybeWithDerivedMetadataBuilder_chain
+ * Signature: (JLorg/ldk/enums/Network;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1chain
+  (JNIEnv *, jclass, jlong, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RefundMaybeWithDerivedMetadataBuilder_quantity
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1quantity
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RefundMaybeWithDerivedMetadataBuilder_payer_note
+ * Signature: (JLjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1payer_1note
+  (JNIEnv *, jclass, jlong, jstring);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RefundMaybeWithDerivedMetadataBuilder_build
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RefundMaybeWithDerivedMetadataBuilder_1build
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Refund_free
@@ -39303,6 +42927,14 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Refund_1payer_1id
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Refund_1payer_1note
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Refund_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Refund_1hash
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Refund_write
@@ -39471,6 +43103,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeId_1clone
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeId_1from_1pubkey
   (JNIEnv *, jclass, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeId_from_slice
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeId_1from_1slice
+  (JNIEnv *, jclass, jbyteArray);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    NodeId_as_slice
@@ -40055,6 +43695,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1channel
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1effective_1capacity
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DirectedChannelInfo_source
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1source
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DirectedChannelInfo_target
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectedChannelInfo_1target
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    EffectiveCapacity_free
@@ -40527,6 +44183,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1clone
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeInfo_1eq
   (JNIEnv *, jclass, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeInfo_is_tor_only
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NodeInfo_1is_1tor_1only
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    NodeInfo_write
@@ -43047,13 +46711,29 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescripto
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1channel_1value_1satoshis
   (JNIEnv *, jclass, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DelayedPaymentOutputDescriptor_get_channel_transaction_parameters
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1channel_1transaction_1parameters
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DelayedPaymentOutputDescriptor_set_channel_transaction_parameters
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1channel_1transaction_1parameters
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    DelayedPaymentOutputDescriptor_new
- * Signature: (J[BSJJ[BJ)J
+ * Signature: (J[BSJJ[BJJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1new
-  (JNIEnv *, jclass, jlong, jbyteArray, jshort, jlong, jlong, jbyteArray, jlong);
+  (JNIEnv *, jclass, jlong, jbyteArray, jshort, jlong, jlong, jbyteArray, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -43479,6 +47159,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1get_1channel_
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1set_1channel_1derivation_1parameters
   (JNIEnv *, jclass, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    HTLCDescriptor_get_commitment_txid
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1get_1commitment_1txid
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    HTLCDescriptor_set_commitment_txid
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1set_1commitment_1txid
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    HTLCDescriptor_get_per_commitment_number
@@ -43575,6 +47271,14 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1get_1cou
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1set_1counterparty_1sig
   (JNIEnv *, jclass, jlong, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    HTLCDescriptor_new
+ * Signature: (J[BJ[BIJJ[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCDescriptor_1new
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jbyteArray, jint, jlong, jlong, jbyteArray);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    HTLCDescriptor_clone_ptr
@@ -43719,6 +47423,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EntropySource_1free
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeSigner_1free
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutputSpender_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutputSpender_1free
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    SignerProvider_free
@@ -43727,6 +47439,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeSigner_1free
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SignerProvider_1free
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChangeDestinationSource_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChangeDestinationSource_1free
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    InMemorySigner_free
@@ -44015,14 +47735,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1derive_1channel_
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1sign_1spendable_1outputs_1psbt
   (JNIEnv *, jclass, jlong, jlongArray, jbyteArray);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    KeysManager_spend_spendable_outputs
- * Signature: (J[J[J[BIJ)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1spend_1spendable_1outputs
-  (JNIEnv *, jclass, jlong, jlongArray, jlongArray, jbyteArray, jint, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    KeysManager_as_EntropySource
@@ -44039,6 +47751,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1EntropySourc
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1NodeSigner
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    KeysManager_as_OutputSpender
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1OutputSpender
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    KeysManager_as_SignerProvider
@@ -44071,6 +47791,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1Entro
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1NodeSigner
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PhantomKeysManager_as_OutputSpender
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1OutputSpender
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    PhantomKeysManager_as_SignerProvider
@@ -44087,14 +47815,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1as_1Signe
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1new
   (JNIEnv *, jclass, jbyteArray, jlong, jint, jbyteArray);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    PhantomKeysManager_spend_spendable_outputs
- * Signature: (J[J[J[BIJ)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1spend_1spendable_1outputs
-  (JNIEnv *, jclass, jlong, jlongArray, jlongArray, jbyteArray, jint, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    PhantomKeysManager_derive_channel_keys
@@ -44119,6 +47839,30 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1get_
 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_PhantomKeysManager_1get_1phantom_1node_1secret_1key
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RandomBytes_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RandomBytes_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RandomBytes_new
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RandomBytes_1new
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RandomBytes_as_EntropySource
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RandomBytes_1as_1EntropySource
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    EcdsaChannelSigner_free
@@ -44319,6 +48063,30 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Destination_1node
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Destination_1blinded_1path
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Destination_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Destination_1hash
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Destination_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Destination_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Destination_resolve
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Destination_1resolve
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    SendSuccess_free
@@ -44359,6 +48127,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendSuccess_1buffered
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendSuccess_1buffered_1awaiting_1connection
   (JNIEnv *, jclass, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SendSuccess_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendSuccess_1hash
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    SendSuccess_eq
@@ -44455,6 +48231,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendError_1buffer_1full
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendError_1get_1node_1id_1failed
   (JNIEnv *, jclass);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SendError_unresolved_introduction_node
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendError_1unresolved_1introduction_1node
+  (JNIEnv *, jclass);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    SendError_blinded_path_advance_failed
@@ -44463,6 +48247,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendError_1get_1node_1id_1fai
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendError_1blinded_1path_1advance_1failed
   (JNIEnv *, jclass);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SendError_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SendError_1hash
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    SendError_eq
@@ -44506,10 +48298,10 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1clone
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    PeeledOnion_forward
- * Signature: ([BJ)J
+ * Signature: (JJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1forward
-  (JNIEnv *, jclass, jbyteArray, jlong);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -44519,13 +48311,21 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1forward
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeeledOnion_1receive
   (JNIEnv *, jclass, jlong, jbyteArray, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    create_onion_message_resolving_destination
+ * Signature: (JJJJJJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_create_1onion_1message_1resolving_1destination
+  (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    create_onion_message
- * Signature: (JJJJJ)J
+ * Signature: (JJJJJJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_create_1onion_1message
-  (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong);
+  (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -44538,10 +48338,10 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_peel_1onion_1message
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    OnionMessenger_new
- * Signature: (JJJJJJ)J
+ * Signature: (JJJJJJJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OnionMessenger_1new
-  (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jlong);
+  (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -44847,6 +48647,62 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OnionMessageContents_1clone
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OnionMessageContents_1free
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NextMessageHop_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NextMessageHop_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NextMessageHop_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NextMessageHop_node_id
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1node_1id
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NextMessageHop_short_channel_id
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1short_1channel_1id
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NextMessageHop_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1hash
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NextMessageHop_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_NextMessageHop_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    BlindedPath_free
@@ -44857,19 +48713,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1free
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    BlindedPath_get_introduction_node_id
- * Signature: (J)[B
+ * Method:    BlindedPath_get_introduction_node
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1introduction_1node_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlindedPath_1get_1introduction_1node
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    BlindedPath_set_introduction_node_id
- * Signature: (J[B)V
+ * Method:    BlindedPath_set_introduction_node
+ * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1introduction_1node_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1introduction_1node
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -44906,10 +48762,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlindedPath_1set_1blinded_1hop
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    BlindedPath_new
- * Signature: ([B[B[J)J
+ * Signature: (J[B[J)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new
-  (JNIEnv *, jclass, jbyteArray, jbyteArray, jlongArray);
+  (JNIEnv *, jclass, jlong, jbyteArray, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -44943,6 +48799,134 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlindedPath_1hash
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_BlindedPath_1eq
   (JNIEnv *, jclass, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    IntroductionNode_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    IntroductionNode_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    IntroductionNode_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    IntroductionNode_node_id
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1node_1id
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    IntroductionNode_directed_short_channel_id
+ * Signature: (Lorg/ldk/enums/Direction;J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1directed_1short_1channel_1id
+  (JNIEnv *, jclass, jobject, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    IntroductionNode_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1hash
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    IntroductionNode_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_IntroductionNode_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Direction_clone
+ * Signature: (J)Lorg/ldk/enums/Direction;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Direction_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Direction_node_one
+ * Signature: ()Lorg/ldk/enums/Direction;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Direction_1node_1one
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Direction_node_two
+ * Signature: ()Lorg/ldk/enums/Direction;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_Direction_1node_1two
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Direction_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Direction_1hash
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Direction_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Direction_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeIdLookUp_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeIdLookUp_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    EmptyNodeIdLookUp_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    EmptyNodeIdLookUp_new
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1new
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    EmptyNodeIdLookUp_as_NodeIdLookUp
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_EmptyNodeIdLookUp_1as_1NodeIdLookUp
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    BlindedHop_free
@@ -45042,18 +49026,26 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1messag
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    BlindedPath_one_hop_for_payment
- * Signature: ([BJJ)J
+ * Signature: ([BJSJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlindedPath_1one_1hop_1for_1payment
-  (JNIEnv *, jclass, jbyteArray, jlong, jlong);
+  (JNIEnv *, jclass, jbyteArray, jlong, jshort, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    BlindedPath_new_for_payment
- * Signature: ([J[BJJJ)J
+ * Signature: ([J[BJJSJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlindedPath_1new_1for_1payment
-  (JNIEnv *, jclass, jlongArray, jbyteArray, jlong, jlong, jlong);
+  (JNIEnv *, jclass, jlongArray, jbyteArray, jlong, jlong, jshort, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    BlindedPath_public_introduction_node_id
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlindedPath_1public_1introduction_1node_1id
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -45303,13 +49295,29 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1get_1payment_1co
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1set_1payment_1constraints
   (JNIEnv *, jclass, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ReceiveTlvs_get_payment_context
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1get_1payment_1context
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ReceiveTlvs_set_payment_context
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1set_1payment_1context
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ReceiveTlvs_new
- * Signature: ([BJ)J
+ * Signature: ([BJJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReceiveTlvs_1new
-  (JNIEnv *, jclass, jbyteArray, jlong);
+  (JNIEnv *, jclass, jbyteArray, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -45471,6 +49479,206 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentConstraints_1clone_1pt
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentConstraints_1clone
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PaymentContext_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentContext_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PaymentContext_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentContext_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PaymentContext_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentContext_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PaymentContext_unknown
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentContext_1unknown
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PaymentContext_bolt12_offer
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentContext_1bolt12_1offer
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PaymentContext_bolt12_refund
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentContext_1bolt12_1refund
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PaymentContext_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PaymentContext_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UnknownPaymentContext_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UnknownPaymentContext_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UnknownPaymentContext_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UnknownPaymentContext_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt12OfferContext_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt12OfferContext_get_offer_id
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1get_1offer_1id
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt12OfferContext_set_offer_id
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1set_1offer_1id
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt12OfferContext_get_invoice_request
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1get_1invoice_1request
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt12OfferContext_set_invoice_request
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1set_1invoice_1request
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt12OfferContext_new
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1new
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt12OfferContext_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt12OfferContext_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt12OfferContext_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt12RefundContext_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt12RefundContext_new
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1new
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt12RefundContext_clone_ptr
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1clone_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt12RefundContext_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt12RefundContext_eq
+ * Signature: (JJ)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1eq
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ForwardTlvs_write
@@ -45519,6 +49727,70 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_PaymentConstraints_1writ
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentConstraints_1read
   (JNIEnv *, jclass, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PaymentContext_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_PaymentContext_1write
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PaymentContext_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentContext_1read
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UnknownPaymentContext_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1write
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UnknownPaymentContext_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnknownPaymentContext_1read
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt12OfferContext_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1write
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt12OfferContext_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12OfferContext_1read
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt12RefundContext_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1write
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt12RefundContext_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt12RefundContext_1read
+  (JNIEnv *, jclass, jbyteArray);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    PaymentPurpose_free
@@ -45545,12 +49817,28 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1clone
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    PaymentPurpose_invoice_payment
+ * Method:    PaymentPurpose_bolt11_invoice_payment
  * Signature: (J[B)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1invoice_1payment
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt11_1invoice_1payment
   (JNIEnv *, jclass, jlong, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PaymentPurpose_bolt12_offer_payment
+ * Signature: (J[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt12_1offer_1payment
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PaymentPurpose_bolt12_refund_payment
+ * Signature: (J[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentPurpose_1bolt12_1refund_1payment
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    PaymentPurpose_spontaneous_payment
@@ -45602,18 +49890,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ClaimedHTLC_get_channel_id
- * Signature: (J)[B
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1channel_1id
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1get_1channel_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ClaimedHTLC_set_channel_id
- * Signature: (J[B)V
+ * Signature: (JJ)V
  */
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1set_1channel_1id
-  (JNIEnv *, jclass, jlong, jbyteArray);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -45682,10 +49970,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1set_1counterparty
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ClaimedHTLC_new
- * Signature: ([B[BIJJ)J
+ * Signature: (J[BIJJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClaimedHTLC_1new
-  (JNIEnv *, jclass, jbyteArray, jbyteArray, jint, jlong, jlong);
+  (JNIEnv *, jclass, jlong, jbyteArray, jint, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -45833,10 +50121,26 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1holder_1force_
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ClosureReason_cooperative_closure
+ * Method:    ClosureReason_legacy_cooperative_closure
  * Signature: ()J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1cooperative_1closure
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1legacy_1cooperative_1closure
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ClosureReason_counterparty_initiated_cooperative_closure
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1counterparty_1initiated_1cooperative_1closure
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ClosureReason_locally_initiated_cooperative_closure
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1locally_1initiated_1cooperative_1closure
   (JNIEnv *, jclass);
 
 /*
@@ -45895,6 +50199,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1counterparty_1
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1funding_1batch_1closure
   (JNIEnv *, jclass);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ClosureReason_htlcs_timed_out
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosureReason_1htlcs_1timed_1out
+  (JNIEnv *, jclass);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ClosureReason_eq
@@ -45946,10 +50258,10 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1clone
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    HTLCDestination_next_hop_channel
- * Signature: ([B[B)J
+ * Signature: ([BJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1next_1hop_1channel
-  (JNIEnv *, jclass, jbyteArray, jbyteArray);
+  (JNIEnv *, jclass, jbyteArray, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -45967,6 +50279,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1unknown_1nex
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1invalid_1forward
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    HTLCDestination_invalid_onion
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCDestination_1invalid_1onion
+  (JNIEnv *, jclass);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    HTLCDestination_failed_payment
@@ -46106,10 +50426,10 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1clone
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Event_funding_generation_ready
- * Signature: ([B[BJ[B[B)J
+ * Signature: (J[BJ[B[B)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1funding_1generation_1ready
-  (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong, jbyteArray, jbyteArray);
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jbyteArray, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -46218,58 +50538,58 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1spendable_1outputs
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Event_payment_forwarded
- * Signature: (JJJZJ)J
+ * Signature: (JJJJJJZJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1payment_1forwarded
-  (JNIEnv *, jclass, jlong, jlong, jlong, jboolean, jlong);
+  (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jboolean, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Event_channel_pending
- * Signature: ([B[BJ[BJ)J
+ * Signature: (J[BJ[BJJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1channel_1pending
-  (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong, jbyteArray, jlong);
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jbyteArray, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Event_channel_ready
- * Signature: ([B[B[BJ)J
+ * Signature: (J[B[BJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1channel_1ready
-  (JNIEnv *, jclass, jbyteArray, jbyteArray, jbyteArray, jlong);
+  (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Event_channel_closed
- * Signature: ([B[BJ[BJJ)J
+ * Signature: (J[BJ[BJJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1channel_1closed
-  (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong, jbyteArray, jlong, jlong);
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jbyteArray, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Event_discard_funding
- * Signature: ([B[B)J
+ * Signature: (J[B)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1discard_1funding
-  (JNIEnv *, jclass, jbyteArray, jbyteArray);
+  (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Event_open_channel_request
- * Signature: ([B[BJJJ)J
+ * Signature: (J[BJJJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1open_1channel_1request
-  (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong, jlong, jlong);
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Event_htlchandling_failed
- * Signature: ([BJ)J
+ * Signature: (JJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Event_1htlchandling_1failed
-  (JNIEnv *, jclass, jbyteArray, jlong);
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -46778,18 +51098,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1clone
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    BumpTransactionEvent_channel_close
- * Signature: ([BI[BJJ[J)J
+ * Signature: (J[B[BI[BJJ[J)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1channel_1close
-  (JNIEnv *, jclass, jbyteArray, jint, jbyteArray, jlong, jlong, jlongArray);
+  (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jint, jbyteArray, jlong, jlong, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    BumpTransactionEvent_htlcresolution
- * Signature: ([BI[JI)J
+ * Signature: (J[B[BI[JI)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BumpTransactionEvent_1htlcresolution
-  (JNIEnv *, jclass, jbyteArray, jint, jlongArray, jint);
+  (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray, jint, jlongArray, jint);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -48503,6 +52823,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1features
 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1recover_1payee_1pub_1key
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Bolt11Invoice_get_payee_pub_key
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Bolt11Invoice_1get_1payee_1pub_1key
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Bolt11Invoice_expires_at
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKAmount.h b/src/main/jni/org_ldk_impl_bindings_LDKAmount.h
new file mode 100644 (file)
index 0000000..fa3c2cd
--- /dev/null
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKAmount */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKAmount
+#define _Included_org_ldk_impl_bindings_LDKAmount
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKAmount
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKAmount_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKCOption_AmountZ.h b/src/main/jni/org_ldk_impl_bindings_LDKCOption_AmountZ.h
new file mode 100644 (file)
index 0000000..93b4363
--- /dev/null
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKCOption_AmountZ */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKCOption_AmountZ
+#define _Included_org_ldk_impl_bindings_LDKCOption_AmountZ
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKCOption_AmountZ
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1AmountZ_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKCOption_ECDSASignatureZ.h b/src/main/jni/org_ldk_impl_bindings_LDKCOption_ECDSASignatureZ.h
new file mode 100644 (file)
index 0000000..c3978c8
--- /dev/null
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKCOption_ECDSASignatureZ */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKCOption_ECDSASignatureZ
+#define _Included_org_ldk_impl_bindings_LDKCOption_ECDSASignatureZ
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKCOption_ECDSASignatureZ
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1ECDSASignatureZ_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKCOption_PaymentContextZ.h b/src/main/jni/org_ldk_impl_bindings_LDKCOption_PaymentContextZ.h
new file mode 100644 (file)
index 0000000..8b99923
--- /dev/null
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKCOption_PaymentContextZ */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKCOption_PaymentContextZ
+#define _Included_org_ldk_impl_bindings_LDKCOption_PaymentContextZ
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKCOption_PaymentContextZ
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1PaymentContextZ_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKCOption_QuantityZ.h b/src/main/jni/org_ldk_impl_bindings_LDKCOption_QuantityZ.h
new file mode 100644 (file)
index 0000000..c4f5eb7
--- /dev/null
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKCOption_QuantityZ */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKCOption_QuantityZ
+#define _Included_org_ldk_impl_bindings_LDKCOption_QuantityZ
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKCOption_QuantityZ
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKCOption_1QuantityZ_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKIntroductionNode.h b/src/main/jni/org_ldk_impl_bindings_LDKIntroductionNode.h
new file mode 100644 (file)
index 0000000..fa0df7e
--- /dev/null
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKIntroductionNode */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKIntroductionNode
+#define _Included_org_ldk_impl_bindings_LDKIntroductionNode
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKIntroductionNode
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKIntroductionNode_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKNextMessageHop.h b/src/main/jni/org_ldk_impl_bindings_LDKNextMessageHop.h
new file mode 100644 (file)
index 0000000..4f0659a
--- /dev/null
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKNextMessageHop */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKNextMessageHop
+#define _Included_org_ldk_impl_bindings_LDKNextMessageHop
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKNextMessageHop
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKNextMessageHop_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKOutputSpendStatus.h b/src/main/jni/org_ldk_impl_bindings_LDKOutputSpendStatus.h
new file mode 100644 (file)
index 0000000..ad04e20
--- /dev/null
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKOutputSpendStatus */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKOutputSpendStatus
+#define _Included_org_ldk_impl_bindings_LDKOutputSpendStatus
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKOutputSpendStatus
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKOutputSpendStatus_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKPaymentContext.h b/src/main/jni/org_ldk_impl_bindings_LDKPaymentContext.h
new file mode 100644 (file)
index 0000000..3c2ad12
--- /dev/null
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKPaymentContext */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKPaymentContext
+#define _Included_org_ldk_impl_bindings_LDKPaymentContext
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKPaymentContext
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPaymentContext_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKQuantity.h b/src/main/jni/org_ldk_impl_bindings_LDKQuantity.h
new file mode 100644 (file)
index 0000000..441a761
--- /dev/null
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKQuantity */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKQuantity
+#define _Included_org_ldk_impl_bindings_LDKQuantity
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKQuantity
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKQuantity_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKSignError.h b/src/main/jni/org_ldk_impl_bindings_LDKSignError.h
new file mode 100644 (file)
index 0000000..49c0a93
--- /dev/null
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKSignError */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKSignError
+#define _Included_org_ldk_impl_bindings_LDKSignError
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKSignError
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSignError_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKSpendingDelay.h b/src/main/jni/org_ldk_impl_bindings_LDKSpendingDelay.h
new file mode 100644 (file)
index 0000000..048016d
--- /dev/null
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKSpendingDelay */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKSpendingDelay
+#define _Included_org_ldk_impl_bindings_LDKSpendingDelay
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKSpendingDelay
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSpendingDelay_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif